1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Refactor parts of Item_func_sp into Item_sp

In preparation for implementing custom aggregate functions, refactor
the common code between regular stored functions and aggregate stored
functions. This includes:

* initialising SP result field
* executing a SP
* access checks

In addition, refactor sp_head::execute_function to take two extra
parameters, a function rcontext and a Query_arena. These two paremeters
were initially initialised and destroyed within
sp_head::execute_function, but for aggregate stored functions we will
require control over their lifetime. The owner of these objects now
becomes Item_sp.

Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
This commit is contained in:
Varun Gupta
2017-11-23 10:38:04 +02:00
committed by Vicențiu Ciorbaru
parent b213f57dc3
commit c12d1ed48e
6 changed files with 296 additions and 259 deletions

View File

@@ -343,7 +343,8 @@ public:
GRANT_INFO *grant_info);
bool
execute_function(THD *thd, Item **args, uint argcount, Field *return_fld);
execute_function(THD *thd, Item **args, uint argcount, Field *return_fld,
sp_rcontext **nctx, Query_arena *call_arena);
bool
execute_procedure(THD *thd, List<Item> *args);