Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv19272
Modified Files:
Tag: Nov2008
sql_schema.mx
Log Message:
It seems it is also broken in the stable...
If you drop a constraint like a primary key make sure there are no dependencies
on it...
Note: Do not propagate this check in... it was already done in the current
branch...
U sql_schema.mx
Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.152.2.1
retrieving revision 1.152.2.2
diff -u -d -r1.152.2.1 -r1.152.2.2
--- sql_schema.mx 14 Nov 2008 13:48:40 -0000 1.152.2.1
+++ sql_schema.mx 27 Dec 2008 17:08:37 -0000 1.152.2.2
@@ -1695,6 +1695,8 @@
assert(l->h->next->type == type_int);
if ((key = mvc_bind_key(sql, ss, kname )) == NULL)
return sql_error(sql, 02, "cannot drop unknown
constraint %s\n", kname);
+ if (!drop_action && mvc_check_dependency(sql, key->base.id,
KEY_DEPENDENCY, NULL))
+ return sql_error(sql, 02, "unable to drop constraint %s
(there are database objects which depend on it)\n", key->base.name);
mvc_drop_key(sql, ss, key, drop_action);
res = stmt_none();
} break;
------------------------------------------------------------------------------
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins