Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16:/tmp/cvs-serv4686/runtime

Modified Files:
        pf_support.mx 
Log Message:
Only do something to ancestor node sizes for ancestors that are not on
modified pages.
This fixes bug 1706640 for which we also provide corrected output.


Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.216
retrieving revision 1.217
diff -u -d -r1.216 -r1.217
--- pf_support.mx       22 Apr 2007 11:15:06 -0000      1.216
+++ pf_support.mx       25 Apr 2007 12:52:39 -0000      1.217
@@ -2828,6 +2828,13 @@
     # compute the size-delta on the ancestors of modified nodes, and apply 
those to the recent masters (and LOG it) 
     var sel_ancestor_nid := 
ws.fetch(ANCESTOR_NID).reverse().uselect(cont).hmark([EMAIL PROTECTED]); # 
[i,NID]
     var anc_rid := sel_ancestor_nid.leftjoin(ws.fetch(NID_RID).find(cont));
+    # filter out ancestors that are on modified pages
+    var modified_page := ws.fetch(MODIFIED_PAGE).reverse().select(cont); # 
[PGID,cont]
+    var anc_pgid := [oid]([>>]([lng](anc_rid), REMAP_PAGE_BITS));
+    var anc := anc_pgid.outerjoin(modified_page).uselect(oid_nil).mirror();
+    sel_ancestor_nid := anc.leftfetchjoin(sel_ancestor_nid).tmark([EMAIL 
PROTECTED]);
+    anc_rid := anc.leftfetchjoin(anc_rid).tmark([EMAIL PROTECTED]);
+
     var anc_oldsize := [swizzle](anc_rid, 
ws.fetch(MAP_PID).find(cont)).join(ws.fetch(PRE_SIZE).find(cont));
         
anc_rid.access(BAT_WRITE).replace(sel_ancestor_nid.join(ws.fetch(NID_RID_UPDATE).find(cont)));
     var anc_newsize := anc_rid.leftjoin(ws.fetch(RID_SIZE_UPDATE).find(cont));
@@ -3042,17 +3049,17 @@
 
   # separate out attribute
   var types := update_insert_node_kind.get_types();
-  var attrs := types.ord_uselect(ATTR);
-  var elems := types.ord_uselect(ELEM);
+  var attributes := types.ord_uselect(ATTR);
+  var elements := types.ord_uselect(ELEM);
 
-  if ((attrs.count() + elems.count()) != types.count()) {
+  if ((attributes.count() + elements.count()) != types.count()) {
     ERROR("node must be of type ELEMENT or ATTRIBUTE\n");
   }
 
-  if (attrs.count() > 0) {
+  if (attributes.count() > 0) {
     # insert attributes into node
-    attrs := attrs.mirror(); # [i.i]
-    var attrconts := attrs.leftjoin(batdoccont);
+    attributes := attributes.mirror(); # [i.i]
+    var attrconts := attributes.leftjoin(batdoccont);
     attrconts.tunique()@batloop() {
       var cont := $h;
 
@@ -3109,14 +3116,14 @@
     }
   }
 
-  if (elems.count() > 0) {
+  if (elements.count() > 0) {
     # insert new nodes
-    elems := elems.mirror(); # [i,i]
+    elements := elements.mirror(); # [i,i]
     var modified_nid := ws.fetch(MODIFIED_NID);
     var ancestor_nid := ws.fetch(ANCESTOR_NID);
     var new_page := ws.fetch(NEW_PAGE);
     # one at a time
-    elems.leftjoin(update_insert_node_item)@batloop() {
+    elements.leftjoin(update_insert_node_item)@batloop() {
 #       if (debug) printf("\nstart of loop for argument %d\n", int($h));
       # insertcont - container from which to insert an element
       # insertitem - item to insert


-------------------------------------------------------------------------
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