1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-33212: mysqldump uses MASTER_LOG_POS with dump-slave

The patch for MDEV-15530 incorrectly added a column in the middle of SHOW
SLAVE STATUS output. This is wrong, as it breaks backwards compatibility
with existing applications and scripts. In this case, it even broke
mariadb-dump, which is included in the server source tree!

Revert the incorrect change, putting the new Replicate_Rewrite_DB at the end
of SHOW SLAVE STATUS output.

Add a testcase for the mariadb-dump --dump-slave wrong output problem. Also
add a testcase rpl.rpl_show_slave_status to hopefully prevent any future
incorrect additions to SHOW SLAVE STATUS.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2024-03-08 15:23:42 +01:00
parent 11c75fc396
commit 23c48474f7
12 changed files with 175 additions and 28 deletions

View File

@ -198,4 +198,20 @@ if ($postdump_first_binary_log_filename != $postdump_binlog_filename)
connection slave;
--source include/start_slave.inc
# MDEV-33212: mysqldump uses MASTER_LOG_POS with dump-slave
# The bug was that the MASTER_LOG_POS was wrong. So check that it is correct.
--connection master
--let $pos= query_get_value(SHOW MASTER STATUS, Position, 1)
--sync_slave_with_master
--connection master
--exec $MYSQL_DUMP_SLAVE --compact --dump-slave test >$MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
--let SEARCH_RANGE=500000000
--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
--let SEARCH_PATTERN= MASTER_LOG_POS=$pos
--let SEARCH_OUTPUT=count
--source include/search_pattern_in_file.inc
--remove_file $MYSQLTEST_VARDIR/tmp/MDEV-33212.sql
--source include/rpl_end.inc