mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug #49756 Rows_examined is always 0 in the slow query log for
update statements
Only SELECT statements report any examined rows in the slow
log. Slow UPDATE, DELETE and INSERT statements report 0 rows
examined, unless the statement has a condition including a
SELECT substatement.
This patch adds counting of examined rows for the UPDATE and
DELETE statements. An INSERT ... VALUES statement will still
not report any rows as examined.
This commit is contained in:
@@ -1716,8 +1716,15 @@ public:
|
||||
*/
|
||||
ha_rows sent_row_count;
|
||||
|
||||
/*
|
||||
number of rows we read, sent or not, including in create_sort_index()
|
||||
/**
|
||||
Number of rows read and/or evaluated for a statement. Used for
|
||||
slow log reporting.
|
||||
|
||||
An examined row is defined as a row that is read and/or evaluated
|
||||
according to a statement condition, including in
|
||||
create_sort_index(). Rows may be counted more than once, e.g., a
|
||||
statement including ORDER BY could possibly evaluate the row in
|
||||
filesort() before reading it for e.g. update.
|
||||
*/
|
||||
ha_rows examined_row_count;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user