mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -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'<27>\');"
|
||||
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
|
||||
|
Reference in New Issue
Block a user