Bug #56076 Use of --sleep and --use-memory option twice in ibbackup command passes
Submitted: 17 Aug 2010 22:21 Modified: 11 Feb 2012 1:19
Reporter: Hema Sridharan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Backup Severity:S3 (Non-critical)
Version:mysql-5.1-meb OS:Linux
Assigned to: CPU Architecture:Any

[17 Aug 2010 22:21] Hema Sridharan
Description:
Create some database and tables
Execute ibbackup with option --sleep(use twice in command line). Ibbackup passes with out issuing any error or warning message.
Similarly when use-memory option is used twice when recovering the databases, the ibbackup command passes.

There needs to be a warning or error message about issuing the options twice in the command line or 
If this behaviour is accepted, it is better to  document it.

How to repeat:
Create some databases and tables, perform ibbackup like

--exec $IBBACKUP --sleep 4 --sleep 7 $SERVER_CNF $BACKUP_CNF > $BACKUP_LOG 2>&1

and for recovery do the following,
--exec $IBBACKUP --use-memory 500 --use-memory 100 --apply-log $BACKUP_CNF > $REPLAY_LOG 2>&1

The above 2 commands will succeed even if the options are used twice in the ibbackup command line. 

Note: Use ibbackup 3.5 version to test

Suggested fix:
Either this behaviour should be fixed or at least documented.
[21 Aug 2010 14:07] Sveta Smirnova
Thank you for the report.

Verified as described.
[11 Feb 2012 1:19] John Russell
Added to introduction to command-line options in the manual:

The mysqlbackup command follows MySQL standard practice for handling
duplicate options, whether specified in a configuration file, on the
command line, or both. Options are processed first from configuration
files, then from the command line. If an option is specified more
than once, the last instance takes precedence.

There was already an explanation of the order of processing in the section on configuration files. There, I added only a sentence stating that the last takes precedence in the case of duplicate options.