Changeset: 60f94b8d3455 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=60f94b8d3455
Modified Files:
        monetdb5/modules/mal/Tests/All
        monetdb5/modules/mal/Tests/remote08.mal
        monetdb5/modules/mal/Tests/remote08.stable.err
        monetdb5/modules/mal/Tests/remote08.stable.out
Branch: default
Log Message:

remote: add test for OID-headed BAT


diffs (121 lines):

diff --git a/monetdb5/modules/mal/Tests/All b/monetdb5/modules/mal/Tests/All
--- a/monetdb5/modules/mal/Tests/All
+++ b/monetdb5/modules/mal/Tests/All
@@ -32,6 +32,7 @@
 remote03
 remote04
 remote06
+remote08
 # needs Merovingian and aims at SQL
 #remote88
 #remote89
diff --git a/monetdb5/modules/mal/Tests/remote08.mal 
b/monetdb5/modules/mal/Tests/remote08.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote08.mal
@@ -0,0 +1,20 @@
+# let connect figure out itself how to connect to the running db
+uri := sabaoth.getLocalConnectionURI();
+
+# create a persistent connecton to ourself
+conn1:str := remote.connect(uri, "monetdb", "monetdb");
+
+b := bat.new(:oid, :int);
+
+b := bat.insert(b, nil:oid, 2);
+b := bat.insert(b, nil:oid, 4);
+b := algebra.markH(b);
+rb2 := remote.put(conn1, b);
+
+lb2:bat[:oid,:int] := remote.get(conn1, rb2);
+
+io.print(lb2);
+
+# help testweb a bit, since currently no cleanup is done on server
+# shutdown
+remote.disconnect(conn1);
diff --git a/monetdb5/modules/mal/Tests/remote08.stable.err 
b/monetdb5/modules/mal/Tests/remote08.stable.err
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote08.stable.err
@@ -0,0 +1,31 @@
+stderr of test 'remote08` in directory 'modules/mal` itself:
+
+
+# 13:26:30 >  
+# 13:26:30 >   mserver5  --debug=10 --set gdk_nr_threads=0  --set 
"gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-current-volund.ins.cwi.nl/five/dbfarm"
 --set mapi_open=true --set mapi_port=38415 --set monet_prompt= --trace 
--forcemito --set mal_listing=2  --dbname=mTests_modules_mal  remote08.mal
+# 13:26:30 >  
+
+# builtin opt  gdk_dbname = demo
+# builtin opt  gdk_dbfarm = 
/ufs/fabian/scratch/monetdb/current/program-x86_64/var/lib/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 = 
/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-current-volund.ins.cwi.nl/five/dbfarm
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 38415
+# cmdline opt  monet_prompt = 
+# cmdline opt  mal_listing = 2
+# cmdline opt  gdk_dbname = mTests_modules_mal
+
+# 13:26:30 >  
+# 13:26:30 >  Done.
+# 13:26:30 >  
+
diff --git a/monetdb5/modules/mal/Tests/remote08.stable.out 
b/monetdb5/modules/mal/Tests/remote08.stable.out
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mal/Tests/remote08.stable.out
@@ -0,0 +1,44 @@
+stdout of test 'remote08` in directory 'modules/mal` itself:
+
+
+# 13:26:30 >  
+# 13:26:30 >   mserver5  --debug=10 --set gdk_nr_threads=0  --set 
"gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-current-volund.ins.cwi.nl/five/dbfarm"
 --set mapi_open=true --set mapi_port=38415 --set monet_prompt= --trace 
--forcemito --set mal_listing=2  --dbname=mTests_modules_mal  remote08.mal
+# 13:26:30 >  
+
+# MonetDB 5 server v11.4.0 "current-ac82e696762a"
+# Serving database 'mTests_modules_mal', 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-2011 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:38415/
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+function user.main():void;
+# let connect figure out itself how to connect to the running db 
+    uri := sabaoth.getLocalConnectionURI();
+# create a persistent connecton to ourself 
+    conn1:str  := remote.connect(uri,"monetdb","monetdb");
+    b := bat.new(:oid,:int);
+    b := bat.insert(b,nil:oid,2);
+    b := bat.insert(b,nil:oid,4);
+    b := algebra.markH(b);
+    rb2 := remote.put(conn1,b);
+    lb2:bat[:oid,:int]  := remote.get(conn1,rb2);
+    io.print(lb2);
+# help testweb a bit, since currently no cleanup is done on server 
+# shutdown 
+    remote.disconnect(conn1);
+end main;
+#-----------------#
+# h    t         # name
+# void int       # type
+#-----------------#
+[ 0@0,   2       ]
+[ 1@0,   4       ]
+
+# 13:26:30 >  
+# 13:26:30 >  Done.
+# 13:26:30 >  
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to