diff options
author | unknown <aelkin@mysql.com> | 2006-02-13 19:15:02 +0200 |
---|---|---|
committer | unknown <aelkin@mysql.com> | 2006-02-13 19:15:02 +0200 |
commit | 32d32b6eca1f03c9670414a6bbc9d0ad173372a1 (patch) | |
tree | 8b3df354828f8320328ef5997eedc2c3ea9c1bc5 /mysql-test | |
parent | 1c1e15762804b2f9013b71f69e50054913aae853 (diff) | |
parent | a68f171585da08a855df1958caab3264a4b74006 (diff) | |
download | mariadb-git-32d32b6eca1f03c9670414a6bbc9d0ad173372a1.tar.gz |
Merge mysql.com:/usr_rh9/home/elkin.rh9/MySQL/BARE/mysql-4.1
into mysql.com:/usr_rh9/home/elkin.rh9/MySQL/FIXES/mysql-4.1-bug16217
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysqlbinlog.result | 19 | ||||
-rw-r--r-- | mysql-test/t/mysqlbinlog.test | 19 |
2 files changed, 36 insertions, 2 deletions
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index e88ece6b361..adaf0dad56b 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -84,4 +84,21 @@ SET INSERT_ID=1; use test; SET TIMESTAMP=1000000000; insert into t1 values ("Alas"); -drop table t1, t2; +flush logs; +create table t3 (f text character set utf8); +create table t4 (f text character set cp932); +flush logs; +rename table t3 to t03, t4 to t04; +select HEX(f) from t03; +HEX(f) +E382BD +select HEX(f) from t3; +HEX(f) +E382BD +select HEX(f) from t04; +HEX(f) +835C +select HEX(f) from t4; +HEX(f) +835C +drop table t1, t2, t03, t04, t3, t4; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 0f9faa5c337..871886331f6 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -98,7 +98,24 @@ select "--- --position --" as ""; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --exec $MYSQL_BINLOG --short-form --local-load=$MYSQL_TEST_DIR/var/tmp/ --read-from-remote-server --position=27 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 + +# Bug#16217 (mysql client did not know how not switch its internal charset) +flush logs; +create table t3 (f text character set utf8); +create table t4 (f text character set cp932); +--exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')" +--exec $MYSQL --default-character-set=cp932 test -e "insert into t4 values(_cp932'ƒ\');" +flush logs; +rename table t3 to t03, t4 to t04; +--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000004 | $MYSQL --default-character-set=utf8 +# original and recovered data must be equal +select HEX(f) from t03; +select HEX(f) from t3; +select HEX(f) from t04; +select HEX(f) from t4; + + # clean up -drop table t1, t2; +drop table t1, t2, t03, t04, t3, t4; # End of 4.1 tests |