Bug #16514 mysqldump fails on customized prompt for command line client
Submitted: 15 Jan 2006 10:09 Modified: 15 Jan 2006 16:55
Reporter: Beat Vontobel (Silver Quality Contributor) (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (Linux 2.4.21 (SuSE Professional))
Assigned to: CPU Architecture:Any

[15 Jan 2006 10:09] Beat Vontobel
Description:
mysqldump fails and returns an error if a customized prompt for the mysql command line client is set.

How to repeat:
Edit your .my.cnf configuration file to set a customized prompt in the client section:

[client]
prompt=\\h-\\d\\_[\\u]>\\_

Now run mysqldump:

mysql1:~ # mysqldump
mysqldump: unknown variable 'prompt=\h-\d\_[\u]>\_'

The command line client still works fine and uses the customized prompt:

mysql1:~ # mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 681663 to server version: 5.0.18-standard-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

localhost-(none) [root]> 

Suggested fix:
mysqldump should just ignore the settings for unknown variables of other client utilities.
[15 Jan 2006 10:09] Beat Vontobel
Selected category for command-line clients.
[15 Jan 2006 16:55] Hartmut Holzgraefe
[client] is a general section for settings common to all client tools,
options specific to the mysql command line client belong into the
[mysql] section instead