summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_gtid_crash.result
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2013-03-27 19:29:59 +0100
committerunknown <knielsen@knielsen-hq.org>2013-03-27 19:29:59 +0100
commitb0389850a55f16787b183130eee4b8d34eaede29 (patch)
tree11f63df4cce3c8906ebdcb494c2134863ed408b1 /mysql-test/suite/rpl/r/rpl_gtid_crash.result
parent0fdbdde4747445cfb0d7fbc2e8fc0e766be70c8b (diff)
downloadmariadb-git-b0389850a55f16787b183130eee4b8d34eaede29.tar.gz
MDEV-26: Global transaction ID.
Test crashing the master, check that it recovers the binlog state. Fix one bug introduced by previous commit (crash-recoved binlog state was overwritten by loading stale binlog state file). Fix Windows build error.
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_gtid_crash.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_gtid_crash.result45
1 files changed, 43 insertions, 2 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_gtid_crash.result b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
index e9c04462b93..7257847e2c0 100644
--- a/mysql-test/suite/rpl/r/rpl_gtid_crash.result
+++ b/mysql-test/suite/rpl/r/rpl_gtid_crash.result
@@ -1,8 +1,6 @@
include/rpl_init.inc [topology=1->2]
*** Test crashing master, causing slave IO thread to reconnect while SQL thread is running ***
-SET sql_log_bin=0;
ALTER TABLE mysql.rpl_slave_state ENGINE=InnoDB;
-SET sql_log_bin=1;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, 0);
include/stop_slave.inc
@@ -16,4 +14,47 @@ SELECT 1;
Got one of the listed errors
INSERT INTO t1 VALUES (1000, 3);
DROP TABLE t1;
+*** Test crashing the master mysqld and check that binlog state is recovered. ***
+include/stop_slave.inc
+RESET MASTER;
+CHANGE MASTER TO master_gtid_pos='';
+RESET MASTER;
+SHOW BINLOG EVENTS IN 'master-bin.000001' LIMIT 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid_list # # []
+CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
+include/start_slave.inc
+SET gtid_domain_id= 1;
+INSERT INTO t1 VALUES (1);
+INSERT INTO t1 VALUES (2);
+FLUSH LOGS;
+SET gtid_domain_id= 2;
+INSERT INTO t1 VALUES (3);
+FLUSH LOGS;
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+SHOW BINLOG EVENTS IN 'master-bin.000003' LIMIT 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000003 # Gtid_list # # [1-1-3,2-1-4,0-1-1]
+SET SESSION debug_dbug="+d,crash_dispatch_command_before";
+SELECT 1;
+Got one of the listed errors
+show binary logs;
+Log_name File_size
+master-bin.000001 #
+master-bin.000002 #
+master-bin.000003 #
+master-bin.000004 #
+SHOW BINLOG EVENTS IN 'master-bin.000004' LIMIT 1,1;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000004 # Gtid_list # # [1-1-3,0-1-1,2-1-4]
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+3
+DROP TABLE t1;
include/rpl_end.inc