Update of /cvsroot/monetdb/pathfinder/runtime
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28736/runtime

Modified Files:
        pathfinder.mx 
Log Message:
propagated changes of Sunday Nov 15 2009
from the Nov2009 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/15 - boncz: runtime/pathfinder.mx,1.462.4.9
  modified the disable of MPS (which was until recently still used by queries 
that triggered the module cache)
  - it remains disabled, but queries that explicitly request MPS now again get 
the module code again
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/15 - boncz: runtime/pathfinder.mx,1.462.4.10
  - fix in my change earlier today
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.471
retrieving revision 1.472
diff -u -d -r1.471 -r1.472
--- pathfinder.mx       12 Nov 2009 08:39:42 -0000      1.471
+++ pathfinder.mx       15 Nov 2009 23:00:50 -0000      1.472
@@ -5917,7 +5917,6 @@
     return p+1;
 }
 
-#ifdef XQUERY_PREPARE 
 /* 
  * parse an XML datamodel numeric, and determine its minimal type (xs:integer, 
xs:decimal or xs:double) 
  */
@@ -5950,7 +5949,6 @@
  * from a cached MIL tree. Otherwise use pathfinder to compile. Returns error 
string (NULL if ok).
  */
 static char xquery_too_complex[80] = "xquery_prepare: xquery is too complex 
for cached execution.\n";
-#endif
 #define xquery_nondescriptive_error ((char*) -1)
 
 static char*
@@ -5959,11 +5957,24 @@
                char* query) 
 {
     char *err = NULL;
-#ifdef XQUERY_PREPARE 
     int nsbuf = 0, loaded_modules = 0, len;
     char *ns = (char*)&nsbuf, *nsend = ns, *locend, *loc = NULL, *q, *p = 
query;
     char val[1024], url1[1024], url2[1024];
 
+    /* Setting the Algebra flag; server setting overules compile-time default; 
client choice overrules server setting */
+    int options = 0;
+#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 (options != COMPILE_OPTION_ALGEBRA) {
     if (ctx->mode&XQ_DEBUG) {
         /* for debugging purposes, we simulate a full MIL on the log; even if 
parts are cached */
         char *prologue = (char*) PFinitMIL();
@@ -6145,29 +6156,15 @@
      */
     if (err == xquery_function_error) /* MIL execution failed, do not generate 
error in PF compiler */
        return xquery_nondescriptive_error;
-    if (err) 
-#else
-    (void) usec;
-#endif
-    {
+} else {
+    err = xquery_nondescriptive_error;
+}
+    if (err) {
         char *sec1 = NULL;
         char *sec2 = NULL;
         char *sec3 = NULL;
-        int options = 0;
         /* compile and execute the query (minus module imports) */
         err = xquery_nondescriptive_error;
-    /* 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);


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to