Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDEV-34317 Implement RECORD type #3515

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

iqbal-rsec
Copy link

@iqbal-rsec iqbal-rsec commented Sep 13, 2024

Implement DECLARE TYPE type_name IS RECORD (..) with scalar members in
stored routines and anonymous blocks

  • The Jira issue number for this PR is: MDEV-34317

Description

The patch implements RECORD type with the grammar DECLARE TYPE type_name IS RECORD (..) for sql_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

  • This is a new feature or a refactoring, and the PR is based against the main branch.
  • This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

@CLAassistant
Copy link

CLAassistant commented Sep 13, 2024

CLA assistant check
All committers have signed the CLA.

@iqbal-rsec iqbal-rsec force-pushed the feature/MDEV-34317 branch 4 times, most recently from 4f0a304 to 97439b3 Compare September 13, 2024 06:34
Implement `DECLARE TYPE type_name IS RECORD (..)` with scalar members in
 stored routines and anonymous blocks
…te table

Set the real type handler from the item which contains the resolved data type.
Additional test case was added to test for this.

Patch provided by Alexander Barkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants