diff options
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 67a3865057f..94278371fd0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1584,6 +1584,18 @@ mysql_execute_command(THD *thd) DBUG_ENTER("mysql_execute_command"); /* + Clear the SP function cache before each statement (QQ this is a temporary + solution; caching will be rehacked later), and the new ones. + */ + sp_clear_function_cache(thd); + if (lex->sql_command != SQLCOM_CREATE_PROCEDURE && + lex->sql_command != SQLCOM_CREATE_FUNCTION) + { + if (sp_cache_functions(thd, lex)) + DBUG_RETURN(-1); + } + + /* Reset warning count for each query that uses tables A better approach would be to reset this for any commands that is not a SHOW command or a select that only access local |