Skip to content

Commit

Permalink
fix: tidb error log (go-gorm#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
XYenon authored Oct 26, 2023
1 parent 2a61ba0 commit a6570f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ func (m Migrator) TiDBVersion() (isTiDB bool, major, minor, patch int, err error
}

if minor, err = strconv.Atoi(realVersionArray[1]); err != nil {
err = fmt.Errorf("failed to parse the version of TiDB, the minor version is: %s", realVersionArray[0])
err = fmt.Errorf("failed to parse the version of TiDB, the minor version is: %s", realVersionArray[1])
return
}

if patch, err = strconv.Atoi(realVersionArray[2]); err != nil {
err = fmt.Errorf("failed to parse the version of TiDB, the patch version is: %s", realVersionArray[0])
err = fmt.Errorf("failed to parse the version of TiDB, the patch version is: %s", realVersionArray[2])
return
}

Expand Down

0 comments on commit a6570f0

Please sign in to comment.