Changeset: 84c2169140af for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/84c2169140af
Modified Files:
sql/test/BugTracker-2026/Tests/7785-recursive-cte-loops-infinitly.test
Branch: Dec2025
Log Message:
Extend test with query which shows the desired output.
diffs (69 lines):
diff --git
a/sql/test/BugTracker-2026/Tests/7785-recursive-cte-loops-infinitly.test
b/sql/test/BugTracker-2026/Tests/7785-recursive-cte-loops-infinitly.test
--- a/sql/test/BugTracker-2026/Tests/7785-recursive-cte-loops-infinitly.test
+++ b/sql/test/BugTracker-2026/Tests/7785-recursive-cte-loops-infinitly.test
@@ -14,8 +14,21 @@ INSERT INTO t VALUES ('a', 1, 1.1)
statement ok
INSERT INTO t VALUES ('b', 1, 2.2)
+query TIR nosort
+SELECT * FROM t
+----
+a
+1
+1.1
+a
+1
+1.1
+b
+1
+2.2
+
-- next query with UNION does NOT stop
-query TI nosort
+query I nosort
WITH RECURSIVE cte(label, step) AS (
SELECT DISTINCT label, step
FROM t
@@ -29,6 +42,20 @@ SELECT COUNT(*) < 9 FROM cte
1
-- next query with UNION ALL does NOT stop
+query I nosort
+WITH RECURSIVE cte(label, step) AS (
+ SELECT DISTINCT label, step
+ FROM t
+ UNION ALL
+ SELECT label, step + 1
+ FROM cte
+ WHERE step < 3
+)
+SELECT COUNT(*) < 9 FROM cte
+----
+1
+
+-- next query with UNION ALL does NOT stop
query TI nosort
WITH RECURSIVE cte(label, step) AS (
SELECT DISTINCT label, step
@@ -38,9 +65,20 @@ WITH RECURSIVE cte(label, step) AS (
FROM cte
WHERE step < 3
)
-SELECT COUNT(*) < 9 FROM cte
+SELECT * FROM cte
----
+a
1
+b
+1
+a
+2
+b
+2
+a
+3
+b
+3
statement ok
DROP TABLE t
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]