Bug #76230 Command line gets corrupted after window resize
Submitted: 9 Mar 2015 16:34 Modified: 9 Mar 2015 18:33
Reporter: Egmont Koblinger Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.23 OS:Linux (Ubuntu Utopic)
Assigned to: CPU Architecture:Any

[9 Mar 2015 16:34] Egmont Koblinger
Description:
The mysql client doesn't handle window resizes correctly at the prompt.

How to repeat:
1. Start mysql. The prompt appears which looks like "mysql> ".

Resize the terminal emulator window (e.g. xterm).

Press the Up arrow to invoke the previous command.

The prompt is incorrectly displayed once again, ending up in something like
"mysql> mysql> select * from sometable;"

2. Start over; type any text (or press Up to invoke something). With this text after the prompt, resize the window and then press Up again. You'll see even heavier corruptions than in the 1st case.

Suggested fix:
(Maybe consider using libreadline under Linux rather your apparently own implementation. That would have other advantages, e.g. the same shortcut keys many users are already used to in their shell.)
[9 Mar 2015 18:32] MySQL Verification Team
Command Client Ubuntu 14.10

Attachment: command_client_rezise.png (image/png, text), 1.20 MiB.

[9 Mar 2015 18:33] MySQL Verification Team
Thank you for the bug report.