summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_row_img_blobs.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_row_img_blobs.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_img_blobs.result2224
1 files changed, 2224 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_row_img_blobs.result b/mysql-test/suite/rpl/r/rpl_row_img_blobs.result
index e69358a5d29..546f42b61aa 100644
--- a/mysql-test/suite/rpl/r/rpl_row_img_blobs.result
+++ b/mysql-test/suite/rpl/r/rpl_row_img_blobs.result
@@ -1,5 +1,10 @@
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;
@@ -7,6 +12,7 @@ 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
@@ -16,6 +22,7 @@ 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
@@ -24,1559 +31,2297 @@ 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;
@@ -1584,6 +2329,7 @@ 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
@@ -1593,6 +2339,7 @@ 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
@@ -1601,1559 +2348,2297 @@ 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;
@@ -3161,6 +4646,7 @@ 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
@@ -3170,6 +4656,7 @@ 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
@@ -3178,1556 +4665,2293 @@ 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