mirror of
https://github.com/MariaDB/server.git
synced 2025-04-15 19:55:35 +02:00

Make sure that the Annotate_rows_log_events is written into binlog only for the first fragment of the current statement. Also avoid flusing pending rows event when calculating bytes generated by the transaction. Added and recorded a test which verifies that the binlog contains only one Annotate_rows_log_event per statement with various SR settings. Recrded mysql-wsrep-features#136 which produced different output with excession log events suppressed.
36 lines
1.8 KiB
Text
36 lines
1.8 KiB
Text
connection node_2;
|
|
connection node_1;
|
|
CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
|
SET SESSION wsrep_trx_fragment_unit='ROWS';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
INSERT INTO t1 VALUES (1), (2);
|
|
SET SESSION wsrep_trx_fragment_unit='BYTES';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
INSERT INTO t1 VALUES (3), (4);
|
|
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
INSERT INTO t1 VALUES (5), (6);
|
|
SET SESSION wsrep_trx_fragment_unit=default;
|
|
SET SESSION wsrep_trx_fragment_size=default;
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 518;
|
|
Log_name Pos Event_type Server_id End_log_pos Info
|
|
mysqld-bin.000002 518 Gtid 1 560 BEGIN GTID 0-1-2
|
|
mysqld-bin.000002 560 Annotate_rows 1 613 INSERT INTO t1 VALUES (1), (2)
|
|
mysqld-bin.000002 613 Table_map 1 658 table_id: # (test.t1)
|
|
mysqld-bin.000002 658 Write_rows_v1 1 696 table_id: # flags: STMT_END_F
|
|
mysqld-bin.000002 696 Table_map 1 741 table_id: # (test.t1)
|
|
mysqld-bin.000002 741 Write_rows_v1 1 779 table_id: # flags: STMT_END_F
|
|
mysqld-bin.000002 779 Xid 1 810 COMMIT /* xid=# */
|
|
mysqld-bin.000002 810 Gtid 1 852 BEGIN GTID 0-1-3
|
|
mysqld-bin.000002 852 Annotate_rows 1 905 INSERT INTO t1 VALUES (3), (4)
|
|
mysqld-bin.000002 905 Table_map 1 950 table_id: # (test.t1)
|
|
mysqld-bin.000002 950 Write_rows_v1 1 988 table_id: # flags: STMT_END_F
|
|
mysqld-bin.000002 988 Table_map 1 1033 table_id: # (test.t1)
|
|
mysqld-bin.000002 1033 Write_rows_v1 1 1071 table_id: # flags: STMT_END_F
|
|
mysqld-bin.000002 1071 Xid 1 1102 COMMIT /* xid=# */
|
|
mysqld-bin.000002 1102 Gtid 1 1144 BEGIN GTID 0-1-4
|
|
mysqld-bin.000002 1144 Annotate_rows 1 1197 INSERT INTO t1 VALUES (5), (6)
|
|
mysqld-bin.000002 1197 Table_map 1 1242 table_id: # (test.t1)
|
|
mysqld-bin.000002 1242 Write_rows_v1 1 1285 table_id: # flags: STMT_END_F
|
|
mysqld-bin.000002 1285 Xid 1 1316 COMMIT /* xid=# */
|
|
DROP TABLE t1;
|