Skip to content

Commit

Permalink
session: fix processInfo time when using driver to prepare and execut…
Browse files Browse the repository at this point in the history
…e query (#41151)

close #41057
  • Loading branch information
wshwsh12 authored Feb 9, 2023
1 parent a22d690 commit c34238b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ func (s *session) SetProcessInfo(sql string, t time.Time, command byte, maxExecu
}
}
// We set process info before building plan, so we extended execution time.
if oldPi != nil && oldPi.Info == pi.Info {
if oldPi != nil && oldPi.Info == pi.Info && oldPi.Command == pi.Command {
pi.Time = oldPi.Time
}
_, digest := s.sessionVars.StmtCtx.SQLDigest()
Expand Down

0 comments on commit c34238b

Please sign in to comment.