Changeset: a0bfa0d245db for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a0bfa0d245db Modified Files: sql/test/miscellaneous/Tests/declared_tables.test Branch: default Log Message:
Added test for bug 7055. It is not a bug because is not yet in production diffs (35 lines): diff --git a/sql/test/miscellaneous/Tests/declared_tables.test b/sql/test/miscellaneous/Tests/declared_tables.test --- a/sql/test/miscellaneous/Tests/declared_tables.test +++ b/sql/test/miscellaneous/Tests/declared_tables.test @@ -41,3 +41,31 @@ NULL statement ok DROP FUNCTION testtruncate +statement ok +START TRANSACTION + +statement ok +CREATE TABLE foo (i INT) + +statement ok +CREATE FUNCTION cnt() RETURNS INT BEGIN RETURN SELECT COUNT(*) FROM foo; END + +statement ok +CREATE FUNCTION func () RETURNS TABLE(i int) +BEGIN + TRUNCATE foo; + INSERT INTO foo VALUES (1); + INSERT INTO foo VALUES ((SELECT COUNT(*) FROM foo)+1); + INSERT INTO foo SELECT cnt()+1; + RETURN foo; +END + +query I rowsort +SELECT * FROM func() +---- +1 +2 +3 + +statement ok +ROLLBACK _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list