Commit 982294ac authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-17601: MariaDB Galera does not expect 'mbstream' as streamfmt

Setting "streamfmt=mbstream" in the "[sst]" section causes SST to fail
because the format automatically switches to 'tar' by default (insead
of mbstream).

To fix this, we need to add mbstream to the list of valid values for
the format, making it synonymous with xbstream. This must be done both
in the SST script and when parsing the options of the corresponding
utilities.
parent 578b6ba0
...@@ -94,7 +94,7 @@ ENDIF() ...@@ -94,7 +94,7 @@ ENDIF()
######################################################################## ########################################################################
# xbstream binary # mbstream binary
######################################################################## ########################################################################
MYSQL_ADD_EXECUTABLE(mbstream MYSQL_ADD_EXECUTABLE(mbstream
ds_buffer.c ds_buffer.c
......
...@@ -600,8 +600,8 @@ static struct my_option ibx_long_options[] = ...@@ -600,8 +600,8 @@ static struct my_option ibx_long_options[] =
{"stream", OPT_STREAM, "This option specifies the format in which to " {"stream", OPT_STREAM, "This option specifies the format in which to "
"do the streamed backup. The option accepts a string argument. The " "do the streamed backup. The option accepts a string argument. The "
"backup will be done to STDOUT in the specified format. Currently, " "backup will be done to STDOUT in the specified format. Currently, "
"the only supported formats are tar and xbstream. This option is " "the only supported formats are tar and mbstream/xbstream. This "
"passed directly to xtrabackup's --stream option.", "option is passed directly to xtrabackup's --stream option.",
(uchar*) &ibx_xtrabackup_stream_str, (uchar*) &ibx_xtrabackup_stream_str,
(uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR, (uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -669,7 +669,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu ...@@ -669,7 +669,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu
[--include=REGEXP] [--user=NAME]\n\ [--include=REGEXP] [--user=NAME]\n\
[--password=WORD] [--port=PORT] [--socket=SOCKET]\n\ [--password=WORD] [--port=PORT] [--socket=SOCKET]\n\
[--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\ [--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\
[--slave-info] [--galera-info] [--stream=tar|xbstream]\n\ [--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\
[--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\ [--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\
[--databases=LIST] [--no-lock] \n\ [--databases=LIST] [--no-lock] \n\
[--tmpdir=DIRECTORY] [--tables-file=FILE]\n\ [--tmpdir=DIRECTORY] [--tables-file=FILE]\n\
...@@ -765,7 +765,8 @@ ibx_get_one_option(int optid, ...@@ -765,7 +765,8 @@ ibx_get_one_option(int optid,
} }
break; break;
case OPT_STREAM: case OPT_STREAM:
if (!strcasecmp(argument, "xbstream")) if (!strcasecmp(argument, "mbstream") ||
!strcasecmp(argument, "xbstream"))
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
else { else {
ibx_msg("Invalid --stream argument: %s\n", argument); ibx_msg("Invalid --stream argument: %s\n", argument);
......
...@@ -675,7 +675,7 @@ struct my_option xb_client_options[] = ...@@ -675,7 +675,7 @@ struct my_option xb_client_options[] =
{"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output " {"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output "
"in the specified format." "in the specified format."
"Supported format is 'xbstream'." "Supported format is 'mbstream' or 'xbstream'."
, ,
(G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR, (G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -1398,7 +1398,8 @@ xb_get_one_option(int optid, ...@@ -1398,7 +1398,8 @@ xb_get_one_option(int optid,
xtrabackup_target_dir= xtrabackup_real_target_dir; xtrabackup_target_dir= xtrabackup_real_target_dir;
break; break;
case OPT_XTRA_STREAM: case OPT_XTRA_STREAM:
if (!strcasecmp(argument, "xbstream")) if (!strcasecmp(argument, "mbstream") ||
!strcasecmp(argument, "xbstream"))
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM; xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
else else
{ {
......
...@@ -386,8 +386,8 @@ read_cnf() ...@@ -386,8 +386,8 @@ read_cnf()
get_stream() get_stream()
{ {
if [[ $sfmt == 'xbstream' ]];then if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then
wsrep_log_info "Streaming with xbstream" wsrep_log_info "Streaming with ${sfmt}"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
strmcmd="${XBSTREAM_BIN} -x" strmcmd="${XBSTREAM_BIN} -x"
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment