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.