TiCDC fill the default value without consider the real data type #10803
Closed
Description
opened on Mar 18, 2024
What did you do?
create table t (a int primary key, b varchar(100));
insert into t values (1, "nitto");
insert into t values (2, "hotd");
alter table t add column c int default 17;
update t set b = "earth" where a = 1;
delete from t where a = 4;
What did you expect to see?
The old value part for the column c
, should have type int
, instead of string
What did you see instead?
For both update and delete event, the old value is encoded as string
, instead of real data type int
. Since TiDB and TiCDC stores the default value as string
, and TiCDC just use that value without considering the column data type.
Versions of the cluster
Upstream TiDB cluster version (execute SELECT tidb_version();
in a MySQL client):
(paste TiDB cluster version here)
Upstream TiKV version (execute tikv-server --version
):
(paste TiKV version here)
TiCDC version (execute cdc version
):
master
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity