A statement with multiple `ComStmtFetch` is inaccurate with the `Query_time` of slow query log
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
If an execute statement has multiple `ComStmtFetch` operations.
### 2. What did you expect to see? (Required)
The execution time of the "execute command" and "all fetch commands" should be logged.
### 3. What did you see instead (Required)
Each "fetch command" resets `Session.startTime`.
The "slow query log" records the time of the last fetch command execution time.
### 4. What is your TiDB version? (Required)
```
Release Version: v6.1.0-alpha-97-gb35b30bbd-dirty
Edition: Community
Git Commit Hash: b35b30bbd59cb9f0a199deba71e2ea15e1ad1d19
Git Branch: master
```
Contributor guide
Assessment
This issue has not been assessed yet.