Bug #32260 | User variables in query cause server crash | ||
---|---|---|---|
Submitted: | 11 Nov 2007 3:26 | Modified: | 30 Nov 2007 1:23 |
Reporter: | Paul DuBois | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.1.23-BK | OS: | Any |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[11 Nov 2007 3:26]
Paul DuBois
[11 Nov 2007 7:25]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[11 Nov 2007 7:26]
Valeriy Kravchuk
Resolved stack trace: openxs@linux:~/dbs/5.1> bin/resolve_stack_dump -s /tmp/mysqld51.sym -n 32260.st ack 0x8215d2b handle_segfault + 683 0x818654e _ZN22Item_func_set_user_var26register_field_in_read_mapEPh + 14 0x818446b _ZN9Item_func4walkEM4ItemFbPhEbS1_ + 155 0x82fa430 _Z8filesortP3THDP8st_tableP13st_sort_fieldjP10SQL_SELECTmbPm + 4160 0x827db1e _Z17create_sort_indexP3THDP4JOINP8st_ordermmb + 318 0x828e9c6 _ZN4JOIN4execEv + 4198 0x828abf8 _Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB _S2_SB_yP13select_resultP18st_select_lex_unitP13st_select + 184 0x828fa0e _Z13handle_selectP3THDP6st_lexP13select_resultm + 382 0x8222eeb _Z21execute_sqlcom_selectP3THDP10TABLE_LIST + 859 0x8229528 _Z21mysql_execute_commandP3THD + 22008 0x822cbda _Z11mysql_parseP3THDPKcjPS2_ + 586 0x822daa9 _Z16dispatch_command19enum_server_commandP3THDPcj + 3609 0x822e45b _Z10do_commandP3THD + 171 0x821e090 handle_one_connection + 528 0x40032aa7 _end + 931720083 0x401e1c2e _end + 933485850
[16 Nov 2007 5:22]
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/37919 ChangeSet@1.2619, 2007-11-16 09:22:21+04:00, ramil@mysql.com +3 -0 Fix for bug #32260: User variables in query cause server crash Problem: there's no guarantee that the user variable item's result_field is assigned when we're adjusting its table read map. Fix: Check the result_field before using it.
[16 Nov 2007 12:45]
Alexey Kopytov
Bug #32376 was marked as a duplicate of this one.
[17 Nov 2007 7:21]
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/37989 ChangeSet@1.2620, 2007-11-17 11:20:50+04:00, ramil@mysql.com +3 -0 Fix for bug #32260: User variables in query cause server crash Problem: there's no guarantee that the user variable item's result_field is assigned when we're adjusting its table read map. Fix: check the result_field before using it.
[28 Nov 2007 10:25]
Bugs System
Pushed into 6.0.4-alpha
[28 Nov 2007 10:27]
Bugs System
Pushed into 5.1.23-rc
[30 Nov 2007 1:23]
Paul DuBois
Noted in 5.1.23, 6.0.4 changelogs. Some uses of user variables in a query could result in a server crash.