mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
test cleanup: remove Format_description_log_event size dependency
1. use include/show_binlog_events.inc instead of SHOW BINLOG EVENTS 2. use include/show_relaylog_eventc.inc too 3. in all other places where a number might appear in the result file, include binlog_start_pos.inc, calculate the position like pos=`select $binlog_start_pos + 100`; and use replace_result $pos <pos>
This commit is contained in:
@ -3,11 +3,11 @@ RESET MASTER;
|
||||
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 486
|
||||
master-bin.000001 <pos>
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 486
|
||||
Binlog_snapshot_position <pos>
|
||||
BEGIN;
|
||||
INSERT INTO t1 VALUES (0, "");
|
||||
# Connection con1
|
||||
@ -38,10 +38,10 @@ a b
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 988
|
||||
Binlog_snapshot_position <pos>
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 1340
|
||||
master-bin.000001 <pos>
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
2
|
||||
@ -60,50 +60,47 @@ a b
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
Binlog_snapshot_file master-bin.000001
|
||||
Binlog_snapshot_position 988
|
||||
Binlog_snapshot_position <pos>
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 367
|
||||
master-bin.000002 <pos>
|
||||
COMMIT;
|
||||
SHOW STATUS LIKE 'binlog_snapshot_%';
|
||||
Variable_name Value
|
||||
Binlog_snapshot_file master-bin.000002
|
||||
Binlog_snapshot_position 367
|
||||
Binlog_snapshot_position <pos>
|
||||
SHOW MASTER STATUS;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 367
|
||||
SHOW BINLOG EVENTS;
|
||||
master-bin.000002 <pos>
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 248 Server ver: #, Binlog ver: #
|
||||
master-bin.000001 248 Gtid_list 1 273 []
|
||||
master-bin.000001 273 Binlog_checkpoint 1 313 master-bin.000001
|
||||
master-bin.000001 313 Gtid 1 351 GTID 0-1-1
|
||||
master-bin.000001 351 Query 1 486 use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb
|
||||
master-bin.000001 486 Gtid 1 524 GTID 0-1-2
|
||||
master-bin.000001 524 Query 1 636 use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam
|
||||
master-bin.000001 636 Gtid 1 674 BEGIN GTID 0-1-3
|
||||
master-bin.000001 674 Query 1 762 use `test`; INSERT INTO t2 VALUES (2)
|
||||
master-bin.000001 762 Query 1 831 COMMIT
|
||||
master-bin.000001 831 Gtid 1 869 BEGIN GTID 0-1-4
|
||||
master-bin.000001 869 Query 1 961 use `test`; INSERT INTO t1 VALUES (0, "")
|
||||
master-bin.000001 961 Xid 1 988 COMMIT /* XID */
|
||||
master-bin.000001 988 Gtid 1 1026 BEGIN GTID 0-1-5
|
||||
master-bin.000001 1026 Query 1 1114 use `test`; INSERT INTO t2 VALUES (3)
|
||||
master-bin.000001 1114 Query 1 1183 COMMIT
|
||||
master-bin.000001 1183 Gtid 1 1221 BEGIN GTID 0-1-6
|
||||
master-bin.000001 1221 Query 1 1313 use `test`; INSERT INTO t1 VALUES (4, "")
|
||||
master-bin.000001 1313 Xid 1 1340 COMMIT /* XID */
|
||||
master-bin.000001 1340 Gtid 1 1378 BEGIN GTID 0-1-7
|
||||
master-bin.000001 1378 Query 1 1470 use `test`; INSERT INTO t1 VALUES (1, "")
|
||||
master-bin.000001 1470 Xid 1 1497 COMMIT /* XID */
|
||||
master-bin.000001 1497 Gtid 1 1535 BEGIN GTID 0-1-8
|
||||
master-bin.000001 1535 Query 1 1632 use `test`; INSERT INTO t1 VALUES (2, "first")
|
||||
master-bin.000001 1632 Query 1 1730 use `test`; INSERT INTO t1 VALUES (2, "second")
|
||||
master-bin.000001 1730 Xid 1 1757 COMMIT /* XID */
|
||||
master-bin.000001 1757 Gtid 1 1795 BEGIN GTID 0-1-9
|
||||
master-bin.000001 1795 Query 1 1887 use `test`; INSERT INTO t1 VALUES (3, "")
|
||||
master-bin.000001 1887 Xid 1 1914 COMMIT /* XID */
|
||||
master-bin.000001 1914 Rotate 1 1958 master-bin.000002;pos=4
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a INT PRIMARY KEY) ENGINE=myisam
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (2)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (0, "")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (3)
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (4, "")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1, "")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "first")
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2, "second")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (3, "")
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
|
||||
*** MDEV-7310: last_commit_pos_offset set to wrong value after binlog rotate in group commit ***
|
||||
SET @old_size= @@GLOBAL.max_binlog_size;
|
||||
SET GLOBAL max_binlog_size=4096;
|
||||
|
Reference in New Issue
Block a user