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 (pingcap#41151)

close pingcap#41057
  • Loading branch information
wshwsh12 authored and blacktear23 committed Feb 15, 2023
1 parent 989aaee commit 0bc5691
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 0bc5691

Please sign in to comment.