Changeset: c1645df88b58 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c1645df88b58
Modified Files:
        gdk/gdk_bat.c
Branch: Oct2014
Log Message:

Reinitialize vheap in BATclear when force flag given.
This stops the vheap growing indefinitely in the SQL context when all
values get deleted from a table.
Fix suggested by Richard Hughes.


diffs (19 lines):

diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -534,13 +534,13 @@ BATclear(BAT *b, int force)
        IMPSdestroy(b);
 
        /* we must dispose of all inserted atoms */
-       if (b->batDeleted == b->batInserted &&
+       if ((b->batDeleted == b->batInserted || force) &&
            BATatoms[b->htype].atomDel == NULL &&
            BATatoms[b->ttype].atomDel == NULL) {
                Heap hh, th;
 
                /* no stable elements: we do a quick heap clean */
-               /* need to clean heap which keep data even though the
+               /* need to clean heap which keeps data even though the
                   BUNs got removed. This means reinitialize when
                   free > 0
                */
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to