summaryrefslogtreecommitdiff
path: root/sql/wsrep_sst.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_sst.cc')
-rw-r--r--sql/wsrep_sst.cc29
1 files changed, 16 insertions, 13 deletions
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 9472d66f4d3..714df35de8b 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -13,13 +13,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+#include "mariadb.h"
#include "wsrep_sst.h"
-
#include <inttypes.h>
#include <ctype.h>
#include <mysqld.h>
#include <m_ctype.h>
-#include <my_sys.h>
#include <strfunc.h>
#include <sql_class.h>
#include <set_var.h>
@@ -62,11 +61,6 @@ bool wsrep_sst_method_check (sys_var *self, THD* thd, set_var* var)
return 0;
}
-bool wsrep_sst_method_update (sys_var *self, THD* thd, enum_var_type type)
-{
- return 0;
-}
-
static const char* data_home_dir = NULL;
void wsrep_set_data_home_dir(const char *data_dir)
@@ -1130,6 +1124,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))
{
@@ -1188,7 +1183,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);
@@ -1198,6 +1194,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.
@@ -1207,28 +1210,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);