Bug #9218 "mysql no_such_database" fails with ERROR 2013
Submitted: 16 Mar 2005 10:54 Modified: 15 Apr 2005 10:25
Reporter: Marko Mäkelä Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.3 OS:Linux (GNU/Linux)
Assigned to: Assigned Account CPU Architecture:Any

[16 Mar 2005 10:54] Marko Mäkelä
Description:
When I pass an non-existing database to the MySQL client, the 5.0.3 server will report "ERROR 2013: Lost connection to MySQL server during query" instead of the intended "Unknown database".

How to repeat:
Start mysqld-4.1:
$ mysql no_such_database
ERROR 1049: Unknown database 'no_such_database'

Start mysqld-5.0:
$ mysql no_such_database
ERROR 2013: Lost connection to MySQL server during query

Suggested fix:
Check what is wrong with mysql_change_db() in sql_db.cc. Maybe the error information should be flushed to the client somehow? 4.1 outputs the error message with net_printf() instead of my_error().
[16 Mar 2005 13:26] Sergei Glukhov
looks like the bug is duplicated with bug#6837: Wrong error message
[15 Apr 2005 10:25] Sergei Glukhov
This bug is duplicate of bug #6837: Wrong error message