Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2937
Modified Files:
pathfinder.mx pf_support.mx
Log Message:
- BUG 1995879: only use algebra for normal queries
cachable queries and the XRPC server still use mps
U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.421
retrieving revision 1.422
diff -u -d -r1.421 -r1.422
--- pathfinder.mx 16 Jun 2008 23:38:41 -0000 1.421
+++ pathfinder.mx 17 Jun 2008 17:07:26 -0000 1.422
@@ -4246,7 +4246,7 @@
* - execute MIL buffer (parse & execute)
*
* int
- * xquery_compile_exec(xquery_client *ctx, char* xquery, int is_url,
+ * xquery_compile_exec(xquery_client *ctx, int options, char* xquery, int
is_url,
* char** prologue, char** query, char** epilogue, char*
nsurl)
* - translate xquery to MIL and execute
*
@@ -4345,6 +4345,7 @@
extern char* PFmaxstack;
static int
xquery_compile_exec(xquery_client *ctx,
+ int options,
char* url,
int is_url,
char** prologue,
@@ -4356,22 +4357,9 @@
char *xquery = url;
char *err = NULL;
- int options = 0;
/* Setting the StandOff flag based on runtime settings */
if ((GDKgetenv("standoff") != NULL) &&
(strcmp(GDKgetenv("standoff"),"enabled") == 0))
options |= COMPILE_OPTION_STANDOFF;
- /* Setting the Algebra flag; server setting overules compile-time default;
client choice overrules server setting */
-#if MILPRINT_SUMMER_IS_DEFAULT
- if (((ctx->mode & XQ_ALGEBRA) != 0) || \
- (((ctx->mode & XQ_MILPRINT_SUMMER) == 0) && \
- (GDKgetenv("xquery_backend") != NULL) &&
(strcmp(GDKgetenv("xquery_backend"),"algebra") == 0)))
- options |= COMPILE_OPTION_ALGEBRA;
-#else /* ALGEBRA_IS_DEFAULT */
- if (((ctx->mode & XQ_MILPRINT_SUMMER) == 0) && \
- (((ctx->mode & XQ_ALGEBRA) != 0) || \
- (GDKgetenv("xquery_backend") == NULL) ||
(strcmp(GDKgetenv("xquery_backend"),"milprint_summer") != 0)))
- options |= COMPILE_OPTION_ALGEBRA;
-#endif
MT_set_lock(pf_compiler_lock, "xquery_compile_exec");
if (is_url) {
@@ -4910,7 +4898,7 @@
strcpy(mod->url, url);
mod->nsurl = mod->url + url_len;
- ret = xquery_compile_exec(ctx, url, 1, &mod->prologue, NULL,
&mod->epilogue, mod->nsurl);
+ ret = xquery_compile_exec(ctx, 0, url, 1, &mod->prologue, NULL,
&mod->epilogue, mod->nsurl);
if (!ret) {
xquery_module_free(mod);
return NULL;
@@ -5745,9 +5733,22 @@
char *sec1 = NULL;
char *sec2 = NULL;
char *sec3 = NULL;
+ int options = 0;
/* compile and execute the query (minus module imports) */
err = xquery_nondescriptive_error;
- if (xquery_compile_exec(ctx, query, 0, &sec1, &sec2, &sec3, NULL))
+ /* Setting the Algebra flag; server setting overules compile-time default;
client choice overrules server setting */
+#if MILPRINT_SUMMER_IS_DEFAULT
+ if (((ctx->mode & XQ_ALGEBRA) != 0) || \
+ (((ctx->mode & XQ_MILPRINT_SUMMER) == 0) && \
+ (GDKgetenv("xquery_backend") != NULL) &&
(strcmp(GDKgetenv("xquery_backend"),"algebra") == 0)))
+ options = COMPILE_OPTION_ALGEBRA;
+#else /* ALGEBRA_IS_DEFAULT */
+ if (((ctx->mode & XQ_MILPRINT_SUMMER) == 0) && \
+ (((ctx->mode & XQ_ALGEBRA) != 0) || \
+ (GDKgetenv("xquery_backend") == NULL) ||
(strcmp(GDKgetenv("xquery_backend"),"milprint_summer") != 0)))
+ options = COMPILE_OPTION_ALGEBRA;
+#endif
+ if (xquery_compile_exec(ctx, options, query, 0, &sec1, &sec2, &sec3,
NULL))
err = NULL;
if (sec1) free(sec1);
if (sec2) free(sec2);
U pf_support.mx
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -d -r1.301 -r1.302
--- pf_support.mx 10 Jun 2008 09:22:17 -0000 1.301
+++ pf_support.mx 17 Jun 2008 17:07:27 -0000 1.302
@@ -8373,7 +8373,7 @@
BUNins(*res, &docpre, &docid[j], FALSE);
/* skip all nodes of this document */
- docpre = docpre + size[docpre];
+ docpre = docpre + size[docpre] + 1;
for (delta = (n-i) >> 4; delta > 40; delta >>= 4)
while (i+delta < n && * (oid *) BUNtail(inputi, i+delta) <= docpre)
i += delta;
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins