Bug #12482 | Triggers has side effects with auto_increment values | ||
---|---|---|---|
Submitted: | 10 Aug 2005 6:36 | Modified: | 18 Aug 2005 20:42 |
Reporter: | Michael Widenius | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0 | OS: | |
Assigned to: | Michael Widenius | CPU Architecture: | Any |
[10 Aug 2005 6:36]
Michael Widenius
[15 Aug 2005 17:32]
Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: Fix will be in 5.0.12
[17 Aug 2005 23:16]
Michael Widenius
The bug fix removes side effects caused by triggers or stored functions. Problem areas in triggers/stored functions code before the bug fix: - Inserting into table with an autoincrement column (in trigger/SP) could cause wrong auto_increment values to be inserted in the main statement and cause replication failures - last_insert_id() could came from SP/TRIGGER (not wanted side effect) - FOUND_ROWS() could came from SP/TRIGGER and not from last statement - Using RAND() in SP/TRIGGER could cause replication to fail To make it short: This makes triggers/SP usable for replication.
[18 Aug 2005 20:42]
Mike Hillyer
Documented in 5.0.12 changelog: <listitem><para>Trigger and stored procedure execution could break replication. (Bug #12482)</para></listitem>