summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlbinlog.test
diff options
context:
space:
mode:
authorunknown <aelkin@mysql.com>2006-02-10 15:12:27 +0200
committerunknown <aelkin@mysql.com>2006-02-10 15:12:27 +0200
commita68f171585da08a855df1958caab3264a4b74006 (patch)
tree2acf7c5461c6438f1824325abedf22ed98152c69 /mysql-test/t/mysqlbinlog.test
parent1a27a433fc6e3eb50b995cd52c11edcb2364d362 (diff)
downloadmariadb-git-a68f171585da08a855df1958caab3264a4b74006.tar.gz
BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1. client/mysql.cc: BUG#16217 forced to introduce a separate mysql client command. Feature is backported from 5.0, precisely ChangeSet 1.2034 06/02/09 16:23:09 aelkin@mysql.com (under second review at the moment) mysql-test/r/mysqlbinlog.result: changed in 5.0 mysql-test/t/mysqlbinlog.test: backported from 5.0. The last part of the test to mimic bug#16217 sql/log_event.cc: Inserting exclaiming comment command for mysql client made differently than in 5.0. Parsing still is cheap enough not to think to modify server code instead.
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r--mysql-test/t/mysqlbinlog.test19
1 files changed, 18 insertions, 1 deletions
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