Description:
Hi,
the documentation page for "Exchanging Partitions and Subpartitions with Tables" [1a] [1b] [1c] does not mention the limitation of ALGORITHM=INSTANT.
[1a]: https://dev.mysql.com/doc/refman/8.0/en/partitioning-management-exchange.html
[1b]: https://dev.mysql.com/doc/refman/8.4/en/partitioning-management-exchange.html
[1c]: https://dev.mysql.com/doc/refman/9.6/en/partitioning-management-exchange.html
In the documentation page for "ALTER TABLE Statement" [2a] [2b] [2c], we can read:
> After adding a column to a partitioned table using ALGORITHM=INSTANT, it is no longer possible to perform ALTER TABLE ... EXCHANGE PARTITION on the table.
[2a]: https://dev.mysql.com/doc/refman/8.0/en/alter-table.html
[2b]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
[2c]: https://dev.mysql.com/doc/refman/9.6/en/alter-table.html
Also in the documentation page for "ALTER TABLE Partition Operations" [3a] [3b] [3c], we can read:
> Once one or more columns have been added to a partitioned table using ALGORITHM=INSTANT, it is no longer possible to exchange partitions with that table.
[3a]: https://dev.mysql.com/doc/refman/8.0/en/alter-table-partition-operations.html
[3b]: https://dev.mysql.com/doc/refman/8.4/en/alter-table-partition-operations.html
[3c]: https://dev.mysql.com/doc/refman/9.6/en/alter-table-partition-operations.html
I would expect the documentation page for "Exchanging Partitions and Subpartitions with Tables", which is the goto place for the procedure about EXCHANGE PARTITION to also mention the limitation of ALGORITHM=INSTANT which is mentioned in the "ALTER TABLE Statement" and "ALTER TABLE Partition Operations" pages.
Note: it looks like the fix for Bug#104970 in Sep 2021 was done at two places ("ALTER TABLE Statement" and "ALTER TABLE Partition Operations"), but not at "Exchanging Partitions and Subpartitions with Tables".
Also, I guess this also applies to dropping a column to a partitioned table using ALGORITHM=INSTANT (I have not tested, but should be clarified in the docs; my guess is that these docs were not reviewed after introducing INSTANT DROP COLUMN in 8.0.29 / in 2022-04-26).
This bug is only a documentation bug, not a feature request to lift this limitation. Related to this limitation, Bug#95484 shows it is possible to have partitions with different ROW_FORMAT, so lifting this limitation should not be too complicated.
Thanks for looking into this,
Jean-François Gagné
How to repeat:
Check the doc.
Suggested fix:
Update doc "Exchanging Partitions and Subpartitions with Tables".