Status: Closed (View Workflow)
This is a self-containing sub-task of
It's done separately, to reduce the patch size for
MDEV-10591, to easier reviewing purposes.
Currently SQLCOM_CALL is handled in a huge piece of code in a switch in mysql_execute_command():
// around 50 code lines
We'll introduce a new class Sql_cmd_call and move this code to Sql_cmd_call::execute.
After this change, CALL statements will be handled in the same way with other statements using Sql_cmd based implementations:
- ALTER TABLE
- ALTER SEQUENCE
- GET DIAGNOSTICS
MDEV-10591will need more data (other than LEX::sphead) to execute the query: a pointer to Sp_handler will be needed, to distinguish between calls for standalone vs package procedures. Adding a new member to LEX is not a good idea.
- All statements should eventually be refactored to use the Sql_cmd infrastructure anyway.
MDEV-10591 Oracle-style packages