1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-09 11:41:36 +03:00
Commit Graph

3 Commits

Author SHA1 Message Date
Sergei Golubchik
c21d462e6a Merge branch 'bb-11.4-serg' into bb-11.8-serg 2025-11-04 18:27:52 +01:00
Raghunandan Bhat
29d8f65470 MDEV-37489: SIGSEGV in get_param_default_value | store_schema_params
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.
2025-10-15 19:41:50 +05:30
Iqbal Hassan
dfdbec1636 MDEV-10862: Stored procedures: default values for parameters (optional parameters)
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).
2025-01-31 19:42:04 +04:00