Bug#121124 Ignore unchanged CHECK columns for online DDL - #723
Bug#121124 Ignore unchanged CHECK columns for online DDL#723modasserbillah wants to merge 2 commits into
Conversation
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
|
I have signed an OCA which is under review. The CI workflows seem to block the checkout step for PRs from forks. @gopshank please let me know if I need to follow a different procedure for filing the PR. |
Sure, we shall check and get back. |
|
Thank you for signing the OCA. |
|
@modasserbillah Can you rebase your branch on latest trunk to pick up the fixed Github CI/CD actions ? |
Problem: ======== A column-definition ALTER checks every column referenced by an enforced CHECK constraint for type changes. Unchanged DATETIME columns use different internal type representations in Item_field and Create_field, so an unrelated instant ENUM extension is incorrectly forced to use COPY. Solution: ========= Only compare CHECK-referenced column types for Create_field entries that represent changed columns. Add MTR coverage for INSTANT and INPLACE ENUM extensions with an unrelated CHECK on DATETIME(6). Signed-off-by: Modasser Billah <imtishad@gmail.com>
8271e79 to
6f04097
Compare
|
@RidhaOracle done! |
|
The formatting failure lines reported are not part of my PR. |
|
Looks like the failures are unrelated @RidhaOracle please let me know if there's something to do on my side. |
|
@RidhaOracle @phulakun just following up in case you want me to make any changes. |
phulakun
left a comment
There was a problem hiding this comment.
Hello @modasserbillah
Thank you for addressing the review comments. Changes look good to me.
Regards,
Praveen
|
Thanks @phulakun , what's the next step to get this merged? Also, is there a way to ship this to version 8.0.42? |
|
@gopshank @RidhaOracle please guide me to the next steps to get this merged, thanks! |
|
Triggering the CI/CD pipelines and then will move it to integrate. |
What does this change do?
Only compare a CHECK-referenced column's type when its
Create_fieldrepresents a column changed by the ALTER. It also adds MTR coverage for both INSTANT and INPLACE ENUM extensions when an unrelated enforced CHECK referencesDATETIME(6).Why is it needed?
When any
MODIFY COLUMNsetsALTER_CHANGE_COLUMN, the CHECK-constraint evaluation code currently examines unchanged columns too.Item_fieldreports an unchangedDATETIME(6)asMYSQL_TYPE_DATETIME, whileCreate_fieldreports it asMYSQL_TYPE_DATETIME2. MySQL therefore falsely concludes that the checked column changed and requires a table copy for an otherwise metadata-only ENUM extension.Fixes MySQL Bug #121124.
How was it tested?
mysql-test/scripts/ci/mtr.shpasses locallygit diff --checkpasses and the changed C++ code was formatted with the repository configuration. A local Debug build was attempted on macOS, but the host's global Homebrew Protobuf 29.1 headers conflict with MySQL's bundled Protobuf 24.4 before the build reaches the changed code. The upstream Linux CI build and MTR run are therefore the authoritative validation.The initial GitHub build, MTR, and format jobs also fail before checkout because the repository's
pull_request_targetworkflows do not opt in to checking out fork PR code under the currentactions/checkoutsecurity policy. No PR code is compiled, formatted, or tested in those failed jobs.Contributor checklist
scripts/ci/format.sh)AI assistance
OpenAI Codex assisted with root-cause analysis, the code change, regression-test preparation, and this pull request description.
Areas touched
check_constraintsMTR coverage