Changeset: 17aafcd73449 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=17aafcd73449
Modified Files:
MonetDB5/src/modules/mal/tablet.mx
Branch: Feb2010
Log Message:
fixed ref-counting for BAT-of-BATs result created by TABLETcollect_bats
In CMDtablet_load() (tablet.load()) & CMDtablet_input() (tablet.input()),
the reference counting of the BAT-of-BATs result created by TABLETcollect_bats()
was not handled correctly. Instead of incrementing the logical refcount
and decrementing the physical refcount of the result BAT,
only BBPinref( x , TRUE ) was called on an uninitialized variable.
Fixed that.
diffs (25 lines):
diff -r 3c0584bec999 -r 17aafcd73449 MonetDB5/src/modules/mal/tablet.mx
--- a/MonetDB5/src/modules/mal/tablet.mx Fri May 21 14:43:55 2010 +0200
+++ b/MonetDB5/src/modules/mal/tablet.mx Tue Jun 01 08:19:18 2010 +0200
@@ -2180,8 +2180,9 @@
tablet_load(&bn, names, seps, types, *filename, nr);
if (bn == NULL)
throw(MAL, "tablet.load", MAL_MALLOC_FAIL);
+ *ret = bn->batCacheid;
BBPincref(*ret, TRUE);
- *ret = bn->batCacheid;
+ BBPunfix(*ret);
BBPunfix(names->batCacheid);
BBPunfix(seps->batCacheid);
BBPunfix(types->batCacheid);
@@ -2258,8 +2259,9 @@
BBPunfix(types->batCacheid);
throw(MAL, "tablet.load", OPERATION_FAILED);
}
+ *ret = bn->batCacheid;
BBPincref(*ret, TRUE);
- *ret = bn->batCacheid;
+ BBPunfix(*ret);
BBPunfix(names->batCacheid);
BBPunfix(seps->batCacheid);
BBPunfix(types->batCacheid);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list