~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
# Requires statement logging
2
-- source include/have_binlog_format_mixed_or_statement.inc
3
4
source include/master-slave.inc;
5
6
#
7
# Bug#17137 Running "truncate table" on temporary table
8
# leaves the table open on a slave
9
#
10
11
create temporary table t1 (n int);
12
insert into t1 values(1);
13
sync_slave_with_master;
14
show status like 'Slave_open_temp_tables';
15
16
# Perform a delete from temp table
17
connection master;
18
delete from t1;
19
sync_slave_with_master;
20
show status like 'Slave_open_temp_tables';
21
22
# Perform truncate on temp table
23
connection master;
24
truncate t1;
25
sync_slave_with_master;
26
show status like 'Slave_open_temp_tables';
27
28
# Disconnect the master, temp table on slave should dissapear
29
disconnect master;
30
31
connection master1;
32
# Wait until drop of temp tables appers in binlog
33
let $wait_binlog_event= DROP;
34
source include/wait_for_binlog_event.inc;
35
36
connection slave;
37
show status like 'Slave_open_temp_tables';
38
39
40
# End of 4.1 tests