Skip to content

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

Open
HuSharp wants to merge 6 commits into
pingcap:masterfrom
HuSharp:establish_sql_statement
Open

sql-statement: update sql-statement-change-column#13817
HuSharp wants to merge 6 commits into
pingcap:masterfrom
HuSharp:establish_sql_statement

Conversation

@HuSharp

@HuSharp HuSharp commented Apr 26, 2023

Copy link
Copy Markdown
Contributor

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 <jinhao.hu@pingcap.com>
@ti-chi-bot

ti-chi-bot Bot commented Apr 26, 2023

Copy link
Copy Markdown

[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.

Details

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
Signed-off-by: Aolin <aolin.zhang@pingcap.com>
@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

Oreoxmt commented Apr 27, 2023

Copy link
Copy Markdown
Contributor

/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
Comment thread sql-statements/sql-statement-change-column.md Outdated
@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
ERROR 8200 (HY000): Unsupported modify column: newCol IsGenerated false, oldCol IsGenerated true
```

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

有一些问题,没有文档

@ran-huang ran-huang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rest LGTM

Signed-off-by: Aolin <aolin.zhang@pingcap.com>
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
Copy Markdown
Contributor

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 <jinhao.hu@pingcap.com>
@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 <jinhao.hu@pingcap.com>
@qiancai

qiancai commented Aug 25, 2023

Copy link
Copy Markdown
Collaborator

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

qiancai commented Oct 20, 2023

Copy link
Copy Markdown
Collaborator

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
@ti-chi-bot

ti-chi-bot Bot commented Apr 26, 2024

Copy link
Copy Markdown

PR needs rebase.

Details

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.

@Oreoxmt Oreoxmt assigned qiancai and unassigned Oreoxmt Jun 10, 2026
@qiancai

qiancai commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

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

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.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