fix binlog_xa_recover test
1. wait for the binlog thread to reach the certain state, don't use a debug_sync that's incorrectly placed to detect the state 2. no need to do a (non-deterministic) `show binlog events` to verify what is guaranteed by the directly preceding line
This commit is contained in:
parent
bb98c6bf44
commit
3c021485c9
@ -146,29 +146,12 @@ master-bin.000004 # Xid # # COMMIT /* XID */
|
|||||||
SET DEBUG_SYNC= "now SIGNAL con10_cont";
|
SET DEBUG_SYNC= "now SIGNAL con10_cont";
|
||||||
connection con10;
|
connection con10;
|
||||||
connection default;
|
connection default;
|
||||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
|
||||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
|
||||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||||
connection con12;
|
connection con12;
|
||||||
connection default;
|
connection default;
|
||||||
SET GLOBAL debug_dbug= @old_dbug;
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||||
connection con11;
|
connection con11;
|
||||||
connection default;
|
connection default;
|
||||||
Checking that master-bin.000004 is the last binlog checkpoint
|
|
||||||
include/show_binlog_events.inc
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000004 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
|
||||||
master-bin.000004 # Gtid_list # # [#-#-#]
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000001
|
|
||||||
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
|
|
||||||
master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL)
|
|
||||||
master-bin.000004 # Table_map # # table_id: # (test.t1)
|
|
||||||
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000004 # Xid # # COMMIT /* XID */
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000002
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000004
|
|
||||||
Now crash the server
|
Now crash the server
|
||||||
SET SESSION debug_dbug="+d,crash_commit_after_log";
|
SET SESSION debug_dbug="+d,crash_commit_after_log";
|
||||||
INSERT INTO t1 VALUES (14, NULL);
|
INSERT INTO t1 VALUES (14, NULL);
|
||||||
|
@ -178,14 +178,13 @@ connection default;
|
|||||||
|
|
||||||
# We need to sync the test case with the background processing of the
|
# We need to sync the test case with the background processing of the
|
||||||
# commit checkpoint, otherwise we get nondeterministic results.
|
# commit checkpoint, otherwise we get nondeterministic results.
|
||||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
let $wait_condition= select count(*) = 1 from performance_schema.threads where processlist_state = "Waiting for background binlog tasks";
|
||||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
--source include/wait_condition.inc
|
||||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||||
connection con12;
|
connection con12;
|
||||||
reap;
|
reap;
|
||||||
connection default;
|
connection default;
|
||||||
SET GLOBAL debug_dbug= @old_dbug;
|
|
||||||
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||||
connection con11;
|
connection con11;
|
||||||
@ -199,9 +198,6 @@ connection default;
|
|||||||
--let $condition= = "master-bin.000004"
|
--let $condition= = "master-bin.000004"
|
||||||
--source include/wait_show_condition.inc
|
--source include/wait_show_condition.inc
|
||||||
|
|
||||||
--echo Checking that master-bin.000004 is the last binlog checkpoint
|
|
||||||
--source include/show_binlog_events.inc
|
|
||||||
|
|
||||||
--echo Now crash the server
|
--echo Now crash the server
|
||||||
# It is not too easy to test XA recovery, as it runs early during server
|
# It is not too easy to test XA recovery, as it runs early during server
|
||||||
# startup, before any connections can be made.
|
# startup, before any connections can be made.
|
||||||
|
@ -151,30 +151,12 @@ master-bin.000004 # Xid # # COMMIT /* XID */
|
|||||||
SET DEBUG_SYNC= "now SIGNAL con10_cont";
|
SET DEBUG_SYNC= "now SIGNAL con10_cont";
|
||||||
connection con10;
|
connection con10;
|
||||||
connection default;
|
connection default;
|
||||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
|
||||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
|
||||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||||
connection con12;
|
connection con12;
|
||||||
connection default;
|
connection default;
|
||||||
SET GLOBAL debug_dbug= @old_dbug;
|
|
||||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||||
connection con11;
|
connection con11;
|
||||||
connection default;
|
connection default;
|
||||||
Checking that master-bin.000004 is the last binlog checkpoint
|
|
||||||
include/show_binlog_events.inc
|
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
|
||||||
master-bin.000004 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
|
||||||
master-bin.000004 # Start_encryption # #
|
|
||||||
master-bin.000004 # Gtid_list # # [#-#-#]
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000001
|
|
||||||
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
|
|
||||||
master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL)
|
|
||||||
master-bin.000004 # Table_map # # table_id: # (test.t1)
|
|
||||||
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
|
||||||
master-bin.000004 # Xid # # COMMIT /* XID */
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000002
|
|
||||||
master-bin.000004 # Binlog_checkpoint # # master-bin.000004
|
|
||||||
Now crash the server
|
Now crash the server
|
||||||
SET SESSION debug_dbug="+d,crash_commit_after_log";
|
SET SESSION debug_dbug="+d,crash_commit_after_log";
|
||||||
INSERT INTO t1 VALUES (14, NULL);
|
INSERT INTO t1 VALUES (14, NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user