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

xid.c: XIDcompress(): set BATcount to avoid (incorrect) trivial property 
derival with BATcount() == 0


diffs (28 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
@@ -173,6 +173,7 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
                BBPreleaseref(b->batCacheid);
                throw(MAL,"xid.compress", MAL_MALLOC_FAIL);
        }
+       BATsetcount(bn, 0);
 
        if ( tt == TYPE_oid){
                p = (oid*)Tloc(b,BUNfirst(b));
@@ -196,6 +197,7 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
                mnstr_printf(cntxt->fdout,"#xid, %d, tail compress, " BUNFMT 
"," BUNFMT ",  clk " LLFMT " usec\n",
                        getArg(pci,0), BATcount(b), i, GDKusec()-clk);
 
+               BATsetcount(bn, MAX(i+1, BATcount(bn)));
                bn->T->heap.xidcompressed = 1;
                bn->batDirty =1;
        }
@@ -228,6 +230,8 @@ XIDcompress(Client cntxt, MalBlkPtr mb, 
                col[0].value = (xid)(i+1); /* keep compression size */
                mnstr_printf(cntxt->fdout,"#xid, %d, head compress, " BUNFMT 
"," BUNFMT ",  clk " LLFMT " usec\n",
                        getArg(pci,0), BATcount(b), i, GDKusec()-clk);
+
+               BATsetcount(bn, MAX(i+1, BATcount(bn)));
                bn->H->heap.xidcompressed = 1;
                bn->batDirty =1;
        }
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to