Skip to content

data inconsistency after creating multi-value index #52510

@wjhuang2016

Description

@wjhuang2016

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `tdaa95bdd` (
  `col_5` varchar(274) COLLATE utf8mb4_general_ci DEFAULT '^jxnNQ4gH&!da3',
  `col_6` char(211) COLLATE utf8mb4_general_ci NOT NULL,
  `col_7` date NOT NULL DEFAULT '2005-02-12',
  `col_8` datetime NOT NULL DEFAULT '2026-12-30 00:00:00',
  `col_9` json NOT NULL,
  `col_10` datetime DEFAULT '2026-04-29 00:00:00',
  `col_11` json NOT NULL,
  `col_12` json DEFAULT NULL,
  PRIMARY KEY (`col_7`,`col_6`) /*T![clustered_index] CLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `tdaa95bdd` VALUES ('xxX#HY+k','MR8kt64kge','1972-11-10','1982-02-20 00:00:00','[0.40455212861600365, 0.9535237462756136, 0.5457016485614036, 0.06302671859066668, 0.3241613288153938]','2029-05-23 00:00:00','[8433931522675913628, 4200013965305652857, 6450496302587441357]','[8504256802707318090, 7537701347717984363, 5509971712526485598, 1, 4908672832508461002]'), ('W07q!DHyncd','kv@)gA-FG','1974-01-10','2022-10-08 00:00:00','[0.9978550643285481, 0.830502017369649, 0.7706376122819897, 0.29182662988488817]','1974-05-03 00:00:00','[13205329127749649691, 15960381441332082389, 17924229378970648444, 15706013367434594745, 3545537507632439841]','[2194174907646689998, 3828790235503351855]'), ('R)UuN-R&tay())~','iP&Mj+3s&K','1974-12-24','1976-07-27 00:00:00','[0.932543543051738, 0.5257284572901776, 0.8547761204268197]','1984-08-26 00:00:00','[12033124470967976412, 16025614678231278303, 18246013316467853730]','[883065803144240775, 8801059545677706134, 3336060416156478320, 2126155906694105513, 5564082442087756275]'), ('g@*!pj%k2WD(h4WFi(i','xPEx&bCMIB*E+v0nv','1995-04-20','2035-11-14 00:00:00','[0.5099833399926427, 0.7341760488432693]','1991-05-29 00:00:00','[9949684645663580379, 460597432921408783, 7662672047617557736]','[-1, 8385746413494530609]'), (NULL,'SM0V5e','1995-11-25','1995-09-16 00:00:00','[0.35018879073776527, 0.25424786869222027, 0.7418292709748376]','2003-09-04 00:00:00','[2560792419906781836, 10482743626143440465, 7911705946003540134, 6830782450680785089, 7062822477575413332]','[2191073954356589659]'), ('gpG%','u55_&hUjKGY)','1997-02-16','1970-12-20 00:00:00','[0.2198172887635981, 0.4576864179743585, 0.499677261588802]','2018-10-12 00:00:00','[3572707412289413443, 4275493178782125316, 8462558850762761550, 12330351714461775389]','[1764001094459759846, 1232728263956947483, 2198664576374932252, 4734970218912359139, 1291637793030046904]'), ('fqxBmW(x~7B','x6kTW+','1998-05-31','1981-03-17 00:00:00','[0.8150904861567289, 0.7630221947190586]','1999-07-15 00:00:00','[12239392443762336114, 12847684558674614465, 4957109579222525660, 1088417752630795661]','[9223372036854775807, 6964163828944175700]'), ('5c(I8YEYZ3ak&6','_dP_65#OmIrH-Qxoat#','1999-11-19','2014-06-24 00:00:00','[0.6266062121920857, 0.23824126113242158, 0.8807081834493455, 0.07569189286933961, 0.541439427209218]','1995-11-18 00:00:00','[8188930686877066765]','[168660611920626983, 829667095067490876, 2299760916491859669]');

alter table tdaa95bdd add index `idx_8` (`col_8`,(cast(`col_9` as double array)));

admin check table tdaa95bdd;

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

No error

3. What did you see instead (Required)

mysql> admin check table tdaa95bdd;
ERROR 8223 (HY000): data inconsistency in table: tdaa95bdd, index: idx_8, handle: {1825842412015058944,

4. What is your TiDB version? (Required)

66a6d4c

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions