1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-6805 one can set character_set_client to utf32

use the same restriction for character_set_client on the command line
and from SQL.

Also: remove strange hack from thd_init_client_charset() that contradicted
the manual (collation_connection and character_set_result were not always set)
This commit is contained in:
Sergei Golubchik
2014-11-18 22:25:47 +01:00
parent a8bd285f7c
commit ea04a8cfda
11 changed files with 21 additions and 9 deletions

View File

@ -837,14 +837,10 @@ bool thd_init_client_charset(THD *thd, uint cs_number)
Use server character set and collation if
- opt_character_set_client_handshake is not set
- client has not specified a character set
- client character set is the same as the servers
- client character set doesn't exists in server
*/
if (!opt_character_set_client_handshake ||
!(cs= get_charset(cs_number, MYF(0))) ||
!my_strcasecmp(&my_charset_latin1,
global_system_variables.character_set_client->name,
cs->name))
!(cs= get_charset(cs_number, MYF(0))))
{
thd->variables.character_set_client=
global_system_variables.character_set_client;