Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3357

Modified Files:
      Tag: XQuery_0-18
        pathfinder.mx pf_support.mx 
Log Message:
- give an error when trying to update documents with a pftijah text index



Index: pathfinder.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pathfinder.mx,v
retrieving revision 1.367.2.8
retrieving revision 1.367.2.9
diff -u -d -r1.367.2.8 -r1.367.2.9
--- pathfinder.mx       11 Jun 2007 21:56:43 -0000      1.367.2.8
+++ pathfinder.mx       12 Jun 2007 12:27:22 -0000      1.367.2.9
@@ -72,6 +72,8 @@
 const XQUERY_STATUS_READY        := 3; 
 var xquery_status := XQUERY_STATUS_INITIALIZING;
 
+proc tj_is_indexed(str name) : bit { return false; } # dummy function in case 
we have no tijah
+
 var CATCH_module_pftiah := CATCH(module("pftijah")); # load pftijah only if 
available
 if (not(isnil(CATCH_module_pftiah))) {
     if (trim(CATCH_module_pftiah) != "!ERROR: moduleClient: module(pftijah) 
load error.") {

Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.244.2.2
retrieving revision 1.244.2.3
diff -u -d -r1.244.2.2 -r1.244.2.3
--- pf_support.mx       6 Jun 2007 21:25:36 -0000       1.244.2.2
+++ pf_support.mx       12 Jun 2007 12:27:25 -0000      1.244.2.3
@@ -2582,6 +2582,12 @@
     ERROR("updating transient container.\n");
   }
 
+  # we currently cannot update collections that have a pftijah text index
+  var conflict := 
[tj_is_indexed](affected_conts.leftjoin(ws.fetch(CONT_NAME)).reverse().mirror()).uselect(true);
+  if (count(conflict) > 0) {
+    ERROR("cannot update text-indexed collection %s (%s such errors).\n", 
reverse(conflict).fetch(0), count(confict));
+  }
+
   # check that all containers are updatable (i.e. that none are read-only)
   if ([ttype](affected_conts.join(ws.fetch(MAP_PID))).uselect(void).count() > 
0) {
     ERROR("updating read-only document.\n");


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to