Changeset: d62ec17b3ab3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d62ec17b3ab3
Modified Files:
sql/backends/monet5/sql.c
Branch: Jan2014
Log Message:
Properly maintain reference counts.
diffs (22 lines):
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
@@ -2067,9 +2067,15 @@ DELTAsub(bat *result, bat *col, bat *cid
i = BATmirror(BATmark(cminu, 0));
BBPunfix(cminu->batCacheid);
}
- if (isVIEW(res) &&
- (res = BATcopy(res, res->htype, res->ttype, TRUE)) == NULL)
- throw(MAL, "sql.delta", OPERATION_FAILED);
+ if (isVIEW(res)) {
+ BAT *n = BATcopy(res, res->htype, res->ttype, TRUE);
+ BBPunfix(res->batCacheid);
+ res = n;
+ if (res == NULL) {
+ BBPunfix(i->batCacheid);
+ throw(MAL, "sql.delta", OPERATION_FAILED);
+ }
+ }
res = BATappend(res, i, TRUE);
BBPunfix(i->batCacheid);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list