Update of /cvsroot/monetdb/MonetDB5/src/modules/kernel
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9755/modules/kernel
Modified Files:
bat5.mx
Log Message:
Use a stricter runtime test to trap possible BAT bind mismatchs.
Index: bat5.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/kernel/bat5.mx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- bat5.mx 4 Oct 2007 10:37:17 -0000 1.25
+++ bat5.mx 12 Oct 2007 17:40:07 -0000 1.26
@@ -157,6 +157,14 @@
It contains all properties of the BAT record. See the BAT
documentation
in GDK for more information.";
+command getSize ( b:bat[:any_1,:any_2]) :lng
+address BKCbatsize
+comment "Calculate the size of the BAT.";
+
+command getDiskSize ( b:bat[:any_1,:any_2]) :lng
+address BKCbatsize
+comment "Calculate the size of the BAT.";
+
command getCapacity(b:bat[:any_1,:any_2]):lng
address BKCgetCapacity
comment "Returns the current allocation size (in max number of elements) of a
BAT.";
@@ -649,6 +657,8 @@
bat5_export str BKCsetAccess(int *res, int *bid, str *param);
bat5_export str BKCgetAccess(str *res, int *bid);
bat5_export str BKCinfo(int *retval, int *bid);
+bat5_export str BKCbatsize(lng *tot, int *bid);
+bat5_export str BKCbatdsksize(lng *tot, int *bid);
bat5_export str BKCgetSpaceReserved(lng *tot, int *bid);
bat5_export str BKCgetSpaceUsed(lng *tot, int *bid);
bat5_export str BKCgetSpaceReserved_str(lng *tot, str batname);
@@ -3460,6 +3470,28 @@
}
str
+BKCbatdsksize(lng *tot, int *bid){
+ BAT *b;
+ if ((b = BATdescriptor(*bid)) == NULL) {
+ throw(MAL, "bat.getDiskSize", "Cannot access descriptor");
+ }
+ CMDbatdsksize(tot,b);
+ BBPreleaseref(*bid);
+ return MAL_SUCCEED;
+}
+
+str
+BKCbatsize(lng *tot, int *bid){
+ BAT *b;
+ if ((b = BATdescriptor(*bid)) == NULL) {
+ throw(MAL, "bat.getDiskSize", "Cannot access descriptor");
+ }
+ CMDbatsize(tot,b);
+ BBPreleaseref(*bid);
+ return MAL_SUCCEED;
+}
+
+str
BKCgetSpaceReserved(lng *tot, int *bid)
{
BAT *b;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins