From: Date: August 9 2006 8:33pm Subject: bk commit into 5.0 tree (iggy:1.2249) BUG#11972 List-Archive: http://lists.mysql.com/commits/10219 X-Bug: 11972 Message-Id: <20060809183321.69E8017748E@ignatz42.dyndns.org> Below is the list of changes that have just been committed into a local 5.0 repository of iggy. When iggy 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@stripped, 2006-08-09 14:33:15-04:00, iggy@stripped +3 -0 Bug #11972: client uses wrong character set after reconnect. The mysql client uses the default character set on reconnect. The default character set is now controled by the client charset command while the client is running. The charset command now also issues a SET NAMES command to the server to make sure that the client's charset settings are in sync with the server's. client/mysql.cc@stripped, 2006-08-09 14:33:06-04:00, iggy@stripped +3 -0 Client charset command now changes the default character set and issues a SET NAMES command to the server. mysql-test/r/mysql.result@stripped, 2006-08-09 14:33:06-04:00, iggy@stripped +7 -7 Corrected results for new behaviour. mysql-test/t/mysql.test@stripped, 2006-08-09 14:33:06-04:00, iggy@stripped +2 -2 Removed redundant commands from test. # 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: iggy # Host: rolltop.ignatz42.dyndns.org # Root: /mnt/storeage/mysql-5.0-maint_bug11972 --- 1.213/client/mysql.cc 2006-08-09 14:33:20 -04:00 +++ 1.214/client/mysql.cc 2006-08-09 14:33:20 -04:00 @@ -1939,6 +1939,9 @@ if (new_cs) { charset_info= new_cs; + mysql_set_character_set(&mysql, charset_info->csname); + default_charset= (char *)charset_info->csname; + default_charset_used= 1; put_info("Charset changed", INFO_INFO); } else put_info("Charset is not found", INFO_INFO); --- 1.13/mysql-test/r/mysql.result 2006-08-09 14:33:20 -04:00 +++ 1.14/mysql-test/r/mysql.result 2006-08-09 14:33:20 -04:00 @@ -59,16 +59,16 @@ test unlock tables; drop table t1; -ソ -ソ +ƒ\ +ƒ\ c_cp932 +ƒ\ +ƒ\ +ƒ\ ソ ソ -ソ -ソ -ソ -ソ -ソ +ƒ\ +ƒ\ +----------------------+------------+--------+ | concat('>',col1,'<') | col2 | col3 | +----------------------+------------+--------+ --- 1.13/mysql-test/t/mysql.test 2006-08-09 14:33:20 -04:00 +++ 1.14/mysql-test/t/mysql.test 2006-08-09 14:33:20 -04:00 @@ -52,8 +52,8 @@ --exec $MYSQL --default-character-set=cp932 test -e "charset utf8;" # its usage to switch internally in mysql to requested charset ---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; set @@session.character_set_client= cp932; select 'ƒ\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('ƒ\'); select * from t1; drop table t1;" ---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; set character_set_client= cp932; select 'ƒ\'" +--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ƒ\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('ƒ\'); select * from t1; drop table t1;" +--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select 'ƒ\'" --exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select 'ƒ\'" --exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select 'ƒ\'"