Changeset: 1b7c9ab2a295 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b7c9ab2a295 Modified Files: gdk/gdk_batop.c Branch: unlock Log Message:
First check for msk type, only then for dense positions. diffs (49 lines): diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1224,6 +1224,22 @@ BATreplace(BAT *b, BAT *p, BAT *n, bool #endif } } + } else if (ATOMstorage(b->ttype) == TYPE_msk) { + for (BUN i = 0, j = BATcount(p); i < j; i++) { + oid updid = BUNtoid(p, i); + + if (updid < b->hseqbase || updid >= hseqend) { + GDKerror("id out of range\n"); + return GDK_FAIL; + } + updid -= b->hseqbase; + if (!force && updid < b->batInserted) { + GDKerror("updating committed value\n"); + return GDK_FAIL; + } + + mskSetVal(b, updid, mskGetVal(n, i)); + } } else if (BATtdense(p)) { oid updid = BUNtoid(p, 0); @@ -1305,22 +1321,6 @@ BATreplace(BAT *b, BAT *p, BAT *n, bool BATtseqbase(b, n->tseqbase); } } - } else if (ATOMstorage(b->ttype) == TYPE_msk) { - for (BUN i = 0, j = BATcount(p); i < j; i++) { - oid updid = BUNtoid(p, i); - - if (updid < b->hseqbase || updid >= hseqend) { - GDKerror("id out of range\n"); - return GDK_FAIL; - } - updid -= b->hseqbase; - if (!force && updid < b->batInserted) { - GDKerror("updating committed value\n"); - return GDK_FAIL; - } - - mskSetVal(b, updid, mskGetVal(n, i)); - } } else { for (BUN i = 0, j = BATcount(p); i < j; i++) { oid updid = BUNtoid(p, i); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list