This task is a part of
MDEV-10591 Oracle-style packages.
In order for packages to reuse all routine features, such as:
- package-wide variables, exceptions, cursors, etc
- package executable initialization block
under terms of
MDEV-10591we'll introduce new classes (with proposed names Package and Package_body)
and derived these classes from sp_head.
To simplify initialization of the Package* instances, we need to move most the code from sp_head::init to sp_head::sp_head.
The relevant code:
Currently new instances of sp_head are created by LEX::make_sp_head, in this code:
Notice, the constructor call in new is immediately followed by init(this).
After this task, the above members will be initialized in the constructor rather than in init().