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;
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (id INT) ENGINE=InnoDB;
......@@ -10,50 +12,51 @@ SELECT COUNT(*) = 2 FROM t2;
COUNT(*) = 2
1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000002 # Gtid # # GTID 0-1-1
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000002 # Table_map # # table_id: # (test.t1)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-3
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
mysqld-bin.000002 # Gtid # # GTID 0-1-6
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
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
mysqld-bin.000003 # Gtid # # GTID 0-1-1
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
mysqld-bin.000003 # Table_map # # table_id: # (test.t1)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-3
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
mysqld-bin.000003 # Gtid # # GTID 0-1-6
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t1)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
mysqld-bin.000001 # Table_map # # table_id: # (test.t2)
mysqld-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
mysqld-bin.000001 # Xid # # COMMIT /* XID */
mysqld-bin.000001 # Gtid # # GTID #-#-#
mysqld-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
DROP TABLE t1;
DROP TABLE t2;
#cleanup
RESET MASTER;
reset master;
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
reset master;
--connection node_2
reset master;
#
# Test Galera with --log-bin --log-slave-updates .
# This way the actual MySQL binary log is used,
......@@ -20,20 +25,19 @@ SELECT COUNT(*) = 2 FROM t2;
--connection node_1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
FLUSH LOGS;
--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;
--let $MASTER_MYPORT=$NODE_MYPORT_1
--source include/show_binlog_events.inc
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--replace_column 2 # 4 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18;
--let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;
DROP TABLE t2;
--echo #cleanup
--connection node_1
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