summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_temporary.test
diff options
context:
space:
mode:
authorunknown <aelkin@mysql.com>2006-04-23 19:59:43 +0300
committerunknown <aelkin@mysql.com>2006-04-23 19:59:43 +0300
commit65cce20c4b41a49cf763279bc7ba967ba8130a93 (patch)
tree156eb07fae77a2081fe75c0756927a9dad070e99 /mysql-test/t/rpl_temporary.test
parent93409ee7bebcf8df98ab532884ecfdaaae1f96cc (diff)
downloadmariadb-git-65cce20c4b41a49cf763279bc7ba967ba8130a93.tar.gz
Bug#17263 temporary tables and replication
The fix refines the algorithm of generating DROPs for binlog. Temp tables with common pseudo_thread_id are clustered into one query. Consequently one replication event per pseudo_thread_id is generated. mysql-test/r/rpl_temporary.result: results mysql-test/t/rpl_temporary.test: Creating temp tables associated with a set of pseudo_thread_id values within a connection. The aim is to see that slave digest master's binlog consisting of DROP temprorary tables. sql/sql_base.cc: close_temporary_tables is rewritten to generate sequence of DROP temprorary tables with common preudo_thread_id stored in temp table definition.
Diffstat (limited to 'mysql-test/t/rpl_temporary.test')
-rw-r--r--mysql-test/t/rpl_temporary.test30
1 files changed, 29 insertions, 1 deletions
diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test
index 2400eac76ba..facf0d68d2b 100644
--- a/mysql-test/t/rpl_temporary.test
+++ b/mysql-test/t/rpl_temporary.test
@@ -129,6 +129,8 @@ drop table t1,t2;
create temporary table t3 (f int);
sync_with_master;
+# The server will now close done
+
#
# Bug#17284 erroneous temp table cleanup on slave
#
@@ -154,6 +156,32 @@ connection master;
drop temporary table t4;
drop table t5;
-# The server will now close done
+#
+# BUG#17263 incorrect generation DROP temp tables
+# Temporary tables of connection are dropped in batches
+# where a batch correspond to pseudo_thread_id
+# value was set up at the moment of temp table creation
+#
+connection con1;
+set @session.pseudo_thread_id=100;
+create temporary table t101 (id int);
+create temporary table t102 (id int);
+set @session.pseudo_thread_id=200;
+create temporary table t201 (id int);
+create temporary table `#not_user_table_prefixed_with_hash_sign_no_harm` (id int);
+set @con1_id=connection_id();
+kill @con1_id;
+
+#now do something to show that slave is ok after DROP temp tables
+connection master;
+create table t1(f int);
+insert into t1 values (1);
+
+sync_slave_with_master;
+#connection slave;
+select * from t1 /* must be 1 */;
+
+connection master;
+drop table t1;
# End of 5.0 tests