drop table if exists `g59`; create table `g59`(`a` blob)engine=myisam; insert into `g59` values (),(); select count(*) from `g59` group by @`a`:=make_set(`a`,1) desc; Version: '5.6.2-m5-valgrind-max-debug' socket: 'sock' port: 3306 Source distribution 1 errors in context 1 of 461: Conditional jump or move depends on uninitialised value(s) at: my_strnncollsp_simple (ctype-simple.c:171) by: hp_key_cmp (hp_hash.c:656) by: hp_search (hp_hash.c:118) by: heap_rkey (hp_rkey.c:61) by: ha_heap::index_read_map (ha_heap.cc:295) by: handler::ha_index_read_map (handler.cc:2251) by: end_update (sql_select.cc:18827) by: evaluate_join_record (sql_select.cc:17775) by: sub_select (sql_select.cc:17469) by: do_select (sql_select.cc:16997) by: JOIN::exec (sql_select.cc:2917) by: mysql_select (sql_select.cc:3584) by: handle_select (sql_select.cc:323) by: execute_sqlcom_select (sql_parse.cc:4512) by: mysql_execute_command (sql_parse.cc:2095) by: mysql_parse (sql_parse.cc:5549) by: dispatch_command (sql_parse.cc:1078) by: do_command (sql_parse.cc:815) by: do_handle_one_connection (sql_connect.cc:748) by: handle_one_connection (sql_connect.cc:684) by: startthread (pthread_create.c:301) Uninitialised value was created by a heap allocation at: malloc (vg_replace_malloc.c:195) by: my_malloc (my_malloc.c:38) by: alloc_root (my_alloc.c:166) by: multi_alloc_root (my_alloc.c:280) by: create_tmp_table (sql_select.cc:15400) by: JOIN::optimize (sql_select.cc:2526) by: mysql_select (sql_select.cc:3570) by: handle_select (sql_select.cc:323) by: execute_sqlcom_select (sql_parse.cc:4512) by: mysql_execute_command (sql_parse.cc:2095) by: mysql_parse (sql_parse.cc:5549) by: dispatch_command (sql_parse.cc:1078) by: do_command (sql_parse.cc:815) by: do_handle_one_connection (sql_connect.cc:748) by: handle_one_connection (sql_connect.cc:684) by: start_thread (pthread_create.c:301) ==15318== ==15318== ==15318== 1 errors in context 2 of 461: ==15318== Conditional jump or move depends on uninitialised value(s) ==15318== at 0xBB6981: my_strnncollsp_simple (ctype-simple.c:165) ==15318== by 0x9B4266: hp_key_cmp (hp_hash.c:656) ==15318== by 0x9B2F96: hp_search (hp_hash.c:118) ==15318== by 0x9B647B: heap_rkey (hp_rkey.c:61) ==15318== by 0x9B0E9A: ha_heap::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_heap.cc:295) ==15318== by 0x58452E: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:2251) ==15318== by 0x72FA98: end_update(JOIN*, st_join_table*, bool) (sql_select.cc:18827) ==15318== by 0x72D027: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:17775) ==15318== by 0x72C5FD: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17469) ==15318== by 0x72BA6D: do_select(JOIN*, List*, TABLE*, Procedure*) (sql_select.cc:16997) ==15318== by 0x709AB3: JOIN::exec() (sql_select.cc:2917) ==15318== by 0x70C061: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3584) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== Uninitialised value was created by a heap allocation ==15318== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==15318== by 0x913FC9: my_malloc (my_malloc.c:38) ==15318== by 0x90BAF5: alloc_root (my_alloc.c:166) ==15318== by 0x90BD47: multi_alloc_root (my_alloc.c:280) ==15318== by 0x726BBB: create_tmp_table(THD*, TMP_TABLE_PARAM*, List&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*) (sql_select.cc:15400) ==15318== by 0x708319: JOIN::optimize() (sql_select.cc:2526) ==15318== by 0x70BFCF: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3570) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== ==15318== ==15318== 1 errors in context 3 of 461: ==15318== Conditional jump or move depends on uninitialised value(s) ==15318== at 0xBB6F94: my_hash_sort_simple (ctype-simple.c:317) ==15318== by 0x9B35ED: hp_hashnr (hp_hash.c:289) ==15318== by 0x9B2F5B: hp_search (hp_hash.c:114) ==15318== by 0x9B647B: heap_rkey (hp_rkey.c:61) ==15318== by 0x9B0E9A: ha_heap::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_heap.cc:295) ==15318== by 0x58452E: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:2251) ==15318== by 0x72FA98: end_update(JOIN*, st_join_table*, bool) (sql_select.cc:18827) ==15318== by 0x72D027: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:17775) ==15318== by 0x72C5FD: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17469) ==15318== by 0x72BA6D: do_select(JOIN*, List*, TABLE*, Procedure*) (sql_select.cc:16997) ==15318== by 0x709AB3: JOIN::exec() (sql_select.cc:2917) ==15318== by 0x70C061: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3584) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== Uninitialised value was created by a heap allocation ==15318== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==15318== by 0x913FC9: my_malloc (my_malloc.c:38) ==15318== by 0x90BAF5: alloc_root (my_alloc.c:166) ==15318== by 0x90BD47: multi_alloc_root (my_alloc.c:280) ==15318== by 0x726BBB: create_tmp_table(THD*, TMP_TABLE_PARAM*, List&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*) (sql_select.cc:15400) ==15318== by 0x708319: JOIN::optimize() (sql_select.cc:2526) ==15318== by 0x70BFCF: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3570) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== ==15318== ==15318== 1 errors in context 4 of 461: ==15318== Conditional jump or move depends on uninitialised value(s) ==15318== at 0xBB666C: skip_trailing_space (m_string.h:284) ==15318== by 0xBB6F1E: my_hash_sort_simple (ctype-simple.c:315) ==15318== by 0x9B35ED: hp_hashnr (hp_hash.c:289) ==15318== by 0x9B2F5B: hp_search (hp_hash.c:114) ==15318== by 0x9B647B: heap_rkey (hp_rkey.c:61) ==15318== by 0x9B0E9A: ha_heap::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_heap.cc:295) ==15318== by 0x58452E: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:2251) ==15318== by 0x72FA98: end_update(JOIN*, st_join_table*, bool) (sql_select.cc:18827) ==15318== by 0x72D027: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:17775) ==15318== by 0x72C5FD: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17469) ==15318== by 0x72BA6D: do_select(JOIN*, List*, TABLE*, Procedure*) (sql_select.cc:16997) ==15318== by 0x709AB3: JOIN::exec() (sql_select.cc:2917) ==15318== by 0x70C061: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3584) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== Uninitialised value was created by a heap allocation ==15318== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==15318== by 0x913FC9: my_malloc (my_malloc.c:38) ==15318== by 0x90BAF5: alloc_root (my_alloc.c:166) ==15318== by 0x90BD47: multi_alloc_root (my_alloc.c:280) ==15318== by 0x726BBB: create_tmp_table(THD*, TMP_TABLE_PARAM*, List&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*) (sql_select.cc:15400) ==15318== by 0x708319: JOIN::optimize() (sql_select.cc:2526) ==15318== by 0x70BFCF: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3570) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== ==15318== ==15318== 1 errors in context 5 of 461: ==15318== Conditional jump or move depends on uninitialised value(s) ==15318== at 0xBB65A9: skip_trailing_space (m_string.h:267) ==15318== by 0xBB6F1E: my_hash_sort_simple (ctype-simple.c:315) ==15318== by 0x9B35ED: hp_hashnr (hp_hash.c:289) ==15318== by 0x9B2F5B: hp_search (hp_hash.c:114) ==15318== by 0x9B647B: heap_rkey (hp_rkey.c:61) ==15318== by 0x9B0E9A: ha_heap::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_heap.cc:295) ==15318== by 0x58452E: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (handler.cc:2251) ==15318== by 0x72FA98: end_update(JOIN*, st_join_table*, bool) (sql_select.cc:18827) ==15318== by 0x72D027: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:17775) ==15318== by 0x72C5FD: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:17469) ==15318== by 0x72BA6D: do_select(JOIN*, List*, TABLE*, Procedure*) (sql_select.cc:16997) ==15318== by 0x709AB3: JOIN::exec() (sql_select.cc:2917) ==15318== by 0x70C061: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3584) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== Uninitialised value was created by a heap allocation ==15318== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==15318== by 0x913FC9: my_malloc (my_malloc.c:38) ==15318== by 0x90BAF5: alloc_root (my_alloc.c:166) ==15318== by 0x90BD47: multi_alloc_root (my_alloc.c:280) ==15318== by 0x726BBB: create_tmp_table(THD*, TMP_TABLE_PARAM*, List&, st_order*, bool, bool, unsigned long long, unsigned long long, char const*) (sql_select.cc:15400) ==15318== by 0x708319: JOIN::optimize() (sql_select.cc:2526) ==15318== by 0x70BFCF: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List&, 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:3570) ==15318== by 0x70256C: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:323) ==15318== by 0x6E63C7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4512) ==15318== by 0x6DF02A: mysql_execute_command(THD*) (sql_parse.cc:2095) ==15318== by 0x6E8524: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:5549) ==15318== by 0x6DC911: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1078) ==15318== by 0x6DBC19: do_command(THD*) (sql_parse.cc:815) ==15318== by 0x6B6208: do_handle_one_connection(THD*) (sql_connect.cc:748) ==15318== by 0x6B5D99: handle_one_connection (sql_connect.cc:684) ==15318== by 0x30E1807760: start_thread (pthread_create.c:301) ==15318== by 0x1B07270F: ??? ==15318== (gdb) bt #0 __pthread_kill (threadid=, signo=) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:63 #1 in my_write_core (sig=6) at ./mysys/stacktrace.c:423 #2 in handle_segfault (sig=6) at ./sql/mysqld.cc:2511 #3 #4 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #5 in abort () at abort.c:92 #6 in __assert_fail (assertion=0xcdafc1 "0", file=, line=878, function=) at assert.c:81 #7 in make_sortkey (param=0x7fedc0209660, to=0x7feda1255ee0 "", ref_pos=0x7fedc0209280 "") at ./sql/filesort.cc:878 #8 in Bounded_queue::push (this=0x7fedc0209730, element=0x7fedc0209280 "") at ./sql/bounded_queue.h:193 #9 in find_all_keys (param=0x7fedc0209660, select=0x0, sort_keys=0x7feda1255ed0, buffpek_pointers=0x7fedc02093a0, tempfile=0x7fedc0209500, pq=0x7fedc0209730, found_rows=0x7fedc02098b8) at ./sql/filesort.cc:682 #10 in filesort (thd=0x317ba00, table=0x7feda124e300, sortorder=0x7feda075e780, s_length=1, select=0x0, max_rows=1, sort_positions=false, examined_rows=0x7fedc02098c0, found_rows=0x7fedc02098b8) at ./sql/filesort.cc:276 #11 in create_sort_index (thd=0x317ba00, join=0x7feda0ff8cf0, order=0x7feda1571e10, filesort_limit=1, select_limit=1, is_order_by=true) at ./sql/sql_select.cc:20374 #12 in JOIN::exec (this=0x7feda0ff8cf0) at ./sql/sql_select.cc:3326 #13 in mysql_select (thd=0x317ba00, rref_pointer_array=0x317df80, tables=0x7feda0dc8bc0, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7feda1571e10, having=0x0, proc_param=0x0, select_options=2147748096, result=0x7feda15019e0, unit=0x317d720, select_lex=0x317dd68) at ./sql/sql_select.cc:3584 #14 in handle_select (thd=0x317ba00, lex=0x317d670, result=0x7feda15019e0, setup_tables_done_option=0) at ./sql/sql_select.cc:323 #15 in execute_sqlcom_select (thd=0x317ba00, all_tables=0x7feda0dc8bc0) at ./sql/sql_parse.cc:4512 #16 in mysql_execute_command (thd=0x317ba00) at ./sql/sql_parse.cc:2095 #17 in mysql_parse (thd=0x317ba00, rawbuf=0x7feda13bbb80 "select count(*) from\n\t`test2`.`t5` as `t5` \n\t natural right join `test`.`t15` as `t15` use index for group by (idx895)\n \t\n\t cross join `test`.`t59` as `t59` \non ( '1' )\n \n \ngroup by \n\t@`var0`:=@`var2`:= make_set((`t59`.`col4126`),(`t15`.`col1050`)) desc\n \n \n \nlimit 1", length=273, parser_state=0x7fedc020b610) at ./sql/sql_parse.cc:5549 #18 in dispatch_command (command=COM_QUERY, thd=0x317ba00, packet=0x31cbe81 "\nselect count(*) from\n\t`test2`.`t5` as `t5` \n\t natural right join `test`.`t15` as `t15` use index for group by (idx895)\n \t\n\t cross join `test`.`t59` as `t59` \non ( '1' )\n \n \ngroup by \n\t@`var0`:=@`var2`:= make_set((`t59`.`col4126`),(`t15`.`col1050`)) desc\n \n \n \nlimit 1\n ", packet_length=278) at ./sql/sql_parse.cc:1078 #19 in do_command (thd=0x317ba00) at ./sql/sql_parse.cc:815 #20 in do_handle_one_connection (thd_arg=0x317ba00) at ./sql/sql_connect.cc:748 #21 in handle_one_connection (arg=0x317ba00) at ./sql/sql_connect.cc:684 #22 in start_thread (arg=0x7fedc020c710) at pthread_create.c:301 #23 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115 (gdb)