mariadb/mysql-test/r/drop_temp_table.result
unknown ededf83143 Fix for BUG#8055 "Trouble with replication from temporary tables and ignores":
when we close the session's temp tables at session end, we automatically write to binlog *one* DROP TEMPORARY TABLE *per tmp table*.


mysql-test/r/drop_temp_table.result:
  result update (note: one DROP TEMPORARY TABLE per tmp table)
mysql-test/t/drop_temp_table.test:
  checking that we have one DROP TEMPORARY TABLE per tmp table now, not one multi-table DROP.
  Hiding columns Log_pos/End_log_pos per Monty's request.
sql/sql_base.cc:
  When we close the session's temp tables at session end, we automatically write to binlog one DROP TEMPORARY TABLE per tmp table, 
  not one single multi-table DROP TEMPORARY TABLE (because it causes problems if slave has --replicate*table rules).
2005-02-04 22:43:54 +01:00

24 lines
1.3 KiB
Text

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 Orig_log_pos Info
master-bin.000001 # Start 1 # Server ver: VERSION, Binlog ver: 3
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`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn1`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;