Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16:/tmp/cvs-serv22122

Modified Files:
        sql_psm.mx sql_schema.mx 
Log Message:
There are also dependencies between functions and views.
A test was modified to check this situation.

sql/src/Dependencies/dependency_functions.sql



Index: sql_psm.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_psm.mx,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- sql_psm.mx  4 May 2007 14:21:46 -0000       1.41
+++ sql_psm.mx  8 May 2007 11:19:43 -0000       1.42
@@ -707,7 +707,7 @@
        
        
        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);
+               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);
 

Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -d -r1.126 -r1.127
--- sql_schema.mx       3 May 2007 23:34:00 -0000       1.126
+++ sql_schema.mx       8 May 2007 11:19:43 -0000       1.127
@@ -723,7 +723,7 @@
        char *sname = qname_schema(qname);
        sql_schema *s = NULL;
        sql_table *t = NULL;
-       list * id_l = NULL, *view_id_l = NULL;
+       list * id_l = NULL, *view_id_l = NULL, *func_id_l = NULL;
        int instantiate = (sql->mode == m_execute || !persistent);
 
        if (sname && !(s = mvc_bind_schema(sql, sname)))
@@ -769,10 +769,13 @@
                if (!instantiate && sq) {
                        view_id_l = stmt_list_dependencies(sq, VIEW_DEPENDENCY);
                        id_l = stmt_list_dependencies(sq, COLUMN_DEPENDENCY);
+                       func_id_l = stmt_list_dependencies(sq, FUNC_DEPENDENCY);
                        mvc_create_dependencies(sql, id_l, t->base.id, 
VIEW_DEPENDENCY);
                        mvc_create_dependencies(sql, view_id_l, t->base.id, 
VIEW_DEPENDENCY);
+                       mvc_create_dependencies(sql, func_id_l, t->base.id, 
VIEW_DEPENDENCY);
                        list_destroy(id_l);
                        list_destroy(view_id_l);
+                       list_destroy(func_id_l);
                        stmt_destroy(sq);
                        return stmt_none();
                }


-------------------------------------------------------------------------
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

Reply via email to