Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
This is a self-containing sub-task of MDEV-10591.
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():
case SQLCOM_CALL: |
{
|
// 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
- CHECK
- OPTIMIZE
- REPAIR
- SIGNAL
- RESIGNAL
- GET DIAGNOSTICS
- TRUNCATE
Reasoning:
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.
Attachments
Issue Links
- blocks
-
MDEV-10591 Oracle-style packages
- Closed