Changeset: 40c138662695 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=40c138662695
Modified Files:
        sql/backends/monet5/sql_scenario.c
        sql/test/BugTracker-2011/Tests/All
Branch: Dec2011
Log Message:

Merge with Aug2011 branch.


diffs (truncated from 354 to 300 lines):

diff --git a/sql/backends/monet5/sql_scenario.c 
b/sql/backends/monet5/sql_scenario.c
--- a/sql/backends/monet5/sql_scenario.c
+++ b/sql/backends/monet5/sql_scenario.c
@@ -428,6 +428,15 @@ SQLinitClient(Client c)
 
        initSQLreferences();
        /* initialize the database with predefined SQL functions */
+       if (SQLnewcatalog == 0) {
+               /* check whether table sys.systemfunctions exists: if
+                * it doesn't, this is probably a restart of the
+                * server after an incomplete initialization */
+               sql_schema *s = mvc_bind_schema(m, "sys");
+               sql_table *t = s ? mvc_bind_table(m, s, "systemfunctions") : 
NULL;
+               if (t == NULL)
+                       SQLnewcatalog = 1;
+       }
        if (SQLnewcatalog > 0) {
                char path[PATHLENGTH];
                str fullname;
diff --git a/sql/test/BugTracker-2011/Tests/All 
b/sql/test/BugTracker-2011/Tests/All
--- a/sql/test/BugTracker-2011/Tests/All
+++ b/sql/test/BugTracker-2011/Tests/All
@@ -53,3 +53,5 @@ many-connects-cache.Bug-2904
 alter-table-set-read-only.bug-2906
 predicate.Bug-2908
 history.Bug-2909
+interrupted-initialization.Bug-2875
+case-overflow.Bug-2239
diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql 
b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.sql
@@ -0,0 +1,46 @@
+start transaction;
+
+create table t2239 (
+       station136 smallint
+);
+copy 3 records into t2239 from stdin;
+1537
+1228
+1214
+
+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) +
+        (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) +
+        (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) +
+        (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))
+from t2239 order by station136;
+
+rollback;
diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err 
b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.err
@@ -0,0 +1,37 @@
+stderr of test 'case-overflow.Bug-2239` in directory '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 >  
+
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# 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  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30822
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_test_BugTracker-2011
+# cmdline opt  mal_listing = 0
+
+# 14:42:40 >  
+# 14:42:40 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=madrid" 
"--port=30822"
+# 14:42:40 >  
+
+
+# 14:42:40 >  
+# 14:42:40 >  "Done."
+# 14:42:40 >  
+
diff --git a/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out 
b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/case-overflow.Bug-2239.stable.out
@@ -0,0 +1,77 @@
+stdout of test 'case-overflow.Bug-2239` in directory '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-2011 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
+
+Ready.
+# 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,   sys. # table_name
+% station136,  isnull_station136 # name
+% smallint,    int # 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/interrupted-initialization.Bug-2875.py 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.py
@@ -0,0 +1,30 @@
+import os, sys
+try:
+    from MonetDBtesting import process
+except ImportError:
+    import process
+
+dbname = os.getenv('TSTDB') + '-bug2875'
+
+s = process.server(stdin = process.PIPE,
+                   stdout = process.PIPE,
+                   stderr = process.PIPE,
+                   dbname = dbname)
+out, err = s.communicate()
+sys.stdout.write(out)
+sys.stderr.write(err)
+s = process.server(stdin = process.PIPE,
+                   stdout = process.PIPE,
+                   stderr = process.PIPE,
+                   dbname = dbname)
+c = process.client(lang = 'sqldump',
+                   stdin = process.PIPE,
+                   stdout = process.PIPE,
+                   stderr = process.PIPE,
+                   dbname = dbname)
+out, err = c.communicate()
+sys.stdout.write(out)
+sys.stderr.write(err)
+out, err = s.communicate()
+sys.stdout.write(out)
+sys.stderr.write(err)
diff --git 
a/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.err 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.err
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.err
@@ -0,0 +1,50 @@
+stderr of test 'interrupted-initialization.Bug-2875` in directory 
'test/BugTracker-2011` itself:
+
+
+# 13:06:49 >  
+# 13:06:49 >  "/usr/bin/python" "interrupted-initialization.Bug-2875.py" 
"interrupted-initialization.Bug-2875"
+# 13:06:49 >  
+
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# 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  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 33477
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_test_BugTracker-2011-bug2875
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_alloc_map = no
+# builtin opt  gdk_vmtrim = yes
+# 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  gdk_dbfarm = /ufs/sjoerd/Monet-stable/var/MonetDB
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 33477
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_test_BugTracker-2011-bug2875
+
+# 13:06:50 >  
+# 13:06:50 >  "Done."
+# 13:06:50 >  
+
diff --git 
a/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.out 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.out
new file mode 100644
--- /dev/null
+++ 
b/sql/test/BugTracker-2011/Tests/interrupted-initialization.Bug-2875.stable.out
@@ -0,0 +1,56 @@
+stdout of test 'interrupted-initialization.Bug-2875` in directory 
'test/BugTracker-2011` itself:
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to