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

LEFT JOIN on a view results in "runtime error: slice bounds out of range [:264] with capacity 256" #16027

Closed
mrigger opened this issue Apr 2, 2020 · 3 comments · Fixed by #17893
Assignees
Labels
severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Milestone

Comments

@mrigger
Copy link

mrigger commented Apr 2, 2020

Consider the following statements:

CREATE TABLE t0(c0 INT);
INSERT INTO t0(c0) VALUES (1), (1), (1), (1), (1), (1);
CREATE VIEW v0(c0) AS SELECT NULL FROM t0;
SELECT * FROM t0 LEFT JOIN v0 ON TRUE WHERE v0.c0 IS NULL; -- runtime error: slice bounds out of range [:264] with capacity 256

Unexpectedly, the SELECT results in an error ERROR 1105 (HY000): runtime error: slice bounds out of range [:264] with capacity 256.

Environment:

mysql> select tidb_version();
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                          |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.0-beta.2-167-gaa7ef9c46
Git Commit Hash: aa7ef9c46435bb20d42fa0badcf09fc16f9609a9
Git Branch: master
UTC Build Time: 2020-04-02 09:15:47
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
@mrigger mrigger added the type/bug The issue is confirmed as a bug. label Apr 2, 2020
@zz-jason zz-jason added the sig/execution SIG execution label Apr 3, 2020
@zz-jason
Copy link
Member

zz-jason commented Apr 3, 2020

@XuHuaiyu PTAL

@SunRunAway
Copy link
Contributor

@XuHuaiyu A friendly ping.

@SunRunAway
Copy link
Contributor

@XuHuaiyu Please merge these cherry-picks.

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