mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
6957 lines
214 KiB
Text
6957 lines
214 KiB
Text
include/rpl_init.inc [topology=1->2->3]
|
|
connection server_1;
|
|
connection server_2;
|
|
connection server_3;
|
|
connection server_1;
|
|
CON: 'server_1', IMG: 'NOBLOB', RESTART SLAVE: 'N'
|
|
connection server_1;
|
|
SET SESSION binlog_row_image= 'NOBLOB';
|
|
SET GLOBAL binlog_row_image= 'NOBLOB';
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image NOBLOB
|
|
CON: 'server_2', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
|
|
connection server_2;
|
|
SET SESSION binlog_row_image= 'NOBLOB';
|
|
SET GLOBAL binlog_row_image= 'NOBLOB';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image NOBLOB
|
|
CON: 'server_3', IMG: 'NOBLOB', RESTART SLAVE: 'Y'
|
|
connection server_3;
|
|
SET SESSION binlog_row_image= 'NOBLOB';
|
|
SET GLOBAL binlog_row_image= 'NOBLOB';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image NOBLOB
|
|
connection server_1;
|
|
### engines: MyISAM, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
CON: 'server_1', IMG: 'MINIMAL', RESTART SLAVE: 'N'
|
|
connection server_1;
|
|
SET SESSION binlog_row_image= 'MINIMAL';
|
|
SET GLOBAL binlog_row_image= 'MINIMAL';
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image MINIMAL
|
|
CON: 'server_2', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
|
|
connection server_2;
|
|
SET SESSION binlog_row_image= 'MINIMAL';
|
|
SET GLOBAL binlog_row_image= 'MINIMAL';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image MINIMAL
|
|
CON: 'server_3', IMG: 'MINIMAL', RESTART SLAVE: 'Y'
|
|
connection server_3;
|
|
SET SESSION binlog_row_image= 'MINIMAL';
|
|
SET GLOBAL binlog_row_image= 'MINIMAL';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image MINIMAL
|
|
connection server_1;
|
|
### engines: MyISAM, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
CON: 'server_1', IMG: 'FULL', RESTART SLAVE: 'N'
|
|
connection server_1;
|
|
SET SESSION binlog_row_image= 'FULL';
|
|
SET GLOBAL binlog_row_image= 'FULL';
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image FULL
|
|
CON: 'server_2', IMG: 'FULL', RESTART SLAVE: 'Y'
|
|
connection server_2;
|
|
SET SESSION binlog_row_image= 'FULL';
|
|
SET GLOBAL binlog_row_image= 'FULL';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image FULL
|
|
CON: 'server_3', IMG: 'FULL', RESTART SLAVE: 'Y'
|
|
connection server_3;
|
|
SET SESSION binlog_row_image= 'FULL';
|
|
SET GLOBAL binlog_row_image= 'FULL';
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
FLUSH TABLES;
|
|
SHOW VARIABLES LIKE 'binlog_row_image';
|
|
Variable_name Value
|
|
binlog_row_image FULL
|
|
connection server_1;
|
|
### engines: MyISAM, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: MyISAM, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, MyISAM, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, MyISAM
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= MyISAM;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
### engines: InnoDB, InnoDB, InnoDB
|
|
connection server_1;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check when there is no key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the AI (they are not updated)
|
|
### will not break replication (check even if there is a key in the table)
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (UK NOT NULL exists in the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int NOT NULL, c2 blob NOT NULL, c3 int, unique key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that updates without blobs in the BI (PK exists int the table)
|
|
### will not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c1)) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob in a key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a unique (not null) key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob NOT NULL, c3 int, unique key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=0;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=0;
|
|
### Asserts that declaring a blob as part of a primary key does not break replication
|
|
connection server_1;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_2;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_3;
|
|
CREATE TABLE t (c1 int, c2 blob, c3 int, primary key(c2(512))) engine= InnoDB;;
|
|
connection server_1;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_2;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_3;
|
|
SET SQL_LOG_BIN=1;
|
|
connection server_1;
|
|
INSERT INTO t VALUES (1, "a", 10);
|
|
INSERT INTO t VALUES (2, "b", 20);
|
|
INSERT INTO t VALUES (3, "c", 30);
|
|
include/rpl_sync.inc
|
|
connection server_1;
|
|
UPDATE t SET c1=10 WHERE c2="a";
|
|
UPDATE t SET c1=20 WHERE c1=2;
|
|
UPDATE t SET c1=30 WHERE c3=30;
|
|
UPDATE t SET c3=40 WHERE c1=30;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DELETE FROM t WHERE c2="a";
|
|
DELETE FROM t WHERE c1=20;
|
|
DELETE FROM t;
|
|
include/rpl_sync.inc
|
|
include/diff_tables.inc [server_1:test.t, server_2:test.t, server_3:test.t]
|
|
connection server_1;
|
|
DROP TABLE t;
|
|
include/rpl_sync.inc
|
|
include/rpl_end.inc
|