Changeset: cd9f34c1ef4a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cd9f34c1ef4a
Modified Files:
gdk/gdk_bat.c
gdk/gdk_batop.c
Branch: Jul2017
Log Message:
Destroy BAT properties when changing the BAT.
diffs (60 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -505,6 +505,8 @@ BATclear(BAT *b, int force)
HASHdestroy(b);
IMPSdestroy(b);
OIDXdestroy(b);
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
/* we must dispose of all inserted atoms */
if (force && BATatoms[b->ttype].atomDel == NULL) {
@@ -1055,6 +1057,8 @@ BUNappend(BAT *b, const void *t, bit for
IMPSdestroy(b); /* no support for inserts in imprints yet */
OIDXdestroy(b);
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
if (b->thash == (Hash *) 1) {
/* don't bother first loading the hash to then change it */
HASHdestroy(b);
@@ -1118,6 +1122,8 @@ BUNdelete(BAT *b, oid o)
IMPSdestroy(b);
OIDXdestroy(b);
HASHdestroy(b);
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
return GDK_SUCCEED;
}
@@ -1155,6 +1161,8 @@ BUNinplace(BAT *b, BUN p, const void *t,
b->tnil = 0;
}
HASHdestroy(b);
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
Treplacevalue(b, BUNtloc(bi, p), t);
tt = b->ttype;
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -490,6 +490,8 @@ BATappend(BAT *b, BAT *n, BAT *s, bit fo
IMPSdestroy(b); /* imprints do not support updates yet */
OIDXdestroy(b);
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
if (b->thash == (Hash *) 1 || BATcount(b) == 0) {
/* don't bother first loading the hash to then change
* it, or updating the hash if we replace the heap */
@@ -749,6 +751,8 @@ BATdel(BAT *b, BAT *d)
/* not sure about these anymore */
b->tnosorted = b->tnorevsorted = 0;
b->tnokey[0] = b->tnokey[1] = 0;
+ PROPdestroy(b->tprops);
+ b->tprops = NULL;
return GDK_SUCCEED;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list