with --debug it complain differently:
==21801== Thread 4:
==21801== Conditional jump or move depends on uninitialised value(s)
==21801== at 0x4C2BF7E: __GI_strnlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21801== by 0x5EEEAED: vfprintf (vfprintf.c:1624)
==21801== by 0x5EF7606: fprintf (fprintf.c:33)
==21801== by 0x983E8E: _mi_print_key (mi_dbug.c:71)
==21801== by 0x9A5418: mi_rkey (mi_rkey.c:67)
==21801== by 0x9695C0: ha_myisam::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_myisam.cc:1819)
==21801== by 0x5B4985: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (sql_class.h:3673)
==21801== by 0x77CE45: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_select.cc:16335)
==21801== by 0x77CCE0: join_read_key(st_join_table*) (sql_select.cc:16298)
==21801== by 0x77B591: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:15714)
==21801== by 0x77ADC9: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15378)
==21801== by 0x75B880: JOIN::exec() (sql_select.cc:2761)
==21801== by 0x6615ED: subselect_single_select_engine::exec() (item_subselect.cc:3131)
==21801== by 0x659D40: Item_subselect::exec() (item_subselect.cc:588)
==21801== by 0x65C426: Item_exists_subselect::val_int() (item_subselect.cc:1415)
==21801== by 0x77AD93: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15375)
==21801== Conditional jump or move depends on uninitialised value(s)
==21801== at 0x4C2BF8C: __GI_strnlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21801== by 0x5EEEAED: vfprintf (vfprintf.c:1624)
==21801== by 0x5EF7606: fprintf (fprintf.c:33)
==21801== by 0x983E8E: _mi_print_key (mi_dbug.c:71)
==21801== by 0x9A5418: mi_rkey (mi_rkey.c:67)
==21801== by 0x9695C0: ha_myisam::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_myisam.cc:1819)
==21801== by 0x5B4985: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (sql_class.h:3673)
==21801== by 0x77CE45: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_select.cc:16335)
==21801== by 0x77CCE0: join_read_key(st_join_table*) (sql_select.cc:16298)
==21801== by 0x77B591: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:15714)
==21801== by 0x77ADC9: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15378)
==21801== by 0x75B880: JOIN::exec() (sql_select.cc:2761)
==21801== by 0x6615ED: subselect_single_select_engine::exec() (item_subselect.cc:3131)
==21801== by 0x659D40: Item_subselect::exec() (item_subselect.cc:588)
==21801== by 0x65C426: Item_exists_subselect::val_int() (item_subselect.cc:1415)
==21801== by 0x77AD93: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15375)
==21801== Syscall param write(buf) points to uninitialised byte(s)
==21801== at 0x5F8A11D: ??? (syscall-template.S:82)
==21801== by 0x5F1E312: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1289)
==21801== by 0x5F1E1D9: new_do_write (fileops.c:543)
==21801== by 0x5F1F944: _IO_do_write@@GLIBC_2.2.5 (fileops.c:516)
==21801== by 0x5F1E84F: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:918)
==21801== by 0x5F1378A: fflush (iofflush.c:43)
==21801== by 0xCB7A66: DbugFlush (dbug.c:2430)
==21801== by 0xCB623F: db_enter (dbug.c:1211)
==21801== by 0x9A805D: _mi_search (mi_search.c:72)
==21801== by 0x9A55F9: mi_rkey (mi_rkey.c:98)
==21801== by 0x9695C0: ha_myisam::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_myisam.cc:1819)
==21801== by 0x5B4985: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (sql_class.h:3673)
==21801== by 0x77CE45: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_select.cc:16335)
==21801== by 0x77CCE0: join_read_key(st_join_table*) (sql_select.cc:16298)
==21801== by 0x77B591: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:15714)
==21801== by 0x77ADC9: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15378)
==21801== Address 0x4026006 is not stack'd, malloc'd or (recently) free'd
==21801== Use of uninitialised value of size 8
==21801== at 0xCC4AF3: my_strnncollsp_simple (ctype-simple.c:167)
==21801== by 0xC9A0A6: ha_compare_text (my_compare.c:26)
==21801== by 0xC9A5E5: ha_key_cmp (my_compare.c:198)
==21801== by 0x9A8938: _mi_bin_search (mi_search.c:205)
==21801== by 0x9A8221: _mi_search (mi_search.c:91)
==21801== by 0x9A55F9: mi_rkey (mi_rkey.c:98)
==21801== by 0x9695C0: ha_myisam::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_myisam.cc:1819)
==21801== by 0x5B4985: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (sql_class.h:3673)
==21801== by 0x77CE45: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_select.cc:16335)
==21801== by 0x77CCE0: join_read_key(st_join_table*) (sql_select.cc:16298)
==21801== by 0x77B591: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:15714)
==21801== by 0x77ADC9: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15378)
==21801== by 0x75B880: JOIN::exec() (sql_select.cc:2761)
==21801== by 0x6615ED: subselect_single_select_engine::exec() (item_subselect.cc:3131)
==21801== by 0x659D40: Item_subselect::exec() (item_subselect.cc:588)
==21801== by 0x65C426: Item_exists_subselect::val_int() (item_subselect.cc:1415)
==21801== Use of uninitialised value of size 8
==21801== at 0xCC4B33: my_strnncollsp_simple (ctype-simple.c:168)
==21801== by 0xC9A0A6: ha_compare_text (my_compare.c:26)
==21801== by 0xC9A5E5: ha_key_cmp (my_compare.c:198)
==21801== by 0x9A8938: _mi_bin_search (mi_search.c:205)
==21801== by 0x9A8221: _mi_search (mi_search.c:91)
==21801== by 0x9A55F9: mi_rkey (mi_rkey.c:98)
==21801== by 0x9695C0: ha_myisam::index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (ha_myisam.cc:1819)
==21801== by 0x5B4985: handler::ha_index_read_map(unsigned char*, unsigned char const*, unsigned long, ha_rkey_function) (sql_class.h:3673)
==21801== by 0x77CE45: join_read_key2(THD*, st_join_table*, st_table*, st_table_ref*) (sql_select.cc:16335)
==21801== by 0x77CCE0: join_read_key(st_join_table*) (sql_select.cc:16298)
==21801== by 0x77B591: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:15714)
==21801== by 0x77ADC9: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:15378)
==21801== by 0x75B880: JOIN::exec() (sql_select.cc:2761)
==21801== by 0x6615ED: subselect_single_select_engine::exec() (item_subselect.cc:3131)
==21801== by 0x659D40: Item_subselect::exec() (item_subselect.cc:588)
==21801== by 0x65C426: Item_exists_subselect::val_int() (item_subselect.cc:1415)
BTW correct result on this query in first case I got only on non-debugging build. Debugging build gives incorrect in both cases. It is strange that valgrind do not see problem with memory usage.