Bug #49126 MySQL cli 5.1.41 cannot read correctly old history commands
Submitted: 26 Nov 2009 9:13 Modified: 26 Nov 2009 10:40
Reporter: Davide Ferrari Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.41 OS:Linux
Assigned to: CPU Architecture:Any

[26 Nov 2009 9:13] Davide Ferrari
After upgrading server & clients to 5.1.41 on a mysql box, the command history of the mysql CLI tool is messed up.

when I press the up arrow to show the last executed command that was

"show slave status\G"

I get


How to repeat:
1. Install mysql-client 5.1.40
2. execute "mysql" cli tool
3. execute some command with at lease a space in it
4. Upgrade mysql-client from 5.1.40 to 5.1.41
5. execute "mysql" cli tool
6. press up arrow to recall command executed in step 3
7. bug happens
[26 Nov 2009 9:52] Valeriy Kravchuk
Please, send the results of:

mysql --version

What exact binaries you had installed during upgrade? Give full file names/URLs, please.
[26 Nov 2009 10:09] Davide Ferrari
# mysql --version
mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (x86_64) using readline 5.2

I'm using packages from http://packages.dotdeb.org
do you think is something downstream related?
I'm sorry and don't hesitate to close this bug if so.

[26 Nov 2009 10:29] Valeriy Kravchuk
Please, check with mysql from .tar.gz binaries from MySQL site/mirror. I do not see this problem with recent mysql command line client (built from sources) that uses readline 5.1, for example. 

It can be some bug in readline or something related to the way Debian binaries are built...
[26 Nov 2009 10:36] Davide Ferrari
Ok, just tried with upstream mysql cli tool:

/tmp/mysql-5.1.41-linux-x86_64-glibc23/bin/mysql --version
/tmp/mysql-5.1.41-linux-x86_64-glibc23/bin/mysql  Ver 14.14 Distrib 5.1.41, for unknown-linux-gnu (x86_64) using readline 5.1

the same error

/tmp # mysql-5.1.41-linux-x86_64-glibc23/bin/mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 472
Server version: 5.1.41-1.dotdeb.1-log (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MYSQL(root@localhost) [(none)]> show\040slave\040status\134G
[26 Nov 2009 10:40] Davide Ferrari
Ok just tried with upstream 5.1.40 and the same error, so probably it's how it was saved with my previous 5.1.40 installation. I think we can close the bug