Skip to content

请问为何重复发送 #122

Open
Open
@ap0405140

Description

@ap0405140

运行环境:
Windows10
MYSQL 8.0.33
canal 1.1.7
canal c#: CanalSharp 1.2.1

问题重现:
在mysql执行以下代码(逐句执行)
create table tab0919
(
x1 binary(10),
x2 datetime,
x3 bool,
y varchar(100),
constraint pk_tab0919 primary key(x1,x2,x3)
);

insert into tab0919 select 0x123F,now(),101,'ddd';

insert into tab0919 select 0x123F,now(),102,'ddd';

update tab0919 set x2=now();

alter table tab0919 modify column x1 varbinary(34) not null comment 'xx not null';

insert into tab0919 select 0x123F,now(),103,'ddd';

alter table tab0919 rename column x1 to x1B,rename column x2 to x2B;

alter table tab0919 rename column x1B to x111B;

==> 以上SQL都能正确解析,都已Ack确认过. 但是当执行以下SQL:

insert into tab0919 select 0x123F,now(),104,'1122';

==> 得到的Header.EventType=EventType.Alter,
包含2个SQL:
alter table tab0919 rename column x1 to x1B,rename column x2 to x2B;
alter table tab0919 rename column x1B to x111B
即是前面执行过的SQL, 重复执行该SQL导致报错了! 请问为何重复发送, 前面已接收过一次了, 且已Ack确认过, 还重复接收一次.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions