Bug #37894 | Assertion in init_read_record_seq in handler.h line 1444 | ||
---|---|---|---|
Submitted: | 5 Jul 2008 20:46 | Modified: | 10 Nov 2008 18:19 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 5.0,5.1,6.0 | OS: | Any |
Assigned to: | Gleb Shchepa | CPU Architecture: | Any |
[5 Jul 2008 20:46]
Philip Stoev
[9 Jul 2008 16:10]
Philip Stoev
Setting to Open so that the bug verification team can check previous releases.
[10 Jul 2008 15:38]
Sveta Smirnova
Fails also with versions 5.0.68 with: Version: '5.0.68-debug-log' socket: '/users/ssmirnova/src/mysql-5.0/mysql-test/var/tmp/master.sock' port: 9306 Source distribution mysqld: handler.h:677: int handler::ha_rnd_init(bool): Assertion `inited==NONE || (inited==RND && scan)' failed. And 5.1.28 with same error as 6.0
[19 Sep 2008 21:19]
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/54374 2662 Gleb Shchepa 2008-09-20 Bug #37894: Assertion in init_read_record_seq in handler.h line 1444 Select with a "NULL NOT IN" condition containing complex subselect from the same table as in the outer select failed with an assertion. The failure was caused by a concatenation of circumstances: 1) an inner select was optimized by make_join_statistics to use the QUICK_RANGE_SELECT access method (that implies an index scan of the table); 2) a subselect was independent (constant) from the outer select; 3) a condition was pushed down into inner select. During the evaluation of a constant IN expression an optimizer temporary changed the access method from index scan to table scan, but an engine handler was already initialized for index access by make_join_statistics. That caused an assertion. The subselect_single_select_engine::exec method has been modified to substitute a read_record engine handler with its clone for further table scan.
[6 Oct 2008 11:27]
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/55438 2662 Gleb Shchepa 2008-10-06 Bug #37894: Assertion in init_read_record_seq in handler.h line 1444 Select with a "NULL NOT IN" condition containing complex subselect from the same table as in the outer select failed with an assertion. The failure was caused by a concatenation of circumstances: 1) an inner select was optimized by make_join_statistics to use the QUICK_RANGE_SELECT access method (that implies an index scan of the table); 2) a subselect was independent (constant) from the outer select; 3) a condition was pushed down into inner select. During the evaluation of a constant IN expression an optimizer temporary changed the access method from index scan to table scan, but an engine handler was already initialized for index access by make_join_statistics. That caused an assertion. Unnecessary index initialization has been removed from the QUICK_RANGE_SELECT::init method (QUICK_RANGE_SELECT::reset reinvokes this initialization).
[24 Oct 2008 8:42]
Bugs System
Pushed into 5.0.72 (revid:gshchepa@mysql.com-20081010102758-yl9wui7u0cbva97c) (version source revid:gshchepa@mysql.com-20081010102758-yl9wui7u0cbva97c) (pib:5)
[26 Oct 2008 0:30]
Paul DuBois
Noted in 5.0.72 changelog. A SELECT with a NULL NOT IN condition containing a complex subquery from the same table as in the outer select caused an assertion failure. Setting report to NDI pending push into 5.1.x, 6.0.x.
[10 Nov 2008 10:52]
Bugs System
Pushed into 6.0.8-alpha (revid:gshchepa@mysql.com-20081010102758-yl9wui7u0cbva97c) (version source revid:kgeorge@mysql.com-20081010120446-ax2khl3pcsghoeew) (pib:5)
[10 Nov 2008 11:36]
Bugs System
Pushed into 5.1.30 (revid:gshchepa@mysql.com-20081010102758-yl9wui7u0cbva97c) (version source revid:kgeorge@mysql.com-20081010130753-obt82wv52av801ed) (pib:5)
[10 Nov 2008 18:19]
Paul DuBois
Note in 5.1.31, 6.0.8 changelogs.
[11 Nov 2008 16:32]
Paul DuBois
6.0.9 changelog, not 6.0.8.
[19 Jan 2009 11:24]
Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii) (version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers: 5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 2009 13:02]
Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers: 5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 2009 16:08]
Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers: 5.1.31-ndb-6.4.1) (pib:6)