68 lines
2.5 KiB
Plaintext
68 lines
2.5 KiB
Plaintext
#
|
|
# ==== Purpose ====
|
|
#
|
|
# This test checks if the warning regarding invalid replication timestamps is
|
|
# logged only once and if, when the timestamps are no longer invalid, a new
|
|
# warning is also logged once.
|
|
#
|
|
# ==== Implementation ====
|
|
#
|
|
# Two transactions are executed and replicated on the slaves. Then, the test
|
|
# simulates that the replication timestamps are invalid for two transactions.
|
|
# Finally, two transactions are executed with valid timestamps.
|
|
# The test then asserts that only one warning was issued when the timestamps
|
|
# became invalid, and also when the timestamps are back to normal.
|
|
#
|
|
# ==== References ====
|
|
#
|
|
# WL#7319 Infrastructure for GTID based delayed replication and replication lag monitoring
|
|
|
|
--source include/have_debug.inc
|
|
# test is binlog agnostic
|
|
--source include/have_binlog_format_row.inc
|
|
--source include/master-slave.inc
|
|
|
|
CREATE TABLE t1 (a INT);
|
|
INSERT INTO t1 VALUES (1);
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
--source include/rpl_connection_slave.inc
|
|
call mtr.add_suppression("Invalid replication timestamps: original commit timestamp is more recent*");
|
|
call mtr.add_suppression("The replication timestamps have returned to normal values.");
|
|
|
|
--source include/rpl_connection_master.inc
|
|
--let $debug_point= rpl_invalid_gtid_timestamp
|
|
--source include/add_debug_point.inc
|
|
|
|
UPDATE t1 SET a=2;
|
|
DELETE FROM t1 WHERE a=2;
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
--source include/rpl_connection_master.inc
|
|
--source include/remove_debug_point.inc
|
|
|
|
INSERT INTO t1 VALUES (1);
|
|
DROP TABLE t1;
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
# check if invalid gtid timestamps warning is present only once in the slave's
|
|
# log file
|
|
--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err
|
|
--let $assert_text= Invalid replication timestamps warning is present in log
|
|
--let $assert_select= Invalid replication timestamps: original commit timestamp is more recent than the immediate commit timestamp
|
|
--let $assert_count= 1
|
|
--let $assert_only_after= CURRENT_TEST: rpl.rpl_invalid_replication_timestamps
|
|
--source include/assert_grep.inc
|
|
|
|
# check if invalid gtid timestamps warning is present only once in the slave's
|
|
# log file
|
|
--let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.2.err
|
|
--let $assert_text= Normalized replication timestamps warning is present in log
|
|
--let $assert_select= The replication timestamps have returned to normal values.
|
|
--let $assert_count= 1
|
|
--let $assert_only_after= CURRENT_TEST: rpl.rpl_invalid_replication_timestamps
|
|
--source include/assert_grep.inc
|
|
|
|
--source include/rpl_connection_master.inc
|
|
--source include/rpl_end.inc
|