2006-03-09 12:00:12 +01:00
|
|
|
# Requires statement logging
|
2006-08-30 09:22:43 +02:00
|
|
|
-- source include/have_binlog_format_mixed_or_statement.inc
|
2006-03-09 12:00:12 +01:00
|
|
|
|
2006-03-08 10:15:48 +01:00
|
|
|
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
|