diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-31 23:00:02 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-31 23:00:02 +0400 |
commit | c9218ff43989bf2385d1f62b45ed1f6229cbc5a5 (patch) | |
tree | a99c10f5e304662f3b51141871f94ee64eebaee6 /sql/item_func.cc | |
parent | 4937474f862010c90f76bf879a70c1edf17e7c85 (diff) | |
download | mariadb-git-c9218ff43989bf2385d1f62b45ed1f6229cbc5a5.tar.gz |
MDEV-13415 Wrap the code in sp.cc into a class Sp_handler
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index b44b29c15a5..ebd5d9860d6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -6264,8 +6264,7 @@ Item_func_sp::init_result_field(THD *thd) DBUG_ASSERT(m_sp == NULL); DBUG_ASSERT(sp_result_field == NULL); - if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, - &thd->sp_func_cache, TRUE))) + if (!(m_sp= sp_handler_function.sp_find_routine(thd, m_name, true))) { my_missing_function_error (m_name->m_name, ErrConvDQName(m_name).ptr()); context->process_error(thd); @@ -6514,7 +6513,8 @@ Item_func_sp::sp_check_access(THD *thd) DBUG_ENTER("Item_func_sp::sp_check_access"); DBUG_ASSERT(m_sp); if (check_routine_access(thd, EXECUTE_ACL, - m_sp->m_db.str, m_sp->m_name.str, 0, FALSE)) + m_sp->m_db.str, m_sp->m_name.str, + &sp_handler_function, false)) DBUG_RETURN(TRUE); DBUG_RETURN(FALSE); @@ -6540,7 +6540,8 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) thd->security_ctx= context->security_ctx; res= check_routine_access(thd, EXECUTE_ACL, m_name->m_db.str, - m_name->m_name.str, 0, FALSE); + m_name->m_name.str, + &sp_handler_function, false); thd->security_ctx= save_security_ctx; if (res) @@ -6583,7 +6584,7 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) Try to set and restore the security context to see whether it's valid */ Security_context *save_secutiry_ctx; - res= set_routine_security_ctx(thd, m_sp, false, &save_secutiry_ctx); + res= set_routine_security_ctx(thd, m_sp, &save_secutiry_ctx); if (!res) m_sp->m_security_ctx.restore_security_context(thd, save_secutiry_ctx); |