Problem:
When an SP instruction fails during execution, it is re-parsed. During
this process, the items created on-behalf of the SP instruction are
cleaned up, re-parsed and SP instruction state is updated. The clean
up step frees the default parameters and the update step partially
updates the SP instruction state, leaving the `default_value` in
`sp_variable` pointing to the dangling reference.
Fix:
The SP instruction state is updated correctly, making the
`default_value` in `sp_variable` ponit to the re-parsed item.
Implement default values for parameters of stored routines
in both default and oracle mode.
- Default values for cursor parameters are *NOT* supported yet.
- An IN parameter with DEFAULT followed by an OUT param is not supported yet.
This combination will be enabled together with the arrow syntax:
sp1(v=>p2)
The default values can be either literals or expressions.
When it is an expression, it is only evaluated if the parameter
has not been supplied by the caller
(important if the expression has side effects).