📄 mserver00.stable.out
字号:
stdout of test 'mserver00` in directory 'src/modules/mal` itself:# 23:07:54 > # 23:07:54 > Mtimeout -timeout 60 mserver5 "--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --debug=10 --set "monet_mod_path=/ufs/mk/monet5/Linux/lib/MonetDB5:/ufs/mk/opensource/MonetDB/Linux/lib/MonetDB" --set "gdk_dbfarm=/ufs/mk/monet5/Linux/var/MonetDB5/dbfarm" --set "sql_logdir=/ufs/mk/monet5/Linux/var/MonetDB5/dblogs" --set mapi_port=37461 --set monet_prompt= --trace --dbname=mTests_src_modules_kernel mapi00.mal < /dev/null# 23:07:54 > # Monet Database Server V4.99.19# Copyright (c) 1993-2006, CWI. All rights reserved.# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically linked.# config:/ufs/mk/monet5/src/mal/Tests/All.conf# dbfarm:/ufs/mk/monet5/Linux/var/MonetDB5/dbfarm# dbname:mTests_src_modules_kernel# Visit http://monetdb.cwi.nl/ for further information.## Attempt to establish a client connection to yourself.##z:= inspect.getEnvironment();#ps:= algebra.find(z,"mapi_port");#port:= calc.int(ps);#hs:= algebra.find(z,"host");##u:= clients.getInfo();#usr:= algebra.find(u,"user");#pwd:= algebra.find(u,"password");#lang:= algebra.find(u,"scenario");### setup the session#i:= mapi.connect(hs,port,usr,pwd,lang);#io.print(i);#function user.main():void; # 0 (main:void)# Attempt to establish a client connection to yourself. # 1 (_1:str) z := inspect.getEnvironment(); # 2 INSPECTgetEnvironment (z:bat[:str,:str]) ps := algebra.find(z,"mapi_port"); # 3 ALGfind (ps:str)<-(z:bat[:str,:str])(_4:str) port := calc.int(ps); # 4 CALCstr2int (port:int)<-(ps:str) hs := algebra.find(z,"host"); # 5 ALGfind (hs:str)<-(z:bat[:str,:str])(_7:str)# hardcoded, as access control currently works, and client.getInfo # doesn't # 6 (_8:str)#u:= clients.getInfo(); # 7 (_9:str)#usr:= algebra.find(u,"user"); # 8 (_10:str)#pwd:= algebra.find(u,"password"); # 9 (_11:str)#lang:= algebra.find(u,"scenario"); # 10 (_12:str) usr := "monetdb"; # 11 (usr:str)<-(_14:str) 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) 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) 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) 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) 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) 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) mserver.query(mid,"bat.insert(r, 1@0,311);"); # 30 SERVERquery (_40:int)<-(mid:int)(_41:str) mserver.query(mid,"bat.insert(r,2@0,433);"); # 31 SERVERquery (_42:int)<-(mid:int)(_43:str) b:bat[:oid,:int] := mserver.rpc(mid,"io.print(r);"); # 32 SERVERmapi_rpc_bat (b:bat[:oid,:int])<-(mid:int)(_45:str) io.print(b); # 33 IOprint_val (_46:void)<-(b:bat[:oid,:int])# use the BAT fetch operation # 34 (_47:str)#b:bat[:oid,:int]:= mserver.receive(mid,"remotename"); # 35 (_48:str) msg:str := mserver.rpc(mid,"io.print(\"hello world\");"); # 36 SERVERmapi_rpc_single_row (msg:str)<-(mid:int)(_50:str) io.print(msg); # 37 IOprint_val (_51:void)<-(msg:str) o:oid := mserver.rpc(mid,"io.print(34@0);"); # 38 SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_53:str) io.print(o); # 39 IOprint_val (_54:void)<-(o:oid) o:oid := mserver.rpc(mid,"io.print(nil:oid);"); # 40 SERVERmapi_rpc_single_row (o:oid)<-(mid:int)(_55:str) io.print(o); # 41 IOprint_val (_56:void)<-(o:oid)#needs type checks # 42 (_57:str)#(k:int,s:str):= mserver.rpc(mid,"io.print(nil:int,\"done\");"); # 43 (_58:str)#io.print(k,s); # 44 (_59:str)# what is the relationship between local/remote namespace # 45 (_60:str)# mserver.send(key,"a",a); # 46 (_61:str)# c:= mserver.join(key,a,b); # 47 (_62:str)# mserver.rpc(key,"z:=algebra.join(a,b);"); # 48 (_63:str)# c:= mserver.receive(key,"c") # 49 (_64:str)#patterns # 50 (_65:str)#pat:= "a:= algebra.select(b,?,?);"); # 51 (_66:str)#qry:= str.replace(pat,"?",i,j); # 52 (_67:str)#mserver.query(key,pat,i,j); # 53 (_68:str)#how to ship a routine # 54 (_69:str)#fcn:= manual.definition(manual,help); # 55 (_70:str)# how to remote MAL execution # 56 (_71:str)# remotedb:= mserver.connect(...) # 57 (_72:str)# algebra.join@remotedb(a,b) using remote objects # 58 (_73:str)# c:= mserver.rpc(remotedb,algebra,join,a,b) # 59 (_74:str)# the remainder should be tested # 60 (_75:str)catch MapiException:str ; # 61 (MapiException:str) jump 63 io.printf("foutje:%s\n",MapiException); # 62 IOprint_formatted_str (_77:void)<-(_78:str)(MapiException:str)exit MapiException:str ; # 63 (MapiException:str)end main; # 64 [ 1 ]rowcount 1fieldcount 2field 0 4field 1 hello#-----------------## h t # name# oid int # type#-----------------#[ 1@0, 311 ][ 2@0, 433 ][ "hello world" ][ 34@0 ][ nil ]# 23:07:54 > # 23:07:54 > Done.# 23:07:54 >
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -