Skip to content

Commit

Permalink
*: add log for mysql error (pingcap#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhebox committed Mar 13, 2023
1 parent 7dfed7b commit c4bc2f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/proxy/backend/backend_conn_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,12 @@ func (mgr *BackendConnManager) ExecuteCmd(ctx context.Context, request []byte, c
if !holdRequest {
addCmdMetrics(cmd, mgr.backendConn.Addr(), startTime)
}
if err != nil && !IsMySQLError(err) {
return err
if err != nil {
if !IsMySQLError(err) {
return err
} else {
mgr.logger.Debug("got a mysql error", zap.Error(err))
}
}
if err == nil {
switch cmd {
Expand Down

0 comments on commit c4bc2f0

Please sign in to comment.