Commit c165a0b5 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-35038 Server crash in Index_statistics::get_avg_frequency upon EITS...

MDEV-35038 Server crash in Index_statistics::get_avg_frequency upon EITS collection for vector index

don't collect eits for vector indexes
parent 3e5c5818
# Aria doesn't support VECTOR yet
create table t1(v blob not null, vector index(v)) engine=aria;
ERROR HY000: Table storage engine 'Aria' does not support the create option 'VECTOR'
#
# MDEV-35038 Server crash in Index_statistics::get_avg_frequency upon EITS collection for vector index
#
create table t (a int, v blob not null, vector index (v));
analyze table t persistent for columns() indexes (v);
Table Op Msg_type Msg_text
test.t analyze status Engine-independent statistics collected
test.t analyze status Table is already up to date
drop table t;
......@@ -5,3 +5,10 @@
--echo # Aria doesn't support VECTOR yet
--error ER_ILLEGAL_HA_CREATE_OPTION
create table t1(v blob not null, vector index(v)) engine=aria;
--echo #
--echo # MDEV-35038 Server crash in Index_statistics::get_avg_frequency upon EITS collection for vector index
--echo #
create table t (a int, v blob not null, vector index (v));
analyze table t persistent for columns() indexes (v);
drop table t;
......@@ -2965,12 +2965,12 @@ int update_statistics_for_table(THD *thd, TABLE *table)
/* Update the statistical table index_stats */
stat_table= tables[INDEX_STAT].table;
uint key;
key_map::Iterator it(table->keys_in_use_for_query);
Index_stat index_stat(stat_table, table);
while ((key= it++) != key_map::Iterator::BITMAP_END)
for (uint key= 0; key < table->s->keys; key++)
{
if (!table->keys_in_use_for_query.is_set(key))
continue;
KEY *key_info= table->key_info+key;
uint key_parts= table->actual_n_key_parts(key_info);
for (i= 0; i < key_parts; i++)
......
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