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

Modified Files:
      Tag: XQuery_0-20
        pf_support.mx 
Log Message:
Fix RID/PRE confusion.
This fixes the immune_for_updates.SF-1766259 bug.


Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.267.2.2
retrieving revision 1.267.2.3
diff -u -d -r1.267.2.2 -r1.267.2.3
--- pf_support.mx       11 Nov 2007 13:23:43 -0000      1.267.2.2
+++ pf_support.mx       7 Dec 2007 14:16:29 -0000       1.267.2.3
@@ -2376,7 +2376,7 @@
         if (rid_nid_update.exist(from_rid)) {
           from_nid := rid_nid_update.find(from_rid);
         } else {
-          from_nid := pre_nid.find(swizzle(from_rid, map_pid_update));
+          from_nid := pre_nid.find(swizzle(from_rid, map_pid));
         }
       } else {
         from_nid := rid_nid.find(from_rid);
@@ -2413,7 +2413,7 @@
     # now figure out which ancestors *end* at the hole
     var ancestors_end := [oid]([+]([lng](ancestors_newpre), ancestors_size));
     # select those that end in the data being moved
-    var cands := ancestors_end.uselect(from_rid, last);
+    var cands := ancestors_end.uselect(swizzle(from_rid, map_pid_update), 
swizzle(last, map_pid_update));
     if (cands.count() > 0) {
       var new_size := [+](cands.mirror().join(ancestors_size), delta);
       var old_page := ancestors_isnewpage.uselect(false);
@@ -2428,7 +2428,7 @@
       ancestor_nid.insert(cands.project(cont).reverse().join(ancestors_nid));
     }
     # select those that end in the hole being overwritten
-    var cands := ancestors_end.uselect(holefirst, holelast);
+    var cands := ancestors_end.uselect(swizzle(holefirst, map_pid_update), 
swizzle(holelast, map_pid_update));
     if (cands.count() > 0) {
       # clamp to edge
       var new_size := [int](cands.mirror().join(ancestors_newrid)); # not 
really, yet
@@ -3675,11 +3675,11 @@
               } else {
                 var cpend_rid := oid((lng(cpstart_rid) + cpsize) - 1);
                 extend_protect(ws, doccont);
-                rid_size_data := rid_size.reverse().select(cpstart_rid, 
cpend_rid).reverse();
-                rid_level_data := rid_level.reverse().select(cpstart_rid, 
cpend_rid).reverse();
-                rid_kind_data := rid_kind.reverse().select(cpstart_rid, 
cpend_rid).reverse();
-                rid_prop_data := rid_prop.reverse().select(cpstart_rid, 
cpend_rid).reverse();
-                rid_nid_data := rid_nid.reverse().select(cpstart_rid, 
cpend_rid).reverse();
+                rid_size_data := rid_size.reverse().select(cpstart_rid, 
cpend_rid).reverse().copy();
+                rid_level_data := rid_level.reverse().select(cpstart_rid, 
cpend_rid).reverse().copy();
+                rid_kind_data := rid_kind.reverse().select(cpstart_rid, 
cpend_rid).reverse().copy();
+                rid_prop_data := rid_prop.reverse().select(cpstart_rid, 
cpend_rid).reverse().copy();
+                rid_nid_data := rid_nid.reverse().select(cpstart_rid, 
cpend_rid).reverse().copy();
                 extend_unprotect(ws, doccont);
                 # nodes on a new page have already been added to modified_nid 
table
               }


-------------------------------------------------------------------------
SF.Net email is sponsored by: 
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

Reply via email to