Commit a35b0539 authored by Sergei Petrunia's avatar Sergei Petrunia

EXPLAIN FORMAT=JSON: Do set usable_key_parts for key in the temp. table

If we didn't do it, SJ-Materialization table would appear to
EXPLAIN JSON code as having different keyparts than it actually
has. This caused unpredictable content in "used_key_parts"
parent 5c5a8b1c
......@@ -16391,6 +16391,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
((field_count-param->hidden_field_count)+
(share->uniques ? MY_TEST(null_pack_length) : 0));
keyinfo->ext_key_parts= keyinfo->user_defined_key_parts;
keyinfo->usable_key_parts= keyinfo->user_defined_key_parts;
table->distinct= 1;
share->keys= 1;
if (!(key_part_info= (KEY_PART_INFO*)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment