Bug #2308 Dropping Database Bug
Submitted: 7 Jan 2004 7:53 Modified: 7 Jan 2004 7:58
Reporter: Donny Simonton Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.1.1 OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[7 Jan 2004 7:53] Donny Simonton
Description:
After installing 4.1.1 on a new server and using phpmyadmin to create some databases, I decided to delete a database.  And mysql puked on deleting the database.  After looking into it, I verified that this was not happening with the same version of phpmyadmin with 4.1 and 3.x.  I have been able to reproduce this via the command line interface as well.

It happens when you do a select database after dropping a database without changing the database that you are using.  The example in the how to repeat is a better explanation than anything I could write.

Hope this helps.

Donny

How to repeat:
**** This is the error in 4.1.1
mysql> create database MineAllMine;
Query OK, 1 row affected (0.00 sec)

mysql> use MineAllMine;
Database changed

mysql> drop database MineAllMine;
Query OK, 1 row affected (0.00 sec)

mysql> select database();
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql> 
Number of processes running now: 0
040107 09:49:20  mysqld restarted

**** This is what the same process looks like in 4.1.0
mysql> create database MineAllMine;
Query OK, 1 row affected (0.00 sec)

mysql> use MineAllMine;
Database changed
mysql> drop database MineAllMine;
Query OK, 1 row affected (0.08 sec)

mysql> select database();
+-------------+
| database()  |
+-------------+
| MineAllMine |
+-------------+
1 row in set (0.00 sec)

mysql>
[7 Jan 2004 7:58] Dean Ellis
Duplicate of bug #2205.
[7 Jan 2004 8:04] Donny Simonton
Thank you.  I just didn't see it in the change log for 4.1.2 anywhere and I couldn't find it when I did a search.  Thanks for the super quick response!