Incorrect Accumulation of Rows_sent, Rows_examined, and Bytes_sent in Slow Query Log for Stored Routine
General
Escalation
General
Escalation
Description
Environment
None
Activity
Show:
Details
Details
Assignee
Unassigned
UnassignedReporter

Needs QA
Yes
Affects versions
Priority
Smart Checklist
Open Smart Checklist
Smart Checklist

Open Smart Checklist
Created January 17, 2025 at 1:59 AM
Updated January 20, 2025 at 5:19 PM
The
Rows_sent
,Rows_examined
, andBytes_sent
fields in the slow query log are accumulating incorrectly across multiple queries executed within the same stored routine.When executing multiple queries within a stored routine, the slow query log shows incorrect accumulation of the
Rows_sent
,Rows_examined
, andBytes_sent
fields. These fields should reflect the activity of each individual query, but they are being cumulatively reported across queries executed within the same stored routine, for exampleThe expected Behavior:
For each query within the stored routine, the values of
Rows_sent
,Rows_examined
, andBytes_sent
should only reflect the activity of that specific query. Since each query examines only one row, these fields should all report a value of 1 for each query.Reproduce