Changeset: d3facb76dd6c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d3facb76dd6c Modified Files: sql/backends/monet5/vaults/netcdf/netcdf.c Branch: Jul2021 Log Message:
we should only claim once per table insert diffs (38 lines): diff --git a/sql/backends/monet5/vaults/netcdf/netcdf.c b/sql/backends/monet5/vaults/netcdf/netcdf.c --- a/sql/backends/monet5/vaults/netcdf/netcdf.c +++ b/sql/backends/monet5/vaults/netcdf/netcdf.c @@ -881,8 +881,6 @@ NCDFimportVariable(Client cntxt, MalBlkP throw(MAL, "netcdf.importvar", SQLSTATE(HY013) MAL_MALLOC_FAIL); } store->storage_api.append_col(m->session->tr, col, offset, pos, vbat, BATcount(vbat), TYPE_bat); - if (pos) - bat_destroy(pos); BBPunfix(vbatid); BBPrelease(vbatid); vbat = NULL; @@ -902,16 +900,12 @@ NCDFimportVariable(Client cntxt, MalBlkP GDKfree(dim_bids); return createException(MAL, "netcdf.importvar", SQLSTATE(HY002) RUNTIME_OBJECT_MISSING); } - pos = NULL; - if (store->storage_api.claim_tab(m->session->tr, arr_table, BATcount(dimbat), &offset, &pos) != LOG_OK) - throw(MAL, "netcdf.importvar", SQLSTATE(HY013) MAL_MALLOC_FAIL); store->storage_api.append_col(m->session->tr, col, offset, pos, dimbat, BATcount(dimbat), TYPE_bat); - if (pos) - bat_destroy(pos); BBPunfix(dim_bids[i]); /* phys. ref from BATdescriptor */ BBPrelease(dim_bids[i]); /* log. ref. from loadVar */ dimbat = NULL; } + bat_destroy(pos); for (i = 0; i < vndims; i++) GDKfree(dname[i]); @@ -919,7 +913,6 @@ NCDFimportVariable(Client cntxt, MalBlkP GDKfree(dim_bids); nc_close(ncid); - return msg; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list