-
Sergey Glukhov authored
Bug#13639204 64111: CRASH ON SELECT SUBQUERY WITH NON UNIQUE INDEX The crash happened due to wrong calculation of key length during creation of reference for sort order index. The problem is that keyuse->used_tables can have OUTER_REF_TABLE_BIT enabled but used_tables parameter(create_ref_for_key() func) does not have it. So key parts which have OUTER_REF_TABLE_BIT are ommited and it could lead to incorrect key length calculation(zero key length). mysql-test/r/subselect_innodb.result: test result mysql-test/t/subselect_innodb.test: test case sql/sql_select.cc: added OUTER_REF_TABLE_BIT to the used_tables parameter for create_ref_for_key() function. storage/innobase/handler/ha_innodb.cc: added assertion, request from Inno team storage/innodb_plugin/handler/ha_innodb.cc: added assertion, request from Inno team
b5c690aa