[MDEV-17078] EXPLAIN in slow query log has wrong r_filtered for DELETE statement Created: 2018-08-27 Updated: 2020-08-25 Resolved: 2018-11-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Data Manipulation - Delete |
| Affects Version/s: | 10.2.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Sergei Petrunia |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Description |
|
A slow query log entry for a DELETE statement showed the following:
We can see that Rows_affected is 0. Supposedly, r_filtered is 55.55%. The documentation has the following definition of r_filtered:
https://mariadb.com/kb/en/library/analyze-statement/ If 55.55% of rows were left after applying the WHERE clause, then how were 0 rows affected by the delete? It seems likely that either r_filtered is completely wrong or the definition of the column is wrong. |
| Comments |
| Comment by Sergei Petrunia [ 2018-11-02 ] | |||||||||||
|
Indeed, Rows_affected should match r_rows *r_filtered. When I try to reproduce, it does match for me:
| |||||||||||
| Comment by Sergei Petrunia [ 2018-11-02 ] | |||||||||||
|
So, I can't reproduce. But if one looks into the support issue, one can see that they paste two slow query log entries from the same statement. The first time, Rows_affected!=0. The second time, Rows_affected=0. So this bug doesn't happen all the time... and unfortunately, I have no clue what one should do to trigger it. | |||||||||||
| Comment by Sergei Petrunia [ 2018-11-02 ] | |||||||||||
|
.. Tried both current 10.2 and 10.2.11 - didn't help | |||||||||||
| Comment by Sergei Petrunia [ 2018-11-02 ] | |||||||||||
|
Feel free to re-open if there's a way to reproduce it. |