Changeset: 1437965c4c2a for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1437965c4c2a
Modified Files:
clients/python2/monetdb/mapi.py
clients/python3/monetdb/mapi.py
gdk/gdk.h
monetdb5/mal/mal_dataflow.c
monetdb5/mal/mal_interpreter.c
sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.err
sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.out
sql/test/mapi/Tests/php_monetdb.stable.out
sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
Branch: default
Log Message:
Merge with Feb2013 branch.
diffs (212 lines):
diff --git a/clients/python2/monetdb/mapi.py b/clients/python2/monetdb/mapi.py
--- a/clients/python2/monetdb/mapi.py
+++ b/clients/python2/monetdb/mapi.py
@@ -229,7 +229,7 @@ class Connection(object):
while count > 0:
recv = self.socket.recv(count)
if len(recv) == 0:
- time.sleep(1)
+ raise OperationalError("Server closed connection")
#logger.debug("II: package size: %i payload: %s" % (len(recv),
recv))
count -= len(recv)
result.write(recv)
diff --git a/clients/python3/monetdb/mapi.py b/clients/python3/monetdb/mapi.py
--- a/clients/python3/monetdb/mapi.py
+++ b/clients/python3/monetdb/mapi.py
@@ -237,7 +237,7 @@ class Connection(object):
while count > 0:
recv = self.socket.recv(count)
if len(recv) == 0:
- time.sleep(1)
+ raise OperationalError("Server closed connection")
#logger.debug("II: package size: %i payload: %s" % (len(recv),
recv))
count -= len(recv)
result.write(recv)
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1861,7 +1861,7 @@ typedef struct {
BAT *cache[2]; /* if loaded: BAT* handle + reverse */
str logical[2]; /* logical name + reverse */
str bak[2]; /* logical name + reverse backups */
- bat next[2]; /* next BBP slot in link list */
+ bat next[2]; /* next BBP slot in linked list */
BATstore *desc; /* the BAT descriptor */
str physical; /* dir + basename for storage */
str options; /* A string list of options */
diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -336,14 +336,13 @@ DFLOWworker(void *t)
}
MT_lock_unset(&flow->flowlock, "MALworker");
- q_enqueue(flow->done, fe);
if ( fnxt == 0) {
if (todo->last == 0)
profilerHeartbeatEvent("wait");
else
MALresourceFairness(flow->cntxt, flow->mb,
usec);
-
}
+ q_enqueue(flow->done, fe);
}
GDKfree(GDKerrbuf);
GDKsetbuf(0);
@@ -364,10 +363,12 @@ DFLOWinitialize(void)
{
int i, limit;
- if (todo)
+ MT_lock_set(&mal_contextLock, "DFLOWinitialize");
+ if (todo) {
+ MT_lock_unset(&mal_contextLock, "DFLOWinitialize");
return MAL_SUCCEED;
- MT_lock_set(&mal_contextLock, "DFLOWinitialize");
- todo = q_create(2048, "todo");
+ }
+ todo = q_create(2048);
limit = GDKnr_threads ? GDKnr_threads : 1;
for (i = 0; i < limit && i < THREADS; i++) {
if (MT_create_thread(&workers[i], DFLOWworker, (void *)
&workers[i], MT_THR_JOINABLE) < 0) {
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -1154,7 +1154,7 @@ str runMALsequence(Client cntxt, MalBlkP
cntxt->timer = oldtimer;
}
}
- stkpc = mb->stop-1;
+ stkpc = mb->stop;
continue;
default:
stkpc++;
diff --git
a/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.err
b/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.err
--- a/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.err
+++ b/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.err
@@ -1,1 +1,35 @@
-to be filled
+stderr of test 'crash-from-optimizer.Bug-3241` in directory
'sql/test/BugTracker-2013` itself:
+
+
+# 10:57:02 >
+# 10:57:02 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=31204" "--set"
"mapi_usock=/var/tmp/mtest-19299/.s.monetdb.31204" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_sql_test_BugTracker-2013"
"--set" "mal_listing=0"
+# 10:57:02 >
+
+# builtin opt gdk_dbpath =
/ufs/sjoerd/Monet-candidate/var/monetdb5/dbfarm/demo
+# builtin opt gdk_debug = 0
+# 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 mapi_open = true
+# cmdline opt mapi_port = 31204
+# cmdline opt mapi_usock = /var/tmp/mtest-19299/.s.monetdb.31204
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbpath =
/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_sql_test_BugTracker-2013
+# cmdline opt mal_listing = 0
+
+# 10:57:02 >
+# 10:57:02 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-19299" "--port=31204"
+# 10:57:02 >
+
+
+# 10:57:02 >
+# 10:57:02 > "Done."
+# 10:57:02 >
+
diff --git
a/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.out
b/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.out
--- a/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.out
+++ b/sql/test/BugTracker-2013/Tests/crash-from-optimizer.Bug-3241.stable.out
@@ -1,1 +1,60 @@
-to be filled
+stdout of test 'crash-from-optimizer.Bug-3241` in directory
'sql/test/BugTracker-2013` itself:
+
+
+# 10:57:02 >
+# 10:57:02 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set"
"mapi_open=true" "--set" "mapi_port=31204" "--set"
"mapi_usock=/var/tmp/mtest-19299/.s.monetdb.31204" "--set" "monet_prompt="
"--forcemito" "--set" "mal_listing=2"
"--dbpath=/ufs/sjoerd/Monet-candidate/var/MonetDB/mTests_sql_test_BugTracker-2013"
"--set" "mal_listing=0"
+# 10:57:02 >
+
+# MonetDB 5 server v11.15.2 (hg id: 335efc7b71a1+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2013', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically
linked
+# Found 15.629 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2013 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:31204/
+# Listening for UNIX domain connection requests on
mapi:monetdb:///var/tmp/mtest-19299/.s.monetdb.31204
+# MonetDB/GIS module loaded
+# MonetDB/JAQL module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+
+# 10:57:02 >
+# 10:57:02 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e"
"--host=/var/tmp/mtest-19299" "--port=31204"
+# 10:57:02 >
+
+#START TRANSACTION;
+#CREATE TABLE "_dict" (
+# "idstr" CHARACTER LARGE OBJECT,
+# "id" INTEGER NOT NULL,
+# CONSTRAINT "_dict_id_pkey" PRIMARY KEY ("id")
+#);
+#COPY 7 RECORDS INTO "_dict" FROM stdin USING DELIMITERS ' ','\n','"';
+#"entity.department-dummy:11be0f0ab68e55dbbb205fa871914d89" 0
+#"entity.person:e1c055925f3783a7631a2efcde7d4413" 1
+#"entity.section:3673f53d1a8e1e5981b8bb6726923e68" 2
+#"entity.department-dummy:d57100c1f843d4d0f5a611ba7ac711f3" 3
+#"entity.department-dummy:2895b2eae68f91e3240e109e1df3296f" 4
+#"entity.department-dummy:c3f049405e2d621ff271bb92b4f921b9" 5
+#"entity.department-dummy:ce5f9e283849737fcebebd0c973ed0ac" 6
+#
+[ 7 ]
+#create function pcre_index(pat string, s string) returns int external name
pcre."patindex";
+#create function gettype(str string) returns string
+#begin
+# return substring(str, pcre_index('.', str) + 1,pcre_index(':', str) - 1 -
pcre_index('.', str));
+#end;
+#create view dict as select *, gettype(idstr) as type, 1.0e0 as prob from
_dict;
+#SELECT * FROM dict WHERE type='company';
+% sys.dict, sys.dict, sys.dict, .dict # table_name
+% idstr, id, type, prob # name
+% clob, int, clob, double # type
+% 0, 1, 0, 24 # length
+#ROLLBACK;
+
+# 10:57:02 >
+# 10:57:02 > "Done."
+# 10:57:02 >
+
diff --git a/sql/test/mapi/Tests/php_monetdb.stable.out
b/sql/test/mapi/Tests/php_monetdb.stable.out
--- a/sql/test/mapi/Tests/php_monetdb.stable.out
+++ b/sql/test/mapi/Tests/php_monetdb.stable.out
@@ -92,7 +92,7 @@ 5264 queryhistory 2000 0 true 0
false 0
5278 callhistory 2000 0 true 0 false 0
5295 querylog 2000 create view querylog asnselect qd.*, ql.ctime,
ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock,
ql.oublock from queryhistory qd, callhistory qlnwhere qd.id = ql.id; 1
true 0 false 0
6036 storagemodelinput 2000 0 true 0 false
0
-6077 tablestoragemodel 2000 -- A summary of the table storage
requirement is is available as a table view.n-- The auxillary column denotes
the maximum space if all non-sorted columnsn-- would be augmented with a hash
(rare situation)ncreate view tablestoragemodelnas select
"schema","table",max(count) as "count",ntsum(columnsize) as
columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case
when sorted = false then 8 * count else 0 end) as auxillarynfrom storagemodel()
group by "schema","table"; 1 true 0 false 0
+6077 tablestoragemodel 2000 -- A summary of the table storage
requirement is is available as a table view.n-- The auxillary column denotes
the maximum space if all non-sorted columnsn-- would be augmented with a hash
(rare situation)ncreate view sys.tablestoragemodelnas select
"schema","table",max(count) as "count",ntsum(columnsize) as
columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case
when sorted = false then 8 * count else 0 end) as auxillarynfrom
sys.storagemodel() group by "schema","table"; 1 true 0
false 0
6099 systemfunctions 2000 0 true 0 false 0
# 14:03:27 >
diff --git a/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
b/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
--- a/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
+++ b/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out
@@ -92,7 +92,7 @@ 5264 queryhistory 2000 0 true 0
false 0
5278 callhistory 2000 0 true 0 false 0
5295 querylog 2000 create view querylog asnselect qd.*, ql.ctime,
ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock,
ql.oublock from queryhistory qd, callhistory qlnwhere qd.id = ql.id; 1
true 0 false 0
5836 storagemodelinput 2000 0 true 0 false
0
-5877 tablestoragemodel 2000 -- A summary of the table storage
requirement is is available as a table view.n-- The auxillary column denotes
the maximum space if all non-sorted columnsn-- would be augmented with a hash
(rare situation)ncreate view tablestoragemodelnas select
"schema","table",max(count) as "count",ntsum(columnsize) as
columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case
when sorted = false then 8 * count else 0 end) as auxillarynfrom storagemodel()
group by "schema","table"; 1 true 0 false 0
+5877 tablestoragemodel 2000 -- A summary of the table storage
requirement is is available as a table view.n-- The auxillary column denotes
the maximum space if all non-sorted columnsn-- would be augmented with a hash
(rare situation)ncreate view sys.tablestoragemodelnas select
"schema","table",max(count) as "count",ntsum(columnsize) as
columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case
when sorted = false then 8 * count else 0 end) as auxillarynfrom
sys.storagemodel() group by "schema","table"; 1 true 0
false 0
5899 systemfunctions 2000 0 true 0 false 0
# 11:52:05 >
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list