mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into mysql.com:/home/kostja/mysql/mysql-5.1-merge mysql-test/r/sp-error.result: Auto merged mysql-test/r/sp-security.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/sp-error.test: Auto merged mysql-test/t/sp-security.test: Auto merged mysql-test/t/sp.test: Auto merged sql/mysql_priv.h: Auto merged sql/sp.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/share/errmsg.txt: Manual merge sql/sql_base.cc: Manual merge.
This commit is contained in:
11
sql/sp.cc
11
sql/sp.cc
@@ -1013,6 +1013,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *routines, bool any, bool no_error)
|
||||
{
|
||||
TABLE_LIST *routine;
|
||||
bool result= 0;
|
||||
bool sp_object_found;
|
||||
DBUG_ENTER("sp_exists_routine");
|
||||
for (routine= routines; routine; routine= routine->next_global)
|
||||
{
|
||||
@@ -1025,10 +1026,12 @@ sp_exist_routines(THD *thd, TABLE_LIST *routines, bool any, bool no_error)
|
||||
lex_name.str= thd->strmake(routine->table_name, lex_name.length);
|
||||
name= new sp_name(lex_db, lex_name);
|
||||
name->init_qname(thd);
|
||||
if (sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name,
|
||||
&thd->sp_proc_cache, FALSE) != NULL ||
|
||||
sp_find_routine(thd, TYPE_ENUM_FUNCTION, name,
|
||||
&thd->sp_func_cache, FALSE) != NULL)
|
||||
sp_object_found= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name,
|
||||
&thd->sp_proc_cache, FALSE) != NULL ||
|
||||
sp_find_routine(thd, TYPE_ENUM_FUNCTION, name,
|
||||
&thd->sp_func_cache, FALSE) != NULL;
|
||||
mysql_reset_errors(thd, TRUE);
|
||||
if (sp_object_found)
|
||||
{
|
||||
if (any)
|
||||
DBUG_RETURN(1);
|
||||
|
Reference in New Issue
Block a user