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
Conversation
gkodinov
requested changes
Feb 27, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
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.
535489c to
db1e922
Compare
gkodinov
approved these changes
Mar 2, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
LGTM. Please stand by for the final review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.