Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18562

Modified Files:
      Tag: SQL_2-18
        sql_schema.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_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.130.2.1
retrieving revision 1.130.2.2
diff -u -d -r1.130.2.1 -r1.130.2.2
--- sql_schema.mx       8 Jun 2007 09:48:29 -0000       1.130.2.1
+++ sql_schema.mx       8 Jun 2007 11:54:35 -0000       1.130.2.2
@@ -804,7 +804,7 @@
                return sql_error(sql, 02, "DROP VIEW: unable to drop view 
'%s'", tname);
        } else if (t->system) {
                return sql_error(sql, 02, "DROP VIEW: cannot drop system view 
'%s'", tname);
-       } else if (! drop_action && mvc_check_dependency(sql, t->base.id, 
VIEW_DEPENDENCY)) {
+       } else if (! drop_action && mvc_check_dependency(sql, t->base.id, 
VIEW_DEPENDENCY, NULL)) {
                        return sql_error(sql, 02, "unable to drop view %s 
(there are database objects which depend on it)\n", t->base.name);
        } else {
                mvc_drop_table(sql, ss, t, drop_action);
@@ -901,7 +901,7 @@
 drop_user(mvc *sql, char *user)
 {
        int user_id = sql_find_auth(sql, user);
-       if (mvc_check_dependency(sql, user_id, OWNER_DEPENDENCY))
+       if (mvc_check_dependency(sql, user_id, OWNER_DEPENDENCY, NULL))
                return sql_error(sql, 02, "DROP USER: '%s' owns a schema", 
user);
 
        if(sql_drop_user(sql, user) == FALSE)
@@ -1526,7 +1526,7 @@
                        return sql_error(sql, 02, "cannot drop column %s (table 
is a system table)\n", cname);
                if (isView(t))
                        return sql_error(sql, 02, "cannot drop column %s (%s is 
a view)\n", cname, t->base.name);
-               if (!drop_action && mvc_check_dependency(sql, col->base.id, 
COLUMN_DEPENDENCY))
+               if (!drop_action && mvc_check_dependency(sql, col->base.id, 
COLUMN_DEPENDENCY, NULL))
                        return sql_error(sql, 02, "unable to drop column %s 
(there are database objects which depend on it)\n", cname);
                if (!drop_action  && t->keys.set) {
                        node *n, *m;
@@ -1700,7 +1700,7 @@
                }
        }
 
-       if (!drop_action && mvc_check_dependency(sql, t->base.id, 
TABLE_DEPENDENCY))
+       if (!drop_action && mvc_check_dependency(sql, t->base.id, 
TABLE_DEPENDENCY, NULL))
                        return sql_error(sql, 02, "DROP TABLE: unable to drop 
table %s (there are database objects which depend on it)\n", t->base.name);
        
        mvc_drop_table(sql, s, t, 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

Reply via email to