Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19290/runtime
Modified Files:
Tag: PF_ROX
pathfinder.mx pf_support.mx
Log Message:
propagated changes of Tuesday Jun 17 2008 - Thursday Jun 19 2008
from the development trunk to the PF_ROX branch
U pathfinder.mx
Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.395.2.24
retrieving revision 1.395.2.25
diff -u -d -r1.395.2.24 -r1.395.2.25
--- pathfinder.mx 17 Jun 2008 00:25:06 -0000 1.395.2.24
+++ pathfinder.mx 19 Jun 2008 15:54:29 -0000 1.395.2.25
@@ -2506,7 +2506,7 @@
# register the newly opened documents
open_name.append(docpre_nme.tmark([EMAIL PROTECTED]));
open_cont.append(docpre_nme.tmark([EMAIL PROTECTED]).project(cont));
- open_docid.append(docpre_nme.hmark([EMAIL PROTECTED]));
+ open_docid.append(docpre_nme.hmark([EMAIL
PROTECTED]).leftjoin(reverse(frag_root)));
}
return assert_order(any_pre);
}
@@ -4314,7 +4314,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
*
@@ -4413,6 +4413,7 @@
extern char* PFmaxstack;
static int
xquery_compile_exec(xquery_client *ctx,
+ int options,
char* url,
int is_url,
char** prologue,
@@ -4424,22 +4425,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) {
@@ -4987,7 +4975,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;
@@ -5825,9 +5813,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);
@@ -6232,7 +6233,12 @@
#if MILPRINT_SUMMER_IS_DEFAULT
GDKsetenv("xquery_backend","milprint_summer");
#else /* ALGEBRA_IS_DEFAULT */
- GDKsetenv("xquery_backend","algebra");
+ if ((GDKgetenv("standoff") != NULL) &&
(strcmp(GDKgetenv("standoff"),"enabled") == 0)) {
+ /* Algebra back-end does not support StandOff extensions, yet */
+ GDKsetenv("xquery_backend","milprint_summer");
+ } else {
+ GDKsetenv("xquery_backend","algebra");
+ }
#endif
}
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.277.4.21
retrieving revision 1.277.4.22
diff -u -d -r1.277.4.21 -r1.277.4.22
--- pf_support.mx 10 Jun 2008 14:47:44 -0000 1.277.4.21
+++ pf_support.mx 19 Jun 2008 15:54:30 -0000 1.277.4.22
@@ -8964,7 +8964,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