Skip to content
/ server Public

MDEV-35821 vector index sizes are not in information_schema.TABLES nor SHOW TABLE STATUS#4706

Open
shabbann wants to merge 1 commit intoMariaDB:11.8from
shabbann:MDEV-35821-vector-index-sizes-are-not-in-information_schema-TABLES-nor-SHOW-TABLE-STATUS
Open

MDEV-35821 vector index sizes are not in information_schema.TABLES nor SHOW TABLE STATUS#4706
shabbann wants to merge 1 commit intoMariaDB:11.8from
shabbann:MDEV-35821-vector-index-sizes-are-not-in-information_schema-TABLES-nor-SHOW-TABLE-STATUS

Conversation

@shabbann
Copy link

InnoDB stores the HNSW graph for a VECTOR INDEX in a separate tablespace file (tst/vec_test#i#01.ibd) This tablespace was not accounted for when computing stats.index_file_length in ha_innobase::info_low(), causing INDEX_LENGTH to always report 0 for tables with a vector index.

Fix: after computing index_file_length from regular secondary indexes, look up the hlindex tablespace via dict_table_open_on_name() using the normalized path + HLINDEX_TEMPLATE suffix, and add its size to stats.index_file_length.

@gkodinov gkodinov added the External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements. label Feb 27, 2026
Copy link
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution. This is a preliminary review.

This looks like a bug fix to me. It needs to IMHO go into all affected versions.
Since vector is introduced in 11.8, can you please rebase on this?

No further remarks.

…STATUS

InnoDB stores the HNSW graph for a VECTOR INDEX in a separate
tablespace file (tst/vec_test#i#01.ibd) This tablespace was
not accounted for when computing stats.index_file_length in
ha_innobase::info_low(), causing INDEX_LENGTH to always report 0
for tables with a vector index.

Fix: after computing index_file_length from regular secondary
indexes, look up the hlindex tablespace via dict_table_open_on_name()
using the normalized path + HLINDEX_TEMPLATE suffix, and add its
size to stats.index_file_length.
@shabbann shabbann force-pushed the MDEV-35821-vector-index-sizes-are-not-in-information_schema-TABLES-nor-SHOW-TABLE-STATUS branch from 535489c to db1e922 Compare February 27, 2026 17:42
@shabbann shabbann changed the base branch from main to 11.8 February 27, 2026 17:42
@shabbann shabbann requested a review from gkodinov February 27, 2026 17:44
Copy link
Member

@gkodinov gkodinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please stand by for the final review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

External Contribution All PRs from entities outside of MariaDB Foundation, Corporation, Codership agreements.

Development

Successfully merging this pull request may close these issues.

3 participants