Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4, 11.8, 12.3, 13.1
-
None
Description
Note: We had MDEV-40347 closed as won't fix with the implication that statistics for InnoDB tables can show pretty much anything without manifesting a bug; so maybe this one is another representation of it, I'm just not sure.
--source include/have_innodb.inc
|
--source include/have_sequence.inc
|
|
|
create table t ( |
pk int primary key, |
v vector(1) not null, |
vector(v)
|
) engine=InnoDB;
|
insert into t select seq, vec_fromtext(concat('[',seq,']')) |
from seq_1_to_1000; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
alter table t force, algorithm=copy; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
|
|
--source include/restart_mysqld.inc
|
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
select pk from t order by vec_distance(v,0x30303030) limit 2; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
alter table t force, algorithm=copy; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
|
|
drop table t; |
|
PR-4955 ec8dc039fc534e349f1b0fe3282fcee02230c9fd |
alter table t force, algorithm=copy; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
total_nodes cached_nodes
|
1000 0
|
# restart
|
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
total_nodes cached_nodes
|
1 0
|
select pk from t order by vec_distance(v,0x30303030) limit 2; |
pk
|
1
|
2
|
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
total_nodes cached_nodes
|
1 319
|
alter table t force, algorithm=copy; |
select total_nodes, cached_nodes from information_schema.vector_indexes |
where table_name = 't'; |
total_nodes cached_nodes
|
1000 0
|
In the test case above, TOTAL_NODES count after ALTER is still correct (or is close), but after server restart it becomes 1, and using the vector index doesn't fix it. DDL or DML on the table does (not included in the test case).
Attachments
Issue Links
- relates to
-
MDEV-34805 provide various information about vector indexes
-
- Closed
-
-
MDEV-41004 ANALYZE doesn't analyze vector indexes
-
- Open
-