| 1 |
# |
| 2 |
# Bug#48350 truncate temporary table crashes replication |
| 3 |
# |
| 4 |
# All statements operating on temporary tables should not be binlogged in RBR. |
| 5 |
# However, before fix of bug#48350, 'TRUNCATE ...' statement on a temporary |
| 6 |
# table was binlogged in RBR. |
| 7 |
# |
| 8 |
--source include/not_group_replication_plugin.inc |
| 9 |
--source include/have_binlog_format_row.inc |
| 10 |
--source include/master-slave.inc |
| 11 |
|
| 12 |
#This statement is not binlogged in RBR. |
| 13 |
CREATE TEMPORARY TABLE t1(c1 INTEGER); |
| 14 |
CREATE TABLE t2(c1 INTEGER); |
| 15 |
--source include/sync_slave_sql_with_master.inc |
| 16 |
|
| 17 |
CREATE TABLE t1(c1 INTEGER); |
| 18 |
INSERT INTO t1 VALUES(1), (2); |
| 19 |
INSERT INTO t2 VALUES(1), (2); |
| 20 |
SELECT * FROM t1; |
| 21 |
SELECT * FROM t2; |
| 22 |
|
| 23 |
connection master; |
| 24 |
TRUNCATE t1; |
| 25 |
TRUNCATE t2; |
| 26 |
--source include/sync_slave_sql_with_master.inc |
| 27 |
# t1 will have nothing, if 'TRUNCATE t1' has been replicate from master to |
| 28 |
# slave. |
| 29 |
SELECT * FROM t1; |
| 30 |
SELECT * FROM t2; |
| 31 |
|
| 32 |
DROP TABLE t1; |
| 33 |
connection master; |
| 34 |
DROP TABLE t2; |
| 35 |
--source include/rpl_end.inc |