Bug #59498 div function broken in mysql-trunk

Submitted: 14 Jan 2011 12:14 Modified: 29 Jan 2011 23:06
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Types Severity:S1 (Critical)
Version:5.6.2 5.5 OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any
Tags: regression

[14 Jan 2011 12:14] Shane Bester
Description:
mysql-trunk:

(gdb) bt
#0  __pthread_kill 
#1  in my_write_core (sig=11) at ./mysys/stacktrace.c:423
#2  in handle_segfault (sig=11) at ./sql/mysqld.cc:2511
#3  led>
#4  in my_decimal::my_decimal at ./sql/my_decimal.h:105
#5  in Item_func_int_div::val_int at ./sql/item_func.cc:1604
#6  in Item::send at ./sql/item.cc:5968
#7  in Protocol::send_result_set_row at ./sql/protocol.cc:848
#8  in select_send::send_data at ./sql/sql_class.cc:1866
#9  in JOIN::exec at ./sql/sql_select.cc:2794
#10 in mysql_select at ./sql/sql_select.cc:3554
#11 in handle_select at ./sql/sql_select.cc:323
#12 in execute_sqlcom_select at ./sql/sql_parse.cc:4513
#13 in mysql_execute_command at ./sql/sql_parse.cc:2096
#14 in mysql_parse at ./sql/sql_parse.cc:5550
#15 in dispatch_command at ./sql/sql_parse.cc:1078
#16 in do_command at ./sql/sql_parse.cc:815
#17 in do_handle_one_connection at ./sql/sql_connect.cc:748
#18 in handle_one_connection at ./sql/sql_connect.cc:684
#19 in start_thread at pthread_create.c:301
#20 in clone ()
(gdb) frame 4
#4  0x00000000007c28e8 in my_decimal::my_decimal (this=0x7f1a143fe360, rhs=...) at ./sql/my_decimal.h:105
105       my_decimal(const my_decimal &rhs) : decimal_t(rhs)
(gdb) p rhs
$1 = (const my_decimal &) @0x0: <error reading variable>

How to repeat:
#pull recent mysql-trunk and run:
select 1 div null;

Suggested fix:
review bug #59241 fix maybe?
[14 Jan 2011 14:03] 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/128769

3248 Tor Didriksen	2011-01-14
      Bug #59498 div function broken in mysql-trunk
     @ mysql-test/r/func_math.result
        New test case.
     @ mysql-test/t/func_math.test
        New test case.
     @ sql/item_func.cc
        Check for null before converting value to my_decimal.
[14 Jan 2011 15: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/128807

3249 Tor Didriksen	2011-01-14
      Bug #59498 div function broken in mysql-trunk
     @ mysql-test/r/func_math.result
        New test case.
     @ mysql-test/t/func_math.test
        New test case.
     @ sql/item_func.cc
        Check for null before converting value to my_decimal.
[14 Jan 2011 15:36] 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/128813

3511 Tor Didriksen	2011-01-14 [merge]
      Merge Bug #59498 from 5.5
[14 Jan 2011 15:37] Tor Didriksen
pushed to 5.5 and trunk
[14 Jan 2011 20:55] Bugs System
Pushed into mysql-trunk 5.6.2 (revid:tor.didriksen@oracle.com-20110114153619-qwbd2gu5pn0s6e3k) (version source revid:tor.didriksen@oracle.com-20110114153619-qwbd2gu5pn0s6e3k) (merge vers: 5.6.2) (pib:24)
[14 Jan 2011 20:55] Bugs System
Pushed into mysql-5.5 5.5.10 (revid:tor.didriksen@oracle.com-20110114140337-5zz3do0b12fxup3d) (version source revid:tor.didriksen@oracle.com-20110114140337-5zz3do0b12fxup3d) (merge vers: 5.5.10) (pib:24)
[19 Jan 2011 1:35] Paul DuBois
Bug does not appear in released versions. No changelog entry needed.
[20 Feb 2011 8:31] Shane Bester
it's still broken in recent 5.5 and trunk.
select (1.175494351E-37 div 1.7976931348623157E+308);
i'm filing a new bug about it in oracle bugdb.
[20 Feb 2011 8:39] Shane Bester
oracle bug 11792200

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

Page generated in 0.068 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.