Crash/segfault during enum/int comparison in drizzled::optimizer::SqlSelect::cleanup (this=0x21c6940) at drizzled/optimizer/range.cc:390
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Critical
|
Andrew Hutchings | ||
7.0 |
Fix Released
|
Critical
|
Andrew Hutchings |
Bug Description
Crash / segfault when comparing a character-
SELECT X . `col_int_key` FROM `c` AS X LEFT JOIN `a` AS Y USING ( `col_enum_key` ) WHERE X . `col_enum_key` = ( SELECT `col_int_
This only occurs when the WHERE clause is comparing enum to int. Altering the WHERE clause to enum-enum or int-int works fine.
It should be noted that col_enum_key contains character values, which could be contributing to the crash.
Backtrace:
Program terminated with signal 11, Segmentation fault.
#0 0x00000000007459b9 in drizzled:
390 delete quick;
(gdb) backtrace
#0 0x00000000007459b9 in drizzled:
#1 0x0000000000745a8f in ~SqlSelect (this=0x21c6940, __in_chrg=<value optimized out>) at drizzled/
#2 0x00000000007d3740 in drizzled:
#3 0x0000000000706047 in drizzled:
#4 0x0000000000705ba0 in drizzled:
#5 0x00000000007ef70f in drizzled:
#6 0x00000000007d0de9 in drizzled:
tables=
select_
at drizzled/
#7 0x00000000007d0625 in drizzled:
setup_
#8 0x00000000007ccc2f in drizzled:
at drizzled/
#9 0x00000000008258b3 in drizzled:
#10 0x00000000007cc7ba in mysql_execute_
#11 0x00000000007cd57c in drizzled:
inBuf=0x218cb38 "SELECT X . `col_int_key` FROM `c` AS X LEFT JOIN `a` AS Y USING ( `col_enum_key` ) WHERE X . `col_enum_key` = ( SELECT `col_int_
#12 0x00000000007cc10e in drizzled:
packet=
at drizzled/
#13 0x000000000078ef41 in drizzled:
#14 0x000000000078e7db in drizzled:
#15 0x00007f0bbf916b54 in MultiThreadSche
at ./plugin/
#16 0x00007f0bbf9149e2 in session_thread (arg=0x7f0ba801
#17 0x00007f0bc35f69ca in start_thread (arg=<value optimized out>) at pthread_
---Type <return> to continue, or q <return> to quit---
#18 0x00007f0bc33536fd in clone () at ../sysdeps/
#19 0x0000000000000000 in ?? ()
Related branches
- Drizzle Developers: Pending requested
-
Diff: 260 lines (+97/-18)9 files modifieddrizzled/item/subselect.cc (+1/-0)
drizzled/join.cc (+5/-2)
drizzled/optimizer/range.cc (+1/-1)
drizzled/sql_select.cc (+9/-9)
drizzled/sql_select.h (+1/-5)
drizzled/sql_update.cc (+1/-1)
drizzled/table_reference.h (+14/-0)
tests/suite/regression/r/639716.result (+28/-0)
tests/suite/regression/t/639716.test (+37/-0)
Changed in drizzle: | |
assignee: | Patrick Crews (patrick-crews) → Andrew Hutchings (linuxjedi) |
Changed in drizzle: | |
assignee: | Andrew Hutchings (linuxjedi) → nobody |
assignee: | nobody → Padraig O'Sullivan (posulliv) |
Changed in drizzle: | |
assignee: | Padraig O'Sullivan (posulliv) → Andrew Hutchings (linuxjedi) |
This crash only occurs if the server has the transaction log enabled (--transaction- log.enable) .
Otherwise, things work as expected.