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

xid.c: XIDdecompress(): added sanity check for BATcount()


diffs (19 lines):

diff --git a/monetdb5/modules/mal/xid.c b/monetdb5/modules/mal/xid.c
--- a/monetdb5/modules/mal/xid.c
+++ b/monetdb5/modules/mal/xid.c
@@ -315,6 +315,7 @@ XIDdecompress(Client cntxt, MalBlkPtr mb
                BBPreleaseref(b->batCacheid);
                throw(MAL, "xid.decompress", MAL_MALLOC_FAIL);
        }
+       BATsetcount(bn, 0);
 
        if ( b->T->heap.xidcompressed )
        {
@@ -360,6 +361,7 @@ XIDdecompress(Client cntxt, MalBlkPtr mb
                mnstr_printf(cntxt->fdout,"#xid, %d, decompress, " BUNFMT ", " 
BUNFMT " , clk " LLFMT " usec\n",
                        getArg(pci,1), lim, cnt, GDKusec()-clk);
 
+               assert(BATcount(bn) == 0 || BATcount(bn) == cnt);
                BATsetcount(bn, cnt);
                bn->batDirty =1;
        }
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to