Changeset: 9bb8f9fddb8c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9bb8f9fddb8c
Branch: mtest
Log Message:

merged


diffs (truncated from 18579 to 300 lines):

diff --git a/clients/Tests/SingleServer b/clients/Tests/SingleServer
--- a/clients/Tests/SingleServer
+++ b/clients/Tests/SingleServer
@@ -0,0 +1,3 @@
+--set embedded_c=yes
+--set embedded_r=yes
+--set embedded_py=3
diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql 
b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql
--- a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql
+++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql
@@ -9,7 +9,7 @@ 1228
 1214
 
 select station136,
-       ((CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
+       cast(((CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
@@ -40,7 +40,7 @@ select station136,
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
         (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END))
+        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END)) as bigint)
 from t2239 order by station136;
 
 rollback;
diff --git 
a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out.int128 
b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out.int128
deleted file mode 100644
--- a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out.int128
+++ /dev/null
@@ -1,76 +0,0 @@
-stdout of test 'case-overflow.Bug-2239` in directory 
'sql/test/BugTracker-2011` itself:
-
-
-# 14:42:40 >  
-# 14:42:40 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"gdk_dbfarm=/ufs/sjoerd/Monet-stable/var/MonetDB" "--set" "mapi_open=true" 
"--set" "mapi_port=30822" "--set" "monet_prompt=" "--trace" "--forcemito" 
"--set" "mal_listing=2" "--dbname=mTests_test_BugTracker-2011" "--set" 
"mal_listing=0"
-# 14:42:40 >  
-
-# MonetDB 5 server v11.5.8
-# This is an unreleased version
-# Serving database 'mTests_test_BugTracker-2011', using 8 threads
-# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically 
linked
-# Found 15.662 GiB available main-memory.
-# Copyright (c) 1993-July 2008 CWI.
-# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
-# Visit http://www.monetdb.org/ for further information
-# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:30822/
-# MonetDB/GIS module loaded
-# MonetDB/SQL module loaded
-
-# SQL catalog created, loading sql scripts once
-# loading sql script: 10_math.sql
-# loading sql script: 11_times.sql
-# loading sql script: 12_url.sql
-# loading sql script: 13_date.sql
-# loading sql script: 14_inet.sql
-# loading sql script: 15_history.sql
-# loading sql script: 16_tracelog.sql
-# loading sql script: 17_compress.sql
-# loading sql script: 18_dictionary.sql
-# loading sql script: 19_cluster.sql
-# loading sql script: 20_vacuum.sql
-# loading sql script: 21_dependency_functions.sql
-# loading sql script: 22_clients.sql
-# loading sql script: 23_skyserver.sql
-# loading sql script: 24_zorder.sql
-# loading sql script: 25_debug.sql
-# loading sql script: 40_geom.sql
-# loading sql script: 80_udf.sql
-# loading sql script: 99_system.sql
-
-# 14:42:40 >  
-# 14:42:40 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=madrid" 
"--port=30822"
-# 14:42:40 >  
-
-#start transaction;
-#create table t2239 (
-#       station136 smallint
-#);
-#copy 3 records into t2239 from stdin;
-#1537
-#1228
-#1214
-#
-[ 3    ]
-#select station136,
-#       ((CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-#        (CASE WHEN station136 is NULL THEN 0 ELSE station136 END) +
-% sys.t2239,   .%2 # table_name
-% station136,  %2 # name
-% smallint,    hugeint # type
-% 4,   5 # length
-[ 1214,        38848   ]
-[ 1228,        39296   ]
-[ 1537,        49184   ]
-#rollback;
-
-# 14:42:40 >  
-# 14:42:40 >  "Done."
-# 14:42:40 >  
-
diff --git a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.sql 
b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.sql
--- a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.sql
+++ b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.sql
@@ -4,13 +4,13 @@ START TRANSACTION;
 CREATE TABLE dbg (a INT, b INT);
 INSERT INTO dbg (a,b) VALUES (10,10);
 
--- no alias for the SUM(b), works
+-- no alias for the MIN(b), works
 plan
-SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
+SELECT a as d, MIN(b), (2 * (MIN(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
 set optimizer = 'sequential_pipe';
---explain SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg 
GROUP BY d;
+--explain SELECT a as d, MIN(b), (2 * (MIN(b) / (SELECT 2))) as f FROM dbg 
GROUP BY d;
 set optimizer = 'default_pipe';
-SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
+SELECT a as d, MIN(b), (2 * (MIN(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
 
 ROLLBACK;
 
@@ -22,10 +22,10 @@ INSERT INTO dbg (a,b) VALUES (10,10);
 
 -- with alias e, it crashes :/
 plan
-SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY 
d;
+SELECT a as d, MIN(b) as e, (2 * (MIN(b) / (SELECT 2))) as f FROM dbg GROUP BY 
d;
 set optimizer = 'sequential_pipe';
---explain SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM 
dbg GROUP BY d;
+--explain SELECT a as d, MIN(b) as e, (2 * (MIN(b) / (SELECT 2))) as f FROM 
dbg GROUP BY d;
 set optimizer = 'default_pipe';
-SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY 
d;
+SELECT a as d, MIN(b) as e, (2 * (MIN(b) / (SELECT 2))) as f FROM dbg GROUP BY 
d;
 
 ROLLBACK;
diff --git a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out 
b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
--- a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
+++ b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out
@@ -33,14 +33,14 @@ stdout of test 'crash_on_alias.Bug-2798`
 project (
 | group by (
 | | table(sys.dbg) [ "dbg"."a", "dbg"."b" ] COUNT 
-| ) [ "dbg"."a" as "d" ] [ "d", sys.sum no nil ("dbg"."b") as "%1"."%1" ]
+| ) [ "dbg"."a" as "d" ] [ "d", sys.min no nil ("dbg"."b") as "%1"."%1" ]
 ) [ "d", "%1"."%1", sys.sql_mul(sys.sql_div("%1"."%1", tinyint "2" as 
"%2"."%2"), tinyint "2") as "f" ]
 #set optimizer = 'sequential_pipe';
 #set optimizer = 'default_pipe';
 #SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
 % sys.,        sys.%1, sys. # table_name
 % d,   %1,     f # name
-% int,  bigint, bigint # type
+% int, int,    bigint # type
 % 2,    2,      2 # length
 [ 10,   10,     10      ]
 #ROLLBACK;
@@ -57,14 +57,14 @@ project (
 project (
 | group by (
 | | table(sys.dbg) [ "dbg"."a", "dbg"."b" ] COUNT 
-| ) [ "dbg"."a" as "d" ] [ "d", sys.sum no nil ("dbg"."b") as "%1"."%1" ]
+| ) [ "dbg"."a" as "d" ] [ "d", sys.min no nil ("dbg"."b") as "%1"."%1" ]
 ) [ "d", "%1"."%1" as "e", sys.sql_mul(sys.sql_div("%1"."%1", tinyint "2" as 
"%2"."%2"), tinyint "2") as "f" ]
 #set optimizer = 'sequential_pipe';
 #set optimizer = 'default_pipe';
 #SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP 
BY d;
 % sys.,        sys.,   sys. # table_name
 % d,    e,      f # name
-% int,  bigint, bigint # type
+% int, int,    bigint # type
 % 2,    2,      2 # length
 [ 10,   10,     10      ]
 #ROLLBACK;
diff --git 
a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128 
b/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
deleted file mode 100644
--- a/sql/test/BugTracker-2011/Tests/crash_on_alias.Bug-2798.stable.out.int128
+++ /dev/null
@@ -1,75 +0,0 @@
-stdout of test 'crash_on_alias.Bug-2798` in directory 
'sql/test/BugTracker-2011` itself:
-
-
-# 14:09:56 >  
-# 14:09:56 >   mserver5  --debug=10 --set gdk_nr_threads=0  --set 
"gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Apr2011-volund.ins.cwi.nl/sql/dbfarm"
 --set mapi_open=true --set mapi_port=31436 --set monet_prompt= --trace 
--forcemito --set mal_listing=2  "--dbname=mTests_test_BugTracker-2011" --set 
mal_listing=0 ; echo ; echo Over..
-# 14:09:56 >  
-
-# MonetDB 5 server v11.3.1 "Apr2011-f9a21e4aaff7"
-# Serving database 'mTests_test_BugTracker-2011', using 4 threads
-# Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs dynamically linked
-# Found 7.749 GiB available main-memory.
-# Copyright (c) 1993-July 2008 CWI.
-# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved
-# Visit http://monetdb.cwi.nl/ for further information
-# Listening for connection requests on mapi:monetdb://volund.ins.cwi.nl:31436/
-# MonetDB/GIS module loaded
-# MonetDB/SQL module loaded
-
-# 14:09:56 >  
-# 14:09:56 >  mclient -lsql -ftest -i -e --host=volund --port=31436 
-# 14:09:56 >  
-
-#START TRANSACTION;
-#CREATE TABLE dbg (a INT, b INT);
-#INSERT INTO dbg (a,b) VALUES (10,10);
-[ 1     ]
-#plan
-#SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
-% .plan # table_name
-% rel # name
-% clob # type
-% 103 # length
-project (
-| group by (
-| | table(sys.dbg) [ "dbg"."a", "dbg"."b" ] COUNT 
-| ) [ "dbg"."a" as "d" ] [ "d", sys.sum no nil ("dbg"."b") as "%1"."%1" ]
-) [ "d", "%1"."%1", sys.sql_mul(sys.sql_div("%1"."%1", tinyint "2" as 
"%2"."%2"), tinyint "2") as "f" ]
-#set optimizer = 'sequential_pipe';
-#set optimizer = 'default_pipe';
-#SELECT a as d, SUM(b), (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP BY d;
-% sys.,        sys.%1, sys. # table_name
-% d,   %1,     f # name
-% int,  hugeint,        hugeint # type
-% 2,    2,      2 # length
-[ 10,   10,     10      ]
-#ROLLBACK;
-#START TRANSACTION;
-#CREATE TABLE dbg (a INT, b INT);
-#INSERT INTO dbg (a,b) VALUES (10,10);
-[ 1     ]
-#plan
-#SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP 
BY d;
-% .plan # table_name
-% rel # name
-% clob # type
-% 110 # length
-project (
-| group by (
-| | table(sys.dbg) [ "dbg"."a", "dbg"."b" ] COUNT 
-| ) [ "dbg"."a" as "d" ] [ "d", sys.sum no nil ("dbg"."b") as "%1"."%1" ]
-) [ "d", "%1"."%1" as "e", sys.sql_mul(sys.sql_div("%1"."%1", tinyint "2" as 
"%2"."%2"), tinyint "2") as "f" ]
-#set optimizer = 'sequential_pipe';
-#set optimizer = 'default_pipe';
-#SELECT a as d, SUM(b) as e, (2 * (SUM(b) / (SELECT 2))) as f FROM dbg GROUP 
BY d;
-% sys.,        sys.,   sys. # table_name
-% d,    e,      f # name
-% int,  hugeint,        hugeint # type
-% 2,    2,      2 # length
-[ 10,   10,     10      ]
-#ROLLBACK;
-
-# 14:09:56 >  
-# 14:09:56 >  Done.
-# 14:09:56 >  
-
diff --git a/sql/test/BugTracker-2011/Tests/many-connects-cache.Bug-2904.SQL.py 
b/sql/test/BugTracker-2011/Tests/many-connects-cache.Bug-2904.SQL.py
--- a/sql/test/BugTracker-2011/Tests/many-connects-cache.Bug-2904.SQL.py
+++ b/sql/test/BugTracker-2011/Tests/many-connects-cache.Bug-2904.SQL.py
@@ -1,66 +1,56 @@
-import os, sys
-try:
-    from MonetDBtesting import process
-except ImportError:
-    import process
+import sys, os, pymonetdb, threading
+
+db = os.getenv("TSTDB")
+port = int(os.getenv("MAPIPORT"))
 
-with process.client('sql',
-                   args=['-s', '''CREATE USER "testuser" WITH ENCRYPTED 
PASSWORD 
\'e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00\'
 NAME \'Test User\' SCHEMA "sys";
+client = pymonetdb.connect(database=db, port=port, autocommit=True)
+cursor = client.cursor()
+cursor.execute("""
+CREATE USER "testuser" WITH ENCRYPTED PASSWORD 
\'e9e633097ab9ceb3e48ec3f70ee2beba41d05d5420efee5da85f97d97005727587fda33ef4ff2322088f4c79e8133cc9cd9f3512f4d3a303cbdb5bc585415a00\'
 NAME \'Test User\' SCHEMA "sys";
 CREATE SCHEMA "testschema" AUTHORIZATION "testuser";
-ALTER USER "testuser" SET SCHEMA "testschema"'''],
-                   stdout=process.PIPE,
-                   stderr=process.PIPE) as c:
-    out, err = c.communicate()
-    if out:
-        sys.stdout.write(out)
-    if err:
-        sys.stderr.write(err)
+ALTER USER "testuser" SET SCHEMA "testschema"
+""")
+cursor.close()
+client.close()
+
+client = pymonetdb.connect(database=db, port=port, autocommit=True, 
username='testuser', password='testpassword')
+cursor = client.cursor()
+cursor.execute('CREATE FUNCTION rad(d DOUBLE) RETURNS DOUBLE BEGIN RETURN d * 
PI() / 180; END')
+cursor.close()
+client.close()
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to