Changeset: 803f7c80241f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=803f7c80241f Modified Files: gdk/gdk_batop.mx gdk/gdk_logger.mx sql/storage/store.c Branch: default Log Message:
Merge with Apr2011 branch. diffs (56 lines): diff --git a/gdk/ChangeLog.Apr2011 b/gdk/ChangeLog.Apr2011 --- a/gdk/ChangeLog.Apr2011 +++ b/gdk/ChangeLog.Apr2011 @@ -1,6 +1,10 @@ # ChangeLog file for MonetDB # This file is updated with Maddlog +* Sat Jul 9 2011 Sjoerd Mullender <[email protected]> +- Fixed a problem where appending string BATs could cause enormous growth + of the string heap. This fixes bug 2820. + * Wed Jun 29 2011 Sjoerd Mullender <[email protected]> - Fixes to memory detection on FreeBSD. diff --git a/gdk/gdk_batop.mx b/gdk/gdk_batop.mx --- a/gdk/gdk_batop.mx +++ b/gdk/gdk_batop.mx @@ -99,11 +99,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); diff --git a/gdk/gdk_logger.mx b/gdk/gdk_logger.mx --- a/gdk/gdk_logger.mx +++ b/gdk/gdk_logger.mx @@ -804,7 +804,7 @@ if (!lg->log || mnstr_errnr(lg->log)) { if (lg->log) mnstr_destroy(lg->log); - + lg->log = NULL; return 0; } while (!err && log_read_format(lg, &l)) { diff --git a/sql/storage/store.c b/sql/storage/store.c --- a/sql/storage/store.c +++ b/sql/storage/store.c @@ -1575,6 +1575,8 @@ if (logging && res == LOG_OK) res = logger_funcs.cleanup(); logging = 0; + if (res != LOG_OK) + GDKfatal("write-ahead logging failure, disk full?"); } } _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
