Skip to content

Commit

Permalink
MDEV-22983: Mariabackup's --help option disappeared
Browse files Browse the repository at this point in the history
return --help option
  • Loading branch information
sanja-byelkin authored and vlad-lesin committed Jul 1, 2020
1 parent cc0dca3 commit b0f8360
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions extra/mariabackup/xtrabackup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ my_bool xtrabackup_move_back;
my_bool xtrabackup_decrypt_decompress;
my_bool xtrabackup_print_param;
my_bool xtrabackup_mysqld_args;
my_bool xtrabackup_help;

my_bool xtrabackup_export;

Expand Down Expand Up @@ -1458,6 +1459,11 @@ struct my_option xb_server_options[] =
(G_PTR *) &xtrabackup_mysqld_args, (G_PTR *) &xtrabackup_mysqld_args, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},

{"help", '?',
"Display this help and exit.",
(G_PTR *) &xtrabackup_help, (G_PTR *) &xtrabackup_help, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},

{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};

Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/mariabackup/options_check.result
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# Check for options overwriting
# Check if uknown options that follow --mysqld-args are ingored
# Check if [mariadb-client] group is not loaded (MDEV-22894)
# Check if --help presents
7 changes: 6 additions & 1 deletion mysql-test/suite/mariabackup/options_check.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --unknown-option=xxx --target-dir=$targetdir;
--error 2
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --unknown-option --target-dir=$targetdir;
--enable_result_log

--echo # Check for unknown options in "mariabackup" group
--write_file $custom_cnf
Expand Down Expand Up @@ -62,3 +61,9 @@ EOF
exec $XTRABACKUP --defaults-file=$custom_cnf --backup --target-dir=$targetdir;
--remove_file $custom_cnf
--rmdir $targetdir

--echo # Check if --help presents
exec $XTRABACKUP --help;
exec $XTRABACKUP -?;
--enable_result_log

0 comments on commit b0f8360

Please sign in to comment.