mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
Added master-slave synchronization to make sure truncate happen before slave manipulations on every platform
This commit is contained in:
parent
4744d2213e
commit
f9ac1d6553
1 changed files with 6 additions and 0 deletions
|
@ -206,21 +206,27 @@ SET SQL_LOG_BIN=0;
|
||||||
INSERT INTO t1_nodef VALUES (1,2);
|
INSERT INTO t1_nodef VALUES (1,2);
|
||||||
INSERT INTO t1_nodef VALUES (2,4);
|
INSERT INTO t1_nodef VALUES (2,4);
|
||||||
SET SQL_LOG_BIN=1;
|
SET SQL_LOG_BIN=1;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
connection slave;
|
connection slave;
|
||||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||||
|
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||||
SELECT * FROM t1_nodef;
|
SELECT * FROM t1_nodef;
|
||||||
|
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
SELECT * FROM t1_nodef;
|
SELECT * FROM t1_nodef;
|
||||||
|
|
||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
DELETE FROM t1_nodef WHERE a=2;
|
DELETE FROM t1_nodef WHERE a=2;
|
||||||
SELECT * FROM t1_nodef;
|
SELECT * FROM t1_nodef;
|
||||||
|
|
||||||
--echo **** On Slave ****
|
--echo **** On Slave ****
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
SELECT * FROM t1_nodef;
|
SELECT * FROM t1_nodef;
|
||||||
|
|
Loading…
Reference in a new issue