Update of /cvsroot/monetdb/sql/src/storage/bpm
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv13103/src/storage/bpm
Modified Files:
bpm_table.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_table.mx,1.9.6.1
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_table.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/bpm/bpm_table.mx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bpm_table.mx 7 Jan 2009 14:19:30 -0000 1.9
+++ bpm_table.mx 12 Aug 2009 17:41:26 -0000 1.10
@@ -58,13 +58,13 @@
return delta_full_bat( &p->parts[0], isTemp(c), d, s);
}
-static ssize_t
+static oid
column_find_row(sql_trans *tr, sql_column *c, void *value, ...)
{
va_list va;
BUN q;
BAT *b = NULL, *s = NULL, *r = NULL, *d = NULL;
- ssize_t rid = -1;
+ oid rid = oid_nil;
sql_column *nc;
void *nv;
sql_bpm *p = c->t->data;
@@ -100,7 +100,7 @@
}
static void *
-column_find_value(sql_trans *tr, sql_column *c, ssize_t rid)
+column_find_value(sql_trans *tr, sql_column *c, oid rid)
{
BUN q;
BAT *b, *d = NULL;
@@ -130,10 +130,9 @@
}
static int
-column_update_value(sql_trans *tr, sql_column *c, ssize_t rid, void *value)
+column_update_value(sql_trans *tr, sql_column *c, oid rid, void *value)
{
- assert(rid != (ssize_t)oid_nil);
- assert(rid != -1);
+ assert(rid != oid_nil);
store_funcs.update_col(tr, c, value, c->type.type->localtype, rid);
return 0;
@@ -163,10 +162,9 @@
}
static int
-table_delete(sql_trans *tr, sql_table *t, ssize_t rid)
+table_delete(sql_trans *tr, sql_table *t, oid rid)
{
- assert(rid != (ssize_t)oid_nil);
- assert(rid != -1);
+ assert(rid != oid_nil);
store_funcs.delete_tab(tr, t, &rid, TYPE_oid);
return 0;
@@ -292,15 +290,15 @@
}
-/* return table rids from result of rids_select, return (-1) when done */
-static ssize_t
+/* return table rids from result of rids_select, return (oid_nil) when done */
+static oid
rids_next(rids *r)
{
if (r->cur < BATcount(r->data)) {
BATiter bi = bat_iterator(r->data);
return *(oid*)BUNhead(bi, r->cur++);
}
- return -1;
+ return oid_nil;
}
static rids *
------------------------------------------------------------------------------
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