Skip to content

sql-statement: update sql-statement-change-column #13817

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

HuSharp
Copy link
Contributor

@HuSharp HuSharp commented Apr 26, 2023

What is changed, added or deleted? (Required)

  • Update the format of usage section: add more description about SQL statements, remove "Query OK", and move some examples to "Compatibility with MySQL"
  • Update the limitation of "ERROR 1105 (HY000): can't run multi schema change". In TiDB v5.0, tidb_enable_change_multi_schema is introduced to run multiple schema change and TiDB v6.2.0 supports multiple schema change by default.

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 (in Chinese).

  • master (the latest development version)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

looks so strange...
image

Signed-off-by: husharp <[email protected]>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Apr 26, 2023

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Oreoxmt

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 26, 2023
@Oreoxmt Oreoxmt added type/enhancement The issue or PR belongs to an enhancement. translation/doing This PR’s assignee is translating this PR. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.0 and removed missing-translation-status This PR does not have translation status info. labels Apr 27, 2023
@Oreoxmt Oreoxmt self-assigned this Apr 27, 2023
@Oreoxmt Oreoxmt self-requested a review April 27, 2023 09:37
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 27, 2023
@Oreoxmt Oreoxmt requested a review from djshow832 April 27, 2023 10:16
@Oreoxmt Oreoxmt added the area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. label Apr 27, 2023
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Apr 27, 2023

/status LGT1

@ti-chi-bot ti-chi-bot bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 27, 2023
@ti-chi-bot ti-chi-bot bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 27, 2023
@Oreoxmt Oreoxmt added the needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. label Apr 27, 2023
@Oreoxmt Oreoxmt added the requires-version-specific-changes After cherry-picked, the cherry-picked PR requires further changes. label Apr 27, 2023
@Oreoxmt Oreoxmt requested a review from ran-huang April 27, 2023 10:49
ALTER TABLE t CHANGE COLUMN b b VARCHAR(10);
ERROR 8200 (HY000): Unsupported modify column: newCol IsGenerated false, oldCol IsGenerated true
```

* 不支持部分数据类型(例如,部分时间类型、Bit、Set、Enum、JSON 等)的变更,因为 TiDB 中 `CAST` 函数与 MySQL 的行为存在兼容性问题。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cast 的兼容性问题有文档描述吗?看 cast 函数的文档里没有提

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一些问题,没有文档

Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

Comment on lines 17 to 26

## MySQL 兼容性

TiDB 不支持部分数据类型的变更,例如部分时间类型、Bit、Set、Enum 和 JSON 等。

```sql
CREATE TABLE t (a DECIMAL(13, 7));
ALTER TABLE t CHANGE COLUMN a a DATETIME;
ERROR 8200 (HY000): Unsupported modify column: [ddl:8200]Unsupported modify column: change from original type decimal(13,7) to datetime is currently unsupported yet
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AilinKid 在 cast 函数文档中添加了兼容性说明 PTAL

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 15, 2023
@Oreoxmt Oreoxmt added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label May 29, 2023
Signed-off-by: husharp <[email protected]>
@ti-chi-bot ti-chi-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 31, 2023
Signed-off-by: husharp <[email protected]>
@qiancai
Copy link
Collaborator

qiancai commented Aug 25, 2023

Removed the needs-cherry-pick-release-7.0 label because the v7.0 docs have been archived at https://docs-archive.pingcap.com/zh/tidb/v7.0 and will no longer receive new updates.

@qiancai
Copy link
Collaborator

qiancai commented Oct 20, 2023

Removed the needs-cherry-pick-release-7.2 label because the v7.2 docs have been archived at https://docs-archive.pingcap.com/zh/tidb/v7.2 and will no longer receive new updates.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 26, 2024
Copy link

ti-chi-bot bot commented Apr 26, 2024

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sql-infra Indicates that the Issue or PR belongs to the area of sql-infra and sql-metadata. needs-cherry-pick-release-6.1 Should cherry pick this PR to release-6.1 branch. needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. requires-version-specific-changes After cherry-picked, the cherry-picked PR requires further changes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. status/LGT2 Indicates that a PR has LGTM 2. translation/doing This PR’s assignee is translating this PR. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants