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

query gets 'runtime error: index out of range' and no error stack in the tidb log #49566

Closed
wjhuang2016 opened this issue Dec 18, 2023 · 0 comments · Fixed by #50146
Closed

Comments

@wjhuang2016
Copy link
Member

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `tl67c6ff48` (
  `col_4_1` timestamp NULL DEFAULT NULL,
  `col_5` bit(37) NOT NULL,
  UNIQUE KEY `idx_1` (`col_5`,`col_4_1`),
  UNIQUE KEY `idx_2` (`col_4_1`,`col_5`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
INSERT INTO `tl67c6ff48` VALUES ('2006-10-20 00:00:00',x'13e677d4b1'), ('2033-05-05 00:00:00',x'05d3a46d88'), ('1977-06-24 00:00:00',x'04dba3570c'), ('2025-05-14 00:00:00',x'0ed284dfee'), ('2009-04-29 00:00:00',x'12657141bf'), ('2002-05-12 00:00:00',x'101f239415'), ('1983-04-25 00:00:00',x'1ce8daeaa5'), ('2001-05-14 00:00:00',x'1363f05cd5'), ('2000-07-19 00:00:00',x'0d81cc3a76'), ('1981-08-10 00:00:00',x'0dffb7b521'), ('1970-07-23 00:00:00',x'009094e78f'), ('2007-04-07 00:00:00',x'1bb8e87620'), ('1973-02-26 00:00:00',x'175ecaca68'), ('2022-04-19 00:00:00',x'1af1a92543'), ('2027-09-20 00:00:00',x'16ae61d000'), ('2016-04-26 00:00:00',x'14a5e285e5'), ('2025-04-14 00:00:00',x'0765e5ab35'), ('1980-01-05 00:00:00',x'164f0cb832'), ('1999-10-03 00:00:00',x'0647364cd6'), ('2018-12-13 00:00:00',x'14f7dbc182'), ('2025-05-06 00:00:00',x'165ce4e544'), ('2003-06-07 00:00:00',x'0a55af03c4'), ('2012-05-28 00:00:00',x'0f3e47d446'), ('1996-08-20 00:00:00',x'1dda39bfaa');

select reverse(col_5 ) as r1  from tl67c6ff48  order by r1;

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

No error

3. What did you see instead (Required)

mysql> select reverse(col_5 ) as r1  from tl67c6ff48  order by r1;
ERROR 1105 (HY000): runtime error: index out of range [5] with length 5

Note: there is no error stack in the tidb log, so I think it's a new bug.

4. What is your TiDB version? (Required)

nightly-a7260ff598ce0e7c0a77367e84ec265f91b8073e

@wjhuang2016 wjhuang2016 added type/bug This issue is a bug. fuzz/randomtest labels Dec 18, 2023
ti-chi-bot bot pushed a commit that referenced this issue Feb 5, 2024
ti-chi-bot bot pushed a commit that referenced this issue Feb 19, 2024
ti-chi-bot bot pushed a commit that referenced this issue Feb 19, 2024
ti-chi-bot bot pushed a commit that referenced this issue Feb 19, 2024
@windtalker windtalker mentioned this issue Feb 23, 2024
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants