输入下面一段代码,出错:
-
delimiter $$
-
drop trigger if exists istTPersonTgr$$
-
create trigger istTPersonTgr after insert on Topic_Person for each row
-
begin
-
declare newFTid char(10);
-
declare newFSubTid char(10);
-
declare newFLid char(10);
-
declare newFWeight char(10);
-
declare newState char(10);
-
set newFTid = NEW.FTid;
-
set newFSubTid = NEW.FSubTid;
-
set newFLid = NEW.FLid;
-
set newFWeight = NEW.FWeight;
-
set newState = -1;
-
INSERT INTO Topic_Result(FTid,FSubTid,FLid,FOptid,FState) VALUES(newFTid,newFSubTid,newFLid,newFWeight,newState);
-
end$$
ERROR 1235 (42000): This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'
产生这个错误的原因是存在多个触发对同一个表的同一个事件进行触发。
查看一下当前mysql DB中存在的triggers:
发现这里的insertTPersonTgr与上述代码的istTPersonTgr 功能是完全一样的。
将这个trigger删除即可解决问题。
阅读(3885) | 评论(0) | 转发(0) |