diff options
author | Vlad Lesin <vlad_lesin@mail.ru> | 2020-09-04 10:38:27 +0300 |
---|---|---|
committer | Vlad Lesin <vlad_lesin@mail.ru> | 2020-09-04 10:38:27 +0300 |
commit | f19ff5b68e70214c4d75a2165ce8f5ef8cd2739f (patch) | |
tree | f16f7ff77f5c84aeb9f4cd434d405153e008bbc6 | |
parent | cbcb921bb83be8b84142dfa73583724c8af843a8 (diff) | |
download | mariadb-git-10.4-MDEV-23586-test-case.tar.gz |
MDEV-23586 Mariabackup: GTID saved for replication in 10.4.14 is wrong10.4-MDEV-23586-test-case
Test case without replication.
-rw-r--r-- | mysql-test/main/backup_binlog_pos.result | 21 | ||||
-rw-r--r-- | mysql-test/main/backup_binlog_pos.test | 37 |
2 files changed, 58 insertions, 0 deletions
diff --git a/mysql-test/main/backup_binlog_pos.result b/mysql-test/main/backup_binlog_pos.result new file mode 100644 index 00000000000..da2dfaefc1a --- /dev/null +++ b/mysql-test/main/backup_binlog_pos.result @@ -0,0 +1,21 @@ +CREATE TABLE t(i INT) ENGINE INNODB; +SET DEBUG_SYNC='ha_commit_trans_before_log_and_order SIGNAL before_binlog_flush WAIT_FOR cont'; +SET DEBUG_SYNC='ha_commit_trans_after_log_and_order SIGNAL after_binlog_flush'; +INSERT INTO t VALUES(0); +connect con1,localhost,root,,; +SET DEBUG_SYNC='now WAIT_FOR before_binlog_flush'; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +SET DEBUG_SYNC='now SIGNAL cont WAIT_FOR after_binlog_flush'; +SET DEBUG_SYNC='RESET'; +BACKUP STAGE END; +############# +# Binlog position must not be changed under BLOCK_COMMIT lock, +# the following result must be equal to 1 +###################### +SELECT @pos_before = @pos_after; +@pos_before = @pos_after +1 +disconnect con1; +connection default; +DROP TABLE t; diff --git a/mysql-test/main/backup_binlog_pos.test b/mysql-test/main/backup_binlog_pos.test new file mode 100644 index 00000000000..d41bde85300 --- /dev/null +++ b/mysql-test/main/backup_binlog_pos.test @@ -0,0 +1,37 @@ +--source include/have_debug.inc +--source include/have_innodb.inc +--source include/have_log_bin.inc + +CREATE TABLE t(i INT) ENGINE INNODB; + +SET DEBUG_SYNC='ha_commit_trans_before_log_and_order SIGNAL before_binlog_flush WAIT_FOR cont'; +SET DEBUG_SYNC='ha_commit_trans_after_log_and_order SIGNAL after_binlog_flush'; +--send INSERT INTO t VALUES(0) + +--connect (con1,localhost,root,,) + +SET DEBUG_SYNC='now WAIT_FOR before_binlog_flush'; +BACKUP STAGE START; +BACKUP STAGE BLOCK_COMMIT; +--let $pos_before= query_get_value(SHOW MASTER STATUS,Position,1) +SET DEBUG_SYNC='now SIGNAL cont WAIT_FOR after_binlog_flush'; +SET DEBUG_SYNC='RESET'; +--let $pos_after= query_get_value(SHOW MASTER STATUS,Position,1) +BACKUP STAGE END; + +--disable_query_log +--eval SET @pos_before=$pos_before +--eval SET @pos_after=$pos_after +--enable_query_log + +--echo ############# +--echo # Binlog position must not be changed under BLOCK_COMMIT lock, +--echo # the following result must be equal to 1 +--echo ###################### +SELECT @pos_before = @pos_after; + +--disconnect con1 +--connection default +--reap + +DROP TABLE t; |