[MDEV-29326] Slow log reporting wrong time for statements in stored procedure Created: 2022-08-18 Updated: 2022-08-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Stored routines |
| Affects Version/s: | 10.6.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Anders Karlsson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux |
||
| Description |
|
When a statement in a stored procedure is slow to end up in the slow_query_log, and assuming that log_slow_disabled_statements is not set to blank, then a slow statement in a procedure is reported as the time it has taken since the procedure was started, not the statement itself. For example:
If we then call this procedure and look in the slow log we see:
If you look at the second of the statements in the slow log, it is reported to have a query time of 2.001449 seconds, which is clearly wrong. This gets particularily troublesome if some statements in the procedure does not end up in the slow query log, then it is impossible to determine how much time a statement has taken. |