summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorunknown <kostja@dipika.(none)>2008-02-19 14:53:22 +0300
committerunknown <kostja@dipika.(none)>2008-02-19 14:53:22 +0300
commitead02981eae47130fe5d205a11336b3c00225be1 (patch)
tree04e23b57dfe474c6eec621c1ff38cbb47a67058c /sql/sp.cc
parentda1a6127d61bf8ef7c4fd0c48afb2572260f9fb8 (diff)
parent526798dbb55c79b62e795a1cf40062030e2342bd (diff)
downloadmariadb-git-ead02981eae47130fe5d205a11336b3c00225be1.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 mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Auto merged mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/sp.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_table.cc: Auto merged mysql-test/suite/rpl_ndb/t/disabled.def: Manual merge.
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)
{