Skip to content

Invalidate column id -5 for table t #10733

@lilinghai

Description

@lilinghai

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `a` tinyint DEFAULT NULL,
  `b` smallint DEFAULT NULL,
  `c` mediumint DEFAULT NULL,
  `d` int DEFAULT NULL,
  `e` bigint DEFAULT NULL,
  `f` bit(1) DEFAULT NULL,
  `g` bit(10) DEFAULT NULL,
  `h` float DEFAULT NULL,
  `i` float DEFAULT NULL,
  `j` double DEFAULT NULL,
  `l` double DEFAULT NULL,
  `m` double(11,3) DEFAULT NULL,
  `n` decimal(10,0) DEFAULT NULL,
  `o` decimal(4,0) DEFAULT NULL,
  `p` decimal(8,4) DEFAULT NULL,
  `q` char(100) DEFAULT NULL,
  `r` char(102) DEFAULT NULL,
  `s` varchar(104) DEFAULT NULL,
  `t` binary(106) DEFAULT NULL,
  `u` binary(108) DEFAULT NULL,
  `v` varchar(110) DEFAULT NULL,
  `w` varchar(112) DEFAULT NULL,
  `x` varchar(114) DEFAULT NULL,
  `y` varchar(116) DEFAULT NULL,
  `z` varchar(118) DEFAULT NULL,
  `aa` varchar(120) DEFAULT NULL,
  `bb` varchar(122) DEFAULT NULL,
  `cc` varchar(124) DEFAULT NULL,
  `dd` varchar(126) DEFAULT NULL,
  `ee` enum('a','d','y') DEFAULT NULL,
  `ff` set('g','k','a') DEFAULT NULL,
  `gg` time DEFAULT NULL,
  `hh` time(2) DEFAULT NULL,
  `ii` date DEFAULT NULL,
  `jj` datetime DEFAULT NULL,
  `kk` datetime(2) DEFAULT NULL,
  `ll` timestamp NULL DEFAULT NULL,
  `mm` timestamp(2) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

alter table t set tiflash replica 2;
select d, count(*) as order_count, max(d) as m from t where jj >= '2007-01-02 00:00:00.000000'and jj < '2032-01-02 00:00:00.000000' and exists (select * from t where jj >= kk) and d > m - 1 group by d order by d limit 1000;

-- ERROR 1105 (HY000): other error for mpp stream: Code: 49, e.displayText() = DB::Exception: String TiDB::TableInfo::getColumnName(const ColumnID) const: Invalidate column id -5 for table t, e.what() = DB::Exception,

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

master
Release Version: v9.0.0-beta.2.pre-1296-g0b23ce6
Edition: Community
Git Commit Hash: 0b23ce6f14cc4e8c825e4a792d2b9ed86e47632f
Git Branch: HEAD
UTC Build Time: 2026-03-03 16:26:54
GoVersion: go1.25.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Kernel Type: Classic

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugThe issue is confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions