Changeset: 8d5f25da57fe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8d5f25da57fe
Modified Files:
        monetdb5/modules/mal/orderidx.c
Branch: default
Log Message:

Remove BUN_MSK bit from copy of orderidx.


diffs (25 lines):

diff --git a/monetdb5/modules/mal/orderidx.c b/monetdb5/modules/mal/orderidx.c
--- a/monetdb5/modules/mal/orderidx.c
+++ b/monetdb5/modules/mal/orderidx.c
@@ -206,6 +206,8 @@ OIDXgetorderidx(Client cntxt, MalBlkPtr 
        BAT *bn;
        bat *ret = getArgReference_bat(stk,pci,0);
        bat bid = *getArgReference_bat(stk, pci, 1);
+       const oid *s, *se;
+       oid *d;
 
        (void) cntxt;
        (void) mb;
@@ -223,7 +225,11 @@ OIDXgetorderidx(Client cntxt, MalBlkPtr 
                BBPunfix(b->batCacheid);
                throw(MAL, "bat.getorderidx", MAL_MALLOC_FAIL);
        }
-       memcpy(Tloc(bn, BUNfirst(bn)), (const oid *) b->torderidx->base + 
ORDERIDXOFF, BATcount(b) * sizeof(oid));
+       s = (const oid *) b->torderidx->base + ORDERIDXOFF;
+       se = s + BATcount(b);
+       d = (oid *) Tloc(bn, BUNfirst(bn));
+       while (s < se)
+                        *d++ = *s++ & ~BUN_MSK;
        BATsetcount(bn, BATcount(b));
        BATseqbase(bn, 0);
        bn->tkey = 1;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to