mariadb/mysql-test/r/drop_temp_table.result
unknown c23c38fa31 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.
2006-05-09 23:01:31 +03:00

22 lines
1.1 KiB
Text

drop database if exists `drop-temp+table-test`;
reset master;
create database `drop-temp+table-test`;
use `drop-temp+table-test`;
create temporary table shortn1 (a int);
create temporary table `table:name` (a int);
create temporary table shortn2 (a int);
select get_lock("a",10);
get_lock("a",10)
1
select get_lock("a",10);
get_lock("a",10)
1
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # create database `drop-temp+table-test`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1`
drop database `drop-temp+table-test`;