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 on base table joined with view will cause runtime error: index out of range [0] with length 0 #19226

Closed
AilinKid opened this issue Aug 17, 2020 · 0 comments · Fixed by #19461
Assignees
Labels
severity/critical type/bug The issue is confirmed as a bug.

Comments

@AilinKid
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

The detail and reproduced data is listed in here https://asktug.com/t/topic/36381

1: import the 3 base tables as listed in the link

2: create the simplified view: `create or replace view myview as
select (case when ((`fin_undrug`.`itemstatus` = '1') and (`fin_undrug_ext`.`status` = '1')) then '1' else '0' end) AS `ITEMSTATUS`, `fin_undrug`.`itemid` AS `ITEMID`  from (`fin_undrug` join `fin_undrug_ext`) where (`fin_undrug`.`itemid` = `fin_undrug_ext`.`itemid`);`

3: select as the query is listed in the link

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

no error

3. What did you see instead (Required)

runtime error: index out of range [0] with length 0

4. What is your TiDB version? (Required)

master & 4.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/critical type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants