mysqldump additional-options behavior discrepancy

Bug #801691 reported by Andrew Garner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
holland-backup
In Progress
Low
Andrew Garner
1.0
New
High
Unassigned
1.1
New
Undecided
Unassigned

Bug Description

The mysqldump plugin expects the 'additional-options' setting to provide a comma separated list. However the configspec currently has a comment that notes this should be provided "exactly as on the command line". This causes multiple options to be misinterpretted (and mysqldump will fail) and is confusing. The comment/documentation at least needs to be clear on the format required here and possibly the implementation updated.

Example:

additional-options = --no-data, --routines # OK
additional-options = --no-data --routines # misinterpreted as mysqldump "--no-data --routines"

Revision history for this message
m00dawg (tim-moocowproductions) wrote :

Online docs (1.0 and 1.1) are also a bit vague:

"additional-options = <mysqldump arguments>

Can optionally specify additional options directly to mysqldump if there is no native Holland option for it."

That said, I wonder if it would be better to use the latter syntax (if possible) as it feels more like what you would put on the command-line? Otherwise, yes, this needs updating and clarification.

Revision history for this message
Andrew Garner (muzazzi) wrote :

Fixing additional-options is difficult now, since it has been a comma separated list for a long time before this bug was opened. In holland 1.1+ option aliases in config files are supported so we can potentially fix this there while maintaining compatibility by providing a separate option name.

Changed in holland-backup:
status: New → In Progress
assignee: nobody → Andrew Garner (muzazzi)
importance: Undecided → Low
milestone: none → 1.1.0a3
Revision history for this message
Andrew Garner (muzazzi) wrote :

Just revisiting this as I was thinking about this previously. I think the best way forward here is to treat this as a comma-separated list of commandlines, where we parse each comma-separated string as a commandline.

So you can have messy configs like:

additional-options = --foo --bar, --baz

Which would be equivalent to:

additional-options = --foo --bar --baz

If a comma is required in an option, then quoting is needed:

additional-options = "--foo --bar --baz=,"

But this is the case already as configobj's list parsing is fairly simple.

In 1.1+ we can catch this error in the validator and raise a deprecation warning and eventually deprecate the comma separated approach entirely.

Still holding this sort of change off for a 1.1+ release.

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.