mariadb/mysql-test/suite/galera_sr/t/MDEV-18585.test
Teemu Ollakka f0b65102b2 MDEV-18585 Avoid excessive Annotate_rows_log_events in binlog
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.
2019-02-18 15:04:38 +02:00

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;