diff options
author | unknown <konstantin@mysql.com> | 2006-02-22 14:04:24 +0300 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2006-02-22 14:04:24 +0300 |
commit | ae8ed9fdf1dcfd0dde00e60b973965e3da68d34f (patch) | |
tree | 4324672b892ff589d9c5aa20cb3a5bc7c2665c63 /sql/sp.cc | |
parent | 1b6e7fdf55ebac968a2d8ef29a443d759f2765b8 (diff) | |
parent | 85e54a08c4fc468ab89f8df27bc981027cb22e6c (diff) | |
download | mariadb-git-ae8ed9fdf1dcfd0dde00e60b973965e3da68d34f.tar.gz |
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.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 4838f839b4e..481d81edfe4 100644 --- a/sql/sp.cc +++ b/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); |