mirror of
https://github.com/MariaDB/server.git
synced 2025-10-28 17:15:19 +03:00
Made FUNCTIONs work in insert and select queries, as well as nested function invocations.
Had to add a cahing mechanism which is in parts an ugly kludge, but it will be reworked once the real SP caching is implemented.
This commit is contained in:
@@ -1583,6 +1583,18 @@ mysql_execute_command(THD *thd)
|
||||
SELECT_LEX_UNIT *unit= &lex->unit;
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user