Bug #18854 creating a trigger
Submitted: 6 Apr 2006 15:36 Modified: 10 Apr 2006 17:43
Reporter: Samir Seba Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.19 OS:Linux (linux)
Assigned to: CPU Architecture:Any

[6 Apr 2006 15:36] Samir Seba
Description:
Hello,

i have script file in which i have the following script 
delimiter \\
drop trigger DLXTG_DEL_VOIPDOMGW
\g
CREATE TRIGGER DLXTG_DEL_VOIPDOMGW AFTER DELETE ON dlxvoipdomgw 
FOR EACH ROW 
BEGIN
	UPDATE dlxpermissions SET DLXDEFAULTALLOWED=0 , DLXDEFAULTGTW=NULL WHERE DLXDEFAULTGTW=OLD.DLXVUSRID;
	delete from dlxvoipuser_perm_routing where dlxvusrid=OLD.DLXVUSRID;
END;
\g

when i excute that script in command line

i got :

mysql> source 1.txt
ERROR 1360 (HY000): Trigger does not exist
ERROR 1359 (HY000): Trigger already exists

i did the check in : information_schema.TRIGGERS
SELECT * FROM information_schema.TRIGGERS where trigger_name='DLXTG_DEL_VOIPDOMGW'

there was no records. i got Empty set (0.14 sec)

thank you

How to repeat:
the same way i did explain below
[10 Apr 2006 10:53] Valeriy Kravchuk
Thank you for a problem report. Please, send the 

SHOW CREATE TABLE dlxvoipdomgw;

statement results. Have you ever created any triggers on this table? Have you performed ALTER/OPTIMIZE TABLE before creating this trigger?
[10 Apr 2006 13:12] Samir Seba
Hi,
i can not give those informations
because i already remove every thing.
when i had that bug. i had to find a way to resolve it. it was urgent.

i found two ways :
1- Create a trigger with an other name
2- remove mysql and do a new installation. same version

i applied the second solution.

now i can not reproduice it.

If i will have it next time . i will inform you.

thank you.

On the new installation i can not reprod
[10 Apr 2006 13:21] Valeriy Kravchuk
Looks like a duplicate of http://bugs.mysql.com/bug.php?id=18153. Reopen this bug report if the same thing will ever happen with MySQL 5.0.20.
[10 Apr 2006 17:43] Samir Seba
now i execute the same same script on two differents machines

- One with version 5.0.13 on windows
- one with version 5.0.19 on linux

on windows. it's working fine 
on linux . it's not working

before trying to drop a trigger i did an alter of table