mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
10.0-base -> 10.0-monty
This commit is contained in:
88
mysql-test/suite/binlog/r/binlog_checkpoint.result
Normal file
88
mysql-test/suite/binlog/r/binlog_checkpoint.result
Normal file
@@ -0,0 +1,88 @@
|
||||
SET @old_max_binlog_size= @@global.max_binlog_size;
|
||||
SET GLOBAL max_binlog_size= 4096;
|
||||
SET @old_innodb_flush_log_at_trx_commit= @@global.innodb_flush_log_at_trx_commit;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= 1;
|
||||
RESET MASTER;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Innodb;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=Myisam;
|
||||
*** Test that RESET MASTER waits for pending commit checkpoints to complete.
|
||||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con1_ready WAIT_FOR con1_go";
|
||||
INSERT INTO t1 VALUES (1, REPEAT("x", 4100));
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
|
||||
INSERT INTO t2 VALUES (1, REPEAT("x", 4100));
|
||||
INSERT INTO t2 VALUES (2, REPEAT("x", 4100));
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
master-bin.000003 #
|
||||
master-bin.000004 #
|
||||
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 # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "execute_command_after_close_tables SIGNAL reset_master_done";
|
||||
RESET MASTER;
|
||||
This will timeout, as RESET MASTER is blocked
|
||||
SET DEBUG_SYNC= "now WAIT_FOR reset_master_done TIMEOUT 1";
|
||||
Warnings:
|
||||
Warning 1639 debug sync point wait timed out
|
||||
SET DEBUG_SYNC= "now SIGNAL con1_go";
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000001 # Binlog_checkpoint # # master-bin.000001
|
||||
*** Test that binlog N is active, and commit checkpoint for (N-1) is
|
||||
*** done while there is still a pending commit checkpoint for (N-2).
|
||||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con1_ready WAIT_FOR con1_continue";
|
||||
INSERT INTO t1 VALUES (20, REPEAT("x", 4100));
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con1_ready";
|
||||
SET DEBUG_SYNC= "commit_after_group_release_commit_ordered SIGNAL con2_ready WAIT_FOR con2_continue";
|
||||
INSERT INTO t1 VALUES (21, REPEAT("x", 4100));
|
||||
SET DEBUG_SYNC= "now WAIT_FOR con2_ready";
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 #
|
||||
master-bin.000002 #
|
||||
master-bin.000003 #
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000001 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000002 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000002 # Query # # BEGIN
|
||||
master-bin.000002 # Table_map # # table_id: # (test.t1)
|
||||
master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Xid # # COMMIT /* XID */
|
||||
master-bin.000002 # Rotate # # master-bin.000003;pos=POS
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "now SIGNAL con2_continue";
|
||||
con1 is still pending, no new binlog checkpoint should have been logged.
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
SET DEBUG_SYNC= "now SIGNAL con1_continue";
|
||||
No commit checkpoints are pending, a new binlog checkpoint should have been logged.
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000003 # Format_desc # # SERVER_VERSION, BINLOG_VERSION
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000001
|
||||
master-bin.000003 # Binlog_checkpoint # # master-bin.000003
|
||||
DROP TABLE t1, t2;
|
||||
SET GLOBAL max_binlog_size= @old_max_binlog_size;
|
||||
SET GLOBAL innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
|
Reference in New Issue
Block a user