diff options
author | pem@mysql.comhem.se <> | 2004-03-11 17:18:59 +0100 |
---|---|---|
committer | pem@mysql.comhem.se <> | 2004-03-11 17:18:59 +0100 |
commit | 6c6bbba00770b241818b35fe4b1d195e0d34142a (patch) | |
tree | 2a790442a0c109f0f5eabc6530c71782c2104c30 /sql/sp.h | |
parent | 91cc4b288e492df307e7ad35613eba17deadb919 (diff) | |
download | mariadb-git-6c6bbba00770b241818b35fe4b1d195e0d34142a.tar.gz |
WL#1366: Use the schema (db) associated with an SP.
Phase 2: Make SPs belong to a DB, and use qualified names.
As a side effect, using USE in an SP is no longer allowed.
(It just doesn't work otherwise.)
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -70,7 +70,7 @@ int sp_show_status_function(THD *thd, const char *wild); bool -sp_function_exists(THD *thd, LEX_STRING *name); +sp_function_exists(THD *thd, sp_name *name); // This is needed since we have to read the functions before we @@ -82,4 +82,19 @@ sp_merge_funs(LEX *dst, LEX *src); int sp_cache_functions(THD *thd, LEX *lex); + +// +// Utilities... +// + +// Do a "use newdb". The current db is stored at olddb. +// If newdb is the same as the current one, nothing is changed. +int +sp_use_new_db(THD *thd, char *newdb, char *olddb, uint olddbmax, + bool no_access_check); + +// Like mysql_change_db() but handles empty db name and the send_ok() problem. +int +sp_change_db(THD *thd, char *db, bool no_access_check); + #endif /* _SP_H_ */ |