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

Defense line and windows dll fix


diffs (82 lines):

diff --git a/monetdb5/modules/mosaic/mosaic.c b/monetdb5/modules/mosaic/mosaic.c
--- a/monetdb5/modules/mosaic/mosaic.c
+++ b/monetdb5/modules/mosaic/mosaic.c
@@ -45,6 +45,7 @@ MOSinit(MOStask task, BAT *b){
        if( isVIEW(b))
                b= BATdescriptor(VIEWtparent(b));
        assert(b);
+       assert( b->tmosaic);
        base = b->tmosaic->base;
        assert(base);
        task->type = b->ttype;
@@ -87,6 +88,8 @@ MOSlayout(Client cntxt, BAT *b, BAT *bte
        if( task == NULL)
                throw(SQL,"mosaic",MAL_MALLOC_FAIL);
 
+       if( b->tmosaic == NULL)
+                       throw(MAL,"mosaic.layout","Compression heap missing");
        if(compressionscheme){
                //create a tempory compressed column 
                for( i = 0; i< MOSAIC_METHODS; i++)
@@ -290,7 +293,7 @@ inheritCOL( BAT *bn, COLrec *cn, BAT *b,
  * sequence is found with high compression factor.
  */
 static int
-MOSoptimizer(Client cntxt, MOStask task, int typewidth)
+MOSoptimizerCost(Client cntxt, MOStask task, int typewidth)
 {
        int cand = MOSAIC_NONE;
        float ratio = 1.0, fac = 1.0;
@@ -427,7 +430,7 @@ MOScompressInternal(Client cntxt, bat *r
 
        while(task->start < task->stop ){
                // default is to extend the non-compressed block with a single 
element
-               cand = MOSoptimizer(cntxt, task, typewidth);
+               cand = MOSoptimizerCost(cntxt, task, typewidth);
                if( task->dst >= bsrc->tmosaic->base + bsrc->tmosaic->size - 16 
){
                        MOSdestroy(bsrc);
                        msg= createException(MAL,"mosaic","abort compression 
due to size");
@@ -1644,7 +1647,7 @@ MOSanalyse(Client cntxt, MalBlkPtr mb, M
 }
 
 str
-MOSoptimize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
+MOSoptimizer(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
        MOStask task;
        int cases;
diff --git a/monetdb5/modules/mosaic/mosaic.h b/monetdb5/modules/mosaic/mosaic.h
--- a/monetdb5/modules/mosaic/mosaic.h
+++ b/monetdb5/modules/mosaic/mosaic.h
@@ -246,7 +246,7 @@ mosaic_export str MOSlayout(Client cntxt
 mosaic_export str MOSsliceInternal(Client cntxt, bat *slices, BUN size, BAT 
*b);
 mosaic_export int MOSanalyseInternal(Client cntxt, int threshold, MOStask 
task, bat bid);
 mosaic_export void MOSanalyseReport(Client cntxt, BAT *b, BAT *btech, BAT 
*output, BAT *factor, BAT *run, str compressions);
-mosaic_export str MOSoptimize(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
+mosaic_export str MOSoptimizer(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 mosaic_export str MOSslice(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
 mosaic_export void MOSblk(MosaicBlk blk);
 mosaic_export BUN MOSlimit(void);
diff --git a/monetdb5/modules/mosaic/mosaic.mal 
b/monetdb5/modules/mosaic/mosaic.mal
--- a/monetdb5/modules/mosaic/mosaic.mal
+++ b/monetdb5/modules/mosaic/mosaic.mal
@@ -33,16 +33,16 @@ address MOSanalyse
 comment "Apply default heap compression on a specific column";
 
 pattern optimize(bid:int)
-address MOSoptimize
+address MOSoptimizer
 comment "Perform a search thru the compression space using depth 1";
 
 pattern optimize(bid:int)
-address MOSoptimize
+address MOSoptimizer
 comment "Perform a search thru the compression space using up to 2^ply
 candidate combinations";
 
 pattern optimize(bid:int, blk:int)
-address MOSoptimize
+address MOSoptimizer
 comment "Perform a search thru the compression space using up to 2^ply
 candidate combinations and blk*1000 blocksize limits";
 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to