diff options
author | Julius Goryavsky <sysprg@gmail.com> | 2018-12-06 14:36:57 +0100 |
---|---|---|
committer | Julius Goryavsky <sysprg@gmail.com> | 2018-12-17 11:14:54 +0100 |
commit | cadb6ac770d818d1ed14aa1c2b84647619900935 (patch) | |
tree | 4696955e345412b3f9867daf3873f9a3ae1fa400 /sql/wsrep_sst.cc | |
parent | b6f203984bc519a31ac695cbcb6de7f1f638d321 (diff) | |
download | mariadb-git-cadb6ac770d818d1ed14aa1c2b84647619900935.tar.gz |
DEV-17835: Remove wsrep-sst-method=xtrabackup
The use of the xtrabackup and xtrabackup-v2 methods for SST
has been declared obsolete since version 10.2, now it cannot
be used because of the different redo log format. Accordingly,
we need to remove the xtrabackup-related scripts and dynamically
replace the call to xtrabackup[-v2] to the mariabackup (with a
corresponding warning in the log) when the server performs SST.
https://jira.mariadb.org/browse/MDEV-17835
Diffstat (limited to 'sql/wsrep_sst.cc')
-rw-r--r-- | sql/wsrep_sst.cc | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index e648a7f4c69..7a542ab88f1 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -803,6 +803,7 @@ ssize_t wsrep_sst_prepare (void** msg) { const char* addr_in= NULL; const char* addr_out= NULL; + const char* method; if (!strcmp(wsrep_sst_method, WSREP_SST_SKIP)) { @@ -861,7 +862,8 @@ ssize_t wsrep_sst_prepare (void** msg) } ssize_t addr_len= -ENOSYS; - if (!strcmp(wsrep_sst_method, WSREP_SST_MYSQLDUMP)) + method = wsrep_sst_method; + if (!strcmp(method, WSREP_SST_MYSQLDUMP)) { addr_len= sst_prepare_mysqldump (addr_in, &addr_out); if (addr_len < 0) unireg_abort(1); @@ -871,6 +873,13 @@ ssize_t wsrep_sst_prepare (void** msg) /*! A heuristic workaround until we learn how to stop and start engines */ if (SE_initialized) { + if (!strcmp(method, WSREP_SST_XTRABACKUP) || + !strcmp(method, WSREP_SST_XTRABACKUPV2)) + { + WSREP_WARN("The %s SST method is deprecated, so it is automatically " + "replaced by %s", method, WSREP_SST_MARIABACKUP); + method = WSREP_SST_MARIABACKUP; + } // we already did SST at initializaiton, now engines are running // sql_print_information() is here because the message is too long // for WSREP_INFO. @@ -880,28 +889,28 @@ ssize_t wsrep_sst_prepare (void** msg) "Wsrep provider won't be able to fall back to it " "if other means of state transfer are unavailable. " "In that case you will need to restart the server.", - wsrep_sst_method); + method); *msg = 0; return 0; } - addr_len = sst_prepare_other (wsrep_sst_method, sst_auth_real, + addr_len = sst_prepare_other (method, sst_auth_real, addr_in, &addr_out); if (addr_len < 0) { WSREP_ERROR("Failed to prepare for '%s' SST. Unrecoverable.", - wsrep_sst_method); + method); unireg_abort(1); } } - size_t const method_len(strlen(wsrep_sst_method)); + size_t const method_len(strlen(method)); size_t const msg_len (method_len + addr_len + 2 /* + auth_len + 1*/); *msg = malloc (msg_len); if (NULL != *msg) { char* const method_ptr(reinterpret_cast<char*>(*msg)); - strcpy (method_ptr, wsrep_sst_method); + strcpy (method_ptr, method); char* const addr_ptr(method_ptr + method_len + 1); strcpy (addr_ptr, addr_out); |