Changeset: 32935e5e09fb for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=32935e5e09fb
Modified Files:
monetdb5/modules/mal/mat.c
Branch: Jul2015
Log Message:
Don't extend string heaps since they may get replaced due to sharing.
This fixes bug 3789.
diffs (15 lines):
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
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list