Skip navigation links

MySQL Forums :: Triggers :: limit number of rows using a trigger


Advanced Search

Re: limit number of rows using a trigger
Posted by: irek kordirko ()
Date: March 13, 2012 11:50AM

Darren White Wrote:
-------------------------------------------------------
> Now I am back to initial problem:
>
> Error Code: 1442. Can't update table 'a_test' in
> stored function/trigger because it is already used
> by statement which invoked this stored
> function/trigger.
>
Read FAQ:
http://dev.mysql.com/doc/refman/5.5/en/faqs-triggers.html#qandaitem-B-5-1-9

Quote

B.5.9: Can triggers access tables?

A trigger can access both old and new data in its own table. A trigger can also affect other tables,
but it is not permitted to modify a table that is already being used (for reading or writing) by the statement that invoked the function or trigger.

The trigger cannot modify the table on which it has been fired.

Options: ReplyQuote


Subject Views Written By Posted
limit number of rows using a trigger 2532 Darren White 03/13/2012 03:50AM
Re: limit number of rows using a trigger 954 Darren White 03/13/2012 03:59AM
Re: limit number of rows using a trigger 763 Darren White 03/13/2012 04:09AM
Re: limit number of rows using a trigger 1040 Darren White 03/13/2012 04:11AM
Re: limit number of rows using a trigger 952 irek kordirko 03/13/2012 11:50AM
Re: limit number of rows using a trigger 680 Darren White 03/14/2012 05:32AM
Re: limit number of rows using a trigger 1150 irek kordirko 03/14/2012 11:48AM


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.