Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19345
Modified Files:
Tag: SQL_2-18
sql_psm.mx
Log Message:
Correct the dependencies check for the functions with the same name.
DROP ALL f1;
This query will drop all the functions with the name f1 and also the
dependencies between them.
However, if there is dependencies to other objects the query is aborted.
Note: The same was implemented for procedures.
Index: sql_psm.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_psm.mx,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -d -r1.42 -r1.42.2.1
--- sql_psm.mx 8 May 2007 11:19:43 -0000 1.42
+++ sql_psm.mx 8 Jun 2007 11:55:16 -0000 1.42.2.1
@@ -706,7 +706,7 @@
}
- if (!drop_action && mvc_check_dependency(sql, func->base.id,
func->is_func ? FUNC_DEPENDENCY : PROC_DEPENDENCY))
+ if (!drop_action && mvc_check_dependency(sql, func->base.id,
func->is_func ? FUNC_DEPENDENCY : PROC_DEPENDENCY, NULL))
return sql_error(sql, 02, "DROP %s: there are database objects
dependent on %s %s;", F, f, func->base.name);
mvc_drop_func(sql, s, func, drop_action);
@@ -747,8 +747,8 @@
for( n = list_func->h ; n; n = n->next) {
func = (sql_func *) n->data;
- if (!drop_action && mvc_check_dependency(sql, func->base.id,
func->is_func ? FUNC_DEPENDENCY : PROC_DEPENDENCY))
- return sql_error(sql, 02, "DROP %s: there are functions
dependent on %s %s;", F, f, func->base.name);
+ if (!drop_action && mvc_check_dependency(sql, func->base.id,
func->is_func ? FUNC_DEPENDENCY : PROC_DEPENDENCY, list_func))
+ return sql_error(sql, 02, "DROP %s: there are database
objects dependent on %s %s;", F, f, func->base.name);
}
mvc_drop_all_func(sql, s, list_func, drop_action);
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins