mysql error 1360, cannot drop trigger. is this a bug?
delimiter $$
CREATE TRIGGER carslibrary_trigger
AFTER insert ON carslibrary
FOR EACH ROW
BEGIN
insert into facerecord (carslibrary_ID) values (new.CarID);
END$$
delimiter;
i am trying to delete my trigger
Showing rows 0 - 0 (1 total, Query took 0.0087 sec)
SELECT trigger_name
FROM information_schema.triggers
WHERE event_object_table = 'carslibrary'
AND ac开发者_JAVA百科tion_timing = 'AFTER'
AND event_manipulation = 'INSERT'
LIMIT 0 , 30
drop trigger carslibrary_trigger;
#1360 - Trigger does not exist
DROP trigger carslibrary_trigger;
my query returned a record, but it can't drop?
why i can't drop my trigger?
i also made a general query still returns 1 record
Showing rows 0 - 0 (1 total, Query took 0.0606 sec)
SELECT *
FROM TRIGGERS
LIMIT 0 , 30
What version of MySQL? You may have to include table name.
DROP TRIGGER carslibrary.carslibrary_trigger;
If anyone get this issue using MyISAM engine, check the TRN files in the data folder, in my case those were there, even though I deleted the trigger using command line.
Manually Deleting TRN files of the triggers that are throwing error 1360 will solve the issue.
if the error trigger does not exist
with error code 1360 occurs,
simply execute the triggers from command line
mysql -u root -p
then mysql> execute the triggers
then check the information_schema in mysql
the triggers can be viewed there
just edit table data
精彩评论