Changeset: e6864601d4ab for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e6864601d4ab
Modified Files:
gdk/gdk_batop.mx
Branch: Apr2011
Log Message:
Fix for appending string heaps.
When appending string heaps, append after the "free" instead of the
"size" of the heap. The "size" may be much larger than the actual
used area of the heap (which is indicated with "free"), so appending
after it may result in large holes in the string heap.
This fix should finally resolve bug 2820 since we now no longer need
more than 1.5 TB of disk space to run the update queries.
diffs (18 lines):
diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx
--- a/gdk/gdk_batop.mx
+++ b/gdk/gdk_batop.mx
@@ -98,11 +98,13 @@
(!GDK_ELIMDOUBLES(b->@2->vheap) || b->batCount == 0) &&
!GDK_ELIMDOUBLES(n->@2->vheap) &&
b->@2->vheap->hashash == n->@2->vheap->hashash &&
+ /* if needs to be kept unique, take slow path */
(b->@1key & BOUND2BTRUE) == 0 &&
+ /* if view, only copy if significant part of parent is used */
(VIEW@1parent(n) == 0 ||
BATcapacity(BBP_cache(VIEW@1parent(n))) < 2 * BATcount(n))) {
/* append string heaps */
- @1off = b->batCount == 0 ? 0 : b->@2->vheap->size;
+ @1off = b->batCount == 0 ? 0 : b->@2->vheap->free;
/* make sure we get alignment right */
@1off = (@1off + GDK_VARALIGN - 1) & ~(GDK_VARALIGN - 1);
assert(((@1off >> GDK_VARSHIFT) << GDK_VARSHIFT) == @1off);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list