Update of /cvsroot/monetdb/sql/src/storage
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31335
Modified Files:
store.mx
Log Message:
Defense against a segfault.
U store.mx
Index: store.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/store.mx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- store.mx 25 Aug 2008 13:36:19 -0000 1.18
+++ store.mx 10 Sep 2008 19:29:52 -0000 1.19
@@ -809,7 +809,10 @@
v = table_funcs.column_find_value(tr, find_sql_column(ss, "id"), rid);
sid = *(sqlid *)v; _DELETE(v);
if (sid < id) {
- s = find_sql_schema_node(tr, NULL, sid)->data;
+ node *n = find_sql_schema_node(tr, NULL, sid);
+ if (n==NULL)
+ GDKfatal("SQL schema missing or incompatible, rebuilt
from archive");
+ s = n->data;
} else {
s = ZNEW(sql_schema);
v = table_funcs.column_find_value(tr, find_sql_column(ss,
"name"), rid);
@@ -898,7 +901,7 @@
for(rid = table_funcs.rids_next(schemas); rid>=0; rid =
table_funcs.rids_next(schemas)) {
sql_schema *ns = load_schema(tr, id, rid);
- if (ns->base.id > id)
+ if (ns && ns->base.id > id)
cs_add(&tr->schemas, ns, TR_OLD);
}
table_funcs.rids_destroy(schemas);
-------------------------------------------------------------------------
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