Bug #71309 Not able to customize mysql prompt with new line and tab options
Submitted: 6 Jan 2014 22:44 Modified: 7 Jan 2014 6:40
Reporter: Dimitriy A Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S3 (Non-critical)
Version:5.6.14-enterprise-commercial-advanced-log, 5.6.15 OS:Linux (Red Hat Enterprise Linux Server release 5.6 (Tikanga))
Assigned to: CPU Architecture:Any
Tags: new line, prompt, regression, tab

[6 Jan 2014 22:44] Dimitriy A
Using mysql prompt options does not produce new lines or tabs. The options to mysql prompt are documented in the MySQL manual (https://dev.mysql.com/doc/refman/5.0/en/mysql-commands.html).

This seems to be a regression bug as it works with MySQL 5.0, although it was used with a different Linux OS.

How to repeat:
Run the following command (substitute the correct socket file, username, and password):
mysql --socket=socket_file --user=username -ppassword --prompt="Text1\nText2\tText3> "

Here is how the prompt looks:

The expected output should look something like this:
Text2	Text3> 

Trying to add a second escape character does not resolve the problem:
mysql --socket=socket_file --user=username -ppassword --prompt="Text1\\nText2\\tText3> "


Suggested fix:
Make sure that new line and tab characters are printed when those options are used in mysql prompt.
[7 Jan 2014 6:40] MySQL Verification Team
Hello Dimitriy,

Thank you for the bug report.
Verified as described.

[19 May 2014 1:33] li pickup
just want to know which time the bug will be fixed?
[28 Jan 2015 23:04] Rory Michaelis
I second that. How difficult can it be to fix this? thx!