[MDEV-22983] Mariabackup's --help option disappeared Created: 2020-06-23  Updated: 2020-07-02  Resolved: 2020-07-01

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.4, 10.5
Fix Version/s: 10.5.4, 10.4.14

Type: Bug Priority: Blocker
Reporter: Geoff Montee (Inactive) Assignee: Vladislav Lesin
Resolution: Fixed Votes: 1
Labels: regression, regression-10.5

Issue Links:
Relates
relates to MDEV-18215 mariabackup does not report unknown c... Closed
relates to MDEV-22894 Mariabackup should not read [mariadb-... Closed

 Description   

Mariabackup's --help option seemed to disappear in MariaDB 10.5.4.

For example, we can see here that the option existed in MariaDB 10.4.13:

$ mariadb-backup --version
mariadb-backup based on MariaDB server 10.4.13-MariaDB debian-linux-gnu (x86_64)
$ mariadb-backup --help   
mariadb-backup based on MariaDB server 10.4.13-MariaDB debian-linux-gnu (x86_64)
Open source backup tool for InnoDB and XtraDB
...
Usage: mariadb-backup [--defaults-file=#] [--backup | --prepare | --copy-back | --move-back] [OPTIONS]
 
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf 
The following groups are read: xtrabackup mariabackup mysqld server mysqld-10.4 mariadb mariadb-10.4 client-server galera
The following options may be given as the first argument:
--print-defaults          Print the program argument list and exit.
--no-defaults             Don't read default options from any option file.
The following specify which files/extra groups are read (specified before remaining options):
--defaults-file=#         Only read default options from the given file #.
--defaults-extra-file=#   Read this file after the global files are read.
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.
  -V, --verbose       display verbose output
  -v, --version       print xtrabackup version information
...

But now in MariaDB 10.5.4, the option is no longer supported:

$ mariadb-backup --version
mariadb-backup based on MariaDB server 10.5.4-MariaDB debian-linux-gnu (x86_64)
$ mariadb-backup --help
mariadb-backup: unknown option '--help'

Could this be caused by the fix for MDEV-18215?



 Comments   
Comment by Oleksandr Byelkin [ 2020-06-23 ]

here is an urgent fix for 10.5 feel free to reuse it or fix it

 
commit 5018b998a76b99a30efe96ca007a95a5a1c83bb5 (HEAD -> bb-10.5-release, origin/bb-10.5-release)
Author: Oleksandr Byelkin <sanja@mariadb.com>
Date:   Tue Jun 23 17:07:03 2020 +0200
 
    return --help option
 
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 0b53f1382ea..faf2d6147a0 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -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 help;
 
 my_bool xtrabackup_export;
 
@@ -1415,6 +1416,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 *) &help, (G_PTR *) &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}
 };
 

Comment by Marko Mäkelä [ 2020-07-01 ]

In 10.5.4, a fix was applied. But the regression still exists in 10.4.

Generated at Thu Feb 08 09:18:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.