Bug #6559 DROP DATABASE forgets to drop triggers
Submitted: 10 Nov 2004 18:07 Modified: 4 Apr 2005 23:58
Reporter: Paul Dubois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.x OS:
Assigned to: Dmitry Lenev CPU Architecture:Any

[10 Nov 2004 18:07] Paul Dubois
Description:
When you create a trigger, it creates a .TRG file
in the database directory.  But DROP DATABASE
doesn't know that it should drop the .TRG file,
and fails.

How to repeat:
use test;
create table t (i int);
create trigger mytrig before insert on t for each row set @a = 1;
drop database test;

Result:

ERROR 1010 (HY000): Error dropping database (can't rmdir './test/', errno: 17)
[3 Apr 2005 14:50] Dmitry Lenev
Fixed in 5.0.4
[4 Apr 2005 23:58] Paul Dubois
Noted in 5.0.4 changelog.