diff options
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index 428ca5aa90e..442e5c53675 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3069,19 +3069,25 @@ Item_func_sp::execute(Item **itp) { DBUG_ENTER("Item_func_sp::execute"); THD *thd= current_thd; - st_sp_security_context save_ctx; int res; +#ifndef NO_EMBEDDED_ACCESS_CHECKS + st_sp_security_context save_ctx; +#endif if (! m_sp) m_sp= sp_find_function(thd, &m_name); if (! m_sp) DBUG_RETURN(-1); +#ifndef NO_EMBEDDED_ACCESS_CHECKS sp_change_security_context(thd, m_sp, &save_ctx); +#endif res= m_sp->execute_function(thd, args, arg_count, itp); +#ifndef NO_EMBEDDED_ACCESS_CHECKS sp_restore_security_context(thd, m_sp, &save_ctx); +#endif DBUG_RETURN(res); } |