No --option prefixes

Registered by Daniel Nichter

From bug 933522:

pt-table-checksum --lock --help
Value "--help" invalid for option lock-wait-timeout (number expected)

It's recognizing --lock, which doesn't exist anymore, as the unambiguous prefix of --lock-wait-timeout. This is like the most evil thing ever about commandline option parsing. I hate this "feature" because it can be very dangerous. I thought I had chosen to disable this years back when I started writing the original tools.

We need to disable this in the next release and include a warning. Otherwise we basically never can safely remove options and we'll have to be paranoid about introducing new options that create ambiguity about prefixes, e.g. right now, this will work:

pt-table-checksum --loc 1

it'll recognize that as --lock-wait-timeout. But in the future, suppose we introduce --lock-foo, then it'll break, with a message like this:

pt-table-checksum --recur 1
Option recur is ambiguous (recurse, recursion-method)
Usage: pt-table-checksum [OPTION...] [DSN]

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.