1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-406: ANALYZE $stmt: Scans that never executed will have r_rows=NULL

This commit is contained in:
Sergei Petrunia
2014-06-24 23:58:13 +04:00
parent 06a87d77e6
commit c3cfb6910a
4 changed files with 31 additions and 8 deletions

View File

@@ -28,6 +28,7 @@ public:
ha_rows r_rows_after_table_cond; /* Rows after applying the table condition */
ha_rows r_rows_after_where; /* Rows after applying attached part of WHERE */
bool has_scans() { return (r_scans != 0); }
ha_rows get_avg_rows()
{
return r_scans ? (ha_rows)rint((double) r_rows / r_scans): 0;