Bug #10101 Server crash when trying to dump into a non-existent database
Submitted: 22 Apr 2005 17:56 Modified: 25 Apr 2005 21:51
Reporter: Disha Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.4 Beta OS:Linux (Linux 9.x)
Assigned to: CPU Architecture:Any

[22 Apr 2005 17:56] Disha
Description:
Database name into which you try to dump a database, causes server crash.

How to repeat:
From mysql prompt:
1. Create Database source;
2. Use source;
3. Create table tb1(fi int);
4. Insert into tb1(1);

From command prompt (mysql\bin):
5. mysqldump source > source.sql;

From mysql prompt:
6. Drop Database if exists target;

From command prompt (mysql\bin):
7. mysql target < source.sql;

ACTUAL RESULT
Server crash. Lost Connection to the server

EXPECTED RESULT
Server should not crash. Appropriate error message (Database does not exist) should be displayed.
[22 Apr 2005 18:15] Jorge del Conde
I was unable to reproduce this bug using 5.0.5 from bk:

jorge-/home/jorge> mysql -uroot mysource < src.sql
ERROR 1049 (42000): Unknown database 'mysource'
[25 Apr 2005 21:51] Sergei Golubchik
It was not a crash but incorrect error message - you could verify that the server was still running, e.g. by connecting with 'mysql' command line client.

Incorrect error message bug was recently fixed.