diff options
author | Georgi Kodinov <joro@sun.com> | 2009-05-27 18:19:44 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-05-27 18:19:44 +0300 |
commit | c675beab98d90e2f1a606c17d106740d1394071a (patch) | |
tree | ef20b1214af011ce8ef6a3fb904fb115e723cb71 /sql/item_func.cc | |
parent | c8a7b7914203a95c30ce45e800f7676744248bf7 (diff) | |
parent | 80730df7d634e1a620c864d6665d6e66ccad447a (diff) | |
download | mariadb-git-c675beab98d90e2f1a606c17d106740d1394071a.tar.gz |
merged 5.0-bugteam to 5.1-bugteam
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 0c8f236a27c..85e5de7b980 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5802,6 +5802,14 @@ Item_func_sp::func_name() const } +int my_missing_function_error(const LEX_STRING &token, const char *func_name) +{ + if (token.length && is_lex_native_function (&token)) + return my_error(ER_FUNC_INEXISTENT_NAME_COLLISION, MYF(0), func_name); + else + return my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", func_name); +} + /** @brief Initialize the result field by creating a temporary dummy table @@ -5834,7 +5842,7 @@ Item_func_sp::init_result_field(THD *thd) if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, &thd->sp_func_cache, TRUE))) { - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); + my_missing_function_error (m_name->m_name, m_name->m_qname.str); context->process_error(thd); DBUG_RETURN(TRUE); } |