Bug #28513 5.0.40: impossible to drop an incorrect trigger created in 5.0.27
Submitted: 18 May 2007 9:45 Modified: 18 Jun 2008 11:14
Reporter: RUDOLF H��CKEL Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: DDL Severity:S2 (Serious)
Version:5.0 OS:Any
Assigned to: Konstantin Osipov CPU Architecture:Any

[18 May 2007 9:45] RUDOLF H��CKEL
Description:
formerly valid trigger causes trouble

"Incorrect usage of UNION and INTO"
- with each Select statement that includes this table
- DROP TRIGGER Name_trigger

SELECT * FROM `information_schema`.`TRIGGERS` 
in Query Browser terminates the windows service

How to repeat:
CREATE TRIGGER Name_trigger BEFORE INSERT ON tblName FOR EACH ROW
begin
DECLARE temp INTEGER;
select max(someID)+1 into temp from tblName
	union select 1 from tblName LIMIT 1;
SET NEW.someID = temp;
end;

Not very intelligent but it worked (for example version 5.0.27)

After Update to version for example 5.0.40 or 41 ...
[18 May 2007 10:33] Sveta Smirnova
Thank you for the report.

Verified as described.

To repeat create wrong trigger in 5.0.22 and try to access to information_schema with current BK sources.
[20 May 2007 16:56] MySQL Verification Team
stack trace in 5.0.42

Attachment: bug28513_crash_info.txt (text/plain), 2.30 KiB.

[28 Jan 2008 20:19] Omer Barnir
Workaround: delete the trigger definition directly using sql
[18 Jun 2008 11:14] Konstantin Osipov
I believe this problem is not relevant any more.
[18 Jun 2008 11:14] Konstantin Osipov
Workaround: remove the trigger manually by removing the file.