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) (#41249)

close #41057
  • Loading branch information
ti-chi-bot authored Feb 17, 2023
1 parent e3c13ec commit 0991a0b
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 @@ -1614,7 +1614,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 0991a0b

Please sign in to comment.