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-34316 Ignore the NOCOPY keyword in stored routine parameters when sql_mode=ORACLE #3517

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

wong-github1
Copy link
Contributor

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

Description

During sql_mode=ORACLE, ignore the NOCOPY keyword in stored routineparameters. The optimization (pass-by-reference instead of pass-by-value) helping to avoid value copying will be done in a separate task when needed.

Release Notes

Ignore the NOCOPY keyword in stored routine parameters when sql_mode=ORACLE

How can this PR be tested?

mysql-test/mtr sp-ignore_nocopy

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.

@LinuxJedi
Copy link
Contributor

Hi @wong-github1,

Unfortunately this is causing test failures, this is because the NOCOPY keyword is also used for ALTER TABLE, for example:

ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY

@wong-github1
Copy link
Contributor Author

wong-github1 commented Sep 13, 2024

Hi @wong-github1,

Unfortunately this is causing test failures, this is because the NOCOPY keyword is also used for ALTER TABLE, for example:

ALTER TABLE t1 MODIFY d DOUBLE DEFAULT 10, ALGORITHM=NOCOPY

Hi @LinuxJedi (Andrew),

Thank you so much in pointing out the error. I have just fixed it.

Copy link
Contributor

@LinuxJedi LinuxJedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for fixing that, I'll hand over to @abarkov for final review.

Copy link
Contributor

@FooBarrior FooBarrior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @wong-github1! Thank you for your efforts.

For the ORACLE compatibility mode we have an compat/oracle suite. I think you can put your tests in the sp-param.test file in that suite.

Also I think we can avoid an extra switch in your ALTER TABLE fix. Can you please update it according to my suggestion?

Kind regards.

sql/sql_yacc.yy Outdated Show resolved Hide resolved
sql/sql_yacc.yy Outdated Show resolved Hide resolved
@FooBarrior FooBarrior removed the request for review from abarkov September 26, 2024 22:11
@wong-github1
Copy link
Contributor Author

Hi @FooBarrior ,
Thanks for your review. I have made the corresponding revision.
Need your help to review again and once again, thank you.

@FooBarrior FooBarrior enabled auto-merge (rebase) October 3, 2024 21:35
…ne parameters

During sql_mode=ORACLE, ignore the NOCOPY keyword in stored routine
parameters. The optimization (pass-by-reference instead of
pass-by-value) helping to avoid value copying will be done in a separate
task when needed.
…ts into the compat/oracle suite, sp-param.test file. 2. Remove the added unit test file and result file. 3. Add type, Alter_info::enum_alter_table_algorithm, into the union. 4. Remove the extra switch case
@FooBarrior FooBarrior merged commit 383d1f9 into MariaDB:main Oct 3, 2024
12 of 14 checks passed
@FooBarrior
Copy link
Contributor

Hello again @wong-github1!

Our QA has found a bug within this patch: MDEV-35229. Can you please take a look?

The bug is serious and the priority is high, so would be nice if you can take a look as soon as possible.

If any questions, reach me out in MariaDB's zulip:
https://mariadb.zulipchat.com/#user/127697

Best regards

Nikita

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.

4 participants