mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug17137/my50-bug17137
This commit is contained in:
22
mysql-test/r/rpl_trunc_temp.result
Normal file
22
mysql-test/r/rpl_trunc_temp.result
Normal file
@ -0,0 +1,22 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values(1);
|
||||
show status like 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
delete from t1;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
truncate t1;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
show status like 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
32
mysql-test/t/rpl_trunc_temp.test
Normal file
32
mysql-test/t/rpl_trunc_temp.test
Normal file
@ -0,0 +1,32 @@
|
||||
source include/master-slave.inc;
|
||||
|
||||
#
|
||||
# Bug#17137 Running "truncate table" on temporary table
|
||||
# leaves the table open on a slave
|
||||
#
|
||||
|
||||
create temporary table t1 (n int);
|
||||
insert into t1 values(1);
|
||||
sync_slave_with_master;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
# Perform a delete from temp table
|
||||
connection master;
|
||||
delete from t1;
|
||||
sync_slave_with_master;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
# Perform truncate on temp table
|
||||
connection master;
|
||||
truncate t1;
|
||||
sync_slave_with_master;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
# Disconnect the master, temp table on slave should dissapear
|
||||
disconnect master;
|
||||
--real_sleep 3 # time for DROP to be read by slave
|
||||
connection slave;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
|
||||
# End of 4.1 tests
|
Reference in New Issue
Block a user