mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
cc05440836
Some of the test cases reference to binlog position and these position numbers are written into result explicitly. It is difficult to maintain if log event format changes. There are a couple of cases explicit position number appears, we handle them in different ways A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options Use --replace_result to mask them. B. 'SHOW BINLOG EVENT ...' Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. show_binlog_events.inc file's function is enhanced by given $binlog_file and $binlog_limit. C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc' For the test cases just care a few items in the result of 'SHOW SLAVE STATUS', only the items related to each test case are showed. 'show_slave_status.inc' is rebuild, only the given items in $status_items will be showed. 'check_slave_is_running.inc' and 'check_slave_no_error.inc' and 'check_slave_param.inc' are auxiliary files helping to show running status and error information easily.
89 lines
2.9 KiB
Text
89 lines
2.9 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;
|
|
**** On Master ****
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
1 1
|
|
2 2
|
|
**** On Slave ****
|
|
INSERT INTO t1 VALUE (3,3);
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
1 1
|
|
2 2
|
|
3 3
|
|
**** On Master ****
|
|
TRUNCATE TABLE t1;
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
**** On Slave ****
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
**** On Master ****
|
|
DROP TABLE t1;
|
|
show binlog events from <binlog_start>;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
|
master-bin.000001 # Write_rows # # table_id: #
|
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
|
**** On Master ****
|
|
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
|
INSERT INTO t1 VALUES (1,1), (2,2);
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
1 1
|
|
2 2
|
|
**** On Slave ****
|
|
INSERT INTO t1 VALUE (3,3);
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
1 1
|
|
2 2
|
|
3 3
|
|
**** On Master ****
|
|
DELETE FROM t1;
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
**** On Slave ****
|
|
SELECT * FROM t1 ORDER BY a,b;
|
|
a b
|
|
3 3
|
|
**** On Master ****
|
|
DROP TABLE t1;
|
|
show binlog events from <binlog_start>;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
|
master-bin.000001 # Write_rows # # table_id: #
|
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|
|
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
|
master-bin.000001 # Write_rows # # table_id: #
|
|
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # BEGIN
|
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
|
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
|
master-bin.000001 # Write_rows # # table_id: #
|
|
master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F
|
|
master-bin.000001 # Query # # COMMIT
|
|
master-bin.000001 # Query # # use `test`; DROP TABLE t1
|