Update of /cvsroot/monetdb/sql/src/storage/bpm
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13071/src/storage/bpm

Modified Files:
        bpm_storage.mx 
Log Message:
propagated changes of Wednesday Aug 12 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/08/12 - stmane: src/storage/bpm/bpm_storage.mx,1.25.2.2

In an attampt to ensure portability to, and hence correctness on,
64-bit big-endian machines with 32-bit OIDs,
we make the SQL storage interface implementation a bit "less generic",
but a bit "more MonetDB-specific",
by using type oid instead of type ssize_t
for row indices / row ids ("rid")
that are stored as type oid in BATs.

(For convenience, these changes are wrapped in CVS tags
 "rid-ssize_t" & "rid-oid".)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: bpm_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bpm/bpm_storage.mx,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- bpm_storage.mx      5 Aug 2009 08:52:03 -0000       1.26
+++ bpm_storage.mx      12 Aug 2009 17:41:22 -0000      1.27
@@ -269,11 +269,11 @@
 }
 
 static void
-update_val( sql_bpm *p, ssize_t rid, void *upd) 
+update_val( sql_bpm *p, oid rid, void *upd) 
 {
        sht nr = (sht) (rid?rid/BPM_SPLIT:0);
 
-       assert(rid != -1);
+       assert(rid != oid_nil);
 
        if (nr >= p->nr)
                nr = p->nr-1;
@@ -282,7 +282,7 @@
 
 /* TODO have a update_bpm */
 static void
-update_col(sql_trans *tr, sql_column *c, void *i, int tpe, ssize_t rid)
+update_col(sql_trans *tr, sql_column *c, void *i, int tpe, oid rid)
 {
        sql_bpm *p = c->data;
 
@@ -411,11 +411,11 @@
 }
 
 static void
-delete_val( sql_dbpm *p, ssize_t rid ) 
+delete_val( sql_dbpm *p, oid rid ) 
 {
        sht nr = (sht) (rid?rid/BPM_SPLIT:0);
 
-       assert(rid != -1);
+       assert(rid != oid_nil);
        if (nr >= p->nr)
                nr = p->nr-1;
        delta_delete_val( &p->parts[nr], rid);
@@ -431,7 +431,7 @@
        if (tpe == TYPE_bat)
                delete_bat(p, ib);
        else
-               delete_val(p, *(ssize_t*)ib);
+               delete_val(p, *(oid*)ib);
 }
 
 static size_t


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to