1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-6490: mysqldump unknown option --galera-sst-mode

A new command line option "galera-sst-mode" was introduced
in mysqldump as part of fix for MDEV-6316. But, since the
fix was pushed to maria-10.0-galera branch, the mysqldump
tool supplied with mariadb client deb/rpm packages, does not
have this new opion.
This fix contains the same patch along with a test case.
This commit is contained in:
Nirbhay Choubey
2014-08-06 19:42:03 -04:00
parent abbdc7ae86
commit 42b6c07ebd
4 changed files with 132 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#
# Test for mysqldump's galera-sst-mode option
#
#
# MDEV-6490: mysqldump unknown option --galera-sst-mode
#
CREATE DATABASE bug6490;
USE bug6490;
CREATE TABLE t1(c1 INT);
INSERT INTO t1 values (1);
INSERT INTO t1 values (2);
# @@global.gtid_binlog_state - after
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
0-1-4
# Save the current gtid_binlog_state.
# Take a dump of bug6490 database
DROP TABLE t1;
# Load the dump
RESET MASTER;
SELECT * from t1;
c1
1
2
# @@global.gtid_binlog_state - after
SELECT @@global.gtid_binlog_state;
@@global.gtid_binlog_state
0-1-4
# Compare the two gtid_binlog_state's
# Cleanup
DROP DATABASE bug6490;
# End of test

View File

@ -0,0 +1,49 @@
# Embedded server doesn't support external clients
--source include/not_embedded.inc
# Binlog is required
--source include/have_log_bin.inc
--echo #
--echo # Test for mysqldump's galera-sst-mode option
--echo #
--echo #
--echo # MDEV-6490: mysqldump unknown option --galera-sst-mode
--echo #
CREATE DATABASE bug6490;
USE bug6490;
CREATE TABLE t1(c1 INT);
INSERT INTO t1 values (1);
INSERT INTO t1 values (2);
--echo # @@global.gtid_binlog_state - after
SELECT @@global.gtid_binlog_state;
--echo # Save the current gtid_binlog_state.
--let $before= `SELECT @@global.gtid_binlog_state`
--echo # Take a dump of bug6490 database
--exec $MYSQL_DUMP --galera-sst-mode bug6490 > $MYSQLTEST_VARDIR/tmp/bug6490.sql
DROP TABLE t1;
--echo # Load the dump
RESET MASTER;
--exec $MYSQL -uroot bug6490 < $MYSQLTEST_VARDIR/tmp/bug6490.sql
SELECT * from t1;
--echo # @@global.gtid_binlog_state - after
SELECT @@global.gtid_binlog_state;
--echo # Compare the two gtid_binlog_state's
--let $after= `SELECT @@global.gtid_binlog_state`
if (`SELECT STRCMP($before, $after)`)
{
--die ERROR: The two gtid_binlog_state's did not match.
}
--echo # Cleanup
--remove_file $MYSQLTEST_VARDIR/tmp/bug6490.sql
DROP DATABASE bug6490;
--echo # End of test