Update of /cvsroot/monetdb/sql/src/storage/restrict
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1792/src/storage/restrict

Modified Files:
        restrict_storage.mx 
Log Message:
Type cleanup.

Counting and indexing BUNs in a BAT is now done exclusively using the
type BUN.  This means that e.g. the BATcount function now returns a
BUN instead of a size_t (with many more similar changes).  It also
means that all uses of the hash_t type have been replaced by BUN.

vheaps are now exclusively indexed using the type var_t.

A few new constants have been introduced:
VAR_MAX - maximum allowed value of a value of type var_t.
BUN_MAX - maximum allowed value of a value of type BUN.
OIDFMT (existed already) - format string to print a value of type oid.
BUNFMT - format string to print a value of type BUN.
VARFMT - format string to print a value of type var_t.


U restrict_storage.mx
Index: restrict_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/restrict/restrict_storage.mx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- restrict_storage.mx 22 Aug 2008 09:50:32 -0000      1.7
+++ restrict_storage.mx 25 Aug 2008 13:36:21 -0000      1.8
@@ -323,7 +323,7 @@
        /* snapshot large bats */
        if (BATcount(b) > SNAPSHOT_MINSIZE) 
                BATmode(b, PERSISTENT);
-       if (BATcount(b) > (size_t) REMAP_PAGE_MAXSIZE)
+       if (BATcount(b) > (BUN) REMAP_PAGE_MAXSIZE)
                        BATmmap(b, STORE_MMAP, STORE_MMAP, STORE_MMAP, 
STORE_MMAP);
        bat_destroy(b);
        return ok;
@@ -500,7 +500,7 @@
        /* snapshot large bats */
        if (BATcount(b) > SNAPSHOT_MINSIZE) 
                BATmode(b, PERSISTENT);
-       if (BATcount(b) > (size_t) REMAP_PAGE_MAXSIZE)
+       if (BATcount(b) > (BUN) REMAP_PAGE_MAXSIZE)
                        BATmmap(b, STORE_MMAP, STORE_MMAP, STORE_MMAP, 
STORE_MMAP);
        bat_destroy(b);
        return LOG_OK;
@@ -660,10 +660,10 @@
        return ok;
 }
 
-static size_t 
+static BUN 
 clear_bat(sql_trans *tr, sql_bat *bat)
 {
-       size_t sz = 0;
+       BUN sz = 0;
 
        (void)tr;
        if (bat->bid) {
@@ -677,7 +677,7 @@
        return sz;
 }
 
-static size_t 
+static BUN 
 clear_col(sql_trans *tr, sql_column *c)
 {
        if (c->data)
@@ -685,7 +685,7 @@
        return 0;
 }
 
-static size_t
+static BUN
 clear_idx(sql_trans *tr, sql_idx *i)
 {
        if (i->data)
@@ -693,7 +693,7 @@
        return 0;
 }
 
-static size_t
+static BUN
 clear_del(sql_trans *tr, sql_table *t)
 {
        if (t->data && isTempTable(t))
@@ -860,7 +860,7 @@
        }
        if (BATcount(cur) > SNAPSHOT_MINSIZE) 
                BATmode(cur, PERSISTENT);
-       if (BATcount(cur) > (size_t) REMAP_PAGE_MAXSIZE) 
+       if (BATcount(cur) > (BUN) REMAP_PAGE_MAXSIZE) 
                        BATmmap(cur, STORE_MMAP, STORE_MMAP, STORE_MMAP, 
STORE_MMAP);
        bat_destroy(cur);
        return LOG_OK;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to