Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
13.0.1, 13.1.1
-
None
-
Not for Release Notes
-
Q4/2026 Server Maintenance
Description
- Description
After creating and dropping a FULLTEXT index, SHOW INDEX and information_schema.STATISTICS correctly report only the primary index. However, mysql.innodb_index_stats still contains the internal FTS_DOC_ID_INDEX.
This leaves inconsistent index metadata for the same table. - Steps to reproduce
DROP DATABASE IF EXISTS test_ftsstats;
CREATE DATABASE test_ftsstats;
USE test_ftsstats;
CREATE TABLE t (
id INT NOT NULL,
v VARCHAR(32) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;CREATE FULLTEXT INDEX ft ON t (v);
DROP INDEX ft ON t;
TRUNCATE TABLE t;
-- These two lists should be the same index names for t.-- STATISTICS / SHOW INDEX: PRIMARY only.-- innodb_index_stats still has FTS_DOC_ID_INDEX (the dropped FULLTEXT helper).SHOW INDEX FROM t;
-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
| t | 0 | PRIMARY | 1 | id | A | 0 | NULL | NULL | | BTREE | | | NO |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
SELECT DISTINCT INDEX_NAME
FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = 'test_ftsstats' AND TABLE_NAME = 't';
+------------+
| INDEX_NAME |+------------+
| PRIMARY |
+------------+
SELECT DISTINCT index_name
FROM mysql.innodb_index_stats
WHERE database_name = 'test_ftsstats' AND table_name = 't';
+------------------+
| index_name |+------------------+
| FTS_DOC_ID_INDEX || PRIMARY |
+------------------+
- Expected behavior
After the FULLTEXT index is dropped, mysql.innodb_index_stats should no longer contain the internal FTS_DOC_ID_INDEX, consistent with SHOW INDEX and information_schema.STATISTICS. - Actual behavior
FTS_DOC_ID_INDEX remains in mysql.innodb_index_stats even though the corresponding FULLTEXT index has been dropped.