Bug #2346 "unique prefix is enough" option behaviour can be confusing with --debug
Submitted: 11 Jan 2004 7:46 Modified: 13 Jan 2004 18:51
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:3.23 to 5.0 OS:Any (all)
Assigned to: Jani Tolonen CPU Architecture:Any

[11 Jan 2004 7:46] Guilhem Bichot
Description:
'mysql' always has an option --debug-info.
If 'mysql' is compiled with debug, it has an option --debug.

So when you call
'mysql --debug'
and 'mysql' does not have the --debug option, it silently selects --debug-info
(as debug is a prefix of debug-info).

I know unique prefix is useful for usability, but here it's a bit confusing.

"Bug" is true from 3.23 to 4.1 (and probably 5.0).

How to repeat:
build mysql with, say, BUILD/compile-pentium, and run 'mysql --debug'. You will search for your debug file quite a long time.

Suggested fix:
Apparently 'mysql' is the only program which has this. 'mysqld' and our other clients don't feature --debug-info.
[13 Jan 2004 12:42] Brian Aker
The option should give a warning if it is not capable of working.
[13 Jan 2004 18:51] Jani Tolonen
Fixed into MySQL 4.1 release, version 14.4.

Regards,
Jani