-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ticdc: add a faq about generated column #19035
base: master
Are you sure you want to change the base?
Conversation
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@wk989898: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
Hi @wk989898, would you please involve tech reviewers for this PR? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
@@ -323,3 +323,11 @@ TiDB 有事务超时的机制,当事务运行超过 [`max-txn-ttl`](/tidb-conf | |||
} | |||
] | |||
``` | |||
|
|||
## DML 中的生成列会发生什么行为? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## DML 中的生成列会发生什么行为? | |
## TiCDC 会同步 DML 操作中的生成列吗? |
|
||
## DML 中的生成列会发生什么行为? | ||
|
||
生成列包括存储生成列和虚拟生成列。TICDC 会忽略虚拟生成列,而仅复制存储生成列到下游。当下游是 MySQL 数据库或其他与 MySQL 兼容的数据库,而不是 Kakfa 或其他存储服务时,存储生成列也会被忽略。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
生成列包括存储生成列和虚拟生成列。TICDC 会忽略虚拟生成列,而仅复制存储生成列到下游。当下游是 MySQL 数据库或其他与 MySQL 兼容的数据库,而不是 Kakfa 或其他存储服务时,存储生成列也会被忽略。 | |
生成列包括虚拟生成列和存储生成列。TiCDC 会忽略虚拟生成列,而仅同步存储生成列到下游。当下游是 MySQL 或其他与 MySQL 兼容的数据库,而不是 Kakfa 或其他存储服务时,存储生成列也会被忽略。 |
> **Note:** | ||
> | ||
> 当复制存储生成列到 Kafka 或存储服务后,再写回 MySQL 时,可能会发生错误 `Error 3105 (HY000): The value specified for generated column 'xx' in table 'xxx' is not allowed`。您可以使用[Open Protocol](https://docs.pingcap.com/zh/tidb/stable/ticdc-open-protocol#ticdc-open-protocol)来避免此错误,因为该协议携带 column flag, 可以区分是否为生成列。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> **Note:** | |
> | |
> 当复制存储生成列到 Kafka 或存储服务后,再写回 MySQL 时,可能会发生错误 `Error 3105 (HY000): The value specified for generated column 'xx' in table 'xxx' is not allowed`。您可以使用[Open Protocol](https://docs.pingcap.com/zh/tidb/stable/ticdc-open-protocol#ticdc-open-protocol)来避免此错误,因为该协议携带 column flag, 可以区分是否为生成列。 | |
> **注意:** | |
> | |
> 当同步存储生成列到 Kafka 或存储服务后,再将其写回 MySQL 时,可能会遇到 `Error 3105 (HY000): The value specified for generated column 'xx' in table 'xxx' is not allowed` 错误。为避免该错误,你可以使用 [Open Protocol](/ticdc/ticdc-open-protocol.md#ticdc-open-protocol) 进行同步。该协议的输出包含[列的 flag 值](/ticdc/ticdc-open-protocol.md#列标志位),可以区分是否为生成列。 |
[LGTM Timeline notifier]Timeline:
|
First-time contributors' checklist
What is changed, added or deleted? (Required)
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).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?