mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / ndb / t / ndb_binlog_format.test
blobacb34bb388cb096f34475e3fabdb91a547246744
2 # test different behavior of ndb using different binlog formats
5 -- source include/have_blackhole.inc
6 -- source include/have_ndb.inc
7 -- source include/have_log_bin.inc
9 --disable_warnings
10 drop table if exists t1, t2, t3;
11 --enable_warnings
14 # Bug #29222 Statement mode replicates both statement and
15 # rows when writing to an NDB table
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;