Bug #16652 mysql client crashes when accessing history
Submitted: 19 Jan 2006 21:03 Modified: 22 Jan 2006 2:02
Reporter: Kolbe Kegel Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.1.16, 5.0.18 OS:64-bit Solaris 8,9
Assigned to: CPU Architecture:Any

[19 Jan 2006 21:03] Kolbe Kegel
Description:
When accessing history data in the MySQL command line client, the client will segfault when the user attempts to consult beyond 1 item in the history.

This occurs only when using commercially licensed (libedit) 64-bit builds of MySQL for Solaris Sparc.

How to repeat:
Install a 64-bit non-GPL MySQL build on a 64-bit Sparc Solaris system.

Start the server, and connect to it using the mysql client.

Issue a statement to the server
Press the up arrow to review the previous statement
Issue the statement again
Press the up arrow twice to review the original statement

This will cause a segfault

kkegel@sunfire100b mysql-pro-4.1.16-sun-solaris2.8-sparc-64bit $ ./bin/mysql --socket=./data/mysql.sock
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.1.16-pro

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 4.1.16-pro (root) "test"> show databases;
+----------+
| Database |
+----------+
| mysql    |
| test     |
+----------+
2 rows in set (0.01 sec)

mysql 4.1.16-pro (root) "test"> show databases;
+----------+
| Database |
+----------+
| mysql    |
| test     |
+----------+
2 rows in set (0.00 sec)

mysql 4.1.16-pro (root) "test"> show databases;Segmentation Fault (core dumped)

Suggested fix:
The client should not crash when a user attempts to use its history mechanism.
[22 Jan 2006 2:02] Kolbe Kegel
This bug is a duplicate of #10218, my apologies.