Skip to content

Commit

Permalink
ticdc: add a faq about generated column (#19369) (#20105)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jan 22, 2025
1 parent 591ea98 commit d3fd586
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ticdc/ticdc-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,11 @@ This is because the default port number of the TiCDC cluster deployed by TiDB Op
}
]
```

## Does TiCDC replicate generated columns of DML operations?

Generated columns include virtual generated columns and stored generated columns. TiCDC ignores virtual generated columns and only replicates stored generated columns to the downstream. However, stored generated columns are also ignored when the downstream is MySQL or another MySQL-compatible database (rather than Kafka or other storage services).

> **Note:**
>
> When replicating stored generated columns to Kafka or a storage service and then writing them back to MySQL, `Error 3105 (HY000): The value specified for generated column 'xx' in table 'xxx' is not allowed` might occur. To avoid this error, you can use [Open Protocol](/ticdc/ticdc-open-protocol.md#ticdc-open-protocol) for replication. The output of this protocol includes [bit flags of columns](/ticdc/ticdc-open-protocol.md#bit-flags-of-columns), which can distinguish whether a column is a generated column.

0 comments on commit d3fd586

Please sign in to comment.