Repository navigation
docs: mention EXCHANGE support in mysql compatibility - #24655
doc-claw-bot wants to merge 3 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1 similar comment
1 similar comment
mjonss
left a comment
There was a problem hiding this comment.
Please make it simpler to understand, by only list what is not supported, instead of a mix of 'not supported' and 'X is supported. Other partition operations are ignored'
There was a problem hiding this comment.
Maybe list only what is not supported, instead of mixing "X is supported. Other partition operations are ignored" with "not supported". The current text is also incorrect: KEY partitioned tables do not support EXCHANGE PARTITION (ERROR 8200 (HY000): Unsupported partition type of table k when exchanging partition), and the other operations are not ignored, TiDB returns an error. Verified on v8.5.8 and master.
Suggest replacing lines 171-180 with:
* TiDB does not support the following partition operations and returns an error for them:
- `REORGANIZE PARTITION` on `HASH` and `KEY` partitioned tables
- `EXCHANGE PARTITION` on `KEY` partitioned tables, or on partitioned tables that contain [global indexes](/global-indexes.md#limitations-of-global-indexes)
- `{CHECK|OPTIMIZE|REPAIR|REBUILD} PARTITION`
- `{DISCARD|IMPORT} PARTITION ... TABLESPACE`
- `PARTITION BY` or `REMOVE PARTITIONING` combined with other changes in the same `ALTER TABLE` statement
For more details on partitioning, see [Partitioning](/partitioned-table.md).
* TiDB ignores `SUBPARTITION` definitions and returns a warning.
* TiDB ignores `LINEAR` in `LINEAR HASH` and `LINEAR KEY` partitioning and returns a warning. TiDB also uses a different hash algorithm than MySQL for `KEY` partitioning. Therefore, rows can be placed in different partitions than in MySQL, which affects partition selection, `TRUNCATE PARTITION`, and `EXCHANGE PARTITION`. For more information, see [Key partitioning](/partitioned-table.md#key-partitioning) and [How TiDB handles Linear Hash partitions](/partitioned-table.md#how-tidb-handles-linear-hash-partitions).
What is changed, added, or deleted? (Required)
This PR fixes
mysql-compatibility.mdto listEXCHANGEas a supported partition operation.The page previously said that other partition operations are ignored for Range/List and Hash/Key partitioned tables, which incorrectly implied that
EXCHANGE PARTITIONis unsupported.EXCHANGE PARTITIONbecame GA in v6.3.0 and is already documented inpartitioned-table.md.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
REORGANIZE PARTITIONis unsupported for Hash and Key tables, andEXCHANGE PARTITIONis unsupported for Key tables and tables with global indexes.ALTER TABLE.SUBPARTITIONdefinitions are ignored with a warning, as isLINEARinLINEAR HASHandLINEAR KEY.