Skip to content

Commit

Permalink
fix cases
Browse files Browse the repository at this point in the history
Signed-off-by: guo-shaoge <shaoge1994@163.com>
  • Loading branch information
guo-shaoge committed Apr 16, 2021
1 parent 0c14d2b commit 5100a75
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions executor/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6892,12 +6892,12 @@ func (s *testSuiteP2) TestApplyCache(c *C) {
tk.MustExec("insert into t values (1),(1),(1),(1),(1),(1),(1),(1),(1);")
tk.MustExec("analyze table t;")
result := tk.MustQuery("explain analyze SELECT count(1) FROM (SELECT (SELECT min(a) FROM t as t2 WHERE t2.a > t1.a) AS a from t as t1) t;")
c.Assert(result.Rows()[1][0], Equals, "└─Apply_39")
c.Assert(result.Rows()[2][0], Equals, " └─Apply_41")
var (
ind int
flag bool
)
value := (result.Rows()[1][5]).(string)
value := (result.Rows()[2][5]).(string)
for ind = 0; ind < len(value)-5; ind++ {
if value[ind:ind+5] == "cache" {
flag = true
Expand All @@ -6912,9 +6912,9 @@ func (s *testSuiteP2) TestApplyCache(c *C) {
tk.MustExec("insert into t values (1),(2),(3),(4),(5),(6),(7),(8),(9);")
tk.MustExec("analyze table t;")
result = tk.MustQuery("explain analyze SELECT count(1) FROM (SELECT (SELECT min(a) FROM t as t2 WHERE t2.a > t1.a) AS a from t as t1) t;")
c.Assert(result.Rows()[1][0], Equals, "└─Apply_39")
c.Assert(result.Rows()[2][0], Equals, " └─Apply_41")
flag = false
value = (result.Rows()[1][5]).(string)
value = (result.Rows()[2][5]).(string)
for ind = 0; ind < len(value)-5; ind++ {
if value[ind:ind+5] == "cache" {
flag = true
Expand Down

0 comments on commit 5100a75

Please sign in to comment.