Skip to content

DM: data lost when upstream use binary as primary key #10672

@GMHDBJD

Description

@GMHDBJD

What did you do?

create an incremental task, execute following queries in upstream

create table tb(a int, b binary(16) primary key);
insert into tb(a,b) values(1,0xBF500C00A2034521B819D6EB7065D200);
update tb set a=a+1 where b=0xBF500C00A2034521B819D6EB7065D200

What did you expect to see?

mysql> select * from tb;
+------+------------------------------------+
| a    | b                                  |
+------+------------------------------------+
|    2 | 0xBF500C00A2034521B819D6EB7065D200 |
+------+------------------------------------+

What did you see instead?

mysql> select * from tb;
+------+------------------------------------+
| a    | b                                  |
+------+------------------------------------+
|    1 | 0xBF500C00A2034521B819D6EB7065D200 |
+------+------------------------------------+

Versions of the cluster

DM version (run dmctl -V or dm-worker -V or dm-master -V):

(paste DM version here, and you must ensure versions of dmctl, DM-worker and DM-master are same)

Upstream MySQL/MariaDB server version:

(paste upstream MySQL/MariaDB server version here)

Downstream TiDB cluster version (execute SELECT tidb_version(); in a MySQL client):

(paste TiDB cluster version here)

How did you deploy DM: tiup or manually?

(leave TiUP or manually here)

Other interesting information (system version, hardware config, etc):

>
>

current status of DM cluster (execute query-status <task-name> in dmctl)

(paste current status of DM cluster here)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions