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

ERROR 1105 (HY000): runtime error: index out of range [0] with length 0 #49986

Closed
jackysp opened this issue Jan 2, 2024 · 2 comments · Fixed by #50002
Closed

ERROR 1105 (HY000): runtime error: index out of range [0] with length 0 #49986

jackysp opened this issue Jan 2, 2024 · 2 comments · Fixed by #50002

Comments

@jackysp
Copy link
Member

jackysp commented Jan 2, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table if not exists ast (i varchar(20));
create table if not exists acc (j varchar(20), k varchar(20), l varchar(20), m varchar(20));

explain with t as(
select i,
    (case
        when b.j = '20001' then b.l
        else b.k
    end) an
from
    ast a
inner join acc b on
(a.i = b.m)
and a.i = 'astp2019121731703151'),
t1 as (select i, group_concat(an order by an separator '; ') an from t group by i)
select * from t1;

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

No error.

3. What did you see instead (Required)

Panicked.

4. What is your TiDB version? (Required)

= v6.5.3
Actually panic starts from v6.5.6, it returns an error [2024/01/02 20:39:19.509 +08:00] [WARN] [session.go:2207] ["compile SQL failed"] [conn=2199023255955] [error="Can't find column Column#31 in schema Column: [test.ast.i,test.acc.j,test.acc.k,test.acc.l] Unique key: []"] [SQL="explain with t as(\nselect i,\n (case\n when b.j = '20001' then b.l\n else b.k\n end) an\nfrom\n ast a\ninner join acc b on\n(a.i = b.m)\nand a.i = 'astp2019121731703151'),\nt1 as (select i, group_concat(an order by an separator '; ') an from t group by i)\nselect * from t1"] on v6.5.3

@kennedy8312
Copy link

/type regression

@kennedy8312
Copy link

Regression Analysis
PR caused this regression: 46419

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