Skip to content

Commit

Permalink
more sst test failures
Browse files Browse the repository at this point in the history
* xtrabackup no longer support --compact
* wsrep_sst_mysqldump wasn't always using --default-file
* wsrep_sst.cc overquoted --default-file for wsrep_sst_mysqldump

also remove redundant lines config and test lines, compiler warnings,
and mark big tests as big.
  • Loading branch information
vuvova committed Jun 15, 2018
1 parent 93ab0ef commit 7fdb7d4
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Setting SST method to mysqldump ...
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
CREATE USER 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
Expand Down Expand Up @@ -105,5 +107,3 @@ CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
DROP USER sslsst;
SET GLOBAL general_log = ON;
SET GLOBAL slow_query_log = ON;
1 change: 1 addition & 0 deletions mysql-test/suite/galera/t/galera_sst_mariabackup.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/galera/t/galera_sst_mysqldump.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/big_test.inc
--source include/galera_cluster.inc

--source suite/galera/include/galera_sst_set_mysqldump.inc
Expand Down
4 changes: 0 additions & 4 deletions mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore
[mysqld]
wsrep_debug=ON

ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem

[client]
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
Expand Down
14 changes: 6 additions & 8 deletions mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_openssl.inc
--source include/have_ssl_communication.inc

--source suite/galera/include/galera_sst_set_mysqldump.inc
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

--connection node_1
CREATE USER sslsst;
Expand All @@ -18,12 +21,7 @@ SET GLOBAL wsrep_sst_auth = 'sslsst:';

--source suite/galera/include/galera_st_disconnect_slave.inc

--source include/auto_increment_offset_restore.inc
--source suite/galera/include/galera_sst_restore.inc
DROP USER sslsst;

--connection node_2
# We have to manually restore global_log and slow_query_log due to mysql-wsrep#108
# Otherwise MTR's check_testcases complains

SET GLOBAL general_log = ON;
SET GLOBAL slow_query_log = ON;
DROP USER sslsst;
1 change: 1 addition & 0 deletions mysql-test/suite/galera/t/galera_sst_rsync.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/big_test.inc
--source include/galera_cluster.inc

--let $node_1=node_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ wsrep_debug=ON
[xtrabackup]
backup-locks
close-files
compact
#compact - disabled in xtrabackup 2.4, https://bugs.launchpad.net/percona-xtrabackup/+bug/1192834/comments/29
# compression requires qpress from the Percona repositories
# compress
# compress-threads=2
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_xtrabackup.inc
Expand Down
13 changes: 6 additions & 7 deletions scripts/wsrep_sst_mysqldump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ then
DROP PREPARE stmt;"
fi

# Retrieve the donor's @@global.gtid_binlog_state.
GTID_BINLOG_STATE=$(echo "SHOW GLOBAL VARIABLES LIKE 'gtid_binlog_state'" |\
$MYSQL_CLIENT $AUTH -S$WSREP_SST_OPT_SOCKET --disable-reconnect --connect_timeout=10 |\
tail -1 | awk -F ' ' '{ print $2 }')

MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF "\
"$AUTH -h${WSREP_SST_OPT_HOST_UNESCAPED} "\
"-P$WSREP_SST_OPT_PORT --disable-reconnect --connect_timeout=10"
Expand All @@ -126,12 +121,16 @@ tail -1 | awk -F ' ' '{ print $2 }')
SERVER_VERSION=$(echo "set statement wsrep_sync_wait=0 for SHOW VARIABLES LIKE 'version'" | $MYSQL |\
tail -1 | awk -F ' ' '{ print $2 }')

# Retrieve the donor's @@global.gtid_binlog_state.
GTID_BINLOG_STATE=$(echo "SHOW GLOBAL VARIABLES LIKE 'gtid_binlog_state'" | $MYSQL |\
tail -1 | awk -F ' ' '{ print $2 }')

RESET_MASTER=""
SET_GTID_BINLOG_STATE=""
SQL_LOG_BIN_OFF=""

# Safety check
if [ ${SERVER_VERSION%%.*} != '5' ]
if [ "${SERVER_VERSION%%.*}" != '5' ]
then
# If binary logging is enabled on the joiner node, we need to copy donor's
# gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be
Expand All @@ -146,7 +145,7 @@ then
fi

# NOTE: we don't use --routines here because we're dumping mysql.proc table
MYSQLDUMP="$MYSQLDUMP $AUTH -S$WSREP_SST_OPT_SOCKET \
MYSQLDUMP="$MYSQLDUMP $WSREP_SST_OPT_CONF $AUTH -S$WSREP_SST_OPT_SOCKET \
--add-drop-database --add-drop-table --skip-add-locks --create-options \
--disable-keys --extended-insert --skip-lock-tables --quick --set-charset \
--skip-comments --flush-privileges --all-databases --events"
Expand Down
34 changes: 17 additions & 17 deletions sql/wsrep_sst.cc
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ static ssize_t sst_prepare_other (const char* method,

ret= snprintf (cmd_str(), cmd_len,
"wsrep_sst_%s "
WSREP_SST_OPT_ROLE" 'joiner' "
WSREP_SST_OPT_ADDR" '%s' "
WSREP_SST_OPT_DATA" '%s' "
WSREP_SST_OPT_ROLE " 'joiner' "
WSREP_SST_OPT_ADDR " '%s' "
WSREP_SST_OPT_DATA " '%s' "
" %s "
WSREP_SST_OPT_PARENT" '%d'"
WSREP_SST_OPT_PARENT " '%d'"
" %s '%s' ",
method, addr_in, mysql_real_data_home,
wsrep_defaults_file,
Expand Down Expand Up @@ -842,13 +842,13 @@ static int sst_donate_mysqldump (const char* addr,

int ret= snprintf (cmd_str(), cmd_len,
"wsrep_sst_mysqldump "
WSREP_SST_OPT_ADDR" '%s' "
WSREP_SST_OPT_PORT" '%d' "
WSREP_SST_OPT_LPORT" '%u' "
WSREP_SST_OPT_SOCKET" '%s' "
" '%s' "
WSREP_SST_OPT_GTID" '%s:%lld' "
WSREP_SST_OPT_GTID_DOMAIN_ID" '%d'"
WSREP_SST_OPT_ADDR " '%s' "
WSREP_SST_OPT_PORT " '%d' "
WSREP_SST_OPT_LPORT " '%u' "
WSREP_SST_OPT_SOCKET " '%s' "
" %s "
WSREP_SST_OPT_GTID " '%s:%lld' "
WSREP_SST_OPT_GTID_DOMAIN_ID " '%d'"
"%s",
addr, port, mysqld_port, mysqld_unix_port,
wsrep_defaults_file, uuid_str,
Expand Down Expand Up @@ -1205,14 +1205,14 @@ static int sst_donate_other (const char* method,

ret= snprintf (cmd_str(), cmd_len,
"wsrep_sst_%s "
WSREP_SST_OPT_ROLE" 'donor' "
WSREP_SST_OPT_ADDR" '%s' "
WSREP_SST_OPT_SOCKET" '%s' "
WSREP_SST_OPT_DATA" '%s' "
WSREP_SST_OPT_ROLE " 'donor' "
WSREP_SST_OPT_ADDR " '%s' "
WSREP_SST_OPT_SOCKET " '%s' "
WSREP_SST_OPT_DATA " '%s' "
" %s "
" %s '%s' "
WSREP_SST_OPT_GTID" '%s:%lld' "
WSREP_SST_OPT_GTID_DOMAIN_ID" '%d'"
WSREP_SST_OPT_GTID " '%s:%lld' "
WSREP_SST_OPT_GTID_DOMAIN_ID " '%d'"
"%s",
method, addr, mysqld_unix_port, mysql_real_data_home,
wsrep_defaults_file,
Expand Down

0 comments on commit 7fdb7d4

Please sign in to comment.