Bug #32262 crash with decimal column...

Submitted: 11 Nov 2007 13:47 Modified: 16 Nov 2010 3:55
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S1 (Critical)
Version:6.0.3, 6.0.4 OS:Any
Assigned to: Gleb Shchepa CPU Architecture:Any

[11 Nov 2007 13:47] Shane Bester
Description:
when comparing a decimal value to a string, the server crashed with stack trace.

mysqld-debug.exe!check_quick_select
mysqld-debug.exe!get_best_group_min_max
mysqld-debug.exe!SQL_SELECT::test_quick_select
mysqld-debug.exe!get_quick_record_count
mysqld-debug.exe!make_join_statistics
mysqld-debug.exe!JOIN::optimize
mysqld-debug.exe!mysql_select
mysqld-debug.exe!mysql_derived_filling
mysqld-debug.exe!mysql_handle_derived
mysqld-debug.exe!open_and_lock_tables
mysqld-debug.exe!execute_sqlcom_select
mysqld-debug.exe!mysql_execute_command
mysqld-debug.exe!mysql_parse
mysqld-debug.exe!dispatch_command
mysqld-debug.exe!do_command
mysqld-debug.exe!handle_one_connection
mysqld-debug.exe!pthread_start
mysqld-debug.exe!_threadstart

How to repeat:
drop table if exists `t1`;
create table `t1`( `col0` decimal(10,0),index(`col0`))engine=myisam;
insert into `t1` values (1),(2),(3);
select `col0` from `t1` where `col0` >= 'a' group by 1;

I could not repeat this on 5.0 or 5.1.
[12 Nov 2007 15:52] 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/37583

ChangeSet@1.2683, 2007-11-12 19:52:48+04:00, gshchepa@gleb.loc +3 -0
  Fixed bug #32262: crash with decimal column.
  
  The server crashed on optimization of queries
  with a comparison of an indexed decimal column with
  a string value.
[15 Nov 2007 20:20] 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/37888

ChangeSet@1.2663, 2007-11-15 23:18:38+03:00, sergefp@mysql.com +3 -0
  Merging Gleb's fix:
  Fixed bug #32262: crash with decimal column.
  
  The server crashed on optimization of queries
  with a comparison of an indexed decimal column with
  a string value.
[16 Nov 2007 9:36] Bugs System
Pushed into 6.0.4-alpha
[16 Nov 2007 16:01] 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/37961

ChangeSet@1.2634, 2007-11-16 18:59:44+03:00, sergefp@mysql.com +3 -0
  Merging Gleb's fix:
  Fixed bug #32262: crash with decimal column.
  
  The server crashed on optimization of queries
  with a comparison of an indexed decimal column with
  a string value.
[19 Nov 2007 4:22] Paul DuBois
Noted in 6.0.4 changelog.
[21 Nov 2007 18:54] Bugs System
Pushed into 6.0.4-alpha
[22 Nov 2007 10:54] Stefan Hinz
Moved from 6.0.4 to 6.0.3 as per Build team; changelog revised accordingly.
[29 Nov 2007 12:53] Bugs System
Pushed into 6.0.4-alpha
[16 Aug 2010 6:40] 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:15] 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)
[16 Nov 2010 3:55] Paul DuBois
Noted in 5.6.1 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.069 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.