Queries such as
SELECT table1 .`col_varchar_nokey` , MAX( table1 .`col_int_key` )
FROM C table1 JOIN (
SELECT *
FROM B ) table2 ON table2 .`pk` = table1 .`pk`
WHERE ( table1 .`col_int_nokey` , table2 .`pk` ) IN (
SELECT `col_int_nokey` , `col_int_key`
FROM C ) ;
SELECT *
FROM (
SELECT table1 .`col_varchar_nokey` , MAX( table1 .`col_int_key` )
FROM C table1 JOIN (
SELECT *
FROM B ) table2 ON table2 .`pk` = table1 .`pk`
WHERE ( table1 .`col_int_nokey` , table2 .`pk` ) IN (
SELECT `col_int_nokey` , `col_int_key`
FROM C ) ) AS
FROM_SUBQUERY /* TRANSFORM_OUTCOME_UNORDERED_MATCH */;
cause valgrind warnings when run with semijoin=off,partial_match_rowid_merge=off. With a suitable client, one can also observe garbage data being sent to the client.
Warnings:
==13550== Conditional jump or move depends on uninitialised value(s) strmem. c:77) text::store_ null() (protocol.cc:849) text::store( Field*) (protocol.cc:1010) :send(Protocol* , String*) (item.cc:5807) send::send_ data(List< Item>&) (sql_class.cc:1871) cc:14063) cc:12610) cc:2355) lex_unit* , st_select_lex*) (sql_select. cc:2556) sqlcom_ select( THD*, TABLE_LIST*) (sql_parse.cc:5081) command( THD*) (sql_parse.cc:2265) command( enum_server_ command, THD*, char*, unsigned int) (sql_parse.cc:1184)
==13550== at 0x40074E7: memcpy (mc_replace_
==13550== by 0x823F3F6: String::append(char const*, unsigned int, unsigned int) (sql_string.h:370)
==13550== by 0x827440B: Protocol_
==13550== by 0x8274CE1: Protocol_
==13550== by 0x81C619C: Item_field:
==13550== by 0x8267CF5: select_
==13550== by 0x831F394: end_send(JOIN*, st_join_table*, bool) (sql_select.
==13550== by 0x831C4DC: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.
==13550== by 0x83029F2: JOIN::exec() (sql_select.
==13550== by 0x8303128: 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_
==13550== by 0x82FB71A: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:276)
==13550== by 0x829A163: execute_
==13550== by 0x8290B3B: mysql_execute_
==13550== by 0x829C324: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6027)
==13550== by 0x828E5F1: dispatch_
==13550== by 0x828DADF: do_command(THD*) (sql_parse.cc:890)
==13550== Conditional jump or move depends on uninitialised value(s) send::send_ data(List< Item>&) (sql_class.cc:1890) cc:14063) cc:12610) cc:2355) lex_unit* , st_select_lex*) (sql_select. cc:2556) sqlcom_ select( THD*, TABLE_LIST*) (sql_parse.cc:5081) command( THD*) (sql_parse.cc:2265) command( enum_server_ command, THD*, char*, unsigned int) (sql_parse.cc:1184) one_connection (sql_connect. cc:1153) -2.12.so)
==13550== at 0x827102B: my_net_write (net_serv.cc:386)
==13550== by 0x8274227: Protocol::write() (protocol.cc:772)
==13550== by 0x8267E1C: select_
==13550== by 0x831F394: end_send(JOIN*, st_join_table*, bool) (sql_select.
==13550== by 0x831C4DC: do_select(JOIN*, List<Item>*, st_table*, Procedure*) (sql_select.
==13550== by 0x83029F2: JOIN::exec() (sql_select.
==13550== by 0x8303128: 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_
==13550== by 0x82FB71A: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:276)
==13550== by 0x829A163: execute_
==13550== by 0x8290B3B: mysql_execute_
==13550== by 0x829C324: mysql_parse(THD*, char const*, unsigned int, char const**) (sql_parse.cc:6027)
==13550== by 0x828E5F1: dispatch_
==13550== by 0x828DADF: do_command(THD*) (sql_parse.cc:890)
==13550== by 0x828AC77: handle_
==13550== by 0xA08918: start_thread (in /lib/libpthread
==13550== by 0x951E5D: clone (in /lib/libc-2.12.so)
==13550== Syscall param write(buf) points to uninitialised byte(s)
==13550== ...