Changeset: d2c890d6f159 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d2c890d6f159
Modified Files:
        gdk/gdk_storage.c
Branch: Jan2022
Log Message:

Merge with Jul2021 branch.


diffs (25 lines):

diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -892,7 +892,9 @@ BATload_intern(bat bid, bool lock)
        /* LOAD bun heap */
        if (b->ttype != TYPE_void) {
                b->theap->storage = b->theap->newstorage = STORE_INVALID;
-               if (HEAPload(b->theap, b->theap->filename, NULL, 
b->batRestricted == BAT_READ) != GDK_SUCCEED) {
+               if ((b->batCount == 0 ?
+                    HEAPalloc(b->theap, b->batCapacity, b->twidth, 
ATOMsize(b->ttype)) :
+                    HEAPload(b->theap, b->theap->filename, NULL, 
b->batRestricted == BAT_READ)) != GDK_SUCCEED) {
                        HEAPfree(b->theap, false);
                        return NULL;
                }
@@ -909,7 +911,9 @@ BATload_intern(bat bid, bool lock)
        /* LOAD tail heap */
        if (ATOMvarsized(b->ttype)) {
                b->tvheap->storage = b->tvheap->newstorage = STORE_INVALID;
-               if (HEAPload(b->tvheap, nme, "theap", b->batRestricted == 
BAT_READ) != GDK_SUCCEED) {
+               if ((b->tvheap->free == 0 ?
+                    ATOMheap(b->ttype, b->tvheap, b->batCapacity) :
+                    HEAPload(b->tvheap, nme, "theap", b->batRestricted == 
BAT_READ)) != GDK_SUCCEED) {
                        HEAPfree(b->theap, false);
                        HEAPfree(b->tvheap, false);
                        return NULL;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to