Changeset: 3fbef4252009 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3fbef4252009
Modified Files:
        gdk/gdk_batop.c
        monetdb5/modules/mal/mat.c
Branch: default
Log Message:

Merge with Jul2015 branch.


diffs (27 lines):

diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -103,7 +103,7 @@ insert_string_bat(BAT *b, BAT *n, int ap
                        /* If b is in the transient farm (i.e. b will
                         * never become persistent), we try some
                         * clever tricks to avoid copying:
-                        * - if b is empty, we just let is share the
+                        * - if b is empty, we just let it share the
                          *   string heap with n;
                         * - otherwise, if b's string heap and n's
                          *   string heap are the same (i.e. shared),
diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -148,8 +148,9 @@ MATpackIncrement(Client cntxt, MalBlkPtr
                bn = BATnew(TYPE_void, b->ttype?b->ttype:TYPE_oid, (BUN)(1.2 * 
BATcount(b) * pieces), TRANSIENT);
                if (bn == NULL)
                        throw(MAL, "mat.pack", MAL_MALLOC_FAIL);
-               /* allocate enough space for the strings */
-               if ( b->T->vheap && bn->T->vheap ){
+               /* allocate enough space for the vheap, but not for strings,
+                * since BATappend does clever things for strings */
+               if ( b->T->vheap && bn->T->vheap && ATOMstorage(b->ttype) != 
TYPE_str){
                        newsize =  b->T->vheap->size * pieces;
                        if (HEAPextend(bn->T->vheap, newsize, TRUE) != 
GDK_SUCCEED)
                                throw(MAL, "mat.pack", MAL_MALLOC_FAIL);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to