Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implement
DECLARE TYPE type_name IS RECORD (..)
with scalar members instored routines and anonymous blocks
Description
The patch implements RECORD type with the grammar
DECLARE TYPE type_name IS RECORD (..)
forsql_mode=oracle;
for usage in anonymous blocks and stored routines with scalar fields.New error code has been introduced ER_SP_DUP_DECL which is thrown when the same identifier for a RECORD is used twice or more (duplicate declaration of a RECORD TYPE).
Limitations: please see MDEV-34317
Additionally support for RECORD type declaration in PACKAGEs, stored routine parameters are out of scope of this ticket, but is required by my org (please advice if new ticket is required).
Release Notes
Introduce support for RECORD collection type based on the Oracle DB grammar with scalar fields for sql_mode=oracle;.
I believe a new documentation page is needed for this.
How can this PR be tested?
mysql-test/mtr sp-record
Basing the PR against the correct MariaDB version
main
branch.PR quality check