Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4680/src/optimizer
Modified Files:
opt_prelude.mx opt_remoteQueries.mx opt_support.mx
Log Message:
fixed bug in mtime (incorrect return type)
fixed bug in ifthenelse on constants (properly dereference external types)
fixed crash in group.mx, if called with wrong arguments we should not crash, ie
protect against NULL result (no BAT)
finished rename of mserver -> mapi/mal_mapi
Index: opt_prelude.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_prelude.mx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- opt_prelude.mx 11 Jan 2008 10:41:39 -0000 1.34
+++ opt_prelude.mx 27 Jan 2008 09:48:23 -0000 1.35
@@ -82,7 +82,7 @@
opt_export str mirrorRef;
opt_export str mkeyRef;
opt_export str mmathRef;
-opt_export str mserverRef;
+opt_export str mapiRef;
opt_export str multiplexRef;
opt_export str newRef;
opt_export str oidRef;
@@ -210,7 +210,7 @@
str mirrorRef;
str mkeyRef;
str mmathRef;
-str mserverRef;
+str mapiRef;
str multiplexRef;
str newRef;
str oidRef;
@@ -334,7 +334,7 @@
mirrorRef = putName("mirror",6);
mkeyRef = putName("mkey",4);
mmathRef = putName("mmath",5);
- mserverRef = putName("mserver",7);
+ mapiRef = putName("mapi",4);
multiplexRef = putName("multiplex",9);
newRef = putName("new",3);
oidRef = putName("oid",3);
Index: opt_remoteQueries.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_remoteQueries.mx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- opt_remoteQueries.mx 11 Jan 2008 10:41:39 -0000 1.16
+++ opt_remoteQueries.mx 27 Jan 2008 09:48:23 -0000 1.17
@@ -24,8 +24,8 @@
Consider the following snippet produced by a query compiler,
@verbatim
-mid:= mserver.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
-b:bat[:oid,:int] := mserver.bind(mid,"rvar");
+mid:= mapi.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
+b:bat[:oid,:int] := mapi.bind(mid,"rvar");
c:=algebra.select(b,0,12);
io.print(c);
d:=algebra.select(b,5,10);
@@ -55,17 +55,17 @@
just before they are locally needed.
@verbatim
-mid:= mserver.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
-mserver.rpc(mid,"b:bat[:oid,:int] :=bbp.bind(\"rvar\");");
-mserver.rpc(mid,"c:=algebra.select(b,0,12);");
-c:bat[:oid,:int]:= mserver.rpc(mid, "io.print(c);");
+mid:= mapi.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
+mapi.rpc(mid,"b:bat[:oid,:int] :=bbp.bind(\"rvar\");");
+mapi.rpc(mid,"c:=algebra.select(b,0,12);");
+c:bat[:oid,:int]:= mapi.rpc(mid, "io.print(c);");
io.print(c);
-mserver.rpc(mid,"d:=algebra.select(b,5,10);");
+mapi.rpc(mid,"d:=algebra.select(b,5,10);");
low:= 5+1;
-mserver.put(mid,"low",low);
-mserver.rpc(mid,"e:=algebra.select(d,low,7);");
-mserver.rpc(mid,"i:=aggr.count(d);");
-i:= mserver.rpc(mid,"io.print(i);");
+mapi.put(mid,"low",low);
+mapi.rpc(mid,"e:=algebra.select(d,low,7);");
+mapi.rpc(mid,"i:=aggr.count(d);");
+i:= mapi.rpc(mid,"io.print(i);");
io.printf(" count %d\n",i);
io.print(d);
@end verbatim
@@ -79,15 +79,15 @@
It seems that we can savely concatenate subsequence
requests.
@verbatim
- mid:=
mserver.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
- mserver.rpc(mid,"b:bat[:oid,:int] :=bbp.bind(\"rvar\");");
- mserver.rpc(mid,"c:=algebra.select(b,0,12);");
- c:bat[:oid,:int]:= mserver.rpc(mid, "io.print(c);");
+ mid:= mapi.reconnect("s0_0","localhost",50000,"monetdb","monetdb","mal");
+ mapi.rpc(mid,"b:bat[:oid,:int] :=bbp.bind(\"rvar\");");
+ mapi.rpc(mid,"c:=algebra.select(b,0,12);");
+ c:bat[:oid,:int]:= mapi.rpc(mid, "io.print(c);");
io.print(c);
- mserver.rpc(mid,"d:=algebra.select(b,5,10);");
+ mapi.rpc(mid,"d:=algebra.select(b,5,10);");
low:= 5+1;
- mserver.put(mid,"low",low);
- i:= mserver.rpc(mid,"e:=algebra.select(d,low,7); i:=aggr.count(d);
io.print(i);");
+ mapi.put(mid,"low",low);
+ i:= mapi.rpc(mid,"e:=algebra.select(d,low,7); i:=aggr.count(d);
io.print(i);");
io.printf(" count %d\n",i);
io.print(d);
@end verbatim
@@ -198,7 +198,7 @@
if( k== dbtop){
r= newInstruction(mb,ASSIGNsymbol);
- getModuleId(r)= mserverRef;
+ getModuleId(r)= mapiRef;
getFunctionId(r)= lookupRef;
j= getArg(r,0)= newTmpVariable(mb, TYPE_int);
r= pushArgument(mb,r, getArg(p,@1));
@@ -211,7 +211,7 @@
} else j= location[getArg(p,0)];
@= prepareRemote
r= newInstruction(mb,ASSIGNsymbol);
- getModuleId(r)= mserverRef;
+ getModuleId(r)= mapiRef;
getFunctionId(r)= rpcRef;
getArg(r,0)= newTmpVariable(mb, @1);
r= pushArgument(mb,r,j);
@@ -219,7 +219,7 @@
@= putRemoteVariables
for(j=p->retc; j<p->argc; j++)
if( location[getArg(p,j)] == 0 && !isVarConstant(mb,getArg(p,j)) ){
- q= newStmt(mb,mserverRef,putRef);
+ q= newStmt(mb,mapiRef,putRef);
getArg(q,0)= newTmpVariable(mb, TYPE_void);
q= pushArgument(mb,q,location[getArg(p,j)]);
q= pushStr(mb,q, getRefName(mb,getArg(p,j)));
@@ -281,7 +281,7 @@
/* detect remote variable binding */
- if( (getModuleId(p)== mserverRef && getFunctionId(p)==bindRef)){
+ if( (getModuleId(p)== mapiRef && getFunctionId(p)==bindRef)){
if( p->argc == 3 && getArgType(mb,p,1) == TYPE_int ) {
int tpe;
setVarUDFtype(mb,getArg(p,0));
@@ -399,7 +399,7 @@
/* perform locally */
for(j=p->retc; j<p->argc; j++)
if( location[getArg(p,j)]){
- q= newStmt(mb,mserverRef,rpcRef);
+ q= newStmt(mb,mapiRef,rpcRef);
getArg(q,0)= getArg(p,j);
q=
pushArgument(mb,q,location[getArg(p,j)]);
snprintf(buf,BUFSIZ,"io.print(%s);",
@@ -414,14 +414,14 @@
} else if (remoteSite){
/* single remote site involved */
r= newInstruction(mb,ASSIGNsymbol);
- getModuleId(r)= mserverRef;
+ getModuleId(r)= mapiRef;
getFunctionId(r)= rpcRef;
getArg(r,0)= newTmpVariable(mb, TYPE_void);
r= pushArgument(mb, r, remoteSite);
for(j=p->retc; j<p->argc; j++)
if( location[getArg(p,j)] == 0 &&
!isVarConstant(mb,getArg(p,j)) ){
- q= newStmt(mb,mserverRef,putRef);
+ q= newStmt(mb,mapiRef,putRef);
getArg(q,0)= newTmpVariable(mb,
TYPE_void);
q= pushArgument(mb, q, remoteSite);
q= pushStr(mb,q,
getRefName(mb,getArg(p,j)));
Index: opt_support.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_support.mx,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- opt_support.mx 11 Jan 2008 10:41:40 -0000 1.56
+++ opt_support.mx 27 Jan 2008 09:48:23 -0000 1.57
@@ -1121,7 +1121,7 @@
}
if (getModuleId(p) == constraintsRef)
return FALSE;
- if( getModuleId(p) == mserverRef){
+ if( getModuleId(p) == mapiRef){
if( getFunctionId(p) == rpcRef)
return TRUE;
if( getFunctionId(p) == reconnectRef)
-------------------------------------------------------------------------
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