@@ -788,7 +788,8 @@ enum open_frm_error open_table_def(THD *thd, TABLE_SHARE *share, uint flags)
788788 DBUG_RETURN (share->error );
789789}
790790
791- static bool create_key_infos (const uchar *strpos, const uchar *frm_image_end,
791+ static bool create_key_infos (THD *thd, const uchar *strpos,
792+ const uchar *frm_image_end,
792793 uint keys, KEY *keyinfo, uint new_frm_ver,
793794 uint *ext_key_parts, TABLE_SHARE *share, uint len,
794795 KEY *first_keyinfo, LEX_STRING *keynames)
@@ -845,6 +846,8 @@ static bool create_key_infos(const uchar *strpos, const uchar *frm_image_end,
845846 keyinfo->algorithm = HA_KEY_ALG_UNDEF;
846847 strpos+=4 ;
847848 }
849+ if (keyinfo->algorithm == HA_KEY_ALG_VECTOR)
850+ thd->status_var .feature_vector_index ++;
848851
849852 if (i == 0 )
850853 {
@@ -2100,7 +2103,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
21002103 share->set_use_ext_keys_flag (plugin_hton (se_plugin)->flags &
21012104 HTON_SUPPORTS_EXTENDED_KEYS);
21022105
2103- if (create_key_infos (disk_buff + 6 , frm_image_end, keys, keyinfo,
2106+ if (create_key_infos (thd, disk_buff + 6 , frm_image_end, keys, keyinfo,
21042107 new_frm_ver, &ext_key_parts,
21052108 share, len, &first_keyinfo, &keynames))
21062109 goto err;
@@ -2200,7 +2203,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
22002203 }
22012204 else
22022205 {
2203- if (create_key_infos (disk_buff + 6 , frm_image_end, keys, keyinfo,
2206+ if (create_key_infos (thd, disk_buff + 6 , frm_image_end, keys, keyinfo,
22042207 new_frm_ver, &ext_key_parts,
22052208 share, len, &first_keyinfo, &keynames))
22062209 goto err;
0 commit comments