Changeset: 248ea02d5bfd for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=248ea02d5bfd
Modified Files:
monetdb5/modules/mal/tablet.c
sql/backends/monet5/sql.c
Branch: resultset
Log Message:
Use the BBPfix operation instead of BBPreleaseref
diffs (105 lines):
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -1487,10 +1487,10 @@ SQLload_file(Client cntxt, Tablet *as, b
task->cntxt->error_input = BATnew(TYPE_void, TYPE_str,0,TRANSIENT);
BATseqbase(task->cntxt->error_input,0);
if ( task->cntxt->error_row== NULL || task->cntxt->error_fld ==
NULL || task->cntxt->error_msg == NULL || task->cntxt->error_input == NULL){
- if (task->cntxt->error_row)
BBPreleaseref(task->cntxt->error_row->batCacheid);
- if (task->cntxt->error_fld)
BBPreleaseref(task->cntxt->error_fld->batCacheid);
- if (task->cntxt->error_msg)
BBPreleaseref(task->cntxt->error_msg->batCacheid);
- if (task->cntxt->error_input)
BBPreleaseref(task->cntxt->error_input->batCacheid);
+ if (task->cntxt->error_row)
BBPunfix(task->cntxt->error_row->batCacheid);
+ if (task->cntxt->error_fld)
BBPunfix(task->cntxt->error_fld->batCacheid);
+ if (task->cntxt->error_msg)
BBPunfix(task->cntxt->error_msg->batCacheid);
+ if (task->cntxt->error_input)
BBPunfix(task->cntxt->error_input->batCacheid);
} else {
BBPkeepref( task->cntxt->error_row->batCacheid);
BBPkeepref( task->cntxt->error_fld->batCacheid);
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -2410,17 +2410,17 @@ mvc_result_set_wrap( Client cntxt, MalBl
if (mvc_result_column(m, tblname, colname, tpename, *digits++,
*scaledigits++, b))
msg = createException(SQL, "sql.resultset",
"mvc_result_column failed");
if( b)
- BBPreleaseref(bid);
+ BBPunfix(bid);
}
// now sent it to the channel cntxt->fdout
if (mvc_export_result(cntxt->sqlcontext, cntxt->fdout, res))
msg = createException(SQL, "sql.resultset", "failed");
wrapup_result_set:
- if( tbl) BBPreleaseref(tblId);
- if( atr) BBPreleaseref(atrId);
- if( tpe) BBPreleaseref(tpeId);
- if( len) BBPreleaseref(lenId);
- if( scale) BBPreleaseref(scaleId);
+ if( tbl) BBPunfix(tblId);
+ if( atr) BBPunfix(atrId);
+ if( tpe) BBPunfix(tpeId);
+ if( len) BBPunfix(lenId);
+ if( scale) BBPunfix(scaleId);
return msg;
}
@@ -2520,7 +2520,7 @@ mvc_export_table_wrap( Client cntxt, Mal
if (mvc_result_column(m, tblname, colname, tpename, *digits++,
*scaledigits++, b))
msg = createException(SQL, "sql.resultset",
"mvc_result_column failed");
if( b)
- BBPreleaseref(bid);
+ BBPunfix(bid);
}
// now select the file channel
if ( strcmp(filename,"stdout") == 0 )
@@ -2540,11 +2540,11 @@ mvc_export_table_wrap( Client cntxt, Mal
mnstr_close(s);
wrapup_result_set1:
BBPunfix(order->batCacheid);
- if( tbl) BBPreleaseref(tblId);
- if( atr) BBPreleaseref(atrId);
- if( tpe) BBPreleaseref(tpeId);
- if( len) BBPreleaseref(lenId);
- if( scale) BBPreleaseref(scaleId);
+ if( tbl) BBPunfix(tblId);
+ if( atr) BBPunfix(atrId);
+ if( tpe) BBPunfix(tpeId);
+ if( len) BBPunfix(lenId);
+ if( scale) BBPunfix(scaleId);
return msg;
}
@@ -2608,11 +2608,11 @@ mvc_row_result_wrap( Client cntxt, MalBl
if (mvc_export_result(cntxt->sqlcontext, cntxt->fdout, res))
msg = createException(SQL, "sql.resultset", "failed");
wrapup_result_set:
- if( tbl) BBPreleaseref(tblId);
- if( atr) BBPreleaseref(atrId);
- if( tpe) BBPreleaseref(tpeId);
- if( len) BBPreleaseref(lenId);
- if( scale) BBPreleaseref(scaleId);
+ if( tbl) BBPunfix(tblId);
+ if( atr) BBPunfix(atrId);
+ if( tpe) BBPunfix(tpeId);
+ if( len) BBPunfix(lenId);
+ if( scale) BBPunfix(scaleId);
return msg;
}
@@ -2719,11 +2719,11 @@ mvc_export_row_wrap( Client cntxt, MalBl
if( s != cntxt->fdout)
mnstr_close(s);
wrapup_result_set:
- if( tbl) BBPreleaseref(tblId);
- if( atr) BBPreleaseref(atrId);
- if( tpe) BBPreleaseref(tpeId);
- if( len) BBPreleaseref(lenId);
- if( scale) BBPreleaseref(scaleId);
+ if( tbl) BBPunfix(tblId);
+ if( atr) BBPunfix(atrId);
+ if( tpe) BBPunfix(tpeId);
+ if( len) BBPunfix(lenId);
+ if( scale) BBPunfix(scaleId);
return msg;
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list