Update of /cvsroot/monetdb/sql/src/storage/restrict
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13166/src/storage/restrict
Modified Files:
restrict_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/restrict/restrict_storage.mx,1.16.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: restrict_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/restrict/restrict_storage.mx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- restrict_storage.mx 5 Aug 2009 08:52:07 -0000 1.17
+++ restrict_storage.mx 12 Aug 2009 17:41:30 -0000 1.18
@@ -126,12 +126,11 @@
}
static void
-update_val( sql_bat *bat, ssize_t rid, void *upd, int isnew)
+update_val( sql_bat *bat, oid rid, void *upd, int isnew)
{
BAT *b;
- assert(rid != (ssize_t)oid_nil);
- assert(rid != -1);
+ assert(rid != oid_nil);
b = temp_descriptor(bat->bid);
if (!isnew) {
BAT *u = NULL;
@@ -152,18 +151,18 @@
}
bat_destroy(u);
}
- assert(rid > 0);
+ assert(rid != oid_nil);
#if SIZEOF_OID < SIZEOF_SSIZE_T
assert((lng) rid <= (lng) GDK_oid_max);
#endif
- void_inplace(b, (oid)rid, upd, TRUE);
+ void_inplace(b, rid, upd, TRUE);
bat_destroy(b);
}
/* for now we simply apply the updates, problem is we can't rollback */
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_bat *bat = c->data;
------------------------------------------------------------------------------
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