From 0e5f9188bea11752e718c4ef7c79675deeb0fd27 Mon Sep 17 00:00:00 2001 From: guo-shaoge Date: Thu, 14 Apr 2022 14:11:56 +0800 Subject: [PATCH] reduce inserted rows to avoid case run too long Signed-off-by: guo-shaoge --- executor/executor_test.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/executor/executor_test.go b/executor/executor_test.go index a1ba9ac08321a..16eba088aaf2e 100644 --- a/executor/executor_test.go +++ b/executor/executor_test.go @@ -9016,13 +9016,13 @@ func (s *testSerialSuite) TestIndexJoin31494(c *C) { tk.MustExec("drop table if exists t1, t2;") tk.MustExec("create table t1(a int(11) default null, b int(11) default null, key(b));") insertStr := "insert into t1 values(1, 1)" - for i := 1; i < 32768; i++ { + for i := 1; i < 3000; i++ { insertStr += fmt.Sprintf(", (%d, %d)", i, i) } tk.MustExec(insertStr) tk.MustExec("create table t2(a int(11) default null, b int(11) default null, c int(11) default null)") insertStr = "insert into t2 values(1, 1, 1)" - for i := 1; i < 32768; i++ { + for i := 1; i < 3000; i++ { insertStr += fmt.Sprintf(", (%d, %d, %d)", i, i, i) } tk.MustExec(insertStr) @@ -9036,9 +9036,11 @@ func (s *testSerialSuite) TestIndexJoin31494(c *C) { conf.OOMAction = config.OOMActionCancel }) c.Assert(tk.Se.Auth(&auth.UserIdentity{Username: "root", Hostname: "%"}, nil, nil), IsTrue) - tk.MustExec("set @@tidb_mem_quota_query=2097152;") - // This bug will be reproduced in 10 times. - for i := 0; i < 10; i++ { + tk.MustExec("set @@tidb_mem_quota_query=200000;") + tk.MustExec("set @@tidb_max_chunk_size=32;") + tk.MustExec("set @@tidb_index_join_batch_size=1;") + // This bug will likely be reproduced in 30 times. + for i := 0; i < 30; i++ { err := tk.QueryToErr("select /*+ inl_join(t1) */ * from t1 right join t2 on t1.b=t2.b;") c.Assert(err, NotNil) c.Assert(err.Error(), Matches, "Out Of Memory Quota!.*")