Bug #68538 mysql client REPL history doesn't work inside Git Bash
Submitted: 1 Mar 2013 13:10 Modified: 20 Apr 2013 19:21
Reporter: Andrew Pennebaker Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:Ver 14.14 Distrib 5.6.10 OS:Windows
Assigned to: CPU Architecture:Any
Tags: cli, client, command, history, interpreter, line, readline, repl

[1 Mar 2013 13:10] Andrew Pennebaker
Description:
The mysql client REPL presents a handy history function in a Command Prompt; Pressing up/down navigates to past commands entered in the current session.

However, this functionality does not work when the mysql client is run in a Git Bash. In this case, pressing up or down does nothing.

System:

$ specs mysql git os
Specs:

specs 0.2
https://github.com/mcandre/specs#readme

mysql --version
mysql  Ver 14.14 Distrib 5.6.10, for Win32 (x86)

git --version
git version 1.8.0.msysgit.0

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows XP Professional
OS Version:                5.1.2600 Service Pack 3 Build 2600

How to repeat:
1. Launch Command Prompt.
2. Enter "mysql -uroot".
3. Enter some commands, such as "show databases;".
4. Press up and down to navigate to past commands entered.
5. Install Git for Windows (http://git-scm.com/downloads).
6. Launch Git Bash.
7. Enter "mysql -uroot".
8. Enter some commands, such as "show databases;".
9. Press up and down. Notice the loss of history functionality.

Suggested fix:
If MySQL uses the readline library for history support, it should already be compatible with Git Bash; maybe something to do with readline is slightly off.

If MySQL uses some other way to implement history support, maybe consider switching to readline, a standard cross-platform library for history support and tab completion?
[20 Mar 2013 19:06] MySQL Verification Team
Could not repeat.

mysql  Ver 14.14 Distrib 5.6.10, for Win64 (x86_64)
git version 1.8.1.msysgit.1
Windows 7

Up/down arrows scroll through history correctly.
[20 Mar 2013 19:21] Sveta Smirnova
Thank you for the report.

Please try with Git Bash 1.8.1 and inform us if problem still exists.
[21 Apr 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".