Why am I getting "This version of MySQL does not yet support the error" ... "?

I have a query like:

delimiter $$
DROP TRIGGER IF EXISTS TR_SCIN_BANK_UPD$$
CREATE TRIGGER TR_SCIN_BANK_UPD
AFTER UPDATE ON SCIN_BANK
FOR EACH ROW
BEGIN
  IF OLD.BANK_NAME != NEW.BANK_NAME THEN
    INSERT into SCIN_BANK_LOG SET BANK_ID=OLD.BANK_ID, BANK_NAME=OLD.BANK_NAME, LAST_UPD_USER_ID=OLD.LAST_UPD_USER_ID, LAST_UPD_TS=now();
  END IF;
  IF OLD.BANK_DESC != NEW.BANK_DESC THEN
    INSERT into SCIN_BANK_LOG SET BANK_ID=OLD.BANK_ID, BANK_DESC=OLD.BANK_DESC, LAST_UPD_USER_ID=OLD.LAST_UPD_USER_ID, LAST_UPD_TS=now();
  END IF;
END$$

when executed i get

This version of MySQL does not yet support "multiple triggers with the same action time and event for the same table"

Can this error solve any problem?

+5
source share
3 answers

I assume that there is already a trigger in this table AFTER UPDATE, but it is not called TR_SCIN_BANK_UPD, which means that your row DROP TRIGGER IF EXISTSdoes nothing.

+8
source

Updating Mysql to version 5.6.27 resolved this for me:

Server Version: 5.6.27-0ubuntu0.14.04.1 (Ubuntu)

+1
source

yes mysql , .

, , : , :

delimiter $$
create trigger trigger_name
AFTER insert
on t1
for each row
begin
  if new.col1 like '%Sabcd%'
  then
    update t2 inner join t3 on t2.col1=t1.col1
    set t2.col2=0 ;
  end if;
  if new.col1 like '%dcba%'
  then
    update t2 inner join t3 on t2.col1=t1.col1
    set t2.col2=02;
  end if;
end;
$$ 
0
source