mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
BUG#38170: rpl_variables failed on pushbuild: could not sync with master
Problem: the test set @@global.init_slave to garbage at a time which was not guaranteed to be after the time when the slave's SQL thread used it. That would cause the slave's SQL thread to stop in rare cases. Fix: The test does not care about the value of @@global.init_slave, except that it should be different on master and slave. Hence, we set @@global.init_slave to something that is valid SQL. mysql-test/suite/rpl/r/rpl_variables.result: updated result file. mysql-test/suite/rpl/t/rpl_variables.test: Set @@global.init_slave to something that is valid SQL.
This commit is contained in:
@ -45,7 +45,7 @@ RESET SLAVE;
|
|||||||
RESET MASTER;
|
RESET MASTER;
|
||||||
START SLAVE;
|
START SLAVE;
|
||||||
[on slave]
|
[on slave]
|
||||||
SET @@global.init_slave = 'ant';
|
SET @@global.init_slave = 'SELECT 1';
|
||||||
[on master]
|
[on master]
|
||||||
CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY,
|
CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
truth BOOLEAN,
|
truth BOOLEAN,
|
||||||
@ -66,9 +66,9 @@ SET @@global.sync_binlog = 2000000;
|
|||||||
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
||||||
SET @@global.sync_binlog = 3000000;
|
SET @@global.sync_binlog = 3000000;
|
||||||
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
||||||
INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode);
|
INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode);
|
||||||
@ -140,9 +140,9 @@ INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
|
|||||||
SET @@global.sync_binlog = 3000000;
|
SET @@global.sync_binlog = 3000000;
|
||||||
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
||||||
# enumeration
|
# enumeration
|
||||||
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
||||||
@ -226,9 +226,9 @@ INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
|
|||||||
SET @@global.sync_binlog = 3000000;
|
SET @@global.sync_binlog = 3000000;
|
||||||
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
||||||
# enumeration
|
# enumeration
|
||||||
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
||||||
@ -316,9 +316,9 @@ INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
|
|||||||
SET @@global.sync_binlog = 3000000;
|
SET @@global.sync_binlog = 3000000;
|
||||||
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
|
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
||||||
# enumeration
|
# enumeration
|
||||||
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
SET @@global.slave_exec_mode = 'IDEMPOTENT';
|
||||||
@ -395,9 +395,9 @@ PREPARE p5 FROM 'SET @@global.sync_binlog = 2000000';
|
|||||||
PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
||||||
PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000';
|
PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000';
|
||||||
PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
||||||
PREPARE p9 FROM 'SET @@global.init_slave = \'bison\'';
|
PREPARE p9 FROM 'SET @@global.init_slave = \'SELECT 2\'';
|
||||||
PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
||||||
PREPARE p11 FROM 'SET @@global.init_slave = \'cat\'';
|
PREPARE p11 FROM 'SET @@global.init_slave = \'SELECT 3\'';
|
||||||
PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
||||||
PREPARE p13 FROM 'SET @@global.slave_exec_mode = \'IDEMPOTENT\'';
|
PREPARE p13 FROM 'SET @@global.slave_exec_mode = \'IDEMPOTENT\'';
|
||||||
PREPARE p14 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)';
|
PREPARE p14 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)';
|
||||||
@ -522,8 +522,8 @@ id truth num text
|
|||||||
2 0 NULL NULL
|
2 0 NULL NULL
|
||||||
3 NULL 2000000 NULL
|
3 NULL 2000000 NULL
|
||||||
4 NULL 3000000 NULL
|
4 NULL 3000000 NULL
|
||||||
5 NULL NULL bison
|
5 NULL NULL SELECT 2
|
||||||
6 NULL NULL cat
|
6 NULL NULL SELECT 3
|
||||||
7 NULL NULL IDEMPOTENT
|
7 NULL NULL IDEMPOTENT
|
||||||
8 NULL NULL STRICT
|
8 NULL NULL STRICT
|
||||||
9 1 NULL NULL
|
9 1 NULL NULL
|
||||||
|
@ -117,7 +117,7 @@ source include/reset_master_and_slave.inc;
|
|||||||
# above, but can't because it affects how the slave works.
|
# above, but can't because it affects how the slave works.
|
||||||
--echo [on slave]
|
--echo [on slave]
|
||||||
connection slave;
|
connection slave;
|
||||||
SET @@global.init_slave = 'ant';
|
SET @@global.init_slave = 'SELECT 1';
|
||||||
|
|
||||||
|
|
||||||
--echo [on master]
|
--echo [on master]
|
||||||
@ -154,9 +154,9 @@ SET @@global.sync_binlog = 3000000;
|
|||||||
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tstmt(num) VALUES (@@global.sync_binlog);
|
||||||
|
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
INSERT INTO tstmt(text) VALUES (@@global.init_slave);
|
||||||
|
|
||||||
# enumeration
|
# enumeration
|
||||||
@ -258,9 +258,9 @@ BEGIN
|
|||||||
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tproc(num) VALUES (@@global.sync_binlog);
|
||||||
|
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
INSERT INTO tproc(text) VALUES (@@global.init_slave);
|
||||||
|
|
||||||
# enumeration
|
# enumeration
|
||||||
@ -367,9 +367,9 @@ BEGIN
|
|||||||
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
|
INSERT INTO tfunc(num) VALUES (@@global.sync_binlog);
|
||||||
|
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
INSERT INTO tfunc(text) VALUES (@@global.init_slave);
|
||||||
|
|
||||||
# enumeration
|
# enumeration
|
||||||
@ -478,9 +478,9 @@ BEGIN
|
|||||||
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
|
INSERT INTO ttrig(num) VALUES (@@global.sync_binlog);
|
||||||
|
|
||||||
# string
|
# string
|
||||||
SET @@global.init_slave = 'bison';
|
SET @@global.init_slave = 'SELECT 2';
|
||||||
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
||||||
SET @@global.init_slave = 'cat';
|
SET @@global.init_slave = 'SELECT 3';
|
||||||
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
INSERT INTO ttrig(text) VALUES (@@global.init_slave);
|
||||||
|
|
||||||
# enumeration
|
# enumeration
|
||||||
@ -581,9 +581,9 @@ PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000';
|
|||||||
PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)';
|
||||||
|
|
||||||
# string
|
# string
|
||||||
PREPARE p9 FROM 'SET @@global.init_slave = \'bison\'';
|
PREPARE p9 FROM 'SET @@global.init_slave = \'SELECT 2\'';
|
||||||
PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
||||||
PREPARE p11 FROM 'SET @@global.init_slave = \'cat\'';
|
PREPARE p11 FROM 'SET @@global.init_slave = \'SELECT 3\'';
|
||||||
PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)';
|
||||||
|
|
||||||
# enumeration
|
# enumeration
|
||||||
|
Reference in New Issue
Block a user