1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-4827: prelude - additional gtid/no-gtid tests for mysqldump

This will make it easier to show changes.
This commit is contained in:
Daniel Black
2024-02-06 18:20:53 +11:00
parent 5e7047067e
commit f7adf1292c
2 changed files with 164 additions and 15 deletions

View File

@ -37,7 +37,7 @@ start slave;
start slave;
--echo *** Test mysqldump --dump-slave GTID functionality.
--echo *** Test mysqldump --dump-slave GTID/non-gtid functionality.
--connection master
SET gtid_seq_no = 1000;
@ -52,37 +52,80 @@ CREATE TABLE t2 (a INT PRIMARY KEY);
DROP TABLE t2;
--echo
--echo 1. --dump-slave=1
--echo 1. --dump-slave=1 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=1 --gtid test
--echo
--echo 2. --dump-slave=2
--echo 1a. --dump-slave=1
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=1 test
--echo
--echo 2. --dump-slave=2 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=2 --gtid test
--echo *** Test mysqldump --master-data GTID functionality.
--echo
--echo 1. --master-data=1
--echo 2. --dump-slave=2
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave=2 test
--echo *** Test mysqldump --master-data GTID/non-gtid functionality.
--echo
--echo 1. --master-data=1 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=1 --gtid test
--echo
--echo 2. --master-data=2
--echo 1a. --master-data=1
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=1 test
--echo
--echo 2. --master-data=2 --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=2 --gtid test
--echo
--echo 3. --master-data --single-transaction
--echo 2a. --master-data=2
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data=2 test
--echo
--echo 3. --master-data --single-transaction --gtid
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data --single-transaction --gtid test
--echo
--echo 3a. --master-data --single-transaction
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/
--exec $MYSQL_DUMP_SLAVE --compact --master-data --single-transaction test
--echo
--echo 4. --master-data=2 --dump-slave=2 --single-transaction --gtid (MDEV-4827)
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/ /MariaDB dump.*/MariaDB dump/ /Dump completed.*/Dump completed/ /Server version.*/Server version/
--exec $MYSQL_DUMP_SLAVE --master-data=2 --dump-slave=2 --single-transaction --gtid test
--echo
--echo
--echo 4a. --master-data=2 --dump-slave=2 --single-transaction (MDEV-4827)
--echo
--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=BINLOG_START/ /MariaDB dump.*/MariaDB dump/ /Dump completed.*/Dump completed/ /Server version.*/Server version/
--exec $MYSQL_DUMP_SLAVE --master-data=2 --dump-slave=2 --single-transaction test
--echo
#
# MDEV-32611 Added test for mysqldump --delete-master-logs option.
# This options is alias of