~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Requires statement logging
-- source include/have_binlog_format_mixed_or_statement.inc

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;

connection master1;
# Wait until drop of temp tables appers in binlog
let $wait_binlog_event= DROP;
source include/wait_for_binlog_event.inc;

connection slave;
show status like 'Slave_open_temp_tables';


# End of 4.1 tests