mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
a2ed682967
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.
29 lines
461 B
Text
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;
|