-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.epic/plan-cacheseverity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
prepared-plan-cache.enabled=true
use test;
drop table if exists UK_COLLATION13389STROBJSTROBJ;
CREATE TABLE `UK_COLLATION13389STROBJSTROBJ` (
`COL1` enum('aa','bb') COLLATE utf8_general_ci DEFAULT NULL,
`COL2` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
`COL4` datetime DEFAULT NULL,
`COL3` bigint(20) DEFAULT NULL,
`COL5` float DEFAULT NULL,
UNIQUE KEY `U_COL1` (`COL1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
insert into UK_COLLATION13389STROBJSTROBJ values("aa", "鞄鎍櫑兎歱独鴯搄挙裎壧夌藍譺这娨慳彌瓲廀", "6274-10-31 20:26:03", -5680221277985353573, -1.52993e38);
prepare stmt from 'select * from UK_COLLATION13389STROBJSTROBJ where col1 = ? and col2 = ? and col3 not in (?, ?, ?);';
set @a="aa", @b="鞄鎍櫑兎歱独鴯搄挙裎壧夌藍譺这娨慳彌瓲廀", @c=8974343214523908157, @d=8974343214523908157, @e=8974343214523908157;
execute stmt using @a,@b,@c,@d,@e;
set @a="none", @b="zxHuU2UgakSnY3wp", @c=-655854024836656433, @d=2241491591785470002, @e=-3806929031203206071;
execute stmt using @a,@b,@c,@d,@e;
2. What did you expect to see? (Required)
mysql> execute stmt using @a,@b,@c,@d,@e;
Empty set (0.00 sec)
3. What did you see instead (Required)
mysql> execute stmt using @a,@b,@c,@d,@e;
ERROR 1105 (HY000): runtime error: index out of range [0] with length 0
4. What is your TiDB version? (Required)
Release Version: v5.4.0-alpha-165-g47f8aad12
Edition: Community
Git Commit Hash: 47f8aad12dfcf57031116b95f28392ebac80f985
Git Branch: master
UTC Build Time: 2021-11-22 03:00:57
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.epic/plan-cacheseverity/majorsig/plannerSIG: PlannerSIG: Plannertype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.