From: Date: March 20 2006 11:43am Subject: bk commit into 4.1 tree (bar:1.2472) BUG#18004 List-Archive: http://lists.mysql.com/commits/3971 X-Bug: 18004 Message-Id: <200603201043.k2KAh8vh053597@bar.intranet.mysql.r18.ru> Below is the list of changes that have just been committed into a local 4.1 repository of bar. When bar does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2472 06/03/20 14:43:02 bar@stripped +4 -0 Bug#18004 Connecting crashes server when default charset is UCS2 table.cc: Fixing to use system_charset_info instead of default_charset_info. Crash happened because the "ctype" array is empty in UCS2, and thus cannot be used with my_isspace(). The reason why UCS2 appeared in this context was because of of default_charset_info variable incorrectly substituted to my_isspace(). As functions check_db_name(), check_table_name() and check_column_name() always get values in utf8, system_charset_info must be used instead. ctype_ucs2_def.test, ctype_ucs2_def-master.opt, ctype_ucs2_def.result: new file sql/table.cc 1.133 06/03/20 14:36:41 bar@stripped +3 -3 Bug#18004 Connecting crashes server when default charset is UCS2 Use of default_charset_info was wrong. Functions check_db_name, check_table_name and check_column_name get values of system_charset_info character set (utf8). mysql-test/t/ctype_ucs2_def.test 1.1 06/03/20 14:36:28 bar@stripped +9 -0 mysql-test/t/ctype_ucs2_def-master.opt 1.1 06/03/20 14:36:28 bar@stripped +1 -0 mysql-test/r/ctype_ucs2_def.result 1.1 06/03/20 14:36:28 bar@stripped +6 -0 mysql-test/t/ctype_ucs2_def.test 1.0 06/03/20 14:36:28 bar@stripped +0 -0 BitKeeper file /usr/home/bar/mysql-4.1.b18004/mysql-test/t/ctype_ucs2_def.test mysql-test/t/ctype_ucs2_def-master.opt 1.0 06/03/20 14:36:28 bar@stripped +0 -0 BitKeeper file /usr/home/bar/mysql-4.1.b18004/mysql-test/t/ctype_ucs2_def-master.opt mysql-test/r/ctype_ucs2_def.result 1.0 06/03/20 14:36:28 bar@stripped +0 -0 BitKeeper file /usr/home/bar/mysql-4.1.b18004/mysql-test/r/ctype_ucs2_def.result # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: bar # Host: bar.intranet.mysql.r18.ru # Root: /usr/home/bar/mysql-4.1.b18004 --- 1.132/sql/table.cc 2005-11-25 14:25:25 +04:00 +++ 1.133/sql/table.cc 2006-03-20 14:36:41 +04:00 @@ -1423,7 +1423,7 @@ while (*name) { #if defined(USE_MB) && defined(USE_MB_IDENT) - last_char_is_space= my_isspace(default_charset_info, *name); + last_char_is_space= my_isspace(system_charset_info, *name); if (use_mb(system_charset_info)) { int len=my_ismbchar(system_charset_info, name, @@ -1469,7 +1469,7 @@ while (name != end) { #if defined(USE_MB) && defined(USE_MB_IDENT) - last_char_is_space= my_isspace(default_charset_info, *name); + last_char_is_space= my_isspace(system_charset_info, *name); if (use_mb(system_charset_info)) { int len=my_ismbchar(system_charset_info, name, end); @@ -1500,7 +1500,7 @@ while (*name) { #if defined(USE_MB) && defined(USE_MB_IDENT) - last_char_is_space= my_isspace(default_charset_info, *name); + last_char_is_space= my_isspace(system_charset_info, *name); if (use_mb(system_charset_info)) { int len=my_ismbchar(system_charset_info, name, --- New file --- +++ mysql-test/r/ctype_ucs2_def.result 06/03/20 14:36:28 show variables like "%character_set_ser%"; Variable_name Value character_set_server ucs2 DROP TABLE IF EXISTS t1; create table t1 (a int); drop table t1; --- New file --- +++ mysql-test/t/ctype_ucs2_def-master.opt 06/03/20 14:36:28 --default-character-set=ucs2 --default-collation=ucs2_unicode_ci --- New file --- +++ mysql-test/t/ctype_ucs2_def.test 06/03/20 14:36:28 # # Bug#18004 Connecting crashes server when default charset is UCS2 # show variables like "%character_set_ser%"; --disable_warnings DROP TABLE IF EXISTS t1; --enable_warnings create table t1 (a int); drop table t1;