Changeset: dccc5e9a56c7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dccc5e9a56c7 Modified Files: gdk/gdk_bbp.h geom/monetdb5/geom.c monetdb5/extras/rapi/rapi.c monetdb5/extras/rdf/rdfalgebra.c monetdb5/mal/mal_runtime.c monetdb5/modules/atoms/batxml.c monetdb5/modules/atoms/json.c monetdb5/modules/atoms/mtime.c monetdb5/modules/kernel/aggr.c monetdb5/modules/kernel/algebra.c monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/batcolor.c monetdb5/modules/kernel/batmmath.c monetdb5/modules/kernel/batstr.c monetdb5/modules/kernel/counters.c monetdb5/modules/kernel/group.c monetdb5/modules/kernel/status.c monetdb5/modules/mal/batExtensions.c monetdb5/modules/mal/batcalc.c monetdb5/modules/mal/bbp.c monetdb5/modules/mal/calc.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/cluster.c monetdb5/modules/mal/groupby.c monetdb5/modules/mal/inspect.c monetdb5/modules/mal/joinpath.c monetdb5/modules/mal/json_util.c monetdb5/modules/mal/manifold.c monetdb5/modules/mal/mat.c monetdb5/modules/mal/mdb.c monetdb5/modules/mal/mkey.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/querylog.c monetdb5/modules/mal/remote.c monetdb5/modules/mal/sysmon.c monetdb5/modules/mal/tablet.c monetdb5/modules/mal/txtsim.c monetdb5/modules/mal/zorder.c monetdb5/optimizer/opt_mapreduce.c monetdb5/optimizer/opt_pipes.c monetdb5/scheduler/run_octopus.c monetdb5/scheduler/srvpool.c sql/backends/monet5/LSST/lsst.c sql/backends/monet5/UDF/udf.c sql/backends/monet5/bam/bam_db_interface.c sql/backends/monet5/bam/bam_export.c sql/backends/monet5/bam/bam_lib.c sql/backends/monet5/datacell/basket.c sql/backends/monet5/datacell/dcoperator.c sql/backends/monet5/datacell/emitter.c sql/backends/monet5/datacell/petrinet.c sql/backends/monet5/datacell/receptor.c sql/backends/monet5/generator/generator.c sql/backends/monet5/gsl/gsl.c sql/backends/monet5/sql.c sql/backends/monet5/sql_bat2time.c sql/backends/monet5/sql_cast.c sql/backends/monet5/sql_cast_impl_down_from_flt.h sql/backends/monet5/sql_cast_impl_down_from_int.h sql/backends/monet5/sql_cast_impl_up_to_flt.h sql/backends/monet5/sql_cast_impl_up_to_int.h sql/backends/monet5/sql_fround_impl.h sql/backends/monet5/sql_optimizer.c sql/backends/monet5/sql_round_impl.h sql/backends/monet5/vaults/mseed.c Branch: default Log Message:
Merge with Oct2014 branch. diffs (truncated from 6504 to 300 lines): diff --git a/gdk/gdk_bbp.h b/gdk/gdk_bbp.h --- a/gdk/gdk_bbp.h +++ b/gdk/gdk_bbp.h @@ -89,18 +89,6 @@ gdk_export int BBPincref(bat b, int logi gdk_export void BBPkeepref(bat i); gdk_export void BBPreleaseref(bat i); gdk_export int BBPdecref(bat b, int logical); -#if 0 -#define BBPdecref(b, logical) \ - ({ \ - bat _b = (b); \ - int _l = (logical); \ - if (BBP_refs(_b) + BBP_lrefs(_b) == 1) \ - fprintf(stderr, "#final decref %d" \ - " %s[%s:%d]\n", \ - _b, __func__, __FILE__, __LINE__); \ - BBPdecref(_b, _l); \ - }) -#endif gdk_export void BBPshare(bat b); /* (strncmp(s, "tmp_", 4) == 0 || strncmp(s, "tmpr_", 5) == 0) */ diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c --- a/geom/monetdb5/geom.c +++ b/geom/monetdb5/geom.c @@ -782,21 +782,21 @@ wkbcreatepoint_bat(bat *out, const bat * throw(MAL, "geom.point", RUNTIME_OBJECT_MISSING); } if ((by = BATdescriptor(*iy)) == NULL) { - BBPreleaseref(bx->batCacheid); + BBPunfix(bx->batCacheid); throw(MAL, "geom.point", RUNTIME_OBJECT_MISSING); } if ( bx->htype != TYPE_void || by->htype != TYPE_void || bx->hseqbase != by->hseqbase || BATcount(bx) != BATcount(by)) { - BBPreleaseref(bx->batCacheid); - BBPreleaseref(by->batCacheid); + BBPunfix(bx->batCacheid); + BBPunfix(by->batCacheid); throw(MAL, "geom.point", "both arguments must have dense and aligned heads"); } if ((bo = BATnew(TYPE_void, ATOMindex("wkb"), BATcount(bx), TRANSIENT)) == NULL) { - BBPreleaseref(bx->batCacheid); - BBPreleaseref(by->batCacheid); + BBPunfix(bx->batCacheid); + BBPunfix(by->batCacheid); throw(MAL, "geom.point", MAL_MALLOC_FAIL); } BATseqbase(bo, bx->hseqbase); @@ -807,9 +807,9 @@ wkbcreatepoint_bat(bat *out, const bat * str err = NULL; if ((err = wkbcreatepoint(&p, &x[i], &y[i])) != MAL_SUCCEED) { str msg; - BBPreleaseref(bx->batCacheid); - BBPreleaseref(by->batCacheid); - BBPreleaseref(bo->batCacheid); + BBPunfix(bx->batCacheid); + BBPunfix(by->batCacheid); + BBPunfix(bo->batCacheid); msg = createException(MAL, "geom.point", "%s", err); GDKfree(err); return msg; @@ -822,8 +822,8 @@ wkbcreatepoint_bat(bat *out, const bat * BATsetcount(bo, BATcount(bx)); BATsettrivprop(bo); BATderiveProps(bo,FALSE); - BBPreleaseref(bx->batCacheid); - BBPreleaseref(by->batCacheid); + BBPunfix(bx->batCacheid); + BBPunfix(by->batCacheid); BBPkeepref(*out = bo->batCacheid); return MAL_SUCCEED; } diff --git a/monetdb5/extras/rapi/rapi.c b/monetdb5/extras/rapi/rapi.c --- a/monetdb5/extras/rapi/rapi.c +++ b/monetdb5/extras/rapi/rapi.c @@ -549,7 +549,7 @@ str RAPIeval(Client cntxt, MalBlkPtr mb, msg = createException(MAL, "rapi.eval", "unknown argument type "); goto wrapup; } - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); // install vector into R environment Rf_defineVar(varname, varvalue, env); diff --git a/monetdb5/extras/rdf/rdfalgebra.c b/monetdb5/extras/rdf/rdfalgebra.c --- a/monetdb5/extras/rdf/rdfalgebra.c +++ b/monetdb5/extras/rdf/rdfalgebra.c @@ -34,12 +34,12 @@ RDFleftfetchjoin_sorted(bat *result, con throw(MAL, "rdf.leftfetchjoin_sorted", RUNTIME_OBJECT_MISSING); } if ((right = BATdescriptor(*rid)) == NULL) { - BBPreleaseref(left->batCacheid); + BBPunfix(left->batCacheid); throw(MAL, "rdf.leftfetchjoin_sorted", RUNTIME_OBJECT_MISSING); } bn = BATleftfetchjoin(left, right, BUN_NONE); - BBPreleaseref(left->batCacheid); - BBPreleaseref(right->batCacheid); + BBPunfix(left->batCacheid); + BBPunfix(right->batCacheid); if (bn == NULL) throw(MAL, "rdf.leftfetchjoin_sorted", GDK_EXCEPTION); diff --git a/monetdb5/mal/mal_runtime.c b/monetdb5/mal/mal_runtime.c --- a/monetdb5/mal/mal_runtime.c +++ b/monetdb5/mal/mal_runtime.c @@ -288,7 +288,7 @@ updateFootPrint(MalBlkPtr mb, MalStkPtr total += heapinfo(b->T->vheap); total += hashinfo(b->H->hash); total += hashinfo(b->T->hash); - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); // no concurrency protection (yet) stk->tmpspace += total/1024/1024; // keep it in MBs } diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c --- a/monetdb5/modules/atoms/batxml.c +++ b/monetdb5/modules/atoms/batxml.c @@ -73,19 +73,19 @@ batxml_export str AGGRsubxmlcand(bat *re batxml_export str AGGRsubxml(bat *retval, const bat *bid, const bat *gid, const bat *eid, const bit *skip_nils); -#define prepareResult(X,Y,tpe,Z,free) \ - (X) = BATnew((Y)->htype, (tpe), BATcount(Y), TRANSIENT); \ - if ((X) == NULL) { \ - BBPreleaseref((Y)->batCacheid); \ - free; \ - throw(MAL, "xml." Z, MAL_MALLOC_FAIL); \ - } \ - BATseqbase((X), (Y)->hseqbase); \ - (X)->hsorted = (Y)->hsorted; \ - (X)->hrevsorted = (Y)->hrevsorted; \ - (X)->tsorted = 0; \ - (X)->trevsorted = 0; \ - (X)->H->nonil = (Y)->H->nonil; \ +#define prepareResult(X,Y,tpe,Z,free) \ + (X) = BATnew((Y)->htype, (tpe), BATcount(Y), TRANSIENT); \ + if ((X) == NULL) { \ + BBPunfix((Y)->batCacheid); \ + free; \ + throw(MAL, "xml." Z, MAL_MALLOC_FAIL); \ + } \ + BATseqbase((X), (Y)->hseqbase); \ + (X)->hsorted = (Y)->hsorted; \ + (X)->hrevsorted = (Y)->hrevsorted; \ + (X)->tsorted = 0; \ + (X)->trevsorted = 0; \ + (X)->H->nonil = (Y)->H->nonil; \ (X)->T->nonil = 1; #define finalizeResult(X,Y,Z) \ @@ -93,7 +93,7 @@ batxml_export str AGGRsubxml(bat *retval (Y) = BATsetaccess((Y), BAT_READ); \ *(X) = (Y)->batCacheid; \ BBPkeepref(*(X)); \ - BBPreleaseref((Z)->batCacheid); + BBPunfix((Z)->batCacheid); str BATXMLxml2str(bat *ret, const bat *bid) @@ -121,7 +121,7 @@ BATXMLxml2str(bat *ret, const bat *bid) finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); throw(MAL, "xml.str", OPERATION_FAILED " During bulk coercion"); } @@ -212,7 +212,7 @@ BATXMLxmltext(bat *ret, const bat *bid) xmlFreeDoc(doc); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -282,7 +282,7 @@ BATXMLstr2xml(bat *ret, const bat *bid) finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -345,7 +345,7 @@ BATXMLdocument(bat *ret, const bat *bid) return MAL_SUCCEED; bunins_failed: GDKfree(buf); - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); throw(MAL, "xml.document", "%s", err); } @@ -421,7 +421,7 @@ BATXMLcontent(bat *ret, const bat *bid) xmlFreeDoc(doc); if (buf != NULL) GDKfree(buf); - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); throw(MAL, "xml.document", "%s", err); } @@ -460,7 +460,7 @@ BATXMLisdocument(bat *ret, const bat *bi finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); throw(MAL, "xml.isdocument", OPERATION_FAILED " During bulk processing"); } @@ -542,7 +542,7 @@ BATXMLoptions(bat *ret, const char * con finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -602,7 +602,7 @@ BATXMLcomment(bat *ret, const bat *bid) finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -676,7 +676,7 @@ BATXMLpi(bat *ret, const char * const *t finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -759,7 +759,7 @@ BATXMLroot(bat *ret, const bat *bid, con finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -824,7 +824,7 @@ BATXMLattribute(bat *ret, const char * c finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -913,7 +913,7 @@ BATXMLelement(bat *ret, const char * con finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(b->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -1034,7 +1034,7 @@ BATXMLforest(Client cntxt, MalBlkPtr mb, bunins_failed: for (i = pci->retc; i < pci->argc; i++) if (bi[i].b) - BBPreleaseref(bi[i].b->batCacheid); + BBPunfix(bi[i].b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -1120,8 +1120,8 @@ BATXMLconcat(bat *ret, const bat *bid, c finalizeResult(ret, bn, b); return MAL_SUCCEED; bunins_failed: - BBPreleaseref(r->batCacheid); - BBPreleaseref(b->batCacheid); + BBPunfix(r->batCacheid); + BBPunfix(b->batCacheid); BBPunfix(bn->batCacheid); if (buf != NULL) GDKfree(buf); @@ -1171,9 +1171,9 @@ BATXMLagg3(bat *ret, const bat *bid, con /* this will not work as it will corrupt the order of the column, ie the order in which the data will be generated */ j = BATjoin(BATmirror(g), b, BUN_NONE); - BBPreleaseref(b->batCacheid); - BBPreleaseref(g->batCacheid); - BBPreleaseref(e->batCacheid); + BBPunfix(b->batCacheid); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list