diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-06-26 19:09:23 +0400 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-06-26 19:09:23 +0400 |
commit | c6be74458fd478b019ac357371d5aee8925fe012 (patch) | |
tree | ec719b8163e9a26adf795d8e4cbcf69bd39f7e73 /sql/sql_explain.h | |
parent | a787edd7e660a00f015ca0a25ded0952085f7451 (diff) | |
download | mariadb-git-c6be74458fd478b019ac357371d5aee8925fe012.tar.gz |
MDEV-6398: ANALYZE UPDATE does not populate r_rows
- In print_explain_row(), do not forget to print r_rows.
- Switch Explain_update from using its own counters to re-using
Table_access_tracker.
- Make ANALYZE UPDATE code structure uniform with ANALYZE DELETE.
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r-- | sql/sql_explain.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h index a36f1676c57..a2b4ea282b7 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -44,6 +44,10 @@ public: return r_filtered; } + + inline void on_scan_init() { r_scans++; } + inline void on_record_read() { r_rows++; } + inline void on_record_after_where() { r_rows_after_where++; } }; @@ -576,14 +580,8 @@ public: bool using_io_buffer; /* ANALYZE members and methods */ - ha_rows r_rows; - ha_rows r_rows_after_where; - inline void on_record_read() { r_rows++; } - inline void on_record_after_where() { r_rows_after_where++; } + Table_access_tracker tracker; - Explain_update() : - r_rows(0), r_rows_after_where(0) - {} virtual int print_explain(Explain_query *query, select_result_sink *output, uint8 explain_flags, bool is_analyze); }; |