MySQL Forums
Forum List  »  Triggers

Re: Still get lock tables error message in 5.0.10
Posted by: Jonathan Stephens
Date: August 03, 2005 08:45PM

Hi, Markus!

I just tried your example in 5.0.10-beta using both MyISAM and InnoDB tables and got the same problem.

The issue seems to be that you're trying to insert into the same table that the trigger is defined on, and what you actually want to do is something like this:

IF NEW.value <= 2 AND NEW.value >= 8 THEN
ABANDON...

which, unfortunately, MySQL doesn't support at this time. :(

You might in the meantime try something like what's suggested here: http://forums.mysql.com/read.php?99,22523 - I know it's not very "clean", but Riccardo's solution does seem to work for now. I'm going to talk to some people here about the ABANDON and error-handling issues and see if I can find out what's being planned for these.

Jon Stephens
MySQL Documentation Team @ Oracle

MySQL Dev Zone
MySQL Server Documentation
Oracle

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Still get lock tables error message in 5.0.10
2453
August 03, 2005 08:45PM


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.