Update of /cvsroot/monetdb/sql/src/storage
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12913/src/storage
Modified Files:
store_connections.mx
Log Message:
propagated changes of Wednesday Aug 12 2009
from the Aug2009 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/08/12 - stmane: src/storage/store_connections.mx,1.5.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: store_connections.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/store_connections.mx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- store_connections.mx 7 Jan 2009 14:19:29 -0000 1.5
+++ store_connections.mx 12 Aug 2009 17:41:01 -0000 1.6
@@ -43,7 +43,7 @@
sql_column *c_db = find_sql_column(t, "db");
sql_column *c_db_alias = find_sql_column(t, "db_alias");
- if ((table_funcs.column_find_row(tr, c_server, server, c_db, db, NULL)
== -1) && (table_funcs.column_find_row(tr, c_db_alias, db_alias, NULL) == -1)) {
+ if ((table_funcs.column_find_row(tr, c_server, server, c_db, db, NULL)
== oid_nil) && (table_funcs.column_find_row(tr, c_db_alias, db_alias, NULL) ==
oid_nil)) {
table_funcs.table_insert(tr, t, &id, server, &port_l, db,
db_alias, user, passwd, lang);
return id;
}
@@ -55,7 +55,7 @@
int
sql_trans_disconnect_catalog(sql_trans* tr, char * db_alias)
{
- ssize_t rid = -1;
+ oid rid = oid_nil;
int id = 0;
sql_schema * s = find_sql_schema(tr, "sys");
sql_table* t = find_sql_table(s, "connections");
@@ -64,7 +64,7 @@
sql_column * col_id = find_sql_column(t, "id");
rid = table_funcs.column_find_row(tr, col_db_alias, db_alias, NULL);
- if (rid != -1) {
+ if (rid != oid_nil) {
id = *(int *) table_funcs.column_find_value(tr, col_id, rid);
table_funcs.table_delete(tr, t, rid);
} else {
@@ -86,7 +86,7 @@
list*
sql_trans_get_connection(sql_trans* tr, int id, char *server, char *db, char
*db_alias, char *user)
{
- ssize_t rid = -1;
+ oid rid = oid_nil;
sql_schema *s = find_sql_schema(tr, "sys");
sql_table *con = find_sql_table(s, "connections");
list *con_arg_list = list_create((fdestroy) NULL);
@@ -112,7 +112,7 @@
else
rid = table_funcs.column_find_row(tr, col_db_alias, db_alias,
NULL);
- if (rid != -1) {
+ if (rid != oid_nil) {
list_append(con_arg_list, (int *)
table_funcs.column_find_value(tr, col_id, rid));
list_append(con_arg_list, (char *)
table_funcs.column_find_value(tr, col_server, rid));
list_append(con_arg_list, (int *)
table_funcs.column_find_value(tr, col_port, rid));
------------------------------------------------------------------------------
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