Skip to content

Commit 982294a

Browse files
committed
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.
1 parent 578b6ba commit 982294a

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

extra/mariabackup/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ ENDIF()
9494

9595

9696
########################################################################
97-
# xbstream binary
97+
# mbstream binary
9898
########################################################################
9999
MYSQL_ADD_EXECUTABLE(mbstream
100100
ds_buffer.c

extra/mariabackup/innobackupex.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,8 +600,8 @@ static struct my_option ibx_long_options[] =
600600
{"stream", OPT_STREAM, "This option specifies the format in which to "
601601
"do the streamed backup. The option accepts a string argument. The "
602602
"backup will be done to STDOUT in the specified format. Currently, "
603-
"the only supported formats are tar and xbstream. This option is "
604-
"passed directly to xtrabackup's --stream option.",
603+
"the only supported formats are tar and mbstream/xbstream. This "
604+
"option is passed directly to xtrabackup's --stream option.",
605605
(uchar*) &ibx_xtrabackup_stream_str,
606606
(uchar*) &ibx_xtrabackup_stream_str, 0, GET_STR,
607607
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -669,7 +669,7 @@ innobackupex [--compress] [--compress-threads=NUMBER-OF-THREADS] [--compress-chu
669669
[--include=REGEXP] [--user=NAME]\n\
670670
[--password=WORD] [--port=PORT] [--socket=SOCKET]\n\
671671
[--no-timestamp] [--ibbackup=IBBACKUP-BINARY]\n\
672-
[--slave-info] [--galera-info] [--stream=tar|xbstream]\n\
672+
[--slave-info] [--galera-info] [--stream=tar|mbstream|xbstream]\n\
673673
[--defaults-file=MY.CNF] [--defaults-group=GROUP-NAME]\n\
674674
[--databases=LIST] [--no-lock] \n\
675675
[--tmpdir=DIRECTORY] [--tables-file=FILE]\n\
@@ -765,7 +765,8 @@ ibx_get_one_option(int optid,
765765
}
766766
break;
767767
case OPT_STREAM:
768-
if (!strcasecmp(argument, "xbstream"))
768+
if (!strcasecmp(argument, "mbstream") ||
769+
!strcasecmp(argument, "xbstream"))
769770
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
770771
else {
771772
ibx_msg("Invalid --stream argument: %s\n", argument);

extra/mariabackup/xtrabackup.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ struct my_option xb_client_options[] =
675675

676676
{"stream", OPT_XTRA_STREAM, "Stream all backup files to the standard output "
677677
"in the specified format."
678-
"Supported format is 'xbstream'."
678+
"Supported format is 'mbstream' or 'xbstream'."
679679
,
680680
(G_PTR*) &xtrabackup_stream_str, (G_PTR*) &xtrabackup_stream_str, 0, GET_STR,
681681
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -1398,7 +1398,8 @@ xb_get_one_option(int optid,
13981398
xtrabackup_target_dir= xtrabackup_real_target_dir;
13991399
break;
14001400
case OPT_XTRA_STREAM:
1401-
if (!strcasecmp(argument, "xbstream"))
1401+
if (!strcasecmp(argument, "mbstream") ||
1402+
!strcasecmp(argument, "xbstream"))
14021403
xtrabackup_stream_fmt = XB_STREAM_FMT_XBSTREAM;
14031404
else
14041405
{

scripts/wsrep_sst_mariabackup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ read_cnf()
386386

387387
get_stream()
388388
{
389-
if [[ $sfmt == 'xbstream' ]];then
390-
wsrep_log_info "Streaming with xbstream"
389+
if [[ $sfmt == 'mbstream' || $sfmt == 'xbstream' ]];then
390+
wsrep_log_info "Streaming with ${sfmt}"
391391
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
392392
strmcmd="${XBSTREAM_BIN} -x"
393393
else

0 commit comments

Comments
 (0)