Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28138/mil
Modified Files:
milprint_summer.c
Log Message:
minor change: add checks for the value of xrpc options.
U milprint_summer.c
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.416
retrieving revision 1.417
diff -u -d -r1.416 -r1.417
--- milprint_summer.c 3 Apr 2008 09:20:43 -0000 1.416
+++ milprint_summer.c 7 Apr 2008 12:48:10 -0000 1.417
@@ -6281,7 +6281,6 @@
PFoops (OOPS_NOTSUPPORTED, "RPC calls to in-line functions not
supported by XRPC.");
}
-
/* The extra parameter 'dst' of an RPC call is not listed in
* fun->params[], so translate it separately.
* 'rpc_iter' contains the real total number of iterations. */
@@ -6365,14 +6364,13 @@
if(strcmp(isoLevel, "none") !=0 && strcmp(isoLevel, "repeatable") != 0)
PFoops(OOPS_FATAL, "Invalid value of option 'xrpc:isolation':
\"%s\".", isoLevel);
-
if(strcmp(isoLevel, "none") != 0)
PFoops(OOPS_NOTSUPPORTED, "XRPC isolation level \"repeatable\" is
not implemented yet.");
}
opt = PFenv_lookup(PFoptions, PFqname(PFns_xrpc, "timeout"));
if(!opt) {
- timeout = 30; /* sec, default value of option 'xrpc:timeout' */
+ timeout = 30000; /* msec, default value of option 'xrpc:timeout' */
} else {
if(PFarray_last(opt) > 1)
PFoops(OOPS_FATAL, "Multiple declarations of option 'xrpc:timeout'
not allowed!");
@@ -6385,10 +6383,15 @@
PFoops(OOPS_FATAL, "Value of option 'xrpc:timeout' out-of-range (>
%ld).",
LONG_MAX);
else if(timeout < 0)
- PFoops(OOPS_FATAL, "Value of option 'xrpc:timeout' may not be
negative.");
- else if(timeout == 0 && strcmp(isoLevel, "none") != 0)
- PFoops(OOPS_FATAL, "Value of option 'xrpc:timeout' must be
positive "
- "when the isloation level \"repeatable\" is required.");
+ PFoops(OOPS_FATAL, "Invalid value of option 'xrpc:timeout': may
not be negative.");
+
+ if(strcmp(isoLevel, "none") != 0) { /* isoLevel == "repeatable" */
+ if(timeout == 0)
+ PFoops(OOPS_FATAL, "Invalid value of option
'xrpc:timeout': must be positive "
+ "when the isloation level \"repeatable\" is
required.");
+ } else { /* isoLevel == "none" */
+ PFoops(OOPS_WARNING, "The option 'xrpc:timeout' does not have
effect in isolation level \"none\", discarded.");
+ }
}
/* Define a variable to hold the results of a function call.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins