mariadb/mysql-test/suite/rpl/r/rpl_row_trunc_temp.result
unknown a2ed682967 Bug #48350 truncate temporary table crashes replication
In RBR, All statements operating on temporary tables should not be binlogged.
Despite this fact, after executing 'TRUNCATE... ' on a temporary table, 
the command is still logged, even if in row-based mode. Consequently, this raises
problems in the slave as the table may not exist, resulting in an
execution failure. Ultimately, this causes the slave to report
an error and abort.

After this patch, 'TRUNCATE ...' statement on a temporary table will not be
binlogged in RBR.
2009-11-22 13:10:33 +08:00

29 lines
461 B
Text

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(c1 INTEGER);
CREATE TABLE t2(c1 INTEGER);
CREATE TABLE t1(c1 INTEGER);
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1), (2);
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
1
2
TRUNCATE t1;
TRUNCATE t2;
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
DROP TABLE t1;
DROP TABLE t2;