| 1 |
# |
| 2 |
# test different behavior of ndb using different binlog formats |
| 3 |
# |
| 4 |
|
| 5 |
-- source include/have_blackhole.inc |
| 6 |
-- source include/have_ndb.inc |
| 7 |
-- source include/have_log_bin.inc |
| 8 |
|
| 9 |
--disable_query_log |
| 10 |
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 11 |
--enable_query_log |
| 12 |
|
| 13 |
# |
| 14 |
# Bug #29222 Statement mode replicates both statement and |
| 15 |
# rows when writing to an NDB table |
| 16 |
# |
| 17 |
CREATE TABLE t1 (m INT, n INT) ENGINE=MYISAM; |
| 18 |
CREATE TABLE t2 (b INT, c INT) ENGINE=BLACKHOLE; |
| 19 |
CREATE TABLE t3 (e INT, f INT) ENGINE=NDB; |
| 20 |
RESET MASTER; |
| 21 |
SET SESSION BINLOG_FORMAT=STATEMENT; |
| 22 |
INSERT INTO t1 VALUES (1,1), (1,2), (2,1), (2,2); |
| 23 |
INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2); |
| 24 |
UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c; |
| 25 |
# A transaction here is not necessary, but I wanted to group the bad statements |
| 26 |
START TRANSACTION; |
| 27 |
INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2); |
| 28 |
UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f; |
| 29 |
UPDATE t3, t2 SET e = 2, b = 3 WHERE f = c; |
| 30 |
COMMIT; |
| 31 |
--source include/show_binlog_events.inc |
| 32 |
DROP TABLE t1, t2, t3; |
| 33 |
|