You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
When upstream runs the ADD PRIMARY KEY DDL, and if for some reason it needs to be retried, this currently will cause Drainer to quit due to the unhandled error "Error 1068: Multiple primary key defined".
What did you expect to see?
The error should not crash Drainer, similar to retrying other ADD KEY DDL which its "Error 1061: Duplicate key name `%s`" (ErrDupKeyName) is considered expected and simply ignored.
The error code 1068 (ErrMultiplePriKey) should be added to the IgnoreDDLError function.
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
When upstream runs the
ADD PRIMARY KEY
DDL, and if for some reason it needs to be retried, this currently will cause Drainer to quit due to the unhandled error "Error 1068: Multiple primary key defined".The error should not crash Drainer, similar to retrying other
ADD KEY
DDL which its "Error 1061: Duplicate key name `%s`" (ErrDupKeyName
) is considered expected and simply ignored.The error code 1068 (
ErrMultiplePriKey
) should be added to theIgnoreDDLError
function.tidb-binlog/pkg/sql/sql.go
Lines 156 to 159 in 981fc1d
N/A
(run
drainer -V
in terminal to get drainer's version)Originally v5.1.4, but also reproducible up to the latest master.
The text was updated successfully, but these errors were encountered: