mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug7-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.0
This commit is contained in:
@@ -3682,7 +3682,8 @@ end_with_restore_list:
|
||||
if (check_access(thd,INSERT_ACL,"mysql",0,1,0,0))
|
||||
break;
|
||||
#ifdef HAVE_DLOPEN
|
||||
if (sp_find_function(thd, lex->spname))
|
||||
if (sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
|
||||
&thd->sp_func_cache, FALSE))
|
||||
{
|
||||
my_error(ER_UDF_EXISTS, MYF(0), lex->spname->m_name.str);
|
||||
goto error;
|
||||
@@ -4216,7 +4217,8 @@ end_with_restore_list:
|
||||
By this moment all needed SPs should be in cache so no need to look
|
||||
into DB.
|
||||
*/
|
||||
if (!(sp= sp_find_procedure(thd, lex->spname, TRUE)))
|
||||
if (!(sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname,
|
||||
&thd->sp_proc_cache, TRUE)))
|
||||
{
|
||||
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "PROCEDURE",
|
||||
lex->spname->m_qname.str);
|
||||
@@ -4340,9 +4342,11 @@ end_with_restore_list:
|
||||
|
||||
memcpy(&chistics, &lex->sp_chistics, sizeof(chistics));
|
||||
if (lex->sql_command == SQLCOM_ALTER_PROCEDURE)
|
||||
sp= sp_find_procedure(thd, lex->spname);
|
||||
sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname,
|
||||
&thd->sp_proc_cache, FALSE);
|
||||
else
|
||||
sp= sp_find_function(thd, lex->spname);
|
||||
sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
|
||||
&thd->sp_func_cache, FALSE);
|
||||
mysql_reset_errors(thd, 0);
|
||||
if (! sp)
|
||||
{
|
||||
@@ -4418,9 +4422,11 @@ end_with_restore_list:
|
||||
char *db, *name;
|
||||
|
||||
if (lex->sql_command == SQLCOM_DROP_PROCEDURE)
|
||||
sp= sp_find_procedure(thd, lex->spname);
|
||||
sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname,
|
||||
&thd->sp_proc_cache, FALSE);
|
||||
else
|
||||
sp= sp_find_function(thd, lex->spname);
|
||||
sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, lex->spname,
|
||||
&thd->sp_func_cache, FALSE);
|
||||
mysql_reset_errors(thd, 0);
|
||||
if (sp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user