Bug #1087 | Crash in in_longlong::set() | ||
---|---|---|---|
Submitted: | 18 Aug 2003 17:54 | Modified: | 19 Aug 2003 12:36 |
Reporter: | Jeremy Cole (Basic Quality Contributor) (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 4.0 | OS: | Any (All) |
Assigned to: | CPU Architecture: | Any |
[18 Aug 2003 17:54]
Jeremy Cole
[18 Aug 2003 21:35]
Jeremy Cole
The stack trace above is from the 4.0.14 RPM.
[18 Aug 2003 23:27]
Jeremy Cole
Tried to simulate what would happen if sql_calloc() failed in in_vector, by making the following change: --- item_cmpfunc.h.orig 2003-08-19 02:01:48.000000000 -0400 +++ item_cmpfunc.h 2003-08-19 02:02:12.000000000 -0400 @@ -294,7 +294,7 @@ public: uint used_count; in_vector(uint elements,uint element_length,qsort_cmp cmp_func) - :base((char*) sql_calloc(elements*element_length)), + :base((char*) NULL /*sql_calloc(elements*element_length)*/), size(element_length), compare(cmp_func), count(elements), used_count(elements) {} virtual ~in_vector() {} And running the simple query: select 1 in (1,2,3) Generates the "exact" same stack trace: 0x8093cfa handle_segfault + 452 0x82653a4 __pthread_sighandler + 116 0x8061c89 _ZN11in_longlong3setEjP4Item + 29 0x8061e7a _ZN12Item_func_in18fix_length_and_decEv + 246 0x8054531 _ZN9Item_func10fix_fieldsEP3THDP13st_table_list + 249 0x8066c74 _ZN12Item_func_in10fix_fieldsEP3THDP13st_table_list + 70 0x80bbb6f _Z12setup_fieldsP3THDP13st_table_listR4ListI4ItemEbPS5_b + 237 0x80c09e1 _Z12mysql_selectP3THDP13st_table_listR4ListI4ItemEPS4_P8st_orderS9_S7_S9_mP13select_result + 379 0x80c083c _Z13handle_selectP3THDP6st_lexP13select_result + 128 0x80a4284 _Z21mysql_execute_commandv + 8250 0x80a6af2 _Z11mysql_parseP3THDPcj + 212 0x80a173a _Z16dispatch_command19enum_server_commandP3THDPcj + 1606 0x80a10e9 _Z10do_commandP3THD + 495 0x80a0667 handle_one_connection + 623 0x8260b89 pthread_start_thread + 193 0x8299d57 clone + 103
[19 Aug 2003 12:36]
Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html