Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7654/sql/src/backends/monet5
Modified Files:
sql_optimizer.mx
Log Message:
fixed one more type mismatch found by the Microsoft compiler
U sql_optimizer.mx
Index: sql_optimizer.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_optimizer.mx,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -d -r1.193 -r1.194
--- sql_optimizer.mx 22 Aug 2008 09:53:53 -0000 1.193
+++ sql_optimizer.mx 9 Sep 2008 13:45:17 -0000 1.194
@@ -321,7 +321,7 @@
char *tname = getVarConstant(mb, getArg(p,2)).val.sval;
char *cname = NULL;
int not_null = 0;
- lng rows = 1;
+ oid rows = 1;
int mode = 0;
int part = 0;
int k = getArg(p,0);
@@ -341,14 +341,18 @@
if (s && f == bindidxRef) {
+ size_t cnt;
sql_idx *i = mvc_bind_idx(m, s, cname);
if (active_store_type == store_bpm && i->data) {
bpm = i->data;
part = bpm->nr;
}
- rows = store_funcs.count_idx(i);
+ cnt = store_funcs.count_idx(i);
+ assert(cnt <= (size_t) GDK_oid_max);
+ rows = (oid) cnt;
} else if (s && f == bindRef) {
+ size_t cnt;
sql_table *t = mvc_bind_table(m, s, tname);
sql_column *c = mvc_bind_column(m, t, cname);
@@ -358,10 +362,12 @@
bpm = c->data;
part = bpm->nr;
}
- rows = store_funcs.count_col(c);
+ cnt = store_funcs.count_col(c);
+ assert(cnt <= (size_t) GDK_oid_max);
+ rows = (oid) cnt;
}
if (rows > 1 && mode != RD_INS)
- varSetProp(mb, k, rowsProp, op_eq, VALset(&vr,
TYPE_lng, &rows));
+ varSetProp(mb, k, rowsProp, op_eq, VALset(&vr,
TYPE_oid, &rows));
if (not_null)
varSetProp(mb, k, notnilProp, op_eq, NULL);
if (0 && active_store_type == store_bpm && part &&
-------------------------------------------------------------------------
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