[MDEV-9358] main.partition_column fails with valgrind warnings "Invalid read of size" Created: 2016-01-04  Updated: 2016-02-03  Resolved: 2016-02-03

Status: Closed
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.0.24

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: valgrind

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled
Sprint: 10.1.11

 Description   

http://buildbot.askmonty.org/buildbot/builders/work-amd64-valgrind/builds/8178/steps/test/logs/stdio

main.partition_column                    w1 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-01-03 17:40:10
line
==18405== Thread 4:
==18405== Invalid write of size 8
==18405==    at 0x4C28173: memcpy (mc_replace_strmem.c:878)
==18405==    by 0x8ECC01: SEL_ARG::store_min_key(st_key_part*, unsigned char**, unsigned int*, unsigned int) (opt_range.cc:503)
==18405==    by 0x8D43F6: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4545)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==  Address 0xcedb000 is 0 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)
==18405== Invalid read of size 1
==18405==    at 0x922673: store_tuple_to_record(Field**, unsigned int*, unsigned char*, unsigned char*) (sql_partition.cc:7496)
==18405==    by 0x923515: get_part_iter_for_interval_cols_via_map(partition_info*, bool, unsigned int*, unsigned char*, unsigned char*, unsigned int, unsigned int, unsigned int, st_partition_iter*) (sql_partition.cc:7725)
==18405==    by 0x8D4069: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4592)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==  Address 0xcedb000 is 0 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)
==18405== Invalid read of size 2
==18405==    at 0x793661: Field_varstring::set_key_image(unsigned char const*, unsigned int) (field.cc:7201)
==18405==    by 0x92264E: store_tuple_to_record(Field**, unsigned int*, unsigned char*, unsigned char*) (sql_partition.cc:7503)
==18405==    by 0x923515: get_part_iter_for_interval_cols_via_map(partition_info*, bool, unsigned int*, unsigned char*, unsigned char*, unsigned int, unsigned int, unsigned int, st_partition_iter*) (sql_partition.cc:7725)
==18405==    by 0x8D4069: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4592)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==  Address 0xcedb001 is 1 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)
==18405== Invalid read of size 1
==18405==    at 0x4C292CC: memmove (mc_replace_strmem.c:1022)
==18405==    by 0x67A0BD: well_formed_copy_nchars(charset_info_st const*, char*, unsigned int, charset_info_st const*, char const*, unsigned int, unsigned int, char const**, char const**, char const**) (sql_string.cc:981)
==18405==    by 0x793582: Field_varstring::store(char const*, unsigned int, charset_info_st const*) (field.cc:6866)
==18405==    by 0x92264E: store_tuple_to_record(Field**, unsigned int*, unsigned char*, unsigned char*) (sql_partition.cc:7503)
==18405==    by 0x923515: get_part_iter_for_interval_cols_via_map(partition_info*, bool, unsigned int*, unsigned char*, unsigned char*, unsigned int, unsigned int, unsigned int, st_partition_iter*) (sql_partition.cc:7725)
==18405==    by 0x8D4069: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4592)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==  Address 0xcedb003 is 3 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)
==18405== Invalid write of size 8
==18405==    at 0x4C28173: memcpy (mc_replace_strmem.c:878)
==18405==    by 0x8ECC01: SEL_ARG::store_min_key(st_key_part*, unsigned char**, unsigned int*, unsigned int) (opt_range.cc:503)
==18405==    by 0x8D43F6: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4545)
==18405==    by 0x8D3F8F: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4802)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==  Address 0xcedb000 is 0 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)
==18405== Invalid read of size 1
==18405==    at 0x922673: store_tuple_to_record(Field**, unsigned int*, unsigned char*, unsigned char*) (sql_partition.cc:7496)
==18405==    by 0x923515: get_part_iter_for_interval_cols_via_map(partition_info*, bool, unsigned int*, unsigned char*, unsigned char*, unsigned int, unsigned int, unsigned int, st_partition_iter*) (sql_partition.cc:7725)
==18405==    by 0x8D4069: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4592)
==18405==    by 0x8D3F8F: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4802)
==18405==    by 0x8D4658: find_used_partitions(st_part_prune_param*, SEL_ARG*) (opt_range.cc:4528)
==18405==    by 0x8E8BE7: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4100)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==  Address 0xcedb000 is 0 bytes after a block of size 48 alloc'd
==18405==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
==18405==    by 0xE3CB3A: my_malloc (my_malloc.c:100)
==18405==    by 0xE32D29: alloc_root (my_alloc.c:180)
==18405==    by 0x8E82D0: prune_partitions(THD*, TABLE*, Item*) (opt_range.cc:4978)
==18405==    by 0x64B1EA: JOIN::optimize_inner() (sql_select.cc:1258)
==18405==    by 0x64CF42: JOIN::optimize() (sql_select.cc:1024)
==18405==    by 0x6508CD: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3294)
==18405==    by 0x65185B: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:373)
==18405==    by 0x5E7CFC: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5304)
==18405==    by 0x5EFDDF: mysql_execute_command(THD*) (sql_parse.cc:2562)
==18405==    by 0x5F27D9: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6565)
==18405==    by 0x5F4A34: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1308)
==18405==    by 0x5F565A: do_command(THD*) (sql_parse.cc:998)
==18405==    by 0x6E70DE: do_handle_one_connection(THD*) (sql_connect.cc:1377)
==18405==    by 0x6E7204: handle_one_connection (sql_connect.cc:1292)
==18405==    by 0xB3E406: pfs_spawn_thread (pfs.cc:1860)

Reproducible locally, too, both on 10.0 and 10.1, on valgrind builds.

Apparently the problem appeared in 10.0 tree with this revision:

commit 8d0d4451d34a8f6c3dd1732d7a813408b6a95b38
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Mon Sep 21 17:32:37 2015 +0300
 
    Backport to 10.0: MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
    
    The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
    (and max_key) to store keys. Buffer size was a good upper bound for
    range analysis and partition pruning, but not for EITS selectivity
    calculations.
    
    Fixed by making these buffers variable-size. The sizes are calculated
    from [pseudo]indexes used for range analysis.



 Comments   
Comment by Sergei Petrunia [ 2016-02-03 ]

This should be closed by fix for MDEV-9505.

Comment by Sergei Petrunia [ 2016-02-03 ]

Fixed by MDEV-9505.

Generated at Thu Feb 08 07:34:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.