Below is the list of changes that have just been committed into a local
4.1 repository of elkin. When elkin 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.2462 06/04/25 22:16:19 aelkin@stripped +5 -0
BUG#14157: utf8 encoding in binlog without set character_set_client e.g DROP temporary
Binlog lacks encoding info about DROPped temporary table.
Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, that automatically, but not the client, who generates the query
the binlog should be updated on the server's encoding for the coming DROP.
sql/sql_base.cc
1.268 06/04/25 22:16:15 aelkin@stripped +3 -0
Idea of the fix is to switch temporary to system_charset_info when a temporary table
is DROPped for binlog. Since that is the server, automatically not the client, who generates the query
the binlog should be updated on server's encoding for the coming DROP.
mysql-test/t/rpl_temporary.test
1.16 06/04/25 22:16:15 aelkin@stripped +12 -0
Check slave digests binlog with DROP temporary tables created in koi8r.
mysql-test/t/mysqlbinlog.test
1.17 06/04/25 22:16:15 aelkin@stripped +10 -1
Check roll-forward recovery from binlog where there are DROP temporary tables created
in koi8r.
mysql-test/r/rpl_temporary.result
1.14 06/04/25 22:16:15 aelkin@stripped +4 -0
results changed
mysql-test/r/mysqlbinlog.result
1.11 06/04/25 22:16:15 aelkin@stripped +6 -1
results changed
# 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: aelkin
# Host: dsl-hkigw8-feb0de00-199.dhcp.inet.fi
# Root: /usr_rh9/home/elkin.rh9/MySQL/FIXES/4.1-bug14157-utf8_binlog
--- 1.267/sql/sql_base.cc 2006-04-23 19:42:21 +03:00
+++ 1.268/sql/sql_base.cc 2006-04-25 22:16:15 +03:00
@@ -615,7 +615,10 @@
rightfully causing the slave to stop.
*/
qinfo.error_code= 0;
+ CHARSET_INFO * client_charset_info= thd->variables.character_set_client;
+ thd->variables.character_set_client= system_charset_info;
mysql_bin_log.write(&qinfo);
+ thd->variables.character_set_client= client_charset_info;
}
else
{
--- 1.10/mysql-test/r/mysqlbinlog.result 2006-02-10 15:12:21 +02:00
+++ 1.11/mysql-test/r/mysqlbinlog.result 2006-04-25 22:16:15 +03:00
@@ -101,4 +101,9 @@
select HEX(f) from t4;
HEX(f)
835C
-drop table t1, t2, t03, t04, t3, t4;
+flush logs;
+select * from t5 /* must be (1),(1) */;
+a
+1
+1
+drop table t1, t2, t03, t04, t3, t4, t5;
--- 1.16/mysql-test/t/mysqlbinlog.test 2006-02-10 15:12:22 +02:00
+++ 1.17/mysql-test/t/mysqlbinlog.test 2006-04-25 22:16:15 +03:00
@@ -114,8 +114,17 @@
select HEX(f) from t04;
select HEX(f) from t4;
+#
+#14157: utf8 encoding in binlog without set character_set_client
+#
+flush logs;
+
+# resulted log is client charset insensitive (latin1 not koi8r) as it must be
+--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000006 | $MYSQL --default-character-set=latin1
+select * from t5 /* must be (1),(1) */;
# clean up
-drop table t1, t2, t03, t04, t3, t4;
+drop table t1, t2, t03, t04, t3, t4, t5;
# End of 4.1 tests
--- 1.13/mysql-test/r/rpl_temporary.result 2006-04-23 11:55:04 +03:00
+++ 1.14/mysql-test/r/rpl_temporary.result 2006-04-25 22:16:15 +03:00
@@ -103,3 +103,7 @@
f
1
drop table t1;
+select * from t1;
+a
+1
+drop table t1;
--- 1.15/mysql-test/t/rpl_temporary.test 2006-04-23 11:55:04 +03:00
+++ 1.16/mysql-test/t/rpl_temporary.test 2006-04-25 22:16:15 +03:00
@@ -156,4 +156,16 @@
connection master;
drop table t1;
+#
+#14157: utf8 encoding in binlog without set character_set_client
+#
+
+sync_slave_with_master;
+#connection slave;
+select * from t1;
+
+connection master;
+drop table t1;
+
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (aelkin:1.2462) BUG#14157 | Andrei Elkin | 25 Apr |