Commit 85f10224 authored by Sachin's avatar Sachin

Fix galera_log_bin

Cleanup the nodes before and after test run
parent 49ec78ab
reset master;
reset master;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB; CREATE TABLE t2 (id INT) ENGINE=InnoDB;
...@@ -10,50 +12,51 @@ SELECT COUNT(*) = 2 FROM t2; ...@@ -10,50 +12,51 @@ SELECT COUNT(*) = 2 FROM t2;
COUNT(*) = 2 COUNT(*) = 2
1 1
ALTER TABLE t1 ADD COLUMN f2 INTEGER; ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS; include/show_binlog_events.inc
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000002 # Gtid # # GTID 0-1-1 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000002 # Table_map # # table_id: # (test.t1) mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000002 # Gtid # # GTID 0-1-3 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000002 # Table_map # # table_id: # (test.t2) mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000002 # Table_map # # table_id: # (test.t2) mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000002 # Gtid # # GTID 0-1-6 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2 COUNT(*) = 2
1 1
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18; include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000003 # Gtid # # GTID 0-1-1 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000003 # Table_map # # table_id: # (test.t1) mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000003 # Gtid # # GTID 0-1-3 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000003 # Table_map # # table_id: # (test.t2) mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5 mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000003 # Table_map # # table_id: # (test.t2) mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */ mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000003 # Gtid # # GTID 0-1-6 mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
#cleanup
RESET MASTER; RESET MASTER;
reset master;
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--connection node_1
reset master;
--connection node_2
reset master;
# #
# Test Galera with --log-bin --log-slave-updates . # Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used, # This way the actual MySQL binary log is used,
...@@ -20,20 +25,19 @@ SELECT COUNT(*) = 2 FROM t2; ...@@ -20,20 +25,19 @@ SELECT COUNT(*) = 2 FROM t2;
--connection node_1 --connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER; ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--let $MASTER_MYPORT=$NODE_MYPORT_1
FLUSH LOGS; --source include/show_binlog_events.inc
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
--connection node_2 --connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--replace_column 2 # 4 # 5 # --let $MASTER_MYPORT=$NODE_MYPORT_2
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/ --source include/show_binlog_events.inc
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
--echo #cleanup
--connection node_1 --connection node_1
RESET MASTER; RESET MASTER;
--connection node_2
reset master;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment