Changeset: 51132050777b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=51132050777b
Modified Files:
gdk/gdk_bat.c
Branch: Jul2012
Log Message:
Properly maintain nil property in inplace update.
diffs (18 lines):
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -1642,6 +1642,14 @@ BUNinplace(BAT *b, BUN p, const void *h,
BUN prv, nxt;
ALIGNinp(b, "BUNreplace", force); /* zap alignment info */
+ if (b->T->nil &&
+ atom_CMP(BUNtail(bi, p), ATOMnilptr(b->ttype), b->ttype) ==
0 &&
+ atom_CMP(t, ATOMnilptr(b->ttype), b->ttype) != 0) {
+ /* if old value is nil and new value isn't,
+ * we're not sure anymore about the nil
+ * property, so we must clear it */
+ b->T->nil = 0;
+ }
tacc_update(del,tail,p,pit);
Treplacevalue(b, BUNtloc(bi, p), t);
tacc_update(ins,tail,p,pit);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list