Bug #36137 | virtual longlong Item_in_subselect::val_int(): Assertion `0' failed. | ||
---|---|---|---|
Submitted: | 16 Apr 2008 12:48 | Modified: | 20 Nov 2010 23:33 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 6.0.4-debug-nt, 6.0.5-bk | OS: | Any |
Assigned to: | Sergey Petrunya | CPU Architecture: | Any |
[16 Apr 2008 12:48]
Shane Bester
[16 Apr 2008 13:14]
MySQL Verification Team
Thank you for the bug report. Verified as described on Suse 10.3 X64: miguel@hegel:~/dbs> 6.0/bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 6.0.5-alpha-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> drop table if exists `t1`; Query OK, 0 rows affected (0.00 sec) mysql> create table `t1` (`a` int,`b` int,key (`a`),key (`b`)) engine=myisam; Query OK, 0 rows affected (0.10 sec) mysql> insert into `t1` values (2,4),(2,4),(2,4); Query OK, 3 rows affected (0.00 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql> select t1.a from t1 where t1.a not in (select 1 from t1) and -> t1.a in (select 1 from t1 where t1.a in (select 1 from t1) group by t1.a ); ERROR 2013 (HY000): Lost connection to MySQL server during query mysql>
[22 Apr 2008 6:31]
Sergey Petrunya
The crash happens only when both semi-join and materialization are enabled. If I set @@optimizer switch to disable semi-join, or materialization, or both, the crash goes away.
[23 Apr 2008 2:57]
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/45856 ChangeSet@1.2625, 2008-04-23 06:56:36+04:00, sergefp@mysql.com +3 -0 BUG#36137: virtual longlong Item_in_subselect::val_int(): Assertion `0' failed. - Call join->flatten_subqueries() before we call join->optimize(). If we don't do this, subquery predicates which were slated for conversion it semi-join nests will remain in the WHERE clause and will fire an assert when we attempt to evaluate them (this happens because these predicates have not undergone the mandatory IN->EXISTS rewrite)
[23 Apr 2008 5: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/45861 ChangeSet@1.2623, 2008-04-23 09:26:34+04:00, sergefp@mysql.com +3 -0 BUG#36137: virtual longlong Item_in_subselect::val_int(): Assertion `0' failed. - Call join->flatten_subqueries() before we call join->optimize() If we don't do this, subquery predicates which were slated for conversion into semi-join nests will remain half-converted and will fire an assert when we attempt to evaluate them.
[28 May 2008 10:02]
Bugs System
Pushed into 6.0.6-alpha
[30 May 2008 18:11]
Paul DuBois
Noted in 6.0.6 changelog. The combination of semi-join and materialization both being enabled could lead to assertion failure during subquery processing.
[16 Aug 2010 6:36]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[13 Nov 2010 16:24]
Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[20 Nov 2010 23:33]
Paul DuBois
Noted in 5.6.1 changelog.
[23 Nov 2010 2:16]
Paul DuBois
Correction: No 5.6.1 changelog entry. Bug does not appear in any released 5.6.x version.