pike.git/lib/modules/Sql.pmod/mysql.pike:1:
/*
- * $Id: mysql.pike,v 1.40 2008/01/09 14:26:07 mast Exp $
+ * $Id: mysql.pike,v 1.41 2008/06/28 16:36:59 nilsson 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:26: Inside #if !constant (Mysql.mysql.HAVE_MYSQL_FIELD_CHARSETNR)
#if !constant (Mysql.mysql.HAVE_MYSQL_FIELD_CHARSETNR)
// Recognition constant to tell that the unicode decode mode would use
// the buggy MySQLBrokenUnicodeWrapper if it would be enabled through
// any of the undocumented methods.
constant unicode_decode_mode_is_broken = 1;
#endif
// Set to the above if the connection is requested to be in one of the
// unicode modes. latin1 unicode encode mode is enabled by default; it
// should be compatible with earlier pike versions.
- static int utf8_mode;
+ protected int utf8_mode;
// The charset, either "latin1" or "utf8", currently assigned to
// character_set_client when unicode encode mode is enabled. Zero when
// the connection charset has been set to something else than "latin1"
// or "unicode".
- static string send_charset;
+ protected string send_charset;
- static void update_unicode_encode_mode_from_charset (string charset)
+ protected void update_unicode_encode_mode_from_charset (string charset)
{
switch (charset) { // Lowercase assumed.
case "latin1":
utf8_mode |= LATIN1_UNICODE_ENCODE_MODE;
utf8_mode &= ~UTF8_UNICODE_ENCODE_MODE;
send_charset = "latin1";
CH_DEBUG ("Entering latin1 encode mode.\n");
break;
case "unicode":
utf8_mode |= UTF8_UNICODE_ENCODE_MODE;
pike.git/lib/modules/Sql.pmod/mysql.pike:796:
// "processlist", "reload", "returns", "row", "rows", "second", "shutdown",
// "soname", "sql_big_selects", "sql_big_tables", "sql_log_off",
// "sql_log_update", "sql_low_priority_updates", "sql_select_limit",
// "sql_small_result", "sql_warnings", "status", "straight_join", "string",
// "tables", "temporary", "text", "time", "timestamp", "tinytext",
// "trailing", "type", "use", "using", "varbinary", "variables", "with",
// "write", "year"
])[ lower_case(name) ];
}
- static void create(string|void host, string|void database,
+ protected void create(string|void host, string|void database,
string|void user, string|void _password,
mapping(string:string|int)|void options)
{
string password = _password;
_password = "CENSORED";
if (options) {
string charset = options->mysql_charset_name ?
lower_case (options->mysql_charset_name) : "latin1";
pike.git/lib/modules/Sql.pmod/mysql.pike:844:
} else {
::create(host||"", database||"", user||"", password||"");
update_unicode_encode_mode_from_charset ("latin1");
}
}
#else
constant this_program_does_not_exist=1;
#endif /* constant(Mysql.mysql) */
+