OpenTenBase / OpenTenBase/TXSQL

Bug:CHECK INDEX assert failure on tables with FULLTEXT index

Open Beginner friendly
#57 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.