diff options
author | unknown <aelkin@mysql.com> | 2006-05-09 23:01:31 +0300 |
---|---|---|
committer | unknown <aelkin@mysql.com> | 2006-05-09 23:01:31 +0300 |
commit | c23c38fa31ff9f7350c342a3fb8142e04b10e121 (patch) | |
tree | 61ba64452d42f5b52941e0cad96049ff2bed1302 /mysql-test/t/rpl_temporary.test | |
parent | f9216cdf8d40c0552382fd0788d03dc20db2d94c (diff) | |
download | mariadb-git-c23c38fa31ff9f7350c342a3fb8142e04b10e121.tar.gz |
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.
The `write_binlog_with_system_charset()' is introduced to replace similar problematic places in the code.
mysql-test/r/drop_temp_table.result:
results changed
mysql-test/r/mix_innodb_myisam_binlog.result:
results changed
mysql-test/r/mysqlbinlog.result:
results changed
mysql-test/r/rpl_temporary.result:
results changed
mysql-test/t/mysqlbinlog.test:
Check roll-forward recovery from binlog where there are DROP temporary tables created
in koi8r.
mysql-test/t/rpl_temporary.test:
Check slave digests binlog with DROP temporary tables created in koi8r.
sql/mysql_priv.h:
`write_binlog_with_system_charset()' is added to be called when a binlog event
is created "implicitly" like DROP temporary table is case of closing connection.
sql/sql_base.cc:
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, not the client, who generates the query
the binlog should be updated on server's encoding for the coming DROP.
Diffstat (limited to 'mysql-test/t/rpl_temporary.test')
-rw-r--r-- | mysql-test/t/rpl_temporary.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test index 71d7b32b7c9..af952760d6b 100644 --- a/mysql-test/t/rpl_temporary.test +++ b/mysql-test/t/rpl_temporary.test @@ -156,4 +156,16 @@ select * from t1 /* must be 1 */; connection master; drop table t1; +# +#14157: utf8 encoding in binlog without set character_set_client +# +--exec $MYSQL --default-character-set=koi8r test -e 'create table t1 (a int); set names koi8r; create temporary table `только герои срезают рашпилем грим` (a int); insert into `только герои срезают рашпилем грим` values (1); insert into t1 select * from `только герои срезают рашпилем грим`' + +sync_slave_with_master; +#connection slave; +select * from t1; + +connection master; +drop table t1; + # End of 4.1 tests |