Skip to content
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

checksum mistmatch since the column is not ordered by the column id at the mounter #8916

Closed
Tracked by #8718
3AceShowHand opened this issue May 8, 2023 · 0 comments · Fixed by #8917
Closed
Tracked by #8718
Assignees
Labels
affects-7.1 area/ticdc Issues or PRs related to TiCDC. component/mounter Mounter component needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. severity/major type/bug The issue is confirmed as a bug.

Comments

@3AceShowHand
Copy link
Contributor

What did you do?

drop database if exists test;
create database test;
use test;

create table tp_int
(
    id          int auto_increment,
    c_tinyint   tinyint   null,
    c_smallint  smallint  null,
    c_mediumint mediumint null,
    c_int       int       null,
    c_bigint    bigint    null,
    constraint pk
        primary key (id)
);

insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint) values (1, 2, 3, 4, 5);

alter table tp_int add column a int not null;
insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint, a) values (2, 3, 4, 5, 6, 7);

alter table tp_int modify c_tinyint bigint not null;
insert into tp_int(c_tinyint, c_smallint, c_mediumint, c_int, c_bigint, a) values (3, 4, 5, 6, 7, 8);

alter table tp_int drop column c_smallint;
insert into tp_int(c_tinyint, c_mediumint, c_int, c_bigint, a) values (4, 5, 6, 7, 8);

-- this should trigger backfill
alter table tp_int modify c_mediumint varchar(10) not null;
insert into tp_int(c_tinyint, c_mediumint, c_int, c_bigint, a) values (5, "234", 6, 7, 8);

What did you expect to see?

the checksum matched

What did you see instead?

checksum not matced, since the column is correctly ordered

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):

(paste TiCDC version here)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.1 area/ticdc Issues or PRs related to TiCDC. component/mounter Mounter component needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. severity/major type/bug The issue is confirmed as a bug.
Projects
None yet
1 participant