Bug #2021 Wron error message from the client
Submitted: 5 Dec 2003 7:37 Modified: 11 Feb 2004 1:45
Reporter: Peter Zaitsev (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23.58 OS:Linux (Linux)
Assigned to: Sergei Glukhov CPU Architecture:Any

[5 Dec 2003 7:37] Peter Zaitsev
Description:
MySQL 3.23.58 client seems not to handle server restart good enough:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.23.57-log

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

mysql> show processlist;
ERROR:

In this case I've restared MySQL server in background after connection to it
It happens both with 4.0 and 3.23 servers 

How to repeat:
1) Start server
2) Connect to it from 3.23.58 command line client 
3) Restart server
4) Enter any query

You'll see Error without error code and command will not be retried after reconnection.   The connection will however be restored as repeting command works.
[8 Dec 2003 10:44] Indrek Siitan
Observing the PROCESSLIST in a second client it seems that on the first
try, just the 'ERROR:' message is printed, the connection isn't really
restarted. It's only done on the second try:

mysql> show processlist;
ERROR: 

mysql> show processlist;
ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: bug

+----+------+-----------+-------+---------+------+-------+------------------+
| Id | User | Host      | db    | Command | Time | State | Info             |
+----+------+-----------+-------+---------+------+-------+------------------+
|  1 | root | localhost | mysql | Sleep   | 52   |       | NULL             |
|  2 | root | localhost | bug   | Query   | 0    | NULL  | show processlist |
+----+------+-----------+-------+---------+------+-------+------------------+
2 rows in set (0.02 sec)