Bug #44653 | Server crash noticed when executing random queries with partitions. | ||
---|---|---|---|
Submitted: | 4 May 2009 20:41 | Modified: | 13 Jul 2009 13:23 |
Reporter: | Hema Sridharan | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S2 (Serious) |
Version: | 5.1, 6.0, mysql-6.0-backup | OS: | Linux |
Assigned to: | Martin Hansson | CPU Architecture: | Any |
[4 May 2009 20:41]
Hema Sridharan
[4 May 2009 21:00]
Sveta Smirnova
Thank you for the report. Verified as described.
[11 Jun 2009 13:52]
Martin Hansson
May be used to trigger bug ./runall.pl --threads=1 --queries=573 --rows=1 --basedir=/data0/martin/bzr/mysql-5.1-bugteam --grammar=/data0/martin/bzr/mysql-test-extra-\ 6.0/mysql-test/gentest/conf/partitions_procedures_triggers.yy
[18 Jun 2009 8:58]
Martin Hansson
A properly minimized test case.
Attachment: bug44653.test (application/octet-stream, text), 564 bytes.
[19 Jun 2009 9:39]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76653 2936 Martin Hansson 2009-06-19 Bug#44653: Server crash noticed when executing random queries with partitions. When opening a table, it is imperative that the flag TABLE::auto_increment_field_not_null be false. But if an error occured during the creation of a table (e.g. the table exists already) with an auto_increment column and a BEFORE trigger that used the INSERT ... SELECT construct, the flag was not reset until after error checking. Thus if an error occured, the function returned immediately and it was not done. Crash happened if the table was opened again. Fixed by resetting the flag before error checking. @ mysql-test/r/trigger.result Bug#44653: Test result @ mysql-test/t/trigger.test Bug#44653: Test case @ sql/sql_insert.cc Bug#44653: Fix: Make sure to set this field before returning in case of error
[19 Jun 2009 11:38]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76670 2936 Martin Hansson 2009-06-19 Bug#44653: Server crash noticed when executing random queries with partitions. When opening a table, it is imperative that the flag TABLE::auto_increment_field_not_null be false. But if an error occured during the creation of a table (e.g. the table exists already) with an auto_increment column and a BEFORE trigger that used the INSERT ... SELECT construct, the flag was not reset until after error checking. Thus if an error occured, the function returned immediately and it was not done. Crash happened if the table was opened again. Fixed by resetting the flag before error checking. @ mysql-test/r/trigger.result Bug#44653: Test result @ mysql-test/t/trigger.test Bug#44653: Test case @ sql/sql_insert.cc Bug#44653: Fix: Make sure to unset this field before returning in case of error
[21 Jun 2009 10:48]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76768 2937 Martin Hansson 2009-06-21 Bug#44653: Server crash noticed when executing random queries with partitions. When opening a table, it is imperative that the flag TABLE::auto_increment_field_not_null be false. But if an error occured during the creation of a table (e.g. the table exists already) with an auto_increment column and a BEFORE trigger that used the INSERT ... SELECT construct, the flag was not reset until after error checking. Thus if an error occured, the function returned immediately and it was not done. Crash happened if the table was opened again. Fixed by resetting the flag after error checking. ****** Bug#44653: Server crash noticed when executing random queries with partitions. When opening a table, it is imperative that the flag TABLE::auto_increment_field_not_null be false. But if an error occured during the creation of a table (e.g. the table exists already) with an auto_increment column and a BEFORE trigger that used the INSERT ... SELECT construct, the flag was not reset until after error checking. Thus if an error occured, the function returned immediately and it was not done. Crash happened if the table was opened again. Fixed by resetting the flag after error checking. @ mysql-test/r/trigger.result Bug#44653: Test result @ mysql-test/t/trigger.test Bug#44653: Test case @ sql/sql_insert.cc Bug#44653: Fix: Make sure to unset this field before returning in case of error
[21 Jun 2009 10:50]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/76769 2936 Martin Hansson 2009-06-21 Bug#44653: Server crash noticed when executing random queries with partitions. When opening a table, it is imperative that the flag TABLE::auto_increment_field_not_null be false. But if an error occured during the creation of a table (e.g. the table exists already) with an auto_increment column and a BEFORE trigger that used the INSERT ... SELECT construct, the flag was not reset until after error checking. Thus if an error occured, the function returned immediately and it was not done. Crash happened if the table was opened again. Fixed by resetting the flag after error checking. @ mysql-test/r/trigger.result Bug#44653: Test result @ mysql-test/t/trigger.test Bug#44653: Test case @ sql/sql_insert.cc Bug#44653: Fix: Make sure to unset this field before returning in case of error
[22 Jun 2009 12:52]
Kristofer Pettersson
Requested more detailed comments, but patch approved.
[8 Jul 2009 13:30]
Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:martin.hansson@sun.com-20090622140142-t735nplwp0yg9alg) (merge vers: 5.1.37) (pib:11)
[9 Jul 2009 7:37]
Bugs System
Pushed into 5.1.37 (revid:joro@sun.com-20090708131116-kyz8iotbum8w9yic) (version source revid:martin.hansson@sun.com-20090622140142-t735nplwp0yg9alg) (merge vers: 5.1.37) (pib:11)
[10 Jul 2009 11:21]
Bugs System
Pushed into 5.4.4-alpha (revid:anozdrin@bk-internal.mysql.com-20090710111017-bnh2cau84ug1hvei) (version source revid:martin.hansson@sun.com-20090622143256-jxcqoks6cl2lcm30) (merge vers: 5.4.4-alpha) (pib:11)
[13 Jul 2009 12:49]
Jon Stephens
Not sure why this is still categorised as Partitioning when the test case doesn't seem to make any use of partitioned tables?
[13 Jul 2009 12:50]
Jon Stephens
Documented bugfix in the 5.1.37 and 5.4.4 changelogs as follows: If an error occurred during the creation of a table (for example, the table already existed) having an AUTO_INCREMENT column and a BEFORE trigger that used the INSERT ... SELECT construct, an internal flag was not reset properly. This led to a crash the next time that the table was opened again.
[12 Aug 2009 22:30]
Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 1:50]
Paul DuBois
Ignore previous comment about 5.4.2.
[26 Aug 2009 13:46]
Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[26 Aug 2009 13:46]
Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (version source revid:jonas@mysql.com-20090826105955-bkj027t47gfbamnc) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[26 Aug 2009 13:48]
Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (version source revid:jonas@mysql.com-20090825194404-37rtosk049t9koc4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[27 Aug 2009 16:33]
Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:magnus.blaudd@sun.com-20090827163030-6o3kk6r2oua159hr) (version source revid:jonas@mysql.com-20090826132541-yablppc59e3yb54l) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[7 Oct 2009 20:21]
Paul DuBois
The 5.4 fix has been pushed to 5.4.2.