Changeset: 1d37254c2722 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1d37254c2722
Added Files:
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out.int128
        sql/test/testdb-reload/Tests/All
        sql/test/testdb-reload/Tests/reload.py
        sql/test/testdb-reload/Tests/reload.stable.err
        sql/test/testdb-reload/Tests/reload.stable.out
        sql/test/testdb-reload/Tests/reload.timeout
Modified Files:
        sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
        sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql
        
sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
        sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.sql
        sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.stable.out
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
        
sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
        sql/test/SQLite_regress/sqllogictest/Tests/select3.test.stable.out
        sql/test/remote/Tests/ssbm.SQL.py
        sql/test/testdb/Tests/dump.stable.out
        sql/test/wlcr/Tests/wlc01.py
        sql/test/wlcr/Tests/wlc100.py
        sql/test/wlcr/Tests/wlc20.py
        sql/test/wlcr/Tests/wlc21.py
        sql/test/wlcr/Tests/wlc30.py
        sql/test/wlcr/Tests/wlc40.py
        sql/test/wlcr/Tests/wlc50.py
        sql/test/wlcr/Tests/wlc70.py
        sql/test/wlcr/Tests/wlr01.py
        sql/test/wlcr/Tests/wlr100.py
        sql/test/wlcr/Tests/wlr20.py
        sql/test/wlcr/Tests/wlr30.py
        sql/test/wlcr/Tests/wlr40.py
        sql/test/wlcr/Tests/wlr50.py
        sql/test/wlcr/Tests/wlr70.py
        testing/process.py
Branch: default
Log Message:

Merge with Aug2018 branch.


diffs (truncated from 113440 to 300 lines):

diff --git 
a/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
--- a/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
+++ b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
@@ -35,7 +35,7 @@ c = process.client(lang = 'sqldump',
                    stdin = process.PIPE,
                    stdout = process.PIPE,
                    stderr = process.PIPE,
-                   dbname = dbname)
+                   server = s)
 out, err = c.communicate()
 sys.stdout.write(out)
 sys.stderr.write(err)
diff --git 
a/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql 
b/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql
--- a/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql
+++ b/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.sql
@@ -1,3 +1,9 @@
-SELECT type,COUNT(id) FROM sys.columns GROUP BY type HAVING COUNT(id)>10 ORDER 
BY COUNT(id) DESC;
-SELECT type,COUNT(id) FROM sys.columns GROUP BY type HAVING COUNT(id)>10 ORDER 
BY 2 DESC;
-SELECT type,COUNT(id) as cnt FROM sys.columns GROUP BY type HAVING 
COUNT(id)>10 ORDER BY cnt DESC;
+CREATE TABLE cols_6624 as
+ SELECT id, type FROM sys.columns WHERE table_id IN (SELECT id FROM sys.tables 
WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp')) WITH DATA;
+
+SELECT type,COUNT(id) FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 ORDER BY 
COUNT(id) DESC;
+SELECT type,COUNT(id) FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 ORDER BY 
2 DESC;
+SELECT type,COUNT(id) as cnt FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 
ORDER BY cnt DESC;
+
+DROP TABLE cols_6624;
+
diff --git 
a/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
 
b/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/groupby_having_orderby_count.Bug-6624.stable.out
@@ -24,42 +24,33 @@ Ready.
 # 18:32:54 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-8372" "--port=30905"
 # 18:32:54 >  
 
-#SELECT type,COUNT(id) FROM sys.columns GROUP BY type HAVING COUNT(id)>10 
ORDER BY COUNT(id) DESC;
-% .columns,    .L16 # table_name
-% type,        L16 # name
+#CREATE TABLE cols_6624 as
+# SELECT id, type FROM sys.columns WHERE table_id IN (SELECT id FROM 
sys.tables WHERE schema_id IN (SELECT id FROM sys.schemas WHERE name = 'tmp')) 
WITH DATA;
+#SELECT type,COUNT(id) FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 ORDER 
BY COUNT(id) DESC;
+% sys.cols_6624,       sys.L3 # table_name
+% type,        L3 # name
 % varchar,     bigint # type
-% 9,   3 # length
-[ "int",       230     ]
-[ "varchar",   165     ]
-[ "bigint",    69      ]
-[ "smallint",  55      ]
-[ "clob",      52      ]
-[ "boolean",   27      ]
-[ "timestamp", 12      ]
-#SELECT type,COUNT(id) FROM sys.columns GROUP BY type HAVING COUNT(id)>10 
ORDER BY 2 DESC;
-% .columns,    .L16 # table_name
-% type,        L16 # name
+% 8,   2 # length
+[ "int",       19      ]
+[ "varchar",   14      ]
+[ "smallint",  6       ]
+#SELECT type,COUNT(id) FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 ORDER 
BY 2 DESC;
+% sys.cols_6624,       sys.L3 # table_name
+% type,        L3 # name
 % varchar,     bigint # type
-% 9,   3 # length
-[ "int",       230     ]
-[ "varchar",   165     ]
-[ "bigint",    69      ]
-[ "smallint",  55      ]
-[ "clob",      52      ]
-[ "boolean",   27      ]
-[ "timestamp", 12      ]
-#SELECT type,COUNT(id) as cnt FROM sys.columns GROUP BY type HAVING 
COUNT(id)>10 ORDER BY cnt DESC;
-% .columns,    .L17 # table_name
+% 8,   2 # length
+[ "int",       19      ]
+[ "varchar",   14      ]
+[ "smallint",  6       ]
+#SELECT type,COUNT(id) as cnt FROM cols_6624 GROUP BY type HAVING COUNT(id)>5 
ORDER BY cnt DESC;
+% sys.cols_6624,       sys.L4 # table_name
 % type,        cnt # name
 % varchar,     bigint # type
-% 9,   3 # length
-[ "int",       230     ]
-[ "varchar",   165     ]
-[ "bigint",    69      ]
-[ "smallint",  55      ]
-[ "clob",      52      ]
-[ "boolean",   27      ]
-[ "timestamp", 12      ]
+% 8,   2 # length
+[ "int",       19      ]
+[ "varchar",   14      ]
+[ "smallint",  6       ]
+#DROP TABLE cols_6624;
 
 # 18:32:54 >  
 # 18:32:54 >  "Done."
diff --git a/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.sql 
b/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.sql
--- a/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.sql
+++ b/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.sql
@@ -34,7 +34,7 @@ SELECT T1.C1, T1.C2, T1.C3
  WHERE T1.C1 = X.C1 AND T1.C2 = X.C2;
 
 -- 5. Let us write the same logic in (4) as a subquery. (results
--- incorrect, the last row should not be there).
+-- incorrect, the last row (1, 3, 6) should not be there).
 SELECT C1, C2, C3
   FROM T1
  WHERE (C1, C2) IN
@@ -45,4 +45,16 @@ SELECT C1, C2, C3
         HAVING COUNT(*) > 1
        );
 
+-- 6. Another IN query variant (swapped C1 and C2) which produces wrong 
results.
+-- (the last row (2, 2, 5) should not be there).
+SELECT C1, C2, C3
+  FROM T1
+ WHERE (C2, C1) IN
+       (
+        SELECT C2, C1
+          FROM T1
+         GROUP BY C1, C2
+        HAVING COUNT(*) > 1
+       );
+
 ROLLBACK;
diff --git 
a/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.stable.out 
b/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.stable.out
--- a/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.stable.out
+++ b/sql/test/BugTracker-2018/Tests/in-subquery-having-Bug-6651.stable.out
@@ -115,6 +115,21 @@ Ready.
 % 1,   1,      1 # length
 [ 1,   2,      3       ]
 [ 1,   2,      4       ]
+#SELECT C1, C2, C3
+#  FROM T1
+# WHERE (C2, C1) IN
+#       (
+#       SELECT C2, C2
+#         FROM T1
+#        GROUP BY C1, C2
+#       HAVING COUNT(*) > 1
+#       );
+% sys.t1,      sys.t1, sys.t1 # table_name
+% c1,  c2,     c3 # name
+% int, int,    int # type
+% 1,   1,      1 # length
+[ 1,   2,      3       ]
+[ 1,   2,      4       ]
 #ROLLBACK;
 
 # 11:21:55 >  
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql
@@ -4,15 +4,25 @@ CREATE TABLE tab1(col0 INTEGER, col1 INT
 INSERT INTO tab0 VALUES (83,0,38), (26,0,79), (43,81,24);
 INSERT INTO tab1 VALUES (22,6,8), (28,57,45), (82,44,71);
 
+SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS 
col2 FROM tab0 AS cor0;
 SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS 
col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
+SELECT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 FROM 
tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
 
+SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1;
 SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 GROUP BY 
tab1.col1;
+SELECT COALESCE ( - 86, tab1.col2 ) FROM tab1 GROUP BY tab1.col1;
 
+SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - 
cor0.col1 AS col1 FROM tab0 cor0;
 SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - 
cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1;
+SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, cor0.col2 ) AS col1 FROM 
tab0 cor0 GROUP BY cor0.col0, col1;
 
+SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) FROM 
tab1;
 SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) FROM 
tab1 GROUP BY tab1.col1;
+SELECT COALESCE ( + 20, tab1.col0 ) FROM tab1 GROUP BY tab1.col1;
 
+SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER ) ) / - 
70 FROM tab0 AS cor0;
 SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER ) ) / - 
70 FROM tab0 AS cor0 GROUP BY cor0.col2;
+SELECT DISTINCT COALESCE ( - 82, cor0.col0, - CAST ( NULL AS INTEGER ) ) FROM 
tab0 AS cor0 GROUP BY cor0.col2;
 
 DROP TABLE tab0;
 DROP TABLE tab1;
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.err
@@ -0,0 +1,75 @@
+stderr of test 'sqlitelogictest-groupby-coalesce-error-message.Bug-6608` in 
directory 'sql/test/BugTracker-2018` itself:
+
+
+# 15:10:13 >  
+# 15:10:13 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=30108" "--set" 
"mapi_usock=/var/tmp/mtest-4323/.s.monetdb.30108" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch1/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2018"
 "--set" "embedded_c=true"
+# 15:10:13 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch1/dinther/INSTALL/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30108
+# cmdline opt  mapi_usock = /var/tmp/mtest-4323/.s.monetdb.30108
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch1/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2018
+# cmdline opt  embedded_c = true
+# cmdline opt  gdk_debug = 553648138
+
+# 15:10:14 >  
+# 15:10:14 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-4323" "--port=30108"
+# 15:10:14 >  
+
+MAPI  = (monetdb) /var/tmp/mtest-4323/.s.monetdb.30108
+QUERY = SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 
) AS col2 FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col1' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS col2 
FROM tab0 AS cor0 GROUP BY cor0.col2, cor0.col0;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col1' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT ALL + 33 * - COALESCE ( - 86, tab1.col2 ) + + col1 FROM tab1 
GROUP BY tab1.col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col2' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT COALESCE ( - 86, tab1.col2 ) FROM tab1 GROUP BY tab1.col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col2' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, - cor0.col2 ) * - 
cor0.col1 AS col1 FROM tab0 cor0 GROUP BY cor0.col0, col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col2' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT ALL + COALESCE ( - cor0.col1, cor0.col1, 63, cor0.col2 ) AS 
col1 FROM tab0 cor0 GROUP BY cor0.col0, col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col2' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT - 38 + - tab1.col1 - tab1.col1 / COALESCE ( + 20, - tab1.col0 ) 
FROM tab1 GROUP BY tab1.col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col0' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT COALESCE ( + 20, tab1.col0 ) FROM tab1 GROUP BY tab1.col1;
+ERROR = !SELECT: cannot use non GROUP BY column 'tab1.col0' in query results 
without an aggregate function
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT DISTINCT COALESCE ( - 82, - cor0.col0, - CAST ( NULL AS INTEGER 
) ) / - 70 FROM tab0 AS cor0 GROUP BY cor0.col2;
+QUERY = SELECT DISTINCT COALESCE ( - 82, cor0.col0, - CAST ( NULL AS INTEGER ) 
) FROM tab0 AS cor0 GROUP BY cor0.col2;
+CODE  = 42000
+MAPI  = (monetdb) /var/tmp/mtest-5941/.s.monetdb.34059
+QUERY = SELECT DISTINCT COALESCE ( - 82, cor0.col0, - CAST ( NULL AS INTEGER ) 
) FROM tab0 AS cor0 GROUP BY cor0.col2;
+ERROR = !SELECT: cannot use non GROUP BY column 'cor0.col0' in query results 
without an aggregate function
+CODE  = 42000
+
+# 15:10:14 >  
+# 15:10:14 >  "Done."
+# 15:10:14 >  
+
diff --git 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
--- 
a/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
+++ 
b/sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out
@@ -8,7 +8,7 @@ stdout of test 'sqlitelogictest-groupby-
 # MonetDB 5 server v11.29.4
 # This is an unreleased version
 # Serving database 'mTests_sql_test_BugTracker-2018', using 8 threads
-# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Compiled for x86_64-pc-linux-gnu/64bit
 # Found 15.492 GiB available main-memory.
 # Copyright (c) 1993 - July 2008 CWI.
 # Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved
@@ -16,9 +16,6 @@ stdout of test 'sqlitelogictest-groupby-
 # Listening for connection requests on 
mapi:monetdb://dhcp-193.eduroam.cwi.nl:34045/
 # Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-13348/.s.monetdb.34045
 # MonetDB/GIS module loaded
-# MonetDB/SQL module loaded
-
-Ready.
 # SQL catalog created, loading sql scripts once
 # loading sql script: 09_like.sql
 # loading sql script: 10_math.sql
@@ -60,6 +57,9 @@ Ready.
 # loading sql script: 90_generator.sql
 # loading sql script: 90_generator_hge.sql
 # loading sql script: 99_system.sql
+# MonetDB/SQL module loaded
+
+Ready.
 
 # 09:40:19 >  
 # 09:40:19 >  "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-13348" "--port=34045"
@@ -71,6 +71,42 @@ Ready.
 [ 3    ]
 #INSERT INTO tab1 VALUES (22,6,8), (28,57,45), (82,44,71);
 [ 3    ]
+#SELECT DISTINCT - COALESCE ( - 86, + cor0.col1, cor0.col1, - cor0.col0 ) AS 
col2 FROM tab0 AS cor0;
+% .L2 # table_name
+% col2 # name
+% int # type
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to