summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-07 14:14:14 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-07 14:14:14 +0200
commit40d63d6099c1a522dba8120368de6c3acd8c80e4 (patch)
tree61a54ba7e0dc0b22c9b8da65692f0e5d8d4a4cb9
parent72da83ff99860878fc28a1f26bfd893baa153368 (diff)
downloadmariadb-git-bb-10.2-MDEV-25328-v3.tar.gz
MDEV-25328: --innodb command line option causes mariabackup to failbb-10.2-MDEV-25328-v3
This patch fixes an issue with launching mariabackup during SST (when used with Galera), when during bootstrap mariabackup receives the "--innodb" option, which is incorrectly interpreted as shortcut for "--innodb-force-recovery". This patch does not require separate test for mtr, as the problem is visible in general testing on buildbot. Also removed extra spaces in generated command lines (minor "cosmetic" change to the patch that caused problem with "--innodb") and clarified abbreviated option names in some tests, to avoid problems with ambiguous options in the future.
-rw-r--r--extra/mariabackup/xtrabackup.cc16
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test2
-rw-r--r--mysql-test/t/mysqldump-nl.test8
-rw-r--r--mysql-test/t/parser_not_embedded.test2
4 files changed, 15 insertions, 13 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 59551a7d044..d4e7114f635 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);
@@ -6622,6 +6622,8 @@ int main(int argc, char **argv)
{
char **client_defaults, **server_defaults;
+ my_getopt_prefix_matching= 0;
+
if (get_exepath(mariabackup_exe,FN_REFLEN, argv[0]))
strncpy(mariabackup_exe,argv[0], FN_REFLEN-1);
diff --git a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
index 5bdd1ff8b6b..a594b7c2a61 100644
--- a/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
+++ b/mysql-test/suite/rpl/t/rpl_row_tbl_metadata.test
@@ -329,7 +329,7 @@ while($ntables)
-- echo ### detect failure. Before the patch mysqlbinlog would find
-- echo ### a corrupted event, thence would fail.
-- let $MYSQLD_DATADIR= `SELECT @@datadir`
--- exec $MYSQL_BINLOG -v --hex $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog
+-- exec $MYSQL_BINLOG -v --hexdump $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug50018.binlog
## clean up
## For debugging purposes you might want not to remove these
diff --git a/mysql-test/t/mysqldump-nl.test b/mysql-test/t/mysqldump-nl.test
index 863c846b9a6..4451b0605c2 100644
--- a/mysql-test/t/mysqldump-nl.test
+++ b/mysql-test/t/mysqldump-nl.test
@@ -26,10 +26,10 @@ create procedure sp() select * from `v1
flush tables;
use test;
-exec $MYSQL_DUMP --compact --comment --routines --add-drop-database --databases 'mysqltest1
+exec $MYSQL_DUMP --compact --comments --routines --add-drop-database --databases 'mysqltest1
1tsetlqsym';
-exec $MYSQL_DUMP --compact --comment --routines --add-drop-database --databases 'mysqltest1
+exec $MYSQL_DUMP --compact --comments --routines --add-drop-database --databases 'mysqltest1
1tsetlqsym' | $MYSQL;
show tables from `mysqltest1
@@ -45,11 +45,11 @@ create database `test\``
show databases like 'test%';
-exec $MYSQL_DUMP --compact --comment --add-drop-database --databases 'test`' 'test\`
+exec $MYSQL_DUMP --compact --comments --add-drop-database --databases 'test`' 'test\`
\! ls
#';
-exec $MYSQL_DUMP --compact --comment --add-drop-database --databases 'test`' 'test\`
+exec $MYSQL_DUMP --compact --comments --add-drop-database --databases 'test`' 'test\`
\! ls
#' | $MYSQL;
diff --git a/mysql-test/t/parser_not_embedded.test b/mysql-test/t/parser_not_embedded.test
index 3ebd23e888e..3af1260f4ad 100644
--- a/mysql-test/t/parser_not_embedded.test
+++ b/mysql-test/t/parser_not_embedded.test
@@ -21,7 +21,7 @@ select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */
select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
EOF
---exec $MYSQL --comment --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
+--exec $MYSQL --comments --force --table test <$MYSQLTEST_VARDIR/tmp/bug39559.sql
--remove_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
--echo # Bug#46527 "COMMIT AND CHAIN RELEASE does not make sense"