Skip to content

Commit f3ff867

Browse files
committed
planner: avoid cascades cleanup in shared regression setup
1 parent 69a200b commit f3ff867

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

pkg/planner/core/issuetest/planner_issue_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -671,21 +671,6 @@ SELECT t84.c0 FROM t84 NATURAL RIGHT JOIN t0 WHERE true GROUP BY NULL HAVING (t8
671671
tk.MustQuery("SELECT /* issue:58999 */ 1 FROM t0, v0 WHERE t0.c2=(-(-1|v0.c0))").Check(testkit.Rows())
672672
}
673673

674-
// issue-66706-decimal-scale-leak-through-sign-view-predicate
675-
testkit.RunTestUnderCascades(t, func(t *testing.T, tk *testkit.TestKit, cascades, caller string) {
676-
resetTestDB(t, tk)
677-
tk.MustExec("CREATE TABLE t0(c0 NUMERIC)")
678-
tk.MustExec("CREATE TABLE t1 LIKE t0")
679-
tk.MustExec("REPLACE INTO t0 VALUES (-1780864408)")
680-
tk.MustExec("INSERT INTO t1 VALUES (1448472626)")
681-
tk.MustExec("CREATE OR REPLACE VIEW v0(c0) AS SELECT 0.99 FROM t1, t0")
682-
683-
tk.MustQuery("SELECT /* issue:66706 */ v0.c0 FROM v0 WHERE SIGN(v0.c0)").Check(testkit.Rows("0.99"))
684-
tk.MustQuery("SHOW WARNINGS").Check(testkit.Rows())
685-
tk.MustQuery("SELECT /* issue:66706 */ ref0 FROM (SELECT v0.c0 AS ref0, SIGN(v0.c0) AS ref1 FROM v0) AS s WHERE ref1").Check(testkit.Rows("0.99"))
686-
tk.MustQuery("SHOW WARNINGS").Check(testkit.Rows())
687-
})
688-
689674
// Regression test for https://github.com/pingcap/tidb/issues/66339
690675
// Read-only user variables with uppercase names should be converted to constant
691676
// and use IndexRangeScan, same as lowercase names.
@@ -947,6 +932,21 @@ ORDER BY t1.a, t2.a, t3.a, var`
947932
tk.MustQuery("select /* issue:65991 */ a from t_range_cols where 1 <=> a").Check(testkit.Rows("1"))
948933
tk.MustQuery("select /* issue:65991 */ a from t_range_cols where null <=> a").Check(testkit.Rows("<nil>"))
949934
})
935+
936+
// issue-66706-decimal-scale-leak-through-sign-view-predicate
937+
testkit.RunTestUnderCascades(t, func(t *testing.T, tk *testkit.TestKit, cascades, caller string) {
938+
resetTestDB(t, tk)
939+
tk.MustExec("CREATE TABLE t0(c0 NUMERIC)")
940+
tk.MustExec("CREATE TABLE t1 LIKE t0")
941+
tk.MustExec("REPLACE INTO t0 VALUES (-1780864408)")
942+
tk.MustExec("INSERT INTO t1 VALUES (1448472626)")
943+
tk.MustExec("CREATE OR REPLACE VIEW v0(c0) AS SELECT 0.99 FROM t1, t0")
944+
945+
tk.MustQuery("SELECT /* issue:66706 */ v0.c0 FROM v0 WHERE SIGN(v0.c0)").Check(testkit.Rows("0.99"))
946+
tk.MustQuery("SHOW WARNINGS").Check(testkit.Rows())
947+
tk.MustQuery("SELECT /* issue:66706 */ ref0 FROM (SELECT v0.c0 AS ref0, SIGN(v0.c0) AS ref1 FROM v0) AS s WHERE ref1").Check(testkit.Rows("0.99"))
948+
tk.MustQuery("SHOW WARNINGS").Check(testkit.Rows())
949+
})
950950
}
951951

952952
func TestOnlyFullGroupCantFeelUnaryConstant(t *testing.T) {

0 commit comments

Comments
 (0)