2.3.3 innobackupex silently skip extra argument

Bug #1533542 reported by Fungo Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Status tracked in 2.4
2.3
Fix Released
Medium
Unassigned
2.4
Fix Released
Medium
Unassigned

Bug Description

If in invoke innobackupex like this:

innobackupex --defaults-file=/etc/my.cnf --slave-info --lock-wait-timeout=900 --host=127.0.0.1 --port=3306 --user=root --test tmp abc 123

IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

innobackupex run as nothing wrong, which should failed, cause I supply an unknown option '--test' and two extra arguments 'abc' and '123'.

And I don't think this is expected behaviour.

For 2.2, innnobackex complain error as:

Unknown option: test
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 4403
        main::check_args() called at /usr/bin/innobackupex line 1562
innobackupex: Error: Too many command line arguments

it spit out the unknown option '--test' and complain about extra arguments.

For the extra arguments, I think can be fixed as attechment.

Tags: innobackupex
Revision history for this message
Fungo Wang (fungo) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

It is an expected behaviour,
It is processing only known options and will just ignore unknown.

Changed in percona-xtrabackup:
status: New → Invalid
Revision history for this message
Fungo Wang (fungo) wrote :

ignoring make sense for options, but not for extra arguments.

there are code for extra argument,

 ibx_msg("Error: extra argument found %s\n",
         opt);

but it did not work.

Changed in percona-xtrabackup:
status: Invalid → New
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Since "unknown options" isn't something xtrabackup has to complain about, I changed the title to mention only extra position arguments.

summary: - 2.3.3 innobackupex silently skip unkown options or extra argument
+ 2.3.3 innobackupex silently skip extra argument
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
monty solomon (monty+launchpad) wrote :

The mysql client in Percona Server reports unknown options. It would be useful to report them in innobackupex too.

# mysql --test
mysql: unknown option '--test'

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-747

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.