I'm note sure if here is the right place to ask about this, but I'm facing some problem
with trigger and replication.
I'm trying to enforce Foreign Key checks on MyISAM using triggers, but I'm not able to
interrupt trigger execution.
On MySQL manual (http://dev.mysql.com/doc/refman/5.1/en/routine-restrictions.html), we
For triggers, the following additional statements or operations are disallowed:
* Triggers currently are not activated by foreign key actions.
* The RETURN statement is disallowed in triggers, which cannot return a
value. To exit a trigger immediately, use the LEAVE statement.
I tried to use LEAVE statement, but I got a sintax error:
mysql> delimiter //
mysql> create trigger aa before insert on y for each row
-> declare v int;
-> select count(*) into v from x where
id = new.id;
-> if v = 0
-> end if;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near
'; end if; end' at line 1
Appreciatte any help on this.
Thanks in advance,
Novos endereços, o Yahoo! que você conhece. Crie um email novo com a
sua cara @ymail.com ou @rocketmail.com.