Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect query result using index merge #52217

Closed
wjhuang2016 opened this issue Mar 28, 2024 · 3 comments
Closed

incorrect query result using index merge #52217

wjhuang2016 opened this issue Mar 28, 2024 · 3 comments
Assignees

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `tl52cb2746` (
  `col_29` varchar(63) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'EQ',
  `col_30` float DEFAULT NULL,
  `col_31` varchar(389) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `col_32` json NOT NULL,
  `col_33` char(18) COLLATE gbk_bin DEFAULT NULL,
  `col_34` tinyint(1) NOT NULL DEFAULT '1',
  `col_35` json NOT NULL,
  KEY `idx_11` (`col_34`),
  KEY `idx_12` (`col_33`,(cast(`col_35` as binary(64) array)),`col_30`),
  KEY `idx_13` ((cast(`col_35` as binary(64) array)))
) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_bin;

INSERT INTO `tl52cb2746` VALUES('+_l0#90473',2009.2867,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('',1935.2688,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',8176.98,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',5220.708,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('a9Yg8&=ZonH',5174.566,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('sQv',4219.7456,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',219.94193,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('ywK',6188.0156,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',4514.5938,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('i%mK^zgrl',597.5764,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('fY~^C~+',6492.04,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('r8gtMaK_Vf',8605.395,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('1B0O7',5981.5947,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('(',8008.345,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('ukZ$t',4305.1294,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','8',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',71.87508,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',6215.486,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',2660.1921,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',6738.0728,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',9645.761,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',4404.665,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',9483.261,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',3726.922,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('+_l0#90473',4731.6104,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','=(5V4T9',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('NZohcQx*=YW',2832.2747,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','AZf=M=-6dJD%d#cv',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('tP!6iKi@-V&62mKGv',5056.859,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','%&RJHYjI1R!!aH',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('V6PMSPJuq',1524.5048,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','S6Z#hPn0Qm4L2A',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('0GK8YW$%',7298.2266,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','Pt~x^wR9',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('CktPk%&r(6%%Y4A4dk',539.1338,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','xIBo^Kg~J',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('Y',2911.058,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','VCBVLsod184P',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('h_FKsw5',3247.023,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','UuMs5$%8sxzf&lz~Q',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('++VUUpxu$',297.48624,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','$',0,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('s~Yv_(O3_Ub',3842.9373,'YHsN9_!Ckj*MhIdp-RB','[9189979195866379740, 649848734400404428, 8357419521788875518, 2336559120029956660, 1487576425277540619]','%brVjv-q@$sZ',1,'[\"HLT21nhPeXXWqnXRD2AYTq1wSTe7ltQhszWjEy2dzg9n5lMF9Aqg3ckS7s5303KG\", \"dsYySFDsrj9gctBfJ92KNZLL8BRS20or9l26yMGU3YWr7A1vTJgy8HFv9ceoqiW3\", \"XNbgnugihMlAZXWTDSQnsHzWiIjgyaXPNC4sIqdbKuo8KsRuIiYWswzzjcRh4jN6\"]'),('GV',4770.062,'@@m1PCFob+','[1951872545212298832, 8877498115533231225, 3259686659868716337, 7659539765275921593, 8374602560906332385]','P4W9z5Of#s$Lt8_',0,'[\"not8NkgBPmm6ZgfODOQbSSIbzGfocklKl8LrKkuc1r4dVDZZQiJJEyhKkls1GsqV\"]');

SELECT /*+ USE_INDEX_MERGE(`tl52cb2746` )*/ TRIM(`tl52cb2746`.`col_33`) AS `r0` FROM `tl52cb2746` WHERE `tl52cb2746`.`col_34` BETWEEN 1 AND 0 OR JSON_CONTAINS(`tl52cb2746`.`col_35`, '"bLVmVzQNNxn9k7an0wtzXwjjcT1HrT3Ek3a1LLvyWvnxaXjPwvTC22J5wlGCx5bM"') GROUP BY `tl52cb2746`.`col_34`,`tl52cb2746`.`col_33` HAVING `tl52cb2746`.`col_34` IN (0,1,0,0,1);

SELECT  TRIM(`tl52cb2746`.`col_33`) AS `r0` FROM `tl52cb2746` WHERE `tl52cb2746`.`col_34` BETWEEN 1 AND 0 OR JSON_CONTAINS(`tl52cb2746`.`col_35`, '"bLVmVzQNNxn9k7an0wtzXwjjcT1HrT3Ek3a1LLvyWvnxaXjPwvTC22J5wlGCx5bM"') GROUP BY `tl52cb2746`.`col_34`,`tl52cb2746`.`col_33` HAVING `tl52cb2746`.`col_34` IN (0,1,0,0,1);

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

Two queries get the same result

3. What did you see instead (Required)

mysql> SELECT  TRIM(`tl52cb2746`.`col_33`) AS `r0` FROM `tl52cb2746` WHERE `tl52cb2746`.`col_34` BETWEEN 1 AND 0 OR JSON_CONTAINS(`tl52cb2746`.`col_35`, '"bLVmVzQNNxn9k7an0wtzXwjjcT1HrT3Ek3a1LLvyWvnxaXjPwvTC22J5wlGCx5bM"') GROUP BY `tl52cb2746`.`col_34`,`tl52cb2746`.`col_33` HAVING `tl52cb2746`.`col_34` IN (0,1,0,0,1);
Empty set (0.01 sec)

mysql> SELECT /*+ USE_INDEX_MERGE(`tl52cb2746` )*/ TRIM(`tl52cb2746`.`col_33`) AS `r0` FROM `tl52cb2746` WHERE `tl52cb2746`.`col_34` BETWEEN 1 AND 0 OR JSON_CONTAINS(`tl52cb2746`.`col_35`, '"bLVmVzQNNxn9k7an0wtzXwjjcT1HrT3Ek3a1LLvyWvnxaXjPwvTC22J5wlGCx5bM"') GROUP BY `tl52cb2746`.`col_34`,`tl52cb2746`.`col_33` HAVING `tl52cb2746`.`col_34` IN (0,1,0,0,1);
+-------------------+
| r0                |
+-------------------+
| %&RJHYjI1R!!aH    |
| S6Z#hPn0Qm4L2A    |
| AZf=M=-6dJD%d#cv  |
| =(5V4T9           |
| VCBVLsod184P      |
| UuMs5$%8sxzf&lz~Q |
| 8                 |
| xIBo^Kg~J         |
| $                 |
| P4W9z5Of#s$Lt8_   |
| Pt~x^wR9          |
| %brVjv-q@$sZ      |
+-------------------+
12 rows in set (0.00 sec)

4. What is your TiDB version? (Required)

8d9e67b

@wjhuang2016 wjhuang2016 added type/bug The issue is confirmed as a bug. fuzz/randomtest labels Mar 28, 2024
@hawkingrei hawkingrei self-assigned this Mar 29, 2024
@kennedy8312
Copy link

/type regression

@kennedy8312
Copy link

Regression Analysis
PR caused this regression: #51716
The testcase was executed successfully on commit 3f915c0 but started to failed on commit af76c2f.

Commit 7056209 : Failure
Commit 3f915c0 : Success
Commit 5a2b8e8 : Failure
Commit af76c2f : Failure

@ti-chi-bot ti-chi-bot added the affects-8.1 This bug affects the 8.1.x(LTS) versions. label Apr 9, 2024
@jebter jebter added the sig/planner SIG: Planner label Apr 12, 2024
@fixdb fixdb assigned time-and-fate and unassigned hawkingrei Apr 25, 2024
@time-and-fate
Copy link
Member

Duplicate with #52395 and already fixed by #52414.

@time-and-fate time-and-fate removed may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 may-affects-7.5 affects-8.1 This bug affects the 8.1.x(LTS) versions. labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants