OpenTenBase / OpenTenBase/TXSQL

Bug:CHECK INDEX assert failure on tables with FULLTEXT index

未关闭 适合新手
#57 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C++
星标
337
派生
234
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 ha_innobase::check_index() 入口点开始,比较 DICT_FTS 与隐藏的 FTS_DOC_ID_INDEX 的处理方式。重现提供的 CREATE TABLE 和 CHECK INDEX 命令,然后确认该命令不再触发断言,并针对跳过的索引输出警告。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp, mysql
领域
databases
Issue 类型
缺陷
难度
2/5
预计耗时
1-3 小时
活跃度
冷清
描述清晰度
描述清楚
新手友好度
75/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。