Bug #12604 | "after insert" function that insert into same table get table LOCK error & fail | ||
---|---|---|---|
Submitted: | 16 Aug 2005 16:39 | Modified: | 24 Jul 2006 15:38 |
Reporter: | Jonathan Miller | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | 5.0 | OS: | Linux (Linux) |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[16 Aug 2005 16:39]
Jonathan Miller
[24 Jul 2006 15:38]
Tomash Brechko
This bug is a duplicate of bug#11896.
[24 Jul 2006 21:42]
Tomash Brechko
It is a limitation of MySQL that you can't update a table from a trigger that is defined for that very table. After the fix of bug#11896 the error message is more clear: ERROR HY000: Can't update table 'test.t2' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.