From 6d36a093864630146590b483ab73c42c657bb2ac Mon Sep 17 00:00:00 2001 From: Luky116Liuyuecai Date: Sun, 20 Nov 2022 22:16:40 +0800 Subject: [PATCH] fix bug --- pkg/datasource/sql/undo/base/undo.go | 4 ++-- .../sql/undo/builder/mysql_update_undo_log_builder.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/datasource/sql/undo/base/undo.go b/pkg/datasource/sql/undo/base/undo.go index da8fd9f98..595c72553 100644 --- a/pkg/datasource/sql/undo/base/undo.go +++ b/pkg/datasource/sql/undo/base/undo.go @@ -96,7 +96,7 @@ func (m *BaseUndoLogManager) InsertUndoLogWithSqlConn(ctx context.Context, recor if err != nil { return err } - _, err = stmt.Exec([]driver.Value{record.BranchID, record.XID, record.Context, record.RollbackInfo, int64(record.LogStatus)}) + _, err = stmt.Exec(record.BranchID, record.XID, record.Context, record.RollbackInfo, int64(record.LogStatus)) if err != nil { return err } @@ -328,7 +328,7 @@ func (m *BaseUndoLogManager) Undo(ctx context.Context, dbType types.DBType, xid log.Errorf("[Undo] insert undo with global finished fail, err: %v", err) return err } - log.Errorf("xid %v branch %v, undo_log added with %v", xid, branchID, undo.UndoLogStatueGlobalFinished) + log.Infof("xid %v branch %v, undo_log added with %v", xid, branchID, undo.UndoLogStatueGlobalFinished) } if err = tx.Commit(); err != nil { diff --git a/pkg/datasource/sql/undo/builder/mysql_update_undo_log_builder.go b/pkg/datasource/sql/undo/builder/mysql_update_undo_log_builder.go index 489b2379e..023a732d6 100644 --- a/pkg/datasource/sql/undo/builder/mysql_update_undo_log_builder.go +++ b/pkg/datasource/sql/undo/builder/mysql_update_undo_log_builder.go @@ -151,7 +151,7 @@ func (u *MySQLUpdateUndoLogBuilder) buildAfterImageSQL(beforeImage *types.Record if OnlyCareUpdateColumns { for _, row := range beforeImage.Rows { for _, column := range row.Columns { - selectFields += column.Name + separator + selectFields += column.ColumnName + separator } } selectFields = strings.TrimSuffix(selectFields, separator)