OpenTenBase / OpenTenBase/TXSQL
Bug:CHECK INDEX assert failure on tables with FULLTEXT index
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 337
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Running CHECK INDEX on an InnoDB table with a FULLTEXT index triggers an assert failure.
Root Cause
In ha_innobase::check_index(), the loop only skips indexes with DICT_FTS type flag, but does not skip the hidden FTS_DOC_ID_INDEX — a regular B-tree index created internally by InnoDB for FTS document ID lookups. When check_index tries to get physical info for this index, it asserts.
Reproduce
CREATE TABLE fts_test (
id bigint NOT NULL,
tran_time varchar(20) NOT NULL,
body text,
PRIMARY KEY (id, tran_time),
FULLTEXT KEY (tran_time, body)
) ENGINE=InnoDB;
CHECK INDEX FROM fts_test; -- assert failure
Fix
Skip FTS_DOC_ID_INDEX in the loop and emit a warning, same as done for DICT_FTS indexes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ha_innobase::check_index() entry point and compare handling of DICT_FTS with the hidden FTS_DOC_ID_INDEX. Reproduce the provided CREATE TABLE and CHECK INDEX commands, then confirm the command no longer asserts and emits a warning for the skipped index.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100