Update of /cvsroot/monetdb/pathfinder/runtime
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10365
Modified Files:
Tag: XQuery_0-18
pf_support.mx
Log Message:
Fix a bug which happened when more data is inserted than there is
space for on a page, but not so much that it doesn't fit when the data
below the insert point and before the hole at the end is moved to the
new page.
This fixes bug [ 1760811 ] XQ: illegal offsets in swizzle.
Index: pf_support.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v
retrieving revision 1.244.2.5
retrieving revision 1.244.2.6
diff -u -d -r1.244.2.5 -r1.244.2.6
--- pf_support.mx 26 Jul 2007 11:04:54 -0000 1.244.2.5
+++ pf_support.mx 26 Jul 2007 16:36:37 -0000 1.244.2.6
@@ -3618,7 +3618,12 @@
var pgstart := oid(lng(lastpage) << REMAP_PAGE_BITS);
# (insertsize - datasize - holeatend) is what gets inserted
after the current page;
# ANDing that with REMAP_PAGE_MASK gives us how much gets
inserted on the last page
- cpwhere_rid := oid(int(pgstart) + (((insertsize - datasize) -
holeatend) and int(REMAP_PAGE_MASK)));
+ if (insertsize <= (datasize + holeatend)) {
+ # no new data needs to go to the new page, just move the old
data to the start of the new page
+ cpwhere_rid := pgstart;
+ } else {
+ cpwhere_rid := oid(int(pgstart) + (((insertsize - datasize) -
holeatend) and int(REMAP_PAGE_MASK)));
+ }
if (cpwhere_rid > pgstart) {
# fix up hole at start of last page since it doesn't
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins