pike.git
/
lib
/
modules
/
Sql.pmod
/
mysql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/mysql.pike:1:
/*
-
* $Id: mysql.pike,v 1.
22
2006/08/15 14:
39
:
23
grubba Exp $
+
* $Id: mysql.pike,v 1.
23
2006/08/15 14:
51
:
28
grubba Exp $
* * Glue for the Mysql-module */ //! Implements the glue needed to access the Mysql-module from the generic //! SQL module. #pike __REAL_VERSION__ #if constant(Mysql.mysql)
pike.git/lib/modules/Sql.pmod/mysql.pike:570:
else { /* utf8_mode & UTF8_UNICODE_ENCODE_MODE */ if (_can_send_as_latin1 (query)) new_send_charset = "latin1"; else { query = utf8_encode_query (query, string_to_utf8); new_send_charset = "utf8"; } } if (new_send_charset != send_charset) {
-
if (
mixed err
=
-
::big_query
("SET character_set_client=" + new_send_charset)) {
-
if (new_send_charset = "utf8")
+
mixed err
;
+
if
(err
=
::big_query("SET character_set_client=" + new_send_charset)) {
+
if (new_send_charset =
=
"utf8")
predef::error ("The query is a wide string " "and the MySQL server doesn't support UTF-8: %s\n", describe_error (err));
-
else
-
throw
err;
+
throw
(
err
)
;
} send_charset = new_send_charset; } } int|object res = ::big_query(query); if (restore_charset) { if (send_charset && (<"latin1", "utf8">)[charset]) send_charset = charset;