[Commits] Rev 4479: MDEV-6805 one can set character_set_client to utf32 in lp:~maria-captains/maria/10.0

Sergei Golubchik serg at mariadb.org
Thu Nov 13 16:50:04 EET 2014


At lp:~maria-captains/maria/10.0

------------------------------------------------------------
revno: 4479
revision-id: sergii at pisem.net-20141113145004-nn38o31jc0s8yso4
parent: sergii at pisem.net-20141113124042-dd4iqcwgcazjy9d2
committer: Sergei Golubchik <sergii at pisem.net>
branch nick: 10.0
timestamp: Thu 2014-11-13 15:50:04 +0100
message:
  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.
=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2014-10-09 08:30:11 +0000
+++ b/sql/mysqld.cc	2014-11-13 14:50:04 +0000
@@ -4268,7 +4268,15 @@ static int init_common_variables()
   global_system_variables.collation_database=	 default_charset_info;
   global_system_variables.collation_connection=  default_charset_info;
   global_system_variables.character_set_results= default_charset_info;
-  global_system_variables.character_set_client=  default_charset_info;
+  if (default_charset_info->mbminlen > 1)
+  {
+    global_system_variables.character_set_client=  &my_charset_latin1;
+    sql_print_warning("Cannot use %s as character_set_client, %s will be used instead",
+                      default_charset_info->csname,
+                      global_system_variables.character_set_client->csname);
+  }
+  else
+    global_system_variables.character_set_client=  default_charset_info;
 
   if (!(character_set_filesystem=
         get_charset_by_csname(character_set_filesystem_name,



More information about the commits mailing list