Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luky116 committed Nov 23, 2022
1 parent 1107a57 commit 452a6b7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/datasource/sql/undo/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ func (b *BaseExecutor) dataValidationAndGoOn(ctx context.Context, conn *sql.Conn
"tableName:[%s], oldRows:[%s],newRows:[%s].", afterImage.TableName, oldRowJson, newRowJson)
return false, fmt.Errorf("Has dirty records when undo.")
}

log.Infof("Stop rollback because there is no data change between the before data snapshot and the after data snapshot.")
return false, nil
}
return true, nil
}
Expand Down Expand Up @@ -166,7 +163,7 @@ func (b *BaseExecutor) parsePkValues(rows []types.RowImage, pkNameList []string)
for _, row := range rows {
for _, column := range row.Columns {
for _, pk := range pkNameList {
if strings.ToUpper(pk) == strings.ToUpper(column.ColumnName) {
if strings.EqualFold(strings.ToUpper(pk), strings.ToUpper(column.ColumnName)) {
values := pkValues[strings.ToUpper(pk)]
if values == nil {
values = make([]types.ColumnImage, 0)
Expand Down

0 comments on commit 452a6b7

Please sign in to comment.