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

parser,ddl: Support ENGINE_ATTRIBUTE option for future use #59201

Merged
merged 6 commits into from
Jan 27, 2025

Conversation

pingyu
Copy link
Contributor

@pingyu pingyu commented Jan 24, 2025

What problem does this PR solve?

Issue Number: close #59200

Problem Summary: Support ENGINE_ATTRIBUTE option

What changed and how does it work?

  • Add ENGINE_ATTRIBUTE syntax to parser.
  • Handle ENGINE_ATTRIBUTE on creating and altering table. But currently just return error about it's not supported.

Error code and message ref https://downloads.mysql.com/docs/mysql-errors-8.0-en.a4.pdf:

Error number: 3981; Symbol: ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED; SQLSTATE: HY000
Message: Storage engine '%s' does not support ENGINE_ATTRIBUTE.
ER_ENGINE_ATTRIBUTE_NOT_SUPPORTED was added in 8.0.21.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
mysql root@127.0.0.1:test> CREATE TABLE t5 (id INT PRIMARY KEY, value VARCHAR(16383)) ENGINE_ATTRIBUTE = '{"key": "value}';
(3981, 'Storage engine does not support ENGINE_ATTRIBUTE.')
mysql root@127.0.0.1:test> CREATE TABLE t5 (id INT PRIMARY KEY, value VARCHAR(16383));
Query OK, 0 rows affected
Time: 0.016s
mysql root@127.0.0.1:test> ALTER TABLE t5 ENGINE_ATTRIBUTE = '{"key": "value}';
You're about to run a destructive command.
Do you want to proceed? (y/n): y
Your call!
(3981, 'Storage engine does not support ENGINE_ATTRIBUTE.')
mysql [email protected]:test>

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

parser,ddl: Support ENGINE_ATTRIBUTE option for future use

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 24, 2025
Copy link

tiprow bot commented Jan 24, 2025

Hi @pingyu. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.8295%. Comparing base (77d35b9) to head (1da4702).
Report is 8 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #59201        +/-   ##
================================================
+ Coverage   73.0466%   74.8295%   +1.7828%     
================================================
  Files          1689       1735        +46     
  Lines        466937     475614      +8677     
================================================
+ Hits         341082     355900     +14818     
+ Misses       104889      97238      -7651     
- Partials      20966      22476      +1510     
Flag Coverage Δ
integration 48.7199% <100.0000%> (?)
unit 72.2332% <0.0000%> (-0.0064%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.6910% <ø> (ø)
parser ∅ <ø> (∅)
br 60.8085% <ø> (+15.4508%) ⬆️

Signed-off-by: Ping Yu <[email protected]>
Signed-off-by: Ping Yu <[email protected]>
Signed-off-by: Ping Yu <[email protected]>
@pingyu
Copy link
Contributor Author

pingyu commented Jan 24, 2025

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jan 24, 2025
@pingyu
Copy link
Contributor Author

pingyu commented Jan 24, 2025

/test fast_test_tiprow

Copy link

ti-chi-bot bot commented Jan 24, 2025

@pingyu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test check-dev
/test check-dev2
/test mysql-test
/test pull-br-integration-test
/test pull-integration-ddl-test
/test pull-integration-e2e-test
/test pull-lightning-integration-test
/test pull-mysql-client-test
/test pull-unit-test-ddlv1
/test unit-test

The following commands are available to trigger optional jobs:

/test pingcap/tidb/canary_ghpr_unit_test
/test pull-common-test
/test pull-e2e-test
/test pull-integration-common-test
/test pull-integration-copr-test
/test pull-integration-jdbc-test
/test pull-integration-mysql-test
/test pull-integration-nodejs-test
/test pull-integration-python-orm-test
/test pull-scan-deps
/test pull-sqllogic-test
/test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

pingcap/tidb/ghpr_build
pingcap/tidb/ghpr_check
pingcap/tidb/ghpr_check2
pingcap/tidb/ghpr_mysql_test
pingcap/tidb/ghpr_unit_test
pingcap/tidb/pull_br_integration_test
pingcap/tidb/pull_integration_ddl_test
pingcap/tidb/pull_integration_e2e_test
pingcap/tidb/pull_lightning_integration_test
pingcap/tidb/pull_mysql_client_test
pingcap/tidb/pull_unit_test_ddlv1

In response to this:

/test fast_test_tiprow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link

tiprow bot commented Jan 24, 2025

@ti-chi-bot[bot]: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test fast_test_tiprow
  • /test tidb_parser_test

Use /test all to run all jobs.

In response to this:

@pingyu: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test build
/test check-dev
/test check-dev2
/test mysql-test
/test pull-br-integration-test
/test pull-integration-ddl-test
/test pull-integration-e2e-test
/test pull-lightning-integration-test
/test pull-mysql-client-test
/test pull-unit-test-ddlv1
/test unit-test

The following commands are available to trigger optional jobs:

/test pingcap/tidb/canary_ghpr_unit_test
/test pull-common-test
/test pull-e2e-test
/test pull-integration-common-test
/test pull-integration-copr-test
/test pull-integration-jdbc-test
/test pull-integration-mysql-test
/test pull-integration-nodejs-test
/test pull-integration-python-orm-test
/test pull-scan-deps
/test pull-sqllogic-test
/test pull-tiflash-test

Use /test all to run the following jobs that were automatically triggered:

pingcap/tidb/ghpr_build
pingcap/tidb/ghpr_check
pingcap/tidb/ghpr_check2
pingcap/tidb/ghpr_mysql_test
pingcap/tidb/ghpr_unit_test
pingcap/tidb/pull_br_integration_test
pingcap/tidb/pull_integration_ddl_test
pingcap/tidb/pull_integration_e2e_test
pingcap/tidb/pull_lightning_integration_test
pingcap/tidb/pull_mysql_client_test
pingcap/tidb/pull_unit_test_ddlv1

In response to this:

/test fast_test_tiprow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@pingyu
Copy link
Contributor Author

pingyu commented Jan 25, 2025

/retest

2 similar comments
@pingyu
Copy link
Contributor Author

pingyu commented Jan 26, 2025

/retest

@pingyu
Copy link
Contributor Author

pingyu commented Jan 26, 2025

/retest

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jan 26, 2025
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 26, 2025
Copy link

ti-chi-bot bot commented Jan 26, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-26 03:58:34.287039069 +0000 UTC m=+585241.617958468: ☑️ agreed by coocood.
  • 2025-01-26 06:39:18.321894147 +0000 UTC m=+594885.652813548: ☑️ agreed by breezewish.

Copy link

ti-chi-bot bot commented Jan 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: breezewish, coocood, tangenta, yudongusa

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the approved label Jan 27, 2025
@ti-chi-bot ti-chi-bot bot merged commit d0d4876 into pingcap:master Jan 27, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ENGINE_ATTRIBUTE option
5 participants