Bug #19824 DROP DATABASE causes not to be able to connect to a server
Submitted: 15 May 2006 17:32 Modified: 17 Aug 2006 7:07
Reporter: Gustavo Zabala Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Administrator Severity:S2 (Serious)
Version:1.1.9 OS:Windows (Windows XP)
Assigned to: Vladimir Kolesnikov CPU Architecture:Any
Tags: Catalog

[15 May 2006 17:32] Gustavo Zabala
Description:
When you drop a database, it does not delete the references in ibdata1 file so when MySQL Administrator tryies to access that database it fails with a cannot conect to server error message. In this way you cannot manage users or anything else. The only way to patch temporarily this problem is to recreate the database root folders (manually), but MySQL Admin shows me databases that are droped.

How to repeat:
In MySQL Administrator drop a database. Go to Service Control and stop the service. Start service again. The service is started but MySQL Administrator cannot connect. If you cancel MySQL Administrator (by clicking in the 'X' icon or by hitting ctrl-f4) and execute it again, it sais that an error happend because it cannot locate the dropped database.

The same happends in command line or in MySQL Browser if you type DROP DATABASE and then try to use MySQL Administrator

Suggested fix:
Delete any reference of the dropped database in the ibdata1 file when drop database is executed.
[15 May 2006 18:23] MySQL Verification Team
Thank you for the bug report. It happens if you right click in the Schemata
ListBox (under the last database) and issue refresh?

Thanks in advance.
[15 May 2006 18:31] Gustavo Zabala
It happend when you drop a database (click in catalogs, select one, right click and drop) and then shut down the administrator. If you execute the administrator again it cannot connect. But, if you drop a database and then go to Service Control, Click in Stop Service, and try to Start Service again, the following message is displayed

Trying to stop the server ...

Server was stopped.

Trying to start the server ...

Could not re-connect to the MySQL Server.
Server was started.
[17 May 2006 18:36] MySQL Verification Team
can't connect to the server messagebox

Attachment: 19824bug.PNG (image/png, text), 34.28 KiB.

[17 May 2006 18:37] MySQL Verification Team
Thank you for the bug report.
[7 Jun 2006 8:51] Chris Cann
I have found that if you rights to the deleted database from the users it will start working again. It seems that it drops the database without checking or deleting user access to it.
[15 Aug 2006 12:46] Gustavo Zabala
.
[16 Aug 2006 20:53] Sveta Smirnova
Same problem in 1.2.1 beta.

Bug #21678 duplicates this one.
[17 Aug 2006 7:07] Vladimir Kolesnikov
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Hi Gustavo,

I see you have re-opened the bug. I guess you're testing against a version that is older that bug close date (Aug 15). You can always check the bug close date at the "View Progress Log" page. I'm closing the bug, but fill free to re-open it if you have the same problem is a version later that aug 15.

Thanks,
Vlad