mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
wl2325 wl2324
This commit is contained in:
55
mysql-test/r/rpl_ndb_multi.result
Normal file
55
mysql-test/r/rpl_ndb_multi.result
Normal file
@@ -0,0 +1,55 @@
|
||||
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(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ;
|
||||
reset master;
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
INSERT INTO t1 VALUES ("row1","will go away",1);
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row1 will go away 1
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row1 will go away 1
|
||||
SELECT @the_epoch:=MAX(epoch) FROM cluster_replication.apply_status;
|
||||
@the_epoch:=MAX(epoch)
|
||||
<the_epoch>
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row1 will go away 1
|
||||
stop slave;
|
||||
SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1)
|
||||
FROM cluster_replication.binlog_index WHERE epoch = <the_epoch> ;
|
||||
@the_pos:=Position @the_file:=SUBSTRING_INDEX(FILE, '/', -1)
|
||||
102 master-bin1.000001
|
||||
CHANGE MASTER TO
|
||||
master_port=<MASTER_PORT1>,
|
||||
master_log_file = 'master-bin1.000001',
|
||||
master_log_pos = 102 ;
|
||||
start slave;
|
||||
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
|
||||
DELETE FROM t1 WHERE c3 = 1;
|
||||
UPDATE t1 SET c2="should go away" WHERE c3 = 2;
|
||||
UPDATE t1 SET c2="C" WHERE c3 = 3;
|
||||
DELETE FROM t1 WHERE c3 = 2;
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row3 C 3
|
||||
row4 D 4
|
||||
INSERT INTO t1 VALUES ("row5","E",5);
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row3 C 3
|
||||
row4 D 4
|
||||
row5 E 5
|
||||
SELECT * FROM t1 ORDER BY c3;
|
||||
c1 c2 c3
|
||||
row3 C 3
|
||||
row4 D 4
|
||||
row5 E 5
|
||||
STOP SLAVE;
|
||||
Reference in New Issue
Block a user