diff --git a/pkg/restore/db.go b/pkg/restore/db.go index 9dc46de52..c25fe3698 100644 --- a/pkg/restore/db.go +++ b/pkg/restore/db.go @@ -5,7 +5,6 @@ package restore import ( "context" "fmt" - "math" "sort" "github.com/pingcap/errors" @@ -164,12 +163,11 @@ func (db *DB) CreateTable(ctx context.Context, table *utils.Table) error { var autoIncID uint64 // auto inc id overflow if table.Info.AutoIncID < 0 { - if table.Info.IsAutoIncColUnsigned() { - autoIncID = math.MaxUint64 - } else { - autoIncID = math.MaxInt64 - } - } else { + log.Info("table auto inc id overflow", + zap.Stringer("db", table.Db.Name), + zap.Stringer("table", table.Info.Name), + zap.Int64("auto inc id", table.Info.AutoIncID), + ) autoIncID = uint64(table.Info.AutoIncID) } restoreMetaSQL = fmt.Sprintf(