Commit 72ee1805 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: set HA_PART_KEY_SEG for HA_KEY_ALG_LONG_HASH prefix keys

because they *are* prefix keys, even if long and hashed
parent 09d29dfc
......@@ -441,8 +441,7 @@ void key_unpack(String *to, TABLE *table, KEY *key)
}
}
field_unpack(to, key_part->field, table->record[0], key_part->length,
MY_TEST(key_part->key_part_flag & HA_PART_KEY_SEG ||
(key->algorithm == HA_KEY_ALG_LONG_HASH && key_part->length)));
MY_TEST(key_part->key_part_flag & HA_PART_KEY_SEG));
}
dbug_tmp_restore_column_map(table->read_set, old_map);
DBUG_VOID_RETURN;
......
......@@ -1208,7 +1208,7 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
new (mem_root)Item_field(thd, keypart->field),
new (mem_root) Item_int(thd, length));
list_item->fix_fields(thd, NULL);
// keypart->key_part_flag |= HA_PART_KEY_SEG;
keypart->key_part_flag |= HA_PART_KEY_SEG;
}
field_list->push_back(list_item, mem_root);
}
......
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