bug#9948 changed client-charset behavior in 4.1.x libmysql, which issue BC prob
sql_parse.cc: mysqld.cc: Added --skip-client-character-set-handshake. When this option is activated, client side character set (which is sent in handshake) is ignored, and server side default-character-set value is used for character_set_client and character_set_results, thus reprodicing 4.0 behaviour.
This commit is contained in:
parent
b5c01d7971
commit
f2ea1ac8b8
@ -271,6 +271,7 @@ arg_cmp_func Arg_comparator::comparator_matrix[4][2] =
|
|||||||
bool opt_log, opt_update_log, opt_bin_log, opt_slow_log;
|
bool opt_log, opt_update_log, opt_bin_log, opt_slow_log;
|
||||||
bool opt_error_log= IF_WIN(1,0);
|
bool opt_error_log= IF_WIN(1,0);
|
||||||
bool opt_disable_networking=0, opt_skip_show_db=0;
|
bool opt_disable_networking=0, opt_skip_show_db=0;
|
||||||
|
bool opt_skip_character_set_client_handshake= 0;
|
||||||
bool lower_case_table_names_used= 0;
|
bool lower_case_table_names_used= 0;
|
||||||
bool server_id_supplied = 0;
|
bool server_id_supplied = 0;
|
||||||
bool opt_endinfo,using_udf_functions, locked_in_memory;
|
bool opt_endinfo,using_udf_functions, locked_in_memory;
|
||||||
@ -4216,6 +4217,7 @@ enum options_mysqld
|
|||||||
OPT_EXPIRE_LOGS_DAYS,
|
OPT_EXPIRE_LOGS_DAYS,
|
||||||
OPT_GROUP_CONCAT_MAX_LEN,
|
OPT_GROUP_CONCAT_MAX_LEN,
|
||||||
OPT_DEFAULT_COLLATION,
|
OPT_DEFAULT_COLLATION,
|
||||||
|
OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
|
||||||
OPT_INIT_CONNECT,
|
OPT_INIT_CONNECT,
|
||||||
OPT_INIT_SLAVE,
|
OPT_INIT_SLAVE,
|
||||||
OPT_SECURE_AUTH,
|
OPT_SECURE_AUTH,
|
||||||
@ -4753,6 +4755,11 @@ Can't be set to 1 if --log-slave-updates is used.",
|
|||||||
"Show user and password in SHOW SLAVE HOSTS on this master",
|
"Show user and password in SHOW SLAVE HOSTS on this master",
|
||||||
(gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0,
|
(gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"skip-character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
|
||||||
|
"Don't use client side character set value sent during handshake.",
|
||||||
|
(gptr*) &opt_skip_character_set_client_handshake,
|
||||||
|
(gptr*) &opt_skip_character_set_client_handshake,
|
||||||
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"skip-grant-tables", OPT_SKIP_GRANT,
|
{"skip-grant-tables", OPT_SKIP_GRANT,
|
||||||
"Start without grant tables. This gives all users FULL ACCESS to all tables!",
|
"Start without grant tables. This gives all users FULL ACCESS to all tables!",
|
||||||
(gptr*) &opt_noacl, (gptr*) &opt_noacl, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
(gptr*) &opt_noacl, (gptr*) &opt_noacl, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||||
|
@ -811,11 +811,13 @@ static int check_connection(THD *thd)
|
|||||||
DBUG_PRINT("info", ("client_character_set: %d", (uint) net->read_pos[8]));
|
DBUG_PRINT("info", ("client_character_set: %d", (uint) net->read_pos[8]));
|
||||||
/*
|
/*
|
||||||
Use server character set and collation if
|
Use server character set and collation if
|
||||||
|
- opt_skip_character_set_client_handshake is set
|
||||||
- client has not specified a character set
|
- client has not specified a character set
|
||||||
- client character set is the same as the servers
|
- client character set is the same as the servers
|
||||||
- client character set doesn't exists in server
|
- client character set doesn't exists in server
|
||||||
*/
|
*/
|
||||||
if (!(thd->variables.character_set_client=
|
if (opt_skip_character_set_client_handshake ||
|
||||||
|
!(thd->variables.character_set_client=
|
||||||
get_charset((uint) net->read_pos[8], MYF(0))) ||
|
get_charset((uint) net->read_pos[8], MYF(0))) ||
|
||||||
!my_strcasecmp(&my_charset_latin1,
|
!my_strcasecmp(&my_charset_latin1,
|
||||||
global_system_variables.character_set_client->name,
|
global_system_variables.character_set_client->name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user