mirror of
https://github.com/MariaDB/server.git
synced 2025-04-14 11:15:34 +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.
42 lines
850 B
Text
42 lines
850 B
Text
#
|
|
# MDEV-18686 Verify that the Annotate_rows_log_event is written only
|
|
# once per statement into binlog.
|
|
#
|
|
--source include/galera_cluster.inc
|
|
|
|
CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
|
|
|
#
|
|
# Unit ROW
|
|
#
|
|
SET SESSION wsrep_trx_fragment_unit='ROWS';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
|
|
INSERT INTO t1 VALUES (1), (2);
|
|
|
|
#
|
|
# Unit BYTE
|
|
#
|
|
SET SESSION wsrep_trx_fragment_unit='BYTES';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
|
|
INSERT INTO t1 VALUES (3), (4);
|
|
|
|
#
|
|
# Unit STATEMENT
|
|
#
|
|
SET SESSION wsrep_trx_fragment_unit='STATEMENTS';
|
|
SET SESSION wsrep_trx_fragment_size=1;
|
|
|
|
INSERT INTO t1 VALUES (5), (6);
|
|
|
|
#
|
|
# Reset to default settings
|
|
#
|
|
SET SESSION wsrep_trx_fragment_unit=default;
|
|
SET SESSION wsrep_trx_fragment_size=default;
|
|
|
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' FROM 518;
|
|
|
|
DROP TABLE t1;
|