Changeset: 16d7c5ac8a62 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16d7c5ac8a62
Modified Files:
gdk/gdk_heap.c
gdk/gdk_sample.c
monetdb5/modules/mal/tablet.c
sql/test/BugTracker/Tests/set_sql_debug_64__breaking_the_DB.SF-1906287.stable.out
Branch: mutation
Log Message:
Merge with default
diffs (51 lines):
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -489,6 +489,7 @@ GDKupgradevarheap(COLrec *c, var_t v, in
var_t *pv;
#endif
size_t i, n;
+ size_t savefree;
assert(c->heap.parentid == 0);
assert(width != 0);
@@ -505,8 +506,13 @@ GDKupgradevarheap(COLrec *c, var_t v, in
* free value at the end; otherwise only copy the area
* indicated by the "free" pointer */
n = (copyall ? c->heap.size : c->heap.free) >> c->shift;
+ savefree = c->heap.free;
+ if (copyall)
+ c->heap.free = c->heap.size;
if (HEAPextend(&c->heap, (c->heap.size >> c->shift) << shift) < 0)
return GDK_FAIL;
+ if (copyall)
+ c->heap.free = savefree;
/* note, cast binds more closely than addition */
pc = (unsigned char *) c->heap.base + n;
ps = (unsigned short *) c->heap.base + n;
diff --git a/gdk/gdk_sample.c b/gdk/gdk_sample.c
--- a/gdk/gdk_sample.c
+++ b/gdk/gdk_sample.c
@@ -101,8 +101,8 @@ BATsample(BAT *b, BUN n)
BATkey(BATmirror(bn), BATtkey(b));
bn->H->seq = b->H->seq;
bn->T->seq = b->T->seq;
- bn->H->nil = b->H->nonil;
- bn->T->nil = b->T->nonil;
+ bn->H->nil = b->H->nil;
+ bn->T->nil = b->T->nil;
bn->H->nonil = b->H->nonil;
bn->T->nonil = b->T->nonil;
BATsetcount(bn, n);
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -169,7 +169,7 @@ TABLETadt_toStr(void *extra, char **buf,
}
l = (int) strlen(src);
if (l + 3 > *len) {
- GDKfree(buf);
+ GDKfree(*buf);
*len = 2 * l + 3;
*buf = GDKzalloc(*len);
}
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list