MySQL Forums
Forum List  »  Triggers

Re: INSERT and DELETE on trigger
Posted by: Andrew Gilfrin
Date: March 29, 2005 04:22PM

I tried in 5.0.3 and it compiled but then on running a update statement that fires the trigger I shows a warning , ERROR 1064.

Check the line after you run your insert statement

Query OK, 1 row affected, 1 warning (0.00 sec)

If it has 1 warning then run

show warnings;

This will show the message associated with the warning.

I also got

ERROR 1100 (HY000): Table 'dept' was not locked with LOCK TABLES

So I think it's safe to say while it might look like the code compiles it's best to avoid SQL in triggers at present.

Andrew Gilfrin
http://www.mysqldevelopment.com

Options: ReplyQuote


Subject
Views
Written By
Posted
5671
March 29, 2005 06:42AM
2817
March 29, 2005 07:28AM
2683
March 29, 2005 07:34AM
Re: INSERT and DELETE on trigger
3138
March 29, 2005 04:22PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.