mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
2019f17276
In certain situations, a scan of the table will return the error code HA_ERR_RECORD_DELETED, and this error code is not correctly caught in the Rows_log_event::find_row() function, which causes an error to be returned for this case. This patch fixes the problem by adding code to either ignore the record and continuing with the next one, the the event of a table scan, or change the error code to HA_ERR_KEY_NOT_FOUND, in the event that a key lookup is attempted.
586 lines
14 KiB
Text
586 lines
14 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)) ENGINE = 'MYISAM' ;
|
|
SELECT * FROM t1;
|
|
C1 C2
|
|
SELECT * FROM t1;
|
|
C1 C2
|
|
INSERT INTO t1 VALUES ('A','B'), ('X','Y'), ('X','X');
|
|
INSERT INTO t1 VALUES ('A','C'), ('X','Z'), ('A','A');
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A A
|
|
A B
|
|
A C
|
|
X X
|
|
X Y
|
|
X Z
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A A
|
|
A B
|
|
A C
|
|
X X
|
|
X Y
|
|
X Z
|
|
DELETE FROM t1 WHERE C1 = C2;
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A B
|
|
A C
|
|
X Y
|
|
X Z
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A B
|
|
A C
|
|
X Y
|
|
X Z
|
|
UPDATE t1 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A B
|
|
A I
|
|
X Y
|
|
X Z
|
|
SELECT * FROM t1 ORDER BY C1,C2;
|
|
C1 C2
|
|
A B
|
|
A I
|
|
X Y
|
|
X Z
|
|
UPDATE t1 SET c2 = 'Q' WHERE c1 = 'A' AND c2 = 'N';
|
|
SELECT * FROM t1 ORDER BY c1,c2;
|
|
C1 C2
|
|
A B
|
|
A I
|
|
X Y
|
|
X Z
|
|
SELECT * FROM t1 ORDER BY c1,c2;
|
|
C1 C2
|
|
A B
|
|
A I
|
|
X Y
|
|
X Z
|
|
CREATE TABLE t2 (c1 INT, c12 char(1), c2 INT, PRIMARY KEY (c1)) ENGINE = 'MYISAM' ;
|
|
INSERT INTO t2
|
|
VALUES (1,'A',2), (2,'A',4), (3,'A',9), (4,'A',15), (5,'A',25),
|
|
(6,'A',35), (7,'A',50), (8,'A',64), (9,'A',81);
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 2
|
|
2 A 4
|
|
3 A 9
|
|
4 A 15
|
|
5 A 25
|
|
6 A 35
|
|
7 A 50
|
|
8 A 64
|
|
9 A 81
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
2 A 4
|
|
3 A 9
|
|
5 A 25
|
|
8 A 64
|
|
9 A 81
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 2
|
|
2 A 4
|
|
3 A 9
|
|
4 A 15
|
|
5 A 25
|
|
6 A 35
|
|
7 A 50
|
|
8 A 64
|
|
9 A 81
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
2 A 4
|
|
3 A 9
|
|
5 A 25
|
|
8 A 64
|
|
9 A 81
|
|
UPDATE t2 SET c2 = c1*c1 WHERE c2 != c1*c1;
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
4 A 16
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
8 A 64
|
|
9 A 81
|
|
SELECT * FROM t2 WHERE c2 = c1 * c1 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
4 A 16
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
8 A 64
|
|
9 A 81
|
|
UPDATE t2 SET c12 = 'Q' WHERE c1 = 1 AND c2 = 999;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
4 A 16
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
8 A 64
|
|
9 A 81
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
4 A 16
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
8 A 64
|
|
9 A 81
|
|
DELETE FROM t2 WHERE c1 % 4 = 0;
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
9 A 81
|
|
SELECT * FROM t2 ORDER BY c1,c2;
|
|
c1 c12 c2
|
|
1 A 1
|
|
2 A 4
|
|
3 A 9
|
|
5 A 25
|
|
6 A 36
|
|
7 A 49
|
|
9 A 81
|
|
UPDATE t2 SET c12='X';
|
|
CREATE TABLE t3 (C1 CHAR(1), C2 CHAR(1), pk1 INT, C3 CHAR(1), pk2 INT, PRIMARY KEY (pk1,pk2)) ENGINE = 'MYISAM' ;
|
|
INSERT INTO t3 VALUES ('A','B',1,'B',1), ('X','Y',2,'B',1), ('X','X',3,'B',1);
|
|
INSERT INTO t3 VALUES ('A','C',1,'B',2), ('X','Z',2,'B',2), ('A','A',3,'B',2);
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A A 3 B 2
|
|
A B 1 B 1
|
|
A C 1 B 2
|
|
X X 3 B 1
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A A 3 B 2
|
|
A B 1 B 1
|
|
A C 1 B 2
|
|
X X 3 B 1
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
DELETE FROM t3 WHERE C1 = C2;
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A B 1 B 1
|
|
A C 1 B 2
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A B 1 B 1
|
|
A C 1 B 2
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
UPDATE t3 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A B 1 B 1
|
|
A I 1 B 2
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
SELECT * FROM t3 ORDER BY C1,C2;
|
|
C1 C2 pk1 C3 pk2
|
|
A B 1 B 1
|
|
A I 1 B 2
|
|
X Y 2 B 1
|
|
X Z 2 B 2
|
|
CREATE TABLE t6 (C1 CHAR(1), C2 CHAR(1), C3 INT) ENGINE = 'MYISAM' ;
|
|
INSERT INTO t6 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
|
INSERT INTO t6 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
X X 3
|
|
A C 4
|
|
X Z 5
|
|
A A 6
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
X X 3
|
|
A C 4
|
|
X Z 5
|
|
A A 6
|
|
DELETE FROM t6 WHERE C1 = C2;
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
A C 4
|
|
X Z 5
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
A C 4
|
|
X Z 5
|
|
UPDATE t6 SET C2 = 'I' WHERE C1 = 'A' AND C2 = 'C';
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
A I 4
|
|
X Z 5
|
|
SELECT * FROM t6 ORDER BY C3;
|
|
C1 C2 C3
|
|
A B 1
|
|
X Y 2
|
|
A I 4
|
|
X Z 5
|
|
CREATE TABLE t5 (C1 CHAR(1), C2 CHAR(1), C3 INT PRIMARY KEY) ENGINE = 'MYISAM' ;
|
|
INSERT INTO t5 VALUES ('A','B',1), ('X','Y',2), ('X','X',3);
|
|
INSERT INTO t5 VALUES ('A','C',4), ('X','Z',5), ('A','A',6);
|
|
UPDATE t5,t2,t3 SET t5.C2='Q', t2.c12='R', t3.C3 ='S' WHERE t5.C1 = t2.c12 AND t5.C1 = t3.C1;
|
|
SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5.C3,t2.c1,t3.pk1,t3.pk2;
|
|
C1 C2 C3 c1 c12 c2 C1 C2 pk1 C3 pk2
|
|
X Q 2 1 R 1 X Y 2 S 1
|
|
X Q 2 1 R 1 X Z 2 S 2
|
|
X Q 2 2 R 4 X Y 2 S 1
|
|
X Q 2 2 R 4 X Z 2 S 2
|
|
X Q 2 3 R 9 X Y 2 S 1
|
|
X Q 2 3 R 9 X Z 2 S 2
|
|
X Q 2 5 R 25 X Y 2 S 1
|
|
X Q 2 5 R 25 X Z 2 S 2
|
|
X Q 2 6 R 36 X Y 2 S 1
|
|
X Q 2 6 R 36 X Z 2 S 2
|
|
X Q 2 7 R 49 X Y 2 S 1
|
|
X Q 2 7 R 49 X Z 2 S 2
|
|
X Q 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T NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'MYISAM' ;
|
|
INSERT INTO t4 SET C1 = 1;
|
|
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
|
C1 HEX(B1) HEX(B2)
|
|
1 NULL 0
|
|
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
|
|
C1 HEX(B1) HEX(B2)
|
|
1 NULL 0
|
|
CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'MYISAM' ;
|
|
--- on slave: original values ---
|
|
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
C1 C2
|
|
1 3
|
|
2 6
|
|
3 9
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
--- on master: new values inserted ---
|
|
INSERT INTO t7 VALUES (1,2), (2,4), (3,6);
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
C1 C2
|
|
1 2
|
|
2 4
|
|
3 6
|
|
set @@global.slave_exec_mode= default;
|
|
--- on slave: old values should be overwritten by replicated values ---
|
|
SELECT * FROM t7 ORDER BY C1;
|
|
C1 C2
|
|
1 2
|
|
2 4
|
|
3 6
|
|
--- on master ---
|
|
CREATE TABLE t8 (a INT PRIMARY KEY, b INT UNIQUE, c INT UNIQUE) ENGINE = 'MYISAM' ;
|
|
INSERT INTO t8 VALUES (99,99,99);
|
|
INSERT INTO t8 VALUES (99,22,33);
|
|
ERROR 23000: Duplicate entry '99' for key 'PRIMARY'
|
|
INSERT INTO t8 VALUES (11,99,33);
|
|
ERROR 23000: Duplicate entry '99' for key 'b'
|
|
INSERT INTO t8 VALUES (11,22,99);
|
|
ERROR 23000: Duplicate entry '99' for key 'c'
|
|
SELECT * FROM t8 ORDER BY a;
|
|
a b c
|
|
99 99 99
|
|
--- on slave ---
|
|
SELECT * FROM t8 ORDER BY a;
|
|
a b c
|
|
99 99 99
|
|
INSERT INTO t8 VALUES (1,2,3), (2,4,6), (3,6,9);
|
|
SELECT * FROM t8 ORDER BY a;
|
|
a b c
|
|
1 2 3
|
|
2 4 6
|
|
3 6 9
|
|
99 99 99
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
--- on master ---
|
|
INSERT INTO t8 VALUES (2,4,8);
|
|
set @@global.slave_exec_mode= default;
|
|
--- on slave ---
|
|
SELECT * FROM t8 ORDER BY a;
|
|
a b c
|
|
1 2 3
|
|
2 4 8
|
|
3 6 9
|
|
99 99 99
|
|
**** Test for BUG#31552 ****
|
|
**** On Master ****
|
|
DELETE FROM t1;
|
|
**** Resetting master and slave ****
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
RESET MASTER;
|
|
START SLAVE;
|
|
**** On Master ****
|
|
INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
|
|
**** On Master ****
|
|
set @@global.slave_exec_mode= 'IDEMPOTENT';
|
|
DELETE FROM t1 WHERE C1 = 'L';
|
|
DELETE FROM t1;
|
|
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
|
COUNT(*) 0
|
|
set @@global.slave_exec_mode= default;
|
|
Last_SQL_Error
|
|
|
|
SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
|
|
COUNT(*) 0
|
|
**** Test for BUG#37076 ****
|
|
**** On Master ****
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (a TIMESTAMP, b DATETIME, c DATE);
|
|
INSERT INTO t1 VALUES(
|
|
'2005-11-14 01:01:01', '2005-11-14 01:01:02', '2005-11-14');
|
|
**** On Slave ****
|
|
SELECT * FROM t1;
|
|
a b c
|
|
2005-11-14 01:01:01 2005-11-14 01:01:02 2005-11-14
|
|
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
|
|
CREATE TABLE t1 (i INT NOT NULL,
|
|
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
CREATE TABLE t2 (i INT NOT NULL,
|
|
c CHAR(16) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
ALTER TABLE t2 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
|
CREATE TABLE t3 (i INT NOT NULL,
|
|
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
ALTER TABLE t3 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
|
CREATE TABLE t4 (i INT NOT NULL,
|
|
c CHAR(128) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
CREATE TABLE t5 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
ALTER TABLE t5 MODIFY c CHAR(16) CHARACTER SET utf8 NOT NULL;
|
|
CREATE TABLE t6 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
|
|
CREATE TABLE t7 (i INT NOT NULL,
|
|
c CHAR(255) CHARACTER SET utf8 NOT NULL,
|
|
j INT NOT NULL) ENGINE = 'MYISAM' ;
|
|
[expecting slave to replicate correctly]
|
|
INSERT INTO t1 VALUES (1, "", 1);
|
|
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
[expecting slave to replicate correctly]
|
|
INSERT INTO t2 VALUES (1, "", 1);
|
|
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
|
|
Comparing tables master:test.t2 and slave:test.t2
|
|
[expecting slave to stop]
|
|
INSERT INTO t3 VALUES (1, "", 1);
|
|
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
|
|
Last_SQL_Error
|
|
Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.
|
|
RESET MASTER;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
[expecting slave to replicate correctly]
|
|
INSERT INTO t4 VALUES (1, "", 1);
|
|
INSERT INTO t4 VALUES (2, repeat(_utf8'a', 128), 2);
|
|
Comparing tables master:test.t4 and slave:test.t4
|
|
[expecting slave to stop]
|
|
INSERT INTO t5 VALUES (1, "", 1);
|
|
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
Last_SQL_Error
|
|
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
|
|
RESET MASTER;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
[expecting slave to stop]
|
|
INSERT INTO t6 VALUES (1, "", 1);
|
|
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
Last_SQL_Error
|
|
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
|
|
RESET MASTER;
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
START SLAVE;
|
|
[expecting slave to replicate correctly]
|
|
INSERT INTO t7 VALUES (1, "", 1);
|
|
INSERT INTO t7 VALUES (2, repeat(_utf8'a', 255), 2);
|
|
Comparing tables master:test.t7 and slave:test.t7
|
|
drop table t1, t2, t3, t4, t5, t6, t7;
|
|
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE='MYISAM' ;
|
|
INSERT INTO t1 VALUES (1), (2), (3);
|
|
UPDATE t1 SET a = 10;
|
|
ERROR 23000: Duplicate entry '10' for key 'PRIMARY'
|
|
INSERT INTO t1 VALUES (4);
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
drop table t1;
|
|
CREATE TABLE t1 (a int) ENGINE='MYISAM' ;
|
|
INSERT IGNORE INTO t1 VALUES (NULL);
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
INSERT INTO t1 ( a ) VALUES ( 2 );
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
UPDATE t1 SET a = 5 WHERE a = 9;
|
|
DELETE FROM t1 WHERE a < 6;
|
|
UPDATE t1 SET a = 9 WHERE a < 3;
|
|
INSERT INTO t1 ( a ) VALUES ( 3 );
|
|
UPDATE t1 SET a = 0 WHERE a < 4;
|
|
UPDATE t1 SET a = 8 WHERE a < 5;
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
drop table t1;
|
|
CREATE TABLE t1 (a bit) ENGINE='MYISAM' ;
|
|
INSERT IGNORE INTO t1 VALUES (NULL);
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
DELETE FROM t1 WHERE a < 2 LIMIT 4;
|
|
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 9 );
|
|
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
|
INSERT INTO t1 ( a ) VALUES ( 8 );
|
|
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
|
|
INSERT INTO t1 ( a ) VALUES ( 4 );
|
|
INSERT INTO t1 ( a ) VALUES ( 3 );
|
|
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
|
|
DELETE FROM t1 WHERE a = 4 LIMIT 7;
|
|
UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
|
|
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
|
|
DELETE FROM t1 WHERE a < 0 LIMIT 5;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 5 );
|
|
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
|
|
DELETE FROM t1 WHERE a < 8 LIMIT 8;
|
|
INSERT INTO t1 ( a ) VALUES ( 6 );
|
|
DELETE FROM t1 WHERE a < 6 LIMIT 7;
|
|
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
|
|
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
|
|
INSERT INTO t1 ( a ) VALUES ( 7 );
|
|
DELETE FROM t1 WHERE a < 9 LIMIT 4;
|
|
INSERT INTO t1 ( a ) VALUES ( 7 );
|
|
INSERT INTO t1 ( a ) VALUES ( 6 );
|
|
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
|
|
DELETE FROM t1 WHERE a = 2 LIMIT 9;
|
|
DELETE FROM t1 WHERE a = 1 LIMIT 4;
|
|
UPDATE t1 SET a = 4 WHERE a = 2 LIMIT 7;
|
|
INSERT INTO t1 ( a ) VALUES ( 0 );
|
|
DELETE FROM t1 WHERE a < 3 LIMIT 0;
|
|
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
|
|
INSERT INTO t1 ( a ) VALUES ( 1 );
|
|
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
|
|
Comparing tables master:test.t1 and slave:test.t1
|
|
drop table t1;
|