Changeset: 86c110f4740d for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=86c110f4740d
Modified Files:
gdk/gdk_atoms.mx
monetdb5/modules/mal/Tests/remote02.mal
monetdb5/modules/mal/Tests/remote12.mal
monetdb5/modules/mal/Tests/remote12.stable.err
monetdb5/modules/mal/Tests/remote12.stable.out
Branch: default
Log Message:
Handling a nil:BAT remotely
Make sure we get it back the way we sent it.
diffs (146 lines):
diff --git a/gdk/gdk_atoms.mx b/gdk/gdk_atoms.mx
--- a/gdk/gdk_atoms.mx
+++ b/gdk/gdk_atoms.mx
@@ -1367,7 +1367,7 @@ batFromStr(char *src, int *len, bat **ds
t++;
if (strcmp(r,"nil")== 0 ){
- **dst = bat_nil;
+ **dst = 0;
return (int) (t + (c == '>') - src);
}
diff --git a/monetdb5/modules/mal/Tests/remote02.mal
b/monetdb5/modules/mal/Tests/remote02.mal
--- a/monetdb5/modules/mal/Tests/remote02.mal
+++ b/monetdb5/modules/mal/Tests/remote02.mal
@@ -6,7 +6,6 @@ a:str := "Fabian!";
b:flt := 4.3;
c:int := 12;
d:bat[:str,:int] := bat.new(:str, :int);
-e := nil:BAT;
bat.insert(d, "bla", 1);
bat.insert(d, nil:str, 2);
@@ -17,21 +16,18 @@ i:str := remote.put(conn, a);
j:str := remote.put(conn, b);
k:str := remote.put(conn, c);
l:str := remote.put(conn, d);
-m:str := remote.put(conn, e);
# retrieve the values
r:str := remote.get(conn, i);
s:flt := remote.get(conn, j);
t:int := remote.get(conn, k);
u:bat[:str,:int] := remote.get(conn, l);
-v:BAT := remote.get(conn,m);
# see if it really is here
io.print(r);
io.print(s);
io.print(t);
io.print(u);
-io.print(v);
# help testweb a bit, since currently no cleanup is done on server
# shutdown
diff --git a/monetdb5/modules/mal/Tests/remote12.mal
b/monetdb5/modules/mal/Tests/remote12.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote12.mal
@@ -0,0 +1,9 @@
+#causing a sigfault
+uri := sabaoth.getLocalConnectionURI();
+conn:str := remote.connect(uri, "monetdb", "monetdb");
+e := nil:BAT;
+m:str := remote.put(conn, e);
+io.print(m);
+v:BAT := remote.get(conn,m);
+io.print(v);
+mdb.var();
diff --git a/monetdb5/modules/mal/Tests/remote12.stable.err
b/monetdb5/modules/mal/Tests/remote12.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote12.stable.err
@@ -0,0 +1,31 @@
+stderr of test 'remote12` in directory 'modules/mal` itself:
+
+
+# 20:06:19 >
+# 20:06:19 > mserver5 --debug=10 --set gdk_nr_threads=0 --set
"gdk_dbfarm=/ufs/mk/current//Linux/var/MonetDB" --set mapi_open=true --set
mapi_port=33456 --set monet_prompt= --trace --forcemito --set mal_listing=2
--dbname=mTests_modules_mal remote12.mal
+# 20:06:19 >
+
+# builtin opt gdk_dbname = demo
+# builtin opt gdk_dbfarm = /ufs/mk/current//Linux/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/mk/current//Linux/var/MonetDB
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 33456
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbname = mTests_modules_mal
+
+# 20:06:20 >
+# 20:06:20 > Done.
+# 20:06:20 >
+
diff --git a/monetdb5/modules/mal/Tests/remote12.stable.out
b/monetdb5/modules/mal/Tests/remote12.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote12.stable.out
@@ -0,0 +1,46 @@
+stdout of test 'remote12` in directory 'modules/mal` itself:
+
+
+# 20:06:19 >
+# 20:06:19 > mserver5 --debug=10 --set gdk_nr_threads=0 --set
"gdk_dbfarm=/ufs/mk/current//Linux/var/MonetDB" --set mapi_open=true --set
mapi_port=33456 --set monet_prompt= --trace --forcemito --set mal_listing=2
--dbname=mTests_modules_mal remote12.mal
+# 20:06:19 >
+
+# MonetDB 5 server v11.6.0
+# This is an unreleased version
+# Serving database 'mTests_modules_mal', using 4 threads
+# Compiled for x86_64-unknown-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-2011 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://eir.ins.cwi.nl:33456/
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/DataCell module not loaded
+# SQLException:mvc:SQL module not initialized
+function user.main():void;
+#causing a sigfault
+ uri := sabaoth.getLocalConnectionURI();
+ conn:str := remote.connect(uri,"monetdb","monetdb");
+ e := nil:BAT;
+ m:str := remote.put(conn,e);
+ io.print(m);
+ v:BAT := remote.get(conn,m);
+ io.print(v);
+ mdb.var();
+end main;
+[ "rmt0_e_BAT" ]
+[ nil ]
+#Stack 'main' size=3200 top=12
+#[2] uri = "mapi:monetdb://eir.ins.cwi.nl:33456/mTests_modules_mal" :str
+#[3] conn = "mTests_modules_mal_monetdb_0" :str
+#[4] _4 = "monetdb" :str constant
+#[5] e = nil :BAT
+#[6] _6 = nil :BAT constant
+#[7] m = "rmt0_e_BAT" :str
+#[9] v = nil :BAT
+
+# 20:06:20 >
+# 20:06:20 > Done.
+# 20:06:20 >
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list