Skip to content

Commit

Permalink
*: fix invalid query result on a cached table
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei committed Apr 22, 2024
1 parent a5c73bf commit 5740255
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/planner/core/casetest/hint/hint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,12 @@ func TestHints(t *testing.T) {
tk.MustQuery("show warnings").Check(testkit.Rows(output[i].Warn...))
}
}

func TestIssue52755(t *testing.T) {
store := testkit.CreateMockStore(t)
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("CREATE TABLE t1 (c1 int, c2 int, UNIQUE i1 (c1, c2));")
tk.MustExec("INSERT INTO t1 VALUES (7, null),(5,1);")
tk.MustQuery("SELECT c1 FROM t1 WHERE ('m' = ALL (SELECT /*+ IGNORE_INDEX(t1, i1) */ c2 FROM t1)) IS NOT UNKNOWN; ").Check(testkit.Rows("5", "7"))
}

0 comments on commit 5740255

Please sign in to comment.