summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorkostja@dipika.(none) <>2008-02-19 14:53:22 +0300
committerkostja@dipika.(none) <>2008-02-19 14:53:22 +0300
commitd8e6308c428a5e5fd3d3482ad3b3520048ee1108 (patch)
tree04e23b57dfe474c6eec621c1ff38cbb47a67058c /sql/sp.cc
parentf4659b38af7f944250cde0b948630d5a0562eebb (diff)
parentacf9b1f346e8b9dc59ad8e1f6a1ff20ef96d0dcd (diff)
downloadmariadb-git-d8e6308c428a5e5fd3d3482ad3b3520048ee1108.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into dipika.(none):/opt/local/work/mysql-5.1-2pc-opt-merge-push
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 83995e9b753..e69bf83d552 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -697,8 +697,16 @@ sp_returns_type(THD *thd, String &result, sp_head *sp)
(TYPE_ENUM_PROCEDURE or TYPE_ENUM_FUNCTION).
@param sp Stored routine object to store.
- @return Error code. SP_OK is returned on success. Other SP_ constants are
- used to indicate about errors.
+ @note Opens and closes the thread tables. Therefore assumes
+ that there are no locked tables in this thread at the time of
+ invocation.
+ Unlike some other DDL statements, *does* close the tables
+ in the end, since the call to this function is normally
+ followed by an implicit grant (sp_grant_privileges())
+ and this subsequent call opens and closes mysql.procs_priv.
+
+ @return Error code. SP_OK is returned on success. Other
+ SP_ constants are used to indicate about errors.
*/
int
@@ -1260,7 +1268,13 @@ done:
}
-/* Drop all routines in database 'db' */
+/**
+ Drop all routines in database 'db'
+
+ @note Close the thread tables, the calling code might want to
+ delete from other system tables afterwards.
+*/
+
int
sp_drop_db_routines(THD *thd, char *db)
{