MDEV-24558: Assertion !index->is_spatial() failed

Issue:
Adding a SPATIAL INDEX triggers a debug assertion failure when the
mysql.innodb_table_stats schema is missing.

Fix:
dict_stats_update_transient_for_index() now exits early with empty
statistics for any index that is not a regular B-tree.
This commit is contained in:
Mohammad Tafzeel Shams 2025-11-27 09:58:22 +05:30
commit 85a801cb24
3 changed files with 15 additions and 23 deletions

View file

@ -1152,6 +1152,7 @@ dummy_empty:
goto dummy_empty;
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
} else if (dict_index_is_online_ddl(index) || !index->is_committed()
|| !index->is_btree()
|| !index->table->space) {
goto dummy_empty;
} else {