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:
None 
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
Description:
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:
TextTextText3>

The expected output should look something like this:
Text1
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> "

Output:
TextTextText3> 

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.

Thanks,
Umesh
[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!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.