Changeset: ad735fba4a9c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ad735fba4a9c Added Files: sql/test/SQLancer/Tests/sqlancer19.SQL.py Modified Files: sql/test/SQLancer/Tests/All sql/test/SQLancer/Tests/sqlancer17.test Branch: Jul2021 Log Message:
My bad, don't expect server to always run on the same directory and the same port diffs (69 lines): diff --git a/sql/test/SQLancer/Tests/All b/sql/test/SQLancer/Tests/All --- a/sql/test/SQLancer/Tests/All +++ b/sql/test/SQLancer/Tests/All @@ -16,3 +16,4 @@ sqlancer15 sqlancer16 sqlancer17 sqlancer18 +sqlancer19 diff --git a/sql/test/SQLancer/Tests/sqlancer17.test b/sql/test/SQLancer/Tests/sqlancer17.test --- a/sql/test/SQLancer/Tests/sqlancer17.test +++ b/sql/test/SQLancer/Tests/sqlancer17.test @@ -369,27 +369,3 @@ True statement ok ROLLBACK -statement ok -CREATE TABLE "t3" ("c0" BIGINT,"c1" INTERVAL MONTH) - -statement ok rowcount 6 -INSERT INTO "t3" VALUES (1, INTERVAL '9' MONTH),(5, INTERVAL '6' MONTH),(5, NULL),(7, NULL),(2, INTERVAL '1' MONTH),(2, INTERVAL '1' MONTH) - -statement ok -CREATE REMOTE TABLE "rt3" ("c0" BIGINT,"c1" INTERVAL MONTH) ON 'mapi:monetdb://localhost:50000/demo/sys/t3' - -query I rowsort -SELECT json."integer"(JSON '1') FROM rt3 ----- -1 -1 -1 -1 -1 -1 - -statement ok -DROP TABLE rt3 - -statement ok -DROP TABLE t3 diff --git a/sql/test/SQLancer/Tests/sqlancer19.SQL.py b/sql/test/SQLancer/Tests/sqlancer19.SQL.py new file mode 100644 --- /dev/null +++ b/sql/test/SQLancer/Tests/sqlancer19.SQL.py @@ -0,0 +1,25 @@ +import os + +from MonetDBtesting.sqltest import SQLTestCase + +port = os.environ['MAPIPORT'] +db = os.environ['TSTDB'] + +with SQLTestCase() as cli: + cli.connect(username="monetdb", password="monetdb") + cli.execute(""" + START TRANSACTION; + CREATE TABLE "t3" ("c0" BIGINT,"c1" INTERVAL MONTH); + INSERT INTO "t3" VALUES (1, INTERVAL '9' MONTH),(5, INTERVAL '6' MONTH),(5, NULL),(7, NULL),(2, INTERVAL '1' MONTH),(2, INTERVAL '1' MONTH); + COMMIT; + START TRANSACTION; + CREATE REMOTE TABLE "rt3" ("c0" BIGINT,"c1" INTERVAL MONTH) ON 'mapi:monetdb://localhost:%s/%s/sys/t3'; + COMMIT;""" % (port, db)).assertSucceeded() + + cli.execute('SELECT json."integer"(JSON \'1\') FROM rt3;').assertSucceeded().assertDataResultMatch([(1,),(1,),(1,),(1,),(1,),(1,)]) + + cli.execute(""" + START TRANSACTION; + DROP TABLE rt3; + DROP TABLE t3; + COMMIT;""").assertSucceeded() _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list