[MDEV-30906] Variable alter_algorithm=COPY takes precedence over explicit ALGORITHM clause Created: 2023-03-22 Updated: 2023-08-15 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table, Variables |
| Affects Version/s: | 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0 |
| Fix Version/s: | 11.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
ALTER TABLE with explicit unsupported algorithm is still executed when alter_algorithm variable is set to COPY. Apparently, the explicit algorithm is quietly ignored.
It contradicts the variable documentation, as well as common sense. Noticeably, it's not the universal rule "variable takes precedence over the clause", apparently it is specific to the COPY algorithm. It doesn't happen with alter_algorithm=INPLACE which is also supported for the operation:
Even if was at some point intentional (maybe some legacy reasons), I think it should be made uniform and consistent. I'm not sure however that it can be done post-GA, so I'm setting fix version to the next RC. Please adjust if needed.
|
| Comments |
| Comment by Nikita Malyavin [ 2023-06-28 ] | |||
|
Will likely be fixed as part of
| |||
| Comment by Elena Stepanova [ 2023-07-01 ] | |||
|
For a note to interested parties, fixing this might potentially cause a problem with OM => NS replication, as always when something that was allowed before becomes prohibited. Still, I think it is an obvious error which needs to be fixed, and I don't see how it can be done without potentially breaking replication. Hopefully not so many users have it set to a non-default value and still use an explicit ALGORITHM clause in their ALTERs. Of course, it concerns having alter-algorithm as a startup option. If the variable is changed dynamically, like in the test case, it will cause replication problems anyway, as many dynamic variables do. |