Bug #37415 | Crash in row_sel_field_store_in_mysql_format on multiple-table update (innodb) | ||
---|---|---|---|
Submitted: | 15 Jun 2008 17:56 | Modified: | 25 Nov 2009 12:55 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Olav Sandstå | CPU Architecture: | Any |
Tags: | engine_condition_pushdown, ICP, index_condition_pushdown, optimizer_switch, v6 |
[15 Jun 2008 17:56]
Philip Stoev
[15 Jun 2008 18:49]
Philip Stoev
Test case for bug 37415
Attachment: bug37415.pl (text/plain), 933 bytes.
[15 Jun 2008 18:59]
Philip Stoev
Please find attached a test case for this bug. Some observations: * The script creates/populates more tables than are actually used. If only the required tables are created/populated, the bug will not show up. * The crashing query is in the form: UPDATE B AS X LEFT JOIN C AS Y USING ( int_key ) SET Y . int_key = 10 WHERE Y . int_nokey > (SELECT 1 FROM (SELECT 1 FROM C AS X LEFT JOIN B AS Y USING ( pk ) ) AS Q LIMIT 1); * Both the join in the outer update and in the inner subquery are required * Both joins need to have the USING clause * The subquery is doubly-nested, otherwise update complains about trying to select and update from the same table.
[16 Jun 2008 17:43]
Philip Stoev
Multiple-table delete is also affected. The query is of the form: DELETE view1, view2 FROM view1 INNER JOIN view2 ON view1.t1_uuid = view2.t1_uuid WHERE view1.t1_uuid = @uuid; Where view1 and view2 are views containing joins.
[17 Jun 2008 17:31]
Heikki Tuuri
This is yet another serious bug in MySQL/InnoDB-6.0. Assigning this to Calvin.
[9 Jul 2008 4:28]
Calvin Sun
Philip - could you please try it again with DS-MRR and index condition pushdown off by using: set engine_condition_pushdown=off; set optimizer_use_mrr='disable'; If the server does not crash with both off, please change the category to Optimizer. The crash looks similar to the one in bug#36981. Thanks, Calvin
[9 Jul 2008 9:05]
Philip Stoev
After setting set global engine_condition_pushdown=off; set global optimizer_use_mrr='disable'; the crash is _still_ observed.
[12 Aug 2008 20:45]
Calvin Sun
With 6.0.7-alpha, I tried three times and the test completed when both engine_condition_pushdown and optimizer_use_mrr are off/disable; but the engine crashed every time when both setting are on/force. I think this is a MRR bug.
[13 Aug 2008 22:37]
Sergey Petrunya
> After setting > > set global engine_condition_pushdown=off; > set global optimizer_use_mrr='disable'; > > the crash is _still_ observed. SET GLOBAL changes apply only to new sessions. If you do not start new session to run the UPDATE statement, then SET GLOBAL statements have no effect.
[13 Aug 2008 22:39]
Sergey Petrunya
Calvin, Agree with your conclusions, re-assigning to myself.
[30 Sep 2008 13:54]
Sanjay Manwani
Reassigning lead to Manyi since Sergey is aware of the issue and assigned to this
[6 Mar 2009 10:54]
Sveta Smirnova
Bug #43448 was marked as duplicate of this one. It contains easier test case.
[27 Mar 2009 22:06]
MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=41367.
[14 Aug 2009 10:14]
Sveta Smirnova
Tested with case from bug #43448, not repeatable for me also.
[13 Nov 2009 10:16]
Olav Sandstå
I am no longer able to reproduce this crash using the mysql-6.0-codebase-bugfixing source. The crash seems to have been fixed by the following large merge into the 6.0-bugteam tree: revno: 2943 [merge] revision-id: joro@sun.com-20090106103847-5a4189bunn8opg6n parent: gshchepa@mysql.com-20081231115801-qgbwd2fy5aib72n1 parent: joerg@mysql.com-20081231141015-zruy7wn1un1yn8n2 committer: Georgi Kodinov <joro@sun.com> branch nick: fix-6.0-bugteam timestamp: Tue 2009-01-06 12:38:47 +0200 message: merged 6.0-main -> 6.0-bugteam Closing this bug as can't repeat.
[13 Nov 2009 10:22]
Philip Stoev
Olav, for every bug that has a MTR test case, please push the test case before you close the bug as Can't repeat. For this bug, the test case is located at http://bugs.mysql.com/bug.php?id=43448 Thank you!
[13 Nov 2009 11:25]
Olav Sandstå
Hi Philip. Thanks for the reminder - and I do agree with you about remember to include MTR test cases. But in this case I do not think the test case located in Bug#43448 is triggering the same bug as the original perl test case in this bug report. I looked at this when I originally looked at the bug a few weeks ago and concluded that the test cases was different (one have a subselect while the other do normal joins) and that they likely triggered a different code path. Further indication that the bug in Bug#43448 is a different but is that running with Bug#43448 test case I am still able to reproduce the crash. Thus I think Bug#433448 is wrongly classified as a duplicate of this bug and should instead have been classified as a duplicate of Bug#43360. I will update the status in Bug43448 and then considering include the MTR test case after Bug#43360 (and possibly some of the other InnoDB ICP memory corruption issues) has been fixed. I did an attempt on converting the perl test case for this bug report to MTR by having a test script doing the exact same sql as the perl test case. With this MTR script I was never able to trigger any crash. I do not understand why but expect it to be timing related. I also had to run the perl script multiple times in some cases in order to reproduce the crash. One possibility could be to include the perl script in the MTR test case? So my conclusion is: This bug has been fixed some time in before January (while Bug#43448 is still not fixed). I have not been able to find the exact patch that fixed it (using bzrfind) - the closest is a large merge containing 1000+ change sets that was merged into the mysql-6.0-codebase-bugfixing tree in January. And unfortunately I do not have any MTR test case that reproduces this crash.
[25 Nov 2009 12:55]
Olav Sandstå
Closing this as "Can not repeat". As mentioned in one of the previous comments this bug has been fixed by another patch. Was unsuccessful in converting the perl test to MTR.