Changeset: de331148d6e6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=de331148d6e6
Modified Files:
        sql/test/subquery/Tests/subquery4.sql
        sql/test/subquery/Tests/subquery4.stable.err
        sql/test/subquery/Tests/subquery4.stable.out
Branch: default
Log Message:

Approved output


diffs (59 lines):

diff --git a/sql/test/subquery/Tests/subquery4.sql 
b/sql/test/subquery/Tests/subquery4.sql
--- a/sql/test/subquery/Tests/subquery4.sql
+++ b/sql/test/subquery/Tests/subquery4.sql
@@ -146,8 +146,8 @@ UPDATE another_T SET col5 = 1 WHERE col5
 DELETE FROM another_T WHERE col1 = (SELECT 1 UNION ALL SELECT 2); --error, 
more than one row returned by a subquery used as an expression
 INSERT INTO another_T VALUES ((SELECT 1 UNION ALL SELECT 2),2,3,4,5,6,7,8); 
--error, more than one row returned by a subquery used as an expression
 
---UPDATE another_T SET (col5, col6) = (SELECT MIN(1), MAX(2) OVER ()); --4 
rows affected
---UPDATE another_T SET (col7, col8) = (SELECT 1,2 UNION ALL SELECT 1,2); 
--error, more than one row returned by a subquery used as an expression
+UPDATE another_T SET (col5, col6) = (SELECT MIN(10), MAX(21) OVER ()); --4 
rows affected
+UPDATE another_T SET (col7, col8) = (SELECT 1,2 UNION ALL SELECT 1,2); 
--error, more than one row returned by a subquery used as an expression
 UPDATE another_T SET (col7, col8) = (SELECT 1 UNION ALL SELECT 2); --error, 
number of columns does not match number of values
 UPDATE another_T SET (col7, col8) = (SELECT 1,2,3); --error, number of columns 
does not match number of values
 UPDATE another_T SET col5 = 1, col5 = 6; --error, multiple assignments to same 
column "col5"
diff --git a/sql/test/subquery/Tests/subquery4.stable.err 
b/sql/test/subquery/Tests/subquery4.stable.err
--- a/sql/test/subquery/Tests/subquery4.stable.err
+++ b/sql/test/subquery/Tests/subquery4.stable.err
@@ -156,7 +156,11 @@ MAPI  = (monetdb) /var/tmp/mtest-204362/
 QUERY = INSERT INTO another_T VALUES ((SELECT 1 UNION ALL SELECT 
2),2,3,4,5,6,7,8); --error, more than one row returned by a subquery used as an 
expression
 ERROR = !Cardinality violation, scalar value expected
 CODE  = 21000
-MAPI  = (monetdb) /var/tmp/mtest-450395/.s.monetdb.35919
+MAPI  = (monetdb) /var/tmp/mtest-657770/.s.monetdb.37553
+QUERY = UPDATE another_T SET (col7, col8) = (SELECT 1,2 UNION ALL SELECT 1,2); 
--error, more than one row returned by a subquery used as an expression
+ERROR = !Cardinality violation, scalar value expected
+CODE  = 21000
+MAPI  = (monetdb) /var/tmp/mtest-657770/.s.monetdb.37553
 QUERY = UPDATE another_T SET (col7, col8) = (SELECT 1 UNION ALL SELECT 2); 
--error, number of columns does not match number of values
 ERROR = !UPDATE: The number of specified columns between the SET clause and 
the right side don't match (2 != 1)
 CODE  = 42000
diff --git a/sql/test/subquery/Tests/subquery4.stable.out 
b/sql/test/subquery/Tests/subquery4.stable.out
--- a/sql/test/subquery/Tests/subquery4.stable.out
+++ b/sql/test/subquery/Tests/subquery4.stable.out
@@ -173,6 +173,8 @@ stdout of test 'subquery4` in directory 
 [ 0    ]
 #DELETE FROM another_T WHERE col7 = (SELECT SUM(col3) OVER ());
 [ 0    ]
+#UPDATE another_T SET (col5, col6) = (SELECT MIN(10), MAX(21) OVER ()); --4 
rows affected
+[ 4    ]
 #DECLARE x int;
 #DECLARE y int;
 #INSERT INTO another_T VALUES ((SELECT SUM(1)),(SELECT SUM(2) OVER 
()),3,4,5,6,7,8); --allowed
@@ -181,11 +183,11 @@ stdout of test 'subquery4` in directory 
 % sys.another_t,       sys.another_t,  sys.another_t,  sys.another_t,  
sys.another_t,  sys.another_t,  sys.another_t,  sys.another_t # table_name
 % col1,        col2,   col3,   col4,   col5,   col6,   col7,   col8 # name
 % int, int,    int,    int,    int,    int,    int,    int # type
-% 4,   4,      4,      5,      4,      4,      4,      4 # length
-[ 1,   2,      5,      26,     5,      6,      7,      8       ]
-[ 11,  22,     55,     186,    55,     66,     77,     88      ]
-[ 111, 222,    555,    1786,   555,    666,    777,    888     ]
-[ 1111,        2222,   5555,   17786,  5555,   6666,   7777,   8888    ]
+% 4,   4,      4,      5,      2,      2,      4,      4 # length
+[ 1,   2,      5,      26,     10,     21,     7,      8       ]
+[ 11,  22,     55,     186,    10,     21,     77,     88      ]
+[ 111, 222,    555,    1786,   10,     21,     777,    888     ]
+[ 1111,        2222,   5555,   17786,  10,     21,     7777,   8888    ]
 [ 1,   2,      3,      4,      5,      6,      7,      8       ]
 #CREATE PROCEDURE crashme(a int) BEGIN DECLARE x INT; SET x = a; END;
 #create sequence "debugme" as integer start with 1;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to