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

Allow caller to set the algorithm that will be used for DDL ALTER TABLE operations #173

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

chitty
Copy link

@chitty chitty commented Sep 4, 2024

Allow callers to set the algorithm that will be used for DDL ALTER TABLE operations instead of hardcoding it to INPLACE.

There is a DDL limitation where using the INPLACE algorithm fails, and COPY should be used instead:

Tables created before MySQL 5.6 that include temporal columns (DATE, DATETIME or TIMESTAMP) and have not been rebuilt using ALGORITHM=COPY do not support ALGORITHM=INPLACE. In this case, an ALTER TABLE ... ALGORITHM=INPLACE operation returns the following error:

ERROR 1846 (0A000): ALGORITHM=INPLACE is not supported.
Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.

There was also an issue reported earlier in which using the INPLACE algorithm fails, and using COPY is recommended by the resulting error message.

@chitty chitty force-pushed the cc-pass-param-to-allow-changing-algo-to-be-used branch from de3af3c to a63fde7 Compare September 4, 2024 17:55
@chitty chitty marked this pull request as ready for review September 4, 2024 18:29
@chitty chitty changed the title Allow caller to set the algorithm that will be used for DDL operations Allow caller to set the algorithm that will be used for DDL ALTER TABLE operations Sep 4, 2024
@chitty chitty requested a review from coding-chimp September 4, 2024 18:36
@chitty chitty force-pushed the cc-pass-param-to-allow-changing-algo-to-be-used branch 3 times, most recently from 29f56bc to cd7a21b Compare September 4, 2024 19:33
@chitty chitty force-pushed the cc-pass-param-to-allow-changing-algo-to-be-used branch 2 times, most recently from e18d3b3 to caa0e6c Compare September 4, 2024 20:29
@chitty chitty force-pushed the cc-pass-param-to-allow-changing-algo-to-be-used branch from caa0e6c to 5a7dc40 Compare September 4, 2024 20:32
@chitty chitty force-pushed the cc-pass-param-to-allow-changing-algo-to-be-used branch from 5a7dc40 to f8c3bab Compare September 5, 2024 13:24
@chitty chitty merged commit 0307198 into master Sep 5, 2024
56 checks passed
@coding-chimp coding-chimp deleted the cc-pass-param-to-allow-changing-algo-to-be-used branch February 7, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants