Update of /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7721/modules/mal/Tests

Modified Files:
        inspect05.stable.out mserver00.mal mserver00.stable.out 
        remote04.stable.out 
Added Files:
        remote05.stable.err remote05.stable.out 
Log Message:
A renaming action to better reflect the actual status of the
old mserver module. It is a wrapper around mapilib.


Index: mserver00.mal
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/mserver00.mal,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mserver00.mal       2 Jan 2008 08:23:18 -0000       1.11
+++ mserver00.mal       21 Jan 2008 08:05:47 -0000      1.12
@@ -15,63 +15,63 @@
 lang := "mal";
 
 # setup the session
-mid:= mserver.connect(hs,port,usr,pwd,lang);
+mid:= mapi.connect(hs,port,usr,pwd,lang);
 io.print(mid);
 # retrieve data from the 'remote' site
 # testing t:=1+3;
-mserver.query(mid, "t:= 1+3; io.print(t,\"hello\");");
-i:= mserver.get_row_count(mid);
+mapi.query(mid, "t:= 1+3; io.print(t,\"hello\");");
+i:= mapi.get_row_count(mid);
 io.printf("rowcount %d\n",i);
-mserver.fetch_row(mid);
-i:= mserver.get_field_count(mid);
+mapi.fetch_row(mid);
+i:= mapi.get_field_count(mid);
 io.printf("fieldcount %d\n",i);
-i:= mserver.fetch_field(mid,0);
+i:= mapi.fetch_field(mid,0);
 io.printf("field 0 %d\n",i);
-s:str:= mserver.fetch_field(mid,1);
+s:str:= mapi.fetch_field(mid,1);
 io.printf("field 1 %s\n",s);
 
-mserver.query(mid,"r:= bat.new(:oid,:int);");
+mapi.query(mid,"r:= bat.new(:oid,:int);");
 io.printf("shipped first query\n");
-mserver.query(mid,"bat.insert(r, [EMAIL PROTECTED],311);");
-mserver.query(mid,"bat.insert(r,[EMAIL PROTECTED],433);");
-b:bat[:oid,:int]:= mserver.rpc(mid,"io.print(r);");
+mapi.query(mid,"bat.insert(r, [EMAIL PROTECTED],311);");
+mapi.query(mid,"bat.insert(r,[EMAIL PROTECTED],433);");
+b:bat[:oid,:int]:= mapi.rpc(mid,"io.print(r);");
 io.print(b);
 
 # use the BAT fetch operation
-#b:bat[:oid,:int]:= mserver.receive(mid,"remotename");
+#b:bat[:oid,:int]:= mapi.receive(mid,"remotename");
 
-msg:str := mserver.rpc(mid,"io.print(\"hello world\");");
+msg:str := mapi.rpc(mid,"io.print(\"hello world\");");
 io.print(msg);
-o:oid := mserver.rpc(mid,"io.print([EMAIL PROTECTED]);");
+o:oid := mapi.rpc(mid,"io.print([EMAIL PROTECTED]);");
 io.print(o);
-o:oid := mserver.rpc(mid,"io.print(nil:oid);");
+o:oid := mapi.rpc(mid,"io.print(nil:oid);");
 io.print(o);
 
 #needs type checks
-#(k:int,s:str):= mserver.rpc(mid,"io.print(nil:int,\"done\");");
+#(k:int,s:str):= mapi.rpc(mid,"io.print(nil:int,\"done\");");
 #io.print(k,s);
 
 # what is the relationship between local/remote namespace
-# mserver.send(key,"a",a);
-# c:= mserver.join(key,a,b);
-# mserver.rpc(key,"z:=algebra.join(a,b);");
-# c:= mserver.receive(key,"c")
+# mapi.send(key,"a",a);
+# c:= mapi.join(key,a,b);
+# mapi.rpc(key,"z:=algebra.join(a,b);");
+# c:= mapi.receive(key,"c")
 
 #patterns
 #pat:= "a:= algebra.select(b,?,?);");
 #qry:=  str.replace(pat,"?",i,j);
-#mserver.query(key,pat,i,j);
+#mapi.query(key,pat,i,j);
 
 #how to ship a routine
 #fcn:= manual.definition(manual,help);
 
 # how to remote MAL execution
-# remotedb:= mserver.connect(...)
+# remotedb:= mapi.connect(...)
 # [EMAIL PROTECTED](a,b) using remote objects
-# c:= mserver.rpc(remotedb,algebra,join,a,b)
+# c:= mapi.rpc(remotedb,algebra,join,a,b)
 
 # the remainder should be tested 
 catch MapiException:str;
        io.printf("foutje:%s\n",MapiException);
 exit MapiException;
-mserver.disconnect(mid);
+mapi.disconnect(mid);

--- NEW FILE: remote05.stable.out ---
stdout of test 'remote05` in directory 'src/modules/mal` itself:


# 04:46:54 >  
# 04:46:54 >   mserver5 "--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" 
--debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs"  --set mapi_open=true 
--set xrpc_open=true --set mapi_port=30399 --set xrpc_port=41245 --set 
monet_prompt= --trace --dbname=mTests_src_modules_mal  remote05.mal
# 04:46:54 >  

# MonetDB server v5.3.0, based on kernel v1.21.0
# Serving database 'mTests_src_modules_mal'
# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-2007 CWI, all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://gio.ins.cwi.nl:30399/
##this example tests recieving tuple values as part of the
##MAL interface.
## now in a remote setting
#
#include remote;
## for testweb, we need to ask the server itself how it is available, use
## sabaoth for that
#include sabaoth;
#
#h := sabaoth.getLocalConnectionHost();
#p := sabaoth.getLocalConnectionPort();
#
## create a connecton to ourself
#remote.create("test", h, p, nil:str, "monetdb", "monetdb");
#
#b:= bat.new(:oid,:str);
#bat.insert( [EMAIL PROTECTED], "hello");
#bat.insert( [EMAIL PROTECTED], "world");
#
## store the values
#remote.send("test",b);
#c:= remote.query("test","io.print(b);")
!SyntaxException:parseError:io.print(c);
!SyntaxException:parseError:^';' expected
#
#
function user.main():void;      # 0  (main:void)
#this example tests recieving tuple values as part of the       # 1  unknown 
(_1:str)
#MAL interface.         # 2  unknown (_2:str)
# now in a remote setting       # 3  unknown (_3:str)
#remote.prelude();      # 4  unknown (_4:str)
# ideally we would like to do this, however that's unfortunately        # 5  
unknown (_5:str)
# impossible since variadic stuff doesn't work in functions     # 6  unknown 
(_6:str)
#function exec(conn:str, ident:str...):any;     # 7  unknown (_7:str)
#       id := remote.exec(conn, ident, ...);    # 8  unknown (_8:str)
#       ret := remote.get(conn, id);    # 9  unknown (_9:str)
#       return(ret);    # 10  unknown (_10:str)
#end exec;      # 11  unknown (_11:str)
# for testweb, we need to ask the server itself how it is available, use        
# 12  unknown (_12:str)
# sabaoth for that      # 13  unknown (_13:str)
#sabaoth.prelude();     # 14  unknown (_14:str)
    h := sabaoth.getLocalConnectionHost();      # 15  unknown (h:any)
    p := sabaoth.getLocalConnectionPort();      # 16  unknown (p:any)
# create a connecton to ourself         # 17  unknown (_17:str)
    remote.create("test",h,p,nil:str,"monetdb","monetdb");      # 18  unknown 
(_18:any)<-(_19:str)(h:any)(p:any)(_20:str)(_21:str)(_21:str)
    b := bat.new(:oid,:str);    # 19  unknown (b:any)<-(_23:oid)(_24:str)
    bat.insert([EMAIL PROTECTED],"hello");      # 20  unknown 
(_25:any)<-(_26:oid)(_27:str)
    bat.insert([EMAIL PROTECTED],"world");      # 21  unknown 
(_28:any)<-(_26:oid)(_29:str)
# store the values      # 22  unknown (_30:str)
    remote.send("test",b);      # 23  unknown (_31:any)<-(_19:str)(b:any)
    c := remote.query("test","io.print(b);");   # 24  unknown 
(c:any)<-(_19:str)(_33:str)
end main;       # 25  unknown 

# 04:46:54 >  
# 04:46:54 >  Done.
# 04:46:54 >  


Index: remote04.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/remote04.stable.out,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- remote04.stable.out 20 Jan 2008 08:26:21 -0000      1.2
+++ remote04.stable.out 21 Jan 2008 08:05:48 -0000      1.3
@@ -27,10 +27,10 @@
 #this example tests recieving tuple values as part of the      # 1  (_1:str)
 #MAL interface.        # 2  (_2:str)
     b := bat.new(:oid,:int);   # 3 CMDBATnew 
(b:bat[:oid,:int])<-(_4:oid)(_5:int)
-    tuples := io.data("/tmp/file8j6cL1");      # 4 IOdatafile 
(tuples:str)<-(_8:str)
+    tuples := io.data("/tmp/fileyUpeEn");      # 4 IOdatafile 
(tuples:str)<-(_8:str)
     b := io.import(b,tuples);  # 5 IOimport 
(b:bat[:oid,:int])<-(b:bat[:oid,:int])(tuples:str)
     c := bat.new(:oid,:str);   # 6 CMDBATnew 
(c:bat[:oid,:str])<-(_4:oid)(_10:str)
-    tuples := io.data("/tmp/fileZjrMI8");      # 7 IOdatafile 
(tuples:str)<-(_13:str)
+    tuples := io.data("/tmp/fileFlEJ4Q");      # 7 IOdatafile 
(tuples:str)<-(_13:str)
     c := io.import(c,tuples);  # 8 IOimport 
(c:bat[:oid,:str])<-(c:bat[:oid,:str])(tuples:str)
     io.print(b);       # 9 IOprint_val (_14:void)<-(b:bat[:oid,:int])
     io.print(c);       # 10 IOprint_val (_15:void)<-(c:bat[:oid,:str])

Index: inspect05.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/inspect05.stable.out,v
retrieving revision 1.350
retrieving revision 1.351
diff -u -d -r1.350 -r1.351
--- inspect05.stable.out        14 Jan 2008 22:24:15 -0000      1.350
+++ inspect05.stable.out        21 Jan 2008 08:05:41 -0000      1.351
@@ -664,60 +664,60 @@
 [ "setFilter",                           "command",      "profiler",     
"(mod:str,fcn:str):void ",                                                      
                                        "CMDsetFilterProfiler;"                 
        ]
 [ "setNone",                             "command",      "profiler",     
"():void ",                                                                     
                                        "CMDsetNoneProfiler;"                   
        ]
 [ "setAll",                              "command",      "profiler",     
"():void ",                                                                     
                                        "CMDsetAllProfiler;"                    
        ]
-[ "bind",                                "pattern",      "mserver",      
"(key:int,remoteName:str):bat[:any_1,:any_2] ",                                 
                                        "SERVERbindBAT;"                        
        ]
-[ "bind",                                "pattern",      "mserver",      
"(key:int,rschema:str,rtable:str,i:int):bat[:any_1,:any_2] ",                   
                                        "SERVERbindBAT;"                        
        ]
-[ "bind",                                "pattern",      "mserver",      
"(key:int,rschema:str,rtable:str,rcolumn:str,i:int):bat[:any_1,:any_2] ",       
                                        "SERVERbindBAT;"                        
        ]
-[ "connect_ssl",                         "command",      "mserver",      
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                        "SERVERconnectssl;"                     
        ]
-[ "connect",                             "command",      "mserver",      
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                        "SERVERconnect;"                        
        ]
-[ "destroy",                             "command",      "mserver",      
"(mid:int):void ",                                                              
                                        "SERVERdestroy;"                        
        ]
-[ "disconnect",                                  "command",      "mserver",    
  "(mid:int):void ",                                                            
                                          "SERVERdisconnect;"                   
          ]
-[ "disconnect",                                  "command",      "mserver",    
  "():int ",                                                                    
                                          "SERVERdisconnectALL;"                
          ]
-[ "disconnect",                                  "command",      "mserver",    
  "(dbalias:str):int ",                                                         
                                          "SERVERdisconnectWithAlias;"          
          ]
-[ "explain",                             "command",      "mserver",      
"(mid:int):str ",                                                               
                                        "SERVERexplain;"                        
        ]
-[ "error",                               "command",      "mserver",      
"(mid:int):int ",                                                               
                                        "SERVERerror;"                          
        ]
-[ "fetch_reset",                         "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERfetch_reset;"                    
        ]
-[ "fetch_line",                                  "command",      "mserver",    
  "(hdl:int):str ",                                                             
                                          "SERVERfetch_line;"                   
          ]
-[ "fetch_field_array",                   "command",      "mserver",      
"(hdl:int):bat[:int,:str] ",                                                    
                                        "SERVERfetch_field_bat;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):chr ",                                                       
                                        "SERVERfetch_field_chr;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):oid ",                                                       
                                        "SERVERfetch_field_oid;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):void ",                                                      
                                        "SERVERfetch_field_void;"               
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):sht ",                                                       
                                        "SERVERfetch_field_sht;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):lng ",                                                       
                                        "SERVERfetch_field_lng;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):int ",                                                       
                                        "SERVERfetch_field_int;"                
        ]
-[ "fetch_field",                         "command",      "mserver",      
"(hdl:int,fnr:int):str ",                                                       
                                        "SERVERfetch_field_str;"                
        ]
-[ "fetch_all_rows",                      "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERfetch_all_rows;"                 
        ]
-[ "fetch_row",                           "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERfetch_row;"                      
        ]
-[ "fetch_row",                           "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERrows_affected;"                  
        ]
-[ "finish",                              "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERfinish;"                         
        ]
-[ "getError",                            "command",      "mserver",      
"(mid:int):str ",                                                               
                                        "SERVERgetError;"                       
        ]
-[ "get_row_count",                       "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERget_row_count;"                  
        ]
-[ "get_field_count",                     "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERget_field_count;"                
        ]
-[ "lookup",                              "command",      "mserver",      
"(dbalias:str):int ",                                                           
                                        "SERVERlookup;"                         
        ]
-[ "listen_ssl",                                  "command",      "mserver",    
  "(port:int,maxusers:int,keyfile:str,certfile:str,cmd:str):int ",              
                                          "SERVERlistenSSL;"                    
          ]
-[ "listen",                              "command",      "mserver",      
"(port:int,maxusers:int,cmd:str):int ",                                         
                                        "SERVERlisten3;"                        
        ]
-[ "listen",                              "command",      "mserver",      
"(port:int,maxusers:int):int ",                                                 
                                        "SERVERlisten2;"                        
        ]
-[ "listen",                              "command",      "mserver",      
"(port:int):int ",                                                              
                                        "SERVERlisten_port;"                    
        ]
-[ "listen",                              "command",      "mserver",      
"():int ",                                                                      
                                        "SERVERlisten_default;"                 
        ]
-[ "malclient",                           "command",      "mserver",      
"(in:streams,out:streams):void ",                                               
                                        "SERVERclient;"                         
        ]
-[ "next_result",                         "command",      "mserver",      
"(hdl:int):int ",                                                               
                                        "SERVERnext_result;"                    
        ]
-[ "put",                                 "pattern",      "mserver",      
"(nme:str,val:any_1):str ",                                                     
                                        "SERVERputLocal;"                       
        ]
-[ "put",                                 "pattern",      "mserver",      
"(mid:int,nme:str,val:any_1):void ",                                            
                                        "SERVERput;"                            
        ]
-[ "prepare",                             "command",      "mserver",      
"(mid:int,qry:str):int ",                                                       
                                        "SERVERprepare;"                        
        ]
-[ "ping",                                "command",      "mserver",      
"(mid:int):int ",                                                               
                                        "SERVERping;"                           
        ]
-[ "query_array",                         "pattern",      "mserver",      
"(mid:int,qry:str,arg:str...):int ",                                            
                                        "SERVERquery_array;"                    
        ]
-[ "query_handle",                        "command",      "mserver",      
"(mid:int,qry:str):int ",                                                       
                                        "SERVERquery_handle;"                   
        ]
-[ "query",                               "command",      "mserver",      
"(mid:int,qry:str):int ",                                                       
                                        "SERVERquery;"                          
        ]
-[ "rpc",                                 "command",      "mserver",      
"(key:int,qry:str):void ",                                                      
                                        "SERVERquery;"                          
        ]
-[ "rpc",                                 "pattern",      "mserver",      
"(key:int,qry:str):bat[:any_1,:any_2] ",                                        
                                        "SERVERmapi_rpc_bat;"                   
        ]
-[ "rpc",                                 "pattern",      "mserver",      
"(key:int,qry:str...):any ",                                                    
                                        "SERVERmapi_rpc_single_row;"            
        ]
-[ "reconnect",                           "command",      "mserver",      
"(mid:int):void ",                                                              
                                        "SERVERreconnect;"                      
        ]
-[ "reconnect",                           "command",      "mserver",      
"(host:str,port:int,db_alias:str,usr:str,passwd:str,lang:str):int ",            
                                        "SERVERreconnectAlias;"                 
        ]
-[ "reconnect",                           "command",      "mserver",      
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                        "SERVERreconnectWithoutAlias;"          
        ]
-[ "resume",                              "command",      "mserver",      
"():void ",                                                                     
                                        "SERVERresume;"                         
        ]
-[ "setAlias",                            "command",      "mserver",      
"(dbalias:str):void ",                                                          
                                        "SERVERsetAlias;"                       
        ]
-[ "suspend",                             "command",      "mserver",      
"():void ",                                                                     
                                        "SERVERsuspend;"                        
        ]
-[ "stop",                                "command",      "mserver",      
"():void ",                                                                     
                                        "SERVERstop;"                           
        ]
-[ "trace",                               "command",      "mserver",      
"(mid:int,flag:int):void ",                                                     
                                        "SERVERtrace;"                          
        ]
+[ "bind",                                "pattern",      "mapi",         
"(key:int,remoteName:str):bat[:any_1,:any_2] ",                                 
                                                        "SERVERbindBAT;"        
                                ]
+[ "bind",                                "pattern",      "mapi",         
"(key:int,rschema:str,rtable:str,i:int):bat[:any_1,:any_2] ",                   
                                                        "SERVERbindBAT;"        
                                ]
+[ "bind",                                "pattern",      "mapi",         
"(key:int,rschema:str,rtable:str,rcolumn:str,i:int):bat[:any_1,:any_2] ",       
                                                        "SERVERbindBAT;"        
                                ]
+[ "connect_ssl",                         "command",      "mapi",         
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                                        "SERVERconnectssl;"     
                                ]
+[ "connect",                             "command",      "mapi",         
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                                        "SERVERconnect;"        
                                ]
+[ "destroy",                             "command",      "mapi",         
"(mid:int):void ",                                                              
                                                        "SERVERdestroy;"        
                                ]
+[ "disconnect",                                  "command",      "mapi",       
  "(mid:int):void ",                                                            
                                                          "SERVERdisconnect;"   
                                  ]
+[ "disconnect",                                  "command",      "mapi",       
  "():int ",                                                                    
                                                          
"SERVERdisconnectALL;"                                  ]
+[ "disconnect",                                  "command",      "mapi",       
  "(dbalias:str):int ",                                                         
                                                          
"SERVERdisconnectWithAlias;"                            ]
+[ "explain",                             "command",      "mapi",         
"(mid:int):str ",                                                               
                                                        "SERVERexplain;"        
                                ]
+[ "error",                               "command",      "mapi",         
"(mid:int):int ",                                                               
                                                        "SERVERerror;"          
                                ]
+[ "fetch_reset",                         "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERfetch_reset;"    
                                ]
+[ "fetch_line",                                  "command",      "mapi",       
  "(hdl:int):str ",                                                             
                                                          "SERVERfetch_line;"   
                                  ]
+[ "fetch_field_array",                   "command",      "mapi",         
"(hdl:int):bat[:int,:str] ",                                                    
                                                        
"SERVERfetch_field_bat;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):chr ",                                                       
                                                        
"SERVERfetch_field_chr;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):oid ",                                                       
                                                        
"SERVERfetch_field_oid;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):void ",                                                      
                                                        
"SERVERfetch_field_void;"                               ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):sht ",                                                       
                                                        
"SERVERfetch_field_sht;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):lng ",                                                       
                                                        
"SERVERfetch_field_lng;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):int ",                                                       
                                                        
"SERVERfetch_field_int;"                                ]
+[ "fetch_field",                         "command",      "mapi",         
"(hdl:int,fnr:int):str ",                                                       
                                                        
"SERVERfetch_field_str;"                                ]
+[ "fetch_all_rows",                      "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERfetch_all_rows;" 
                                ]
+[ "fetch_row",                           "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERfetch_row;"      
                                ]
+[ "fetch_row",                           "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERrows_affected;"  
                                ]
+[ "finish",                              "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERfinish;"         
                                ]
+[ "getError",                            "command",      "mapi",         
"(mid:int):str ",                                                               
                                                        "SERVERgetError;"       
                                ]
+[ "get_row_count",                       "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERget_row_count;"  
                                ]
+[ "get_field_count",                     "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        
"SERVERget_field_count;"                                ]
+[ "lookup",                              "command",      "mapi",         
"(dbalias:str):int ",                                                           
                                                        "SERVERlookup;"         
                                ]
+[ "listen_ssl",                                  "command",      "mapi",       
  "(port:int,maxusers:int,keyfile:str,certfile:str,cmd:str):int ",              
                                                          "SERVERlistenSSL;"    
                                  ]
+[ "listen",                              "command",      "mapi",         
"(port:int,maxusers:int,cmd:str):int ",                                         
                                                        "SERVERlisten3;"        
                                ]
+[ "listen",                              "command",      "mapi",         
"(port:int,maxusers:int):int ",                                                 
                                                        "SERVERlisten2;"        
                                ]
+[ "listen",                              "command",      "mapi",         
"(port:int):int ",                                                              
                                                        "SERVERlisten_port;"    
                                ]
+[ "listen",                              "command",      "mapi",         
"():int ",                                                                      
                                                        "SERVERlisten_default;" 
                                ]
+[ "malclient",                           "command",      "mapi",         
"(in:streams,out:streams):void ",                                               
                                                        "SERVERclient;"         
                                ]
+[ "next_result",                         "command",      "mapi",         
"(hdl:int):int ",                                                               
                                                        "SERVERnext_result;"    
                                ]
+[ "put",                                 "pattern",      "mapi",         
"(nme:str,val:any_1):str ",                                                     
                                                        "SERVERputLocal;"       
                                ]
+[ "put",                                 "pattern",      "mapi",         
"(mid:int,nme:str,val:any_1):void ",                                            
                                                        "SERVERput;"            
                                ]
+[ "prepare",                             "command",      "mapi",         
"(mid:int,qry:str):int ",                                                       
                                                        "SERVERprepare;"        
                                ]
+[ "ping",                                "command",      "mapi",         
"(mid:int):int ",                                                               
                                                        "SERVERping;"           
                                ]
+[ "query_array",                         "pattern",      "mapi",         
"(mid:int,qry:str,arg:str...):int ",                                            
                                                        "SERVERquery_array;"    
                                ]
+[ "query_handle",                        "command",      "mapi",         
"(mid:int,qry:str):int ",                                                       
                                                        "SERVERquery_handle;"   
                                ]
+[ "query",                               "command",      "mapi",         
"(mid:int,qry:str):int ",                                                       
                                                        "SERVERquery;"          
                                ]
+[ "rpc",                                 "command",      "mapi",         
"(key:int,qry:str):void ",                                                      
                                                        "SERVERquery;"          
                                ]
+[ "rpc",                                 "pattern",      "mapi",         
"(key:int,qry:str):bat[:any_1,:any_2] ",                                        
                                                        "SERVERmapi_rpc_bat;"   
                                ]
+[ "rpc",                                 "pattern",      "mapi",         
"(key:int,qry:str...):any ",                                                    
                                                        
"SERVERmapi_rpc_single_row;"                            ]
+[ "reconnect",                           "command",      "mapi",         
"(mid:int):void ",                                                              
                                                        "SERVERreconnect;"      
                                ]
+[ "reconnect",                           "command",      "mapi",         
"(host:str,port:int,db_alias:str,usr:str,passwd:str,lang:str):int ",            
                                                        "SERVERreconnectAlias;" 
                                ]
+[ "reconnect",                           "command",      "mapi",         
"(host:str,port:int,usr:str,passwd:str,lang:str):int ",                         
                                                        
"SERVERreconnectWithoutAlias;"                          ]
+[ "resume",                              "command",      "mapi",         
"():void ",                                                                     
                                                        "SERVERresume;"         
                                ]
+[ "setAlias",                            "command",      "mapi",         
"(dbalias:str):void ",                                                          
                                                        "SERVERsetAlias;"       
                                ]
+[ "suspend",                             "command",      "mapi",         
"():void ",                                                                     
                                                        "SERVERsuspend;"        
                                ]
+[ "stop",                                "command",      "mapi",         
"():void ",                                                                     
                                                        "SERVERstop;"           
                                ]
+[ "trace",                               "command",      "mapi",         
"(mid:int,flag:int):void ",                                                     
                                                        "SERVERtrace;"          
                                ]
 [ "emptySet",                            "command",      "constraints",  
"(b:bat[:oid,:any_2]):void ",                                                   
                                        "CemptySet;"                            
        ]
 [ "assertSpace",                         "pattern",      "language",     
"(depth:int):void ",                                                            
        "MALsafeguardStack;"                            ]
 [ "assert",                              "pattern",      "language",     
"(v:any_1,pname:str,oper:str,val:any_2):void ",                                 
                                        "MALassertTriple;"                      
        ]
@@ -879,7 +879,8 @@
 [ "setStream",                           "command",      "tablet",       
"(s:streams):void ",                                                            
                                        "TABsetStream;"                         
        ]
 [ "setFormat",                           "pattern",      "tablet",       
"(b:any...):void ",                                                             
                                        "TABsetFormat;"                         
        ]
 [ "setProperties",                       "command",      "tablet",       
"(prop:str):int ",                                                              
                                        "TABsetProperties;"                     
        ]
-[ "export",                              "command",      "io",           
"(b:bat[:any_1,:any_2],filepath:str):bit ",                                     
                                        "IOexport;"                             
        ]
+[ "data",                                "command",      "io",           
"(fname:str):str ",                                                             
                                                        "IOdatafile;"           
                                ]
+[ "export",                              "command",      "io",           
"(b:bat[:any_1,:any_2],filepath:str):bit ",                                     
        "IOexport;"                                     ]
 [ "ftable",                              "pattern",      "io",           
"(fp:streams,order:int,b1:bat[:any_1,:any],b:bat[:any_1,:any]...):void ",       
                                        "IOfotable;"                            
        ]
 [ "ftable",                              "pattern",      "io",           
"(filep:streams,b1:bat[:any_1,:any],b:bat[:any_1,:any]...):void ",              
                                        "IOftable;"                             
        ]
 [ "import",                              "command",      "io",           
"(b:bat[:any_1,:any_2],filepath:str):bat[:any_1,:any_2] ",                      
                                        "IOimport;"                             
        ]

Index: mserver00.stable.out
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/Tests/mserver00.stable.out,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mserver00.stable.out        2 Jan 2008 08:23:19 -0000       1.9
+++ mserver00.stable.out        21 Jan 2008 08:05:47 -0000      1.10
@@ -43,33 +43,33 @@
     pwd := "monetdb";  # 12  (pwd:str)<-(_14:str)
     lang := "mal";     # 13  (lang:str)<-(_17:str)
 # setup the session    # 14  (_18:str)
-    mid := mserver.connect(hs,port,usr,pwd,lang);      # 15 SERVERconnect 
(mid:int)<-(hs:str)(port:int)(usr:str)(pwd:str)(lang:str)
+    mid := mapi.connect(hs,port,usr,pwd,lang); # 15 SERVERconnect 
(mid:int)<-(hs:str)(port:int)(usr:str)(pwd:str)(lang:str)
     io.print(mid);     # 16 IOprint_val (_20:void)<-(mid:int)
 # retrieve data from the 'remote' site         # 17  (_21:str)
 # testing t:=1+3;      # 18  (_22:str)
-    mserver.query(mid,"t:= 1+3; io.print(t,\"hello\");");      # 19 
SERVERquery (_23:int)<-(mid:int)(_24:str)
-    i := mserver.get_row_count(mid);   # 20 SERVERget_row_count 
(i:int)<-(mid:int)
+    mapi.query(mid,"t:= 1+3; io.print(t,\"hello\");"); # 19 SERVERquery 
(_23:int)<-(mid:int)(_24:str)
+    i := mapi.get_row_count(mid);      # 20 SERVERget_row_count 
(i:int)<-(mid:int)
     io.printf("rowcount %d\n",i);      # 21 IOprint_formatted_int 
(_26:void)<-(_27:str)(i:int)
-    mserver.fetch_row(mid);    # 22 SERVERfetch_row (_28:int)<-(mid:int)
-    i := mserver.get_field_count(mid); # 23 SERVERget_field_count 
(i:int)<-(mid:int)
+    mapi.fetch_row(mid);       # 22 SERVERfetch_row (_28:int)<-(mid:int)
+    i := mapi.get_field_count(mid);    # 23 SERVERget_field_count 
(i:int)<-(mid:int)
     io.printf("fieldcount %d\n",i);    # 24 IOprint_formatted_int 
(_29:void)<-(_30:str)(i:int)
-    i := mserver.fetch_field(mid,0);   # 25 SERVERfetch_field_int 
(i:int)<-(mid:int)(_31:int)
+    i := mapi.fetch_field(mid,0);      # 25 SERVERfetch_field_int 
(i:int)<-(mid:int)(_31:int)
     io.printf("field 0 %d\n",i);       # 26 IOprint_formatted_int 
(_32:void)<-(_33:str)(i:int)
-    s:str  := mserver.fetch_field(mid,1);      # 27 SERVERfetch_field_str 
(s:str)<-(mid:int)(_35:int)
+    s:str  := mapi.fetch_field(mid,1); # 27 SERVERfetch_field_str 
(s:str)<-(mid:int)(_35:int)
     io.printf("field 1 %s\n",s);       # 28 IOprint_formatted_str 
(_36:void)<-(_37:str)(s:str)
-    mserver.query(mid,"r:= bat.new(:oid,:int);");      # 29 SERVERquery 
(_38:int)<-(mid:int)(_39:str)
+    mapi.query(mid,"r:= bat.new(:oid,:int);"); # 29 SERVERquery 
(_38:int)<-(mid:int)(_39:str)
     io.printf("shipped first query\n");        # 30 IOprint_str 
(_40:void)<-(_41:str)
-    mserver.query(mid,"bat.insert(r, [EMAIL PROTECTED],311);");        # 31 
SERVERquery (_42:int)<-(mid:int)(_43:str)
-    mserver.query(mid,"bat.insert(r,[EMAIL PROTECTED],433);"); # 32 
SERVERquery (_44:int)<-(mid:int)(_45:str)
-    b:bat[:oid,:int]  := mserver.rpc(mid,"io.print(r);");      # 33 
SERVERmapi_rpc_bat (b:bat[:oid,:int])<-(mid:int)(_47:str)
+    mapi.query(mid,"bat.insert(r, [EMAIL PROTECTED],311);");   # 31 
SERVERquery (_42:int)<-(mid:int)(_43:str)
+    mapi.query(mid,"bat.insert(r,[EMAIL PROTECTED],433);");    # 32 
SERVERquery (_44:int)<-(mid:int)(_45:str)
+    b:bat[:oid,:int]  := mapi.rpc(mid,"io.print(r);"); # 33 SERVERmapi_rpc_bat 
(b:bat[:oid,:int])<-(mid:int)(_47:str)
     io.print(b);       # 34 IOprint_val (_48:void)<-(b:bat[:oid,:int])
 # use the BAT fetch operation  # 35  (_49:str)
-#b:bat[:oid,:int]:= mserver.receive(mid,"remotename");         # 36  (_50:str)
-    msg:str  := mserver.rpc(mid,"io.print(\"hello world\");"); # 37 
SERVERmapi_rpc_single_row (msg:str)<-(mid:int)(_52:str)
+#b:bat[:oid,:int]:= mapi.receive(mid,"remotename");    # 36  (_50:str)
+    msg:str  := mapi.rpc(mid,"io.print(\"hello world\");");    # 37 
SERVERmapi_rpc_single_row (msg:str)<-(mid:int)(_52:str)
     io.print(msg);     # 38 IOprint_val (_53:void)<-(msg:str)
-    o:oid  := mserver.rpc(mid,"io.print([EMAIL PROTECTED]);"); # 39 
SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_55:str)
+    o:oid  := mapi.rpc(mid,"io.print([EMAIL PROTECTED]);");    # 39 
SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_55:str)
     io.print(o);       # 40 IOprint_val (_56:void)<-(o:oid)
-    o:oid  := mserver.rpc(mid,"io.print(nil:oid);");   # 41 
SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_57:str)
+    o:oid  := mapi.rpc(mid,"io.print(nil:oid);");      # 41 
SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_57:str)
     io.print(o);       # 42 IOprint_val (_58:void)<-(o:oid)
 #needs type checks     # 43  (_59:str)
 #(k:int,s:str):= mserver.rpc(mid,"io.print(nil:int,\"done\");");       # 44  
(_60:str)
@@ -93,7 +93,7 @@
 catch MapiException:str ;      # 62  (MapiException:str) jump 64
     io.printf("foutje:%s\n",MapiException);    # 63 IOprint_formatted_str 
(_79:void)<-(_80:str)(MapiException:str)
 exit MapiException:str ;       # 64  (MapiException:str)
-    mserver.disconnect(mid);   # 65 SERVERdisconnect (_81:void)<-(mid:int)
+    mapi.disconnect(mid);      # 65 SERVERdisconnect (_81:void)<-(mid:int)
 end main;      # 66  
 [ 1 ]
 rowcount 1

--- NEW FILE: remote05.stable.err ---
stderr of test 'remote05` in directory 'src/modules/mal` itself:


# 04:46:54 >  
# 04:46:54 >   mserver5 "--config=/ufs/mk/monet5/Linux/etc/monetdb5.conf" 
--debug=10 --set 
"monet_mod_path=/ufs/mk/monet5//Linux/lib/MonetDB5:/ufs/mk/monet5//Linux/lib/MonetDB5/lib:/ufs/mk/monet5//Linux/lib/MonetDB5/bin"
 --set "gdk_dbfarm=/ufs/mk/monet5//Linux/var/MonetDB5/dbfarm" --set 
"sql_logdir=/ufs/mk/monet5//Linux/var/MonetDB5/sql_logs"  --set mapi_open=true 
--set xrpc_open=true --set mapi_port=30399 --set xrpc_port=41245 --set 
monet_prompt= --trace --dbname=mTests_src_modules_mal  remote05.mal
# 04:46:54 >  

#warning: please don't forget to set your vault key!
#(see /ufs/mk/monet5/Linux/etc/monetdb5.conf)

# 04:46:54 >  
# 04:46:54 >  Done.
# 04:46:54 >  



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to