summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-02 05:06:48 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-02 05:06:48 +0200
commit34678ec48d3bfe343ab0adbc8bf219755ab8d698 (patch)
treee10db8a4b0868d4e31b7791b3ad65013c97c94c4
parentfb9d151934c3444e55eb3ea505e2403d082c9a85 (diff)
downloadmariadb-git-bb-10.2-MDEV-25328.tar.gz
MDEV-25328: --innodb command line option causes mariabackup to failbb-10.2-MDEV-25328
This patch fixes an issue with mariabackup starting during SST (when used with Galera) when it is given the "--innodb" option that is passed to mysqld during bootstap when mtr starts. This patch does not need a separate test, as the problem is visible in general testing on buildbot.
-rw-r--r--extra/mariabackup/innobackupex.cc9
-rw-r--r--extra/mariabackup/xtrabackup.cc14
2 files changed, 15 insertions, 8 deletions
diff --git a/extra/mariabackup/innobackupex.cc b/extra/mariabackup/innobackupex.cc
index 5bc320264e4..03b911fd180 100644
--- a/extra/mariabackup/innobackupex.cc
+++ b/extra/mariabackup/innobackupex.cc
@@ -208,11 +208,14 @@ enum innobackupex_options
OPT_TABLES_FILE,
OPT_THROTTLE,
OPT_USE_MEMORY,
- OPT_INNODB_FORCE_RECOVERY,
+ OPT_INNODB,
+ OPT_INNODB_FORCE_RECOVERY
};
ibx_mode_t ibx_mode = IBX_MODE_BACKUP;
+static char* innobase_ignored_opt;
+
static struct my_option ibx_long_options[] =
{
{"version", 'v', "print xtrabackup version information",
@@ -626,6 +629,10 @@ static struct my_option ibx_long_options[] =
0, GET_LL, REQUIRED_ARG, 100*1024*1024L, 1024*1024L, LONGLONG_MAX, 0,
1024*1024L, 0},
+ {"innodb", OPT_INNODB, "Ignored option for MySQL option compatibility",
+ (uchar*) &innobase_ignored_opt, (uchar*) &innobase_ignored_opt, 0,
+ GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+
{"innodb-force-recovery", OPT_INNODB_FORCE_RECOVERY,
"This option starts up the embedded InnoDB instance in crash "
"recovery mode to ignore page corruption; should be used "
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 59551a7d044..5b2c8ca4c05 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -1815,33 +1815,33 @@ static int prepare_export()
// Process defaults-file , it can have some --lc-language stuff,
// which is* unfortunately* still necessary to get mysqld up
- if (strncmp(orig_argv1,"--defaults-file=",16) == 0)
+ if (strncmp(orig_argv1,"--defaults-file=", 16) == 0)
{
snprintf(cmdline, sizeof cmdline,
- IF_WIN("\"","") "\"%s\" --mysqld \"%s\" "
+ IF_WIN("\"","") "\"%s\" --mysqld \"%s\""
" --defaults-extra-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
- " --console --skip-log-error --skip-log-bin --bootstrap %s < "
+ " --console --skip-log-error --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
orig_argv1, (my_defaults_group_suffix?my_defaults_group_suffix:""),
xtrabackup_use_memory,
- (srv_force_recovery ? "--innodb-force-recovery=1" : ""));
+ (srv_force_recovery ? "--innodb-force-recovery=1 " : ""));
}
else
{
snprintf(cmdline, sizeof cmdline,
- IF_WIN("\"","") "\"%s\" --mysqld"
+ IF_WIN("\"","") "\"%s\" --mysqld"
" --defaults-file=./backup-my.cnf --defaults-group-suffix=%s --datadir=."
" --innodb --innodb-fast-shutdown=0 --loose-partition"
" --innodb_purge_rseg_truncate_frequency=1 --innodb-buffer-pool-size=%llu"
- " --console --log-error= --skip-log-bin --bootstrap %s < "
+ " --console --log-error= --skip-log-bin --bootstrap %s< "
BOOTSTRAP_FILENAME IF_WIN("\"",""),
mariabackup_exe,
(my_defaults_group_suffix?my_defaults_group_suffix:""),
xtrabackup_use_memory,
- (srv_force_recovery ? "--innodb-force-recovery=1" : ""));
+ (srv_force_recovery ? "--innodb-force-recovery=1 " : ""));
}
msg("Prepare export : executing %s\n", cmdline);