Changeset: e4d1c4f41d3b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e4d1c4f41d3b
Added Files:
        sql/backends/monet5/Tests/factory01.stable.err
        sql/backends/monet5/Tests/factory01.stable.out
        sql/backends/monet5/Tests/factory02.stable.err
        sql/backends/monet5/Tests/factory02.stable.out
        sql/backends/monet5/Tests/factory03.stable.err
        sql/backends/monet5/Tests/factory03.stable.out
        sql/backends/monet5/Tests/factory04.sql
        sql/backends/monet5/Tests/factory04.stable.err
        sql/backends/monet5/Tests/factory04.stable.out
        sql/backends/monet5/Tests/factory05.sql
        sql/backends/monet5/Tests/factory05.stable.err
        sql/backends/monet5/Tests/factory05.stable.out
        sql/backends/monet5/Tests/factory06.sql
        sql/backends/monet5/Tests/factory07.sql
        sql/backends/monet5/Tests/factory07.stable.err
        sql/backends/monet5/Tests/factory07.stable.out
        sql/backends/monet5/Tests/factory08.sql
        sql/backends/monet5/Tests/factory08.stable.err
        sql/backends/monet5/Tests/factory08.stable.out
        sql/backends/monet5/Tests/factory09.sql
        sql/backends/monet5/Tests/factory09.stable.err
        sql/backends/monet5/Tests/factory09.stable.out
        sql/backends/monet5/Tests/factory10.sql
        sql/backends/monet5/Tests/factory11.sql
        sql/backends/monet5/Tests/factory12.sql
        sql/backends/monet5/Tests/factory13.sql
        sql/backends/monet5/Tests/factory14.sql
        sql/backends/monet5/Tests/factory15.sql
        sql/backends/monet5/Tests/factory16.sql
        sql/backends/monet5/Tests/factory17.sql
Modified Files:
        sql/backends/monet5/Tests/All
        sql/backends/monet5/Tests/factory00.sql
        sql/backends/monet5/Tests/factory00.stable.err
        sql/backends/monet5/Tests/factory00.stable.out
        sql/backends/monet5/Tests/factory01.sql
        sql/backends/monet5/Tests/factory02.sql
        sql/backends/monet5/Tests/factory03.sql
Branch: trails
Log Message:

Split factory tests


diffs (truncated from 2042 to 300 lines):

diff --git a/sql/backends/monet5/Tests/All b/sql/backends/monet5/Tests/All
--- a/sql/backends/monet5/Tests/All
+++ b/sql/backends/monet5/Tests/All
@@ -106,3 +106,17 @@ factory00
 factory01
 factory02
 factory03
+factory04
+factory05
+factory06
+factory07
+factory08
+factory09
+factory10
+factory11
+factory12
+factory13
+factory14
+factory15
+factory16
+factory17
diff --git a/sql/backends/monet5/Tests/factory00.sql 
b/sql/backends/monet5/Tests/factory00.sql
--- a/sql/backends/monet5/Tests/factory00.sql
+++ b/sql/backends/monet5/Tests/factory00.sql
@@ -1,78 +1,14 @@
 # Test MAL factories with YIELD statements
 
-CREATE FUNCTION factory1() RETURNS INT BEGIN
+CREATE FUNCTION factory00() RETURNS INT BEGIN
     YIELD 1;
     YIELD 2;
     YIELD 3;
 END;
 
-SELECT factory1();
-SELECT factory1();
-SELECT factory1();
-SELECT factory1(); --error
-
-CREATE FUNCTION factory2() RETURNS INT BEGIN
-    DECLARE a INT;
-    SET a = 1;
-    YIELD a;
-    SET a = a + 1;
-    YIELD a;
-    SET a = a + 1;
-    YIELD a;
-END;
-
-SELECT factory2();
-SELECT factory2();
-SELECT factory2();
-SELECT factory2(); --error
-
-CREATE FUNCTION factory3() RETURNS INT BEGIN
-    DECLARE a INT;
-    SET a = 0;
-    WHILE a < 3 DO
-        SET a = a + 1;
-        YIELD a;
-    END WHILE;
-END;
-
-SELECT factory3();
-SELECT factory3();
-SELECT factory3();
-SELECT factory3(); --error
+SELECT factory00();
+SELECT factory00();
+SELECT factory00();
+SELECT factory00(); --error
 
-CREATE FUNCTION factory4() RETURNS INT BEGIN
-    DECLARE a INT;
-    SET a = 1;
-    WHILE a < 4 DO
-        YIELD a;
-        SET a = a + 1;
-    END WHILE;
-END;
-
-SELECT factory4();
-SELECT factory4();
-SELECT factory4();
-SELECT factory4(); --error
-
-CREATE FUNCTION factory5() RETURNS INT BEGIN
-    DECLARE a INT;
-    SET a = 0;
-    WHILE a < 1 DO
-        SET a = a + 1;
-    END WHILE;
-    WHILE a < 4 DO
-        YIELD a;
-        SET a = a + 1;
-    END WHILE;
-END;
-
-SELECT factory5();
-SELECT factory5();
-SELECT factory5();
-SELECT factory5(); --error
-
-DROP FUNCTION factory1;
-DROP FUNCTION factory2;
-DROP FUNCTION factory3;
-DROP FUNCTION factory4;
-DROP FUNCTION factory5;
+DROP FUNCTION factory00;
diff --git a/sql/backends/monet5/Tests/factory00.stable.err 
b/sql/backends/monet5/Tests/factory00.stable.err
--- a/sql/backends/monet5/Tests/factory00.stable.err
+++ b/sql/backends/monet5/Tests/factory00.stable.err
@@ -27,24 +27,8 @@ stderr of test 'factory00` in directory 
 # 14:39:52 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-14113" "--port=37491"
 # 14:39:52 >  
 
-MAPI  = (monetdb) /var/tmp/mtest-14113/.s.monetdb.37491
-QUERY = SELECT factory1(); --error
-ERROR = !The factory has ended
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14113/.s.monetdb.37491
-QUERY = SELECT factory2(); --error
-ERROR = !The factory has ended
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14113/.s.monetdb.37491
-QUERY = SELECT factory3(); --error
-ERROR = !The factory has ended
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14113/.s.monetdb.37491
-QUERY = SELECT factory4(); --error
-ERROR = !The factory has ended
-CODE  = 42000
-MAPI  = (monetdb) /var/tmp/mtest-14113/.s.monetdb.37491
-QUERY = SELECT factory5(); --error
+MAPI  = (monetdb) /var/tmp/mtest-12722/.s.monetdb.31223
+QUERY = SELECT factory00(); --error
 ERROR = !The factory has ended
 CODE  = 42000
 
diff --git a/sql/backends/monet5/Tests/factory00.stable.out 
b/sql/backends/monet5/Tests/factory00.stable.out
--- a/sql/backends/monet5/Tests/factory00.stable.out
+++ b/sql/backends/monet5/Tests/factory00.stable.out
@@ -88,119 +88,7 @@ Ready.
 % int # type
 % 1 # length
 [ 3    ]
-#CREATE FUNCTION factory2() RETURNS INT BEGIN
-#    DECLARE a INT;
-#    SET a = 1;
-#    YIELD a;
-#    SET a = a + 1;
-#    YIELD a;
-#    SET a = a + 1;
-#    YIELD a;
-#END;
-#SELECT factory2();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 1    ]
-#SELECT factory2();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 2    ]
-#SELECT factory2();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 3    ]
-#CREATE FUNCTION factory3() RETURNS INT BEGIN
-#    DECLARE a INT;
-#    SET a = 0;
-#    WHILE a < 3 DO
-#        SET a = a + 1;
-#        YIELD a;
-#    END WHILE;
-#END;
-#SELECT factory3();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 1    ]
-#SELECT factory3();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 2    ]
-#SELECT factory3();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 3    ]
-#CREATE FUNCTION factory4() RETURNS INT BEGIN
-#    DECLARE a INT;
-#    SET a = 1;
-#    WHILE a < 4 DO
-#        YIELD a;
-#        SET a = a + 1;
-#    END WHILE;
-#END;
-#SELECT factory4();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 1    ]
-#SELECT factory4();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 2    ]
-#SELECT factory4();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 3    ]
-#CREATE FUNCTION factory5() RETURNS INT BEGIN
-#    DECLARE a INT;
-#    SET a = 0;
-#    WHILE a < 1 DO
-#        SET a = a + 1;
-#    END WHILE;
-#    WHILE a < 4 DO
-#        YIELD a;
-#        SET a = a + 1;
-#    END WHILE;
-#END;
-#SELECT factory5();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 1    ]
-#SELECT factory5();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 2    ]
-#SELECT factory5();
-% .L2 # table_name
-% L2 # name
-% int # type
-% 1 # length
-[ 3    ]
-#DROP FUNCTION factory1;
-#DROP FUNCTION factory2;
-#DROP FUNCTION factory3;
-#DROP FUNCTION factory4;
-#DROP FUNCTION factory5;
+#DROP FUNCTION factory00;
 
 # 14:39:53 >  
 # 14:39:53 >  "Done."
diff --git a/sql/backends/monet5/Tests/factory01.sql 
b/sql/backends/monet5/Tests/factory01.sql
--- a/sql/backends/monet5/Tests/factory01.sql
+++ b/sql/backends/monet5/Tests/factory01.sql
@@ -1,100 +1,18 @@
-
-CREATE FUNCTION factory6(param INT) RETURNS INT BEGIN
-    YIELD param;
-    YIELD param;
-END;
-
-SELECT factory6(1);
-SELECT factory6(1);
-SELECT factory6(1); --error
+# Test MAL factories with YIELD statements
 
-CREATE FUNCTION factory7(param INT) RETURNS INT BEGIN
-    YIELD param;
-    SET param = param + 1;
-    YIELD param;
-    SET param = param + 1;
-    YIELD param;
-END;
-
-SELECT factory7(0);
-SELECT factory7(0);
-SELECT factory7(0);
-SELECT factory7(0); --error
-
-CREATE FUNCTION factory8() RETURNS INT BEGIN
+CREATE FUNCTION factory01() RETURNS INT BEGIN
     DECLARE a INT;
-    SET a = 0;
-    WHILE TRUE DO
-        SET a = a + 1;
-        YIELD a;
-    END WHILE;
+    SET a = 1;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to