#12 0x000000000069e6ff in handle_select (thd=0x7fdc13335070, lex=0x7fdc13338c88, result=0x7fdc1074c4f8, setup_tables_done_option=0) at 10.0/sql/sql_select.cc:372
#13 0x00000000006737b1 in execute_sqlcom_select (thd=0x7fdc13335070, all_tables=0x7fdc1045f348) at 10.0/sql/sql_parse.cc:5301
#14 0x000000000066bb5c in mysql_execute_command (thd=0x7fdc13335070) at 10.0/sql/sql_parse.cc:2587
#15 0x0000000000675f3b in mysql_parse (thd=0x7fdc13335070, rawbuf=0x7fdc1045f088 "SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2\nWHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a )", length=128, parser_state=0x7fdc1ac7b630) at 10.0/sql/sql_parse.cc:6447
#16 0x0000000000668d09 in dispatch_command (command=COM_QUERY, thd=0x7fdc13335070, packet=0x7fdc1332b071 "SELECT STRAIGHT_JOIN * FROM t1, t2 AS t2_1, t2 AS t2_2\nWHERE t2_2.c = t2_1.c AND t2_2.b = t2_1.b AND ( a IS NULL OR t2_1.c = a )", packet_length=128) at 10.0/sql/sql_parse.cc:1308
#17 0x00000000006680ab in do_command (thd=0x7fdc13335070) at 10.0/sql/sql_parse.cc:1005
#18 0x0000000000782305 in do_handle_one_connection (thd_arg=0x7fdc13335070) at 10.0/sql/sql_connect.cc:1379
#19 0x0000000000782058 in handle_one_connection (arg=0x7fdc13335070) at 10.0/sql/sql_connect.cc:1293
#20 0x0000000000aa86f1 in pfs_spawn_thread (arg=0x7fdc13b75b70) at 10.0/storage/perfschema/pfs.cc:1853
#21 0x00007fdc1a9c9b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
#22 0x00007fdc19518a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
EXPLAIN also crashes. optimizer_switch does not matter, the crash happens with all OFF values as well as with the default set.
Attachments
Issue Links
relates to
MDEV-7865Server crashes in Item_equal_iterator<List_iterator_fast, Item>::get_curr_field on query with impossible condition and OR/AND expressions
Not sure if this may be related with two solved bugs MDEV-4274 and MDEV-4944 but leaving comment here for future reference.
Jorge Manuel Silva
added a comment - Not sure if this may be related with two solved bugs MDEV-4274 and MDEV-4944 but leaving comment here for future reference.
Debugging, I don't see anything apparently wrong in the code for MDEV-5606.
I do see something wrong in Item_equal code, though:
Breakpoint 2, get_full_func_mm_tree (param=0x7ffff7f78a40, cond_func=0x7fffcbce1ba0, field_item=0x7fffcbcde188, value=0x7fffcbcd86b0, inv=false) at /home/psergey/dev2/10.0/sql/opt_range.cc:7783
(gdb) p field_item
$64 = (Item_field *) 0x7fffcbcde188
(gdb) p dbug_print_item(field_item)
$65 = 0x195cf60 "'foo'"
(gdb) p field_item
$66 = (Item_field *) 0x7fffcbcde188
(gdb)
(gdb) p item_equal
$67 = (Item_equal *) 0x7fffcbcdf9c0
(gdb) p item_equal->equal_items
$68 = {<base_list> = {<Sql_alloc> =
{<No data fields>}
, first = 0x7fffcbcdfba0, last = 0x7fffcbcdfba0, elements = 1}, <No data fields>}
(gdb) p item_equal->equal_items.head()
$69 = (Item *) 0x8f8f8f8f8f8f8f8f
(gdb) p item_equal->with_const
$70 = false
As far as I undersand, item_equal->equal_items has garbage values.
Sergei Petrunia
added a comment - Debugging, I don't see anything apparently wrong in the code for MDEV-5606 .
I do see something wrong in Item_equal code, though:
Breakpoint 2, get_full_func_mm_tree (param=0x7ffff7f78a40, cond_func=0x7fffcbce1ba0, field_item=0x7fffcbcde188, value=0x7fffcbcd86b0, inv=false) at /home/psergey/dev2/10.0/sql/opt_range.cc:7783
(gdb) p field_item
$64 = (Item_field *) 0x7fffcbcde188
(gdb) p dbug_print_item(field_item)
$65 = 0x195cf60 "'foo'"
(gdb) p field_item
$66 = (Item_field *) 0x7fffcbcde188
(gdb)
(gdb) p item_equal
$67 = (Item_equal *) 0x7fffcbcdf9c0
(gdb) p item_equal->equal_items
$68 = {<base_list> = {<Sql_alloc> =
{<No data fields>}
, first = 0x7fffcbcdfba0, last = 0x7fffcbcdfba0, elements = 1}, <No data fields>}
(gdb) p item_equal->equal_items.head()
$69 = (Item *) 0x8f8f8f8f8f8f8f8f
(gdb) p item_equal->with_const
$70 = false
As far as I undersand, item_equal->equal_items has garbage values.
I can indeed reproduce this bug in 10.0.8 release packages in Windows 7.
If change ENGINE=MyISAM to ENGINE=Aria or ENGINE=InnoDB, the bug no longer happens.
Is there any way to workaround this bug in MyISAM or do I have to wait for 10.0.9 release?
Jorge Manuel Silva
added a comment - Another thing.
I can indeed reproduce this bug in 10.0.8 release packages in Windows 7.
If change ENGINE=MyISAM to ENGINE=Aria or ENGINE=InnoDB, the bug no longer happens.
Is there any way to workaround this bug in MyISAM or do I have to wait for 10.0.9 release?
Not sure if this may be related with two solved bugs
MDEV-4274andMDEV-4944but leaving comment here for future reference.