-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
index out of range [0] with length 0 in query #40184
Labels
affects-6.0
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.2
affects-6.3
affects-6.4
fuzz/schrddl
may-affects-5.0
This bug maybe affects 5.0.x versions.
may-affects-5.1
This bug maybe affects 5.1.x versions.
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
severity/major
type/bug
The issue is confirmed as a bug.
Comments
Can't reproduce. Version:
Result:
|
I added a row and please try again, |
Reproducible unit test: func TestIssue40184(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("CREATE TABLE `t` ( `a` int(11) NOT NULL DEFAULT '-1534562528', `b` int(11) NOT NULL DEFAULT '2080417292', PRIMARY KEY (`a`,`b`) /*T![clustered_index] CLUSTERED */) ENGINE=InnoDB DEFAULT CHARSET=gbk COLLATE=gbk_chinese_ci PARTITION BY HASH (`a`) PARTITIONS 3")
tk.MustExec("insert into `t` values (1248018841, 250053474)")
tk.MustQuery("select nth_value( `t`.`a` , 4 ) over\nw as r0 , sum( distinct `t`.`b` ) as r1 from `t` group by `t`.`a` window w as ( partition by `a`,`b` order by `a`,`b` ) order by r0,r1 limit 32;\n")
} Error stack:
|
Same with #40470 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.0
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.2
affects-6.3
affects-6.4
fuzz/schrddl
may-affects-5.0
This bug maybe affects 5.0.x versions.
may-affects-5.1
This bug maybe affects 5.1.x versions.
may-affects-5.2
This bug maybe affects 5.2.x versions.
may-affects-5.3
This bug maybe affects 5.3.x versions.
may-affects-5.4
This bug maybe affects 5.4.x versions.
severity/major
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
no error
3. What did you see instead (Required)
index out of range [0] with length 0
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: