Skip to content

Commit 2ecc1f4

Browse files
committed
save work
Signed-off-by: xufei <[email protected]>
1 parent 3de72ec commit 2ecc1f4

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

executor/issuetest/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go_test(
77
"main_test.go",
88
],
99
flaky = True,
10-
shard_count = 50,
10+
shard_count = 51,
1111
deps = [
1212
"//autoid_service",
1313
"//config",

executor/issuetest/executor_issue_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,3 +1463,22 @@ func TestIssue49902(t *testing.T) {
14631463
tk.MustQuery("SELECT count(`t`.`c`) FROM (`s`) JOIN `t` GROUP BY `t`.`c`;").Check(testkit.Rows("170"))
14641464
tk.MustExec("set @@tidb_max_chunk_size = default;")
14651465
}
1466+
1467+
func TestIssue55881(t *testing.T) {
1468+
store := testkit.CreateMockStore(t)
1469+
tk := testkit.NewTestKit(t, store)
1470+
tk.MustExec("use test;")
1471+
tk.MustExec("drop table if exists aaa;")
1472+
tk.MustExec("drop table if exists bbb;")
1473+
tk.MustExec("create table aaa(id int, value int);")
1474+
tk.MustExec("create table bbb(id int, value int);")
1475+
tk.MustExec("insert into aaa values(1,2),(2,3)")
1476+
tk.MustExec("insert into bbb values(1,2),(2,3),(3,4)")
1477+
// set tidb_executor_concurrency to 1 to let the issue happens with high probability.
1478+
tk.MustExec("set tidb_executor_concurrency=1;")
1479+
// this is a random issue, so run it 100 times to increase the probability of the issue.
1480+
for i := 0; i < 100; i++ {
1481+
tk.MustQuery("with cte as (select * from aaa) select id, (select id from (select * from aaa where aaa.id != bbb.id union all select * from cte union all select * from cte) d limit 1)," +
1482+
"(select max(value) from (select * from cte union all select * from cte union all select * from aaa where aaa.id > bbb.id)) from bbb;")
1483+
}
1484+
}

0 commit comments

Comments
 (0)