Bug #52159 | returning time type from function and empty left join causes debug assertion | ||
---|---|---|---|
Submitted: | 17 Mar 2010 20:51 | Modified: | 4 Aug 2010 19:59 |
Reporter: | Shane Bester (Platinum Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S1 (Critical) |
Version: | 5.5.3-debug, 5.5.4-debug, 5.6.99-m4-debug | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
Tags: | assertion, regression, time |
[17 Mar 2010 20:51]
Shane Bester
[17 Mar 2010 21:14]
MySQL Verification Team
[miguel@hegel ~]$ dbs/5.5/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: 5.6.99-m4-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop function if exists `f1`; Query OK, 0 rows affected (0.01 sec) mysql> create function `f1`() returns time return 1; Query OK, 0 rows affected (0.00 sec) mysql> drop table if exists `t1`; Query OK, 0 rows affected (0.00 sec) mysql> create table `t1`(`b` int)engine=myisam; Query OK, 0 rows affected (0.07 sec) mysql> insert into `t1` values (0); Query OK, 1 row affected (0.00 sec) mysql> select `f1`() from `t1` left join -> ( select 1 as `a` from `t1` limit 0 -> ) as `d` on 1 group by `a`; ERROR 2013 (HY000): Lost connection to MySQL server during query mysql>
[17 Mar 2010 21:17]
MySQL Verification Team
Thank you for the bug report. Server version: 5.1.46-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop function if exists `f1`; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> create function `f1`() returns time return 1; Query OK, 0 rows affected (0.01 sec) mysql> drop table if exists `t1`; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> create table `t1`(`b` int)engine=myisam; Query OK, 0 rows affected (0.08 sec) mysql> insert into `t1` values (0); Query OK, 1 row affected (0.00 sec) mysql> select `f1`() from `t1` left join -> ( select 1 as `a` from `t1` limit 0 -> ) as `d` on 1 group by `a`; +----------+ | `f1`() | +----------+ | 00:00:01 | +----------+ 1 row in set (0.00 sec) mysql>
[28 Mar 2010 13:26]
Guilhem Bichot
regression source: bar@mysql.com-20100211041725-ijbox021olab82nv WL#2649 Number-to-string conversions Found by bzrfind.
[5 Jun 2010 11:25]
MySQL Verification Team
another testcase: set names latin1; set sql_mode=''; drop table if exists `g1`; create table `g1`(`a` char(215) character set utf8 not null,key(a))engine=myisam; insert into `g1` values (); select maketime(`a`,`a`,`a`) from `g1` group by 1 ;
[23 Jun 2010 7:51]
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/111861 3064 Alexander Barkov 2010-06-23 Bug#52159 returning time type from function and empty left join causes debug assertion Problem: Item_copy did not set "fixed", which resulted in DBUG_ASSERT in some cases. Fix: adding initialization of the "fixed" member Adding tests: mysql-test/include/ctype_numconv.inc mysql-test/r/ctype_binary.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result Adding initialization of the "fixed" member: sql/item.h
[7 Jul 2010 6:17]
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/112993 3094 Alexander Barkov 2010-07-07 Bug#52159 returning time type from function and empty left join causes debug assertion Problem: Item_copy did not set "fixed", which resulted in DBUG_ASSERT in some cases. Fix: adding initialization of the "fixed" member Adding tests: mysql-test/include/ctype_numconv.inc mysql-test/r/ctype_binary.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result Adding initialization of the "fixed" member: sql/item.h
[7 Jul 2010 6:18]
Alexander Barkov
Pushed into mysql-trunk-bugfixing (currently labeled as 5.5.6-m3)
[7 Jul 2010 7:41]
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/113001 3289 Alexander Barkov 2010-07-07 [merge] Merging Bug#52159 from mysql-trunk-bugfixing
[7 Jul 2010 7:49]
Alexander Barkov
Pushed into mysql-next-mr-bugfixing (5.6.99-m4)
[8 Jul 2010 17:14]
MySQL Verification Team
another testcase... drop table if exists `t1`; create table `t1`(`a` time)engine=myisam; insert into `t1` values (); select if(1,null,`a`) from `t1` group by null;
[9 Jul 2010 5:12]
Alexander Barkov
Thanks Shane! I checked the another test case, it now works fine in mysql-trunk-bugfixing: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.6-m3-debug Source distribution Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop table if exists `t1`; Query OK, 0 rows affected (0.00 sec) mysql> create table `t1`(`a` time)engine=myisam; Query OK, 0 rows affected (0.01 sec) mysql> insert into `t1` values (); Query OK, 1 row affected (0.00 sec) mysql> select if(1,null,`a`) from `t1` group by null; +----------------+ | if(1,null,`a`) | +----------------+ | NULL | +----------------+ 1 row in set (0.00 sec)
[23 Jul 2010 12:25]
Bugs System
Pushed into mysql-trunk 5.5.6-m3 (revid:alik@sun.com-20100723121820-jryu2fuw3pc53q9w) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[23 Jul 2010 12:32]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100723121929-90e9zemk3jkr2ocy) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (pib:18)
[31 Jul 2010 16:29]
Paul DuBois
Noted in 5.5.6 changelog. Some queries involving GROUP BY and a function that returned DATE raised a debug assertion.
[4 Aug 2010 8:06]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804080001-bny5271e65xo34ig) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[4 Aug 2010 8:22]
Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@ibmvm-20100804081533-c1d3rbipo9e8rt1s) (version source revid:vasil.dimov@oracle.com-20100531152341-x2d4hma644icamh1) (merge vers: 5.5.5-m3) (pib:18)
[4 Aug 2010 19:59]
Paul DuBois
Noted in 5.6.0 changelog.
[4 Aug 2010 22:50]
Paul DuBois
Correction: Bug does not appear in any released 5.6.x version, so no 5.6.0 changelog entry is needed.