diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-06-03 19:04:59 +0400 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-06-03 19:04:59 +0400 |
commit | 917b22393f16a2143fd0e480473123731be5b6d1 (patch) | |
tree | 92da89508eb96725cc74942804acd12b8df9fc54 /sql/sql_explain.h | |
parent | 5621aa3230a60c97111f52c03dc31ce7b57d70d6 (diff) | |
download | mariadb-git-917b22393f16a2143fd0e480473123731be5b6d1.tar.gz |
MDEV-406: ANALYZE $stmt
- Testcase for ANALYZE UNION
- Provide r_rows for union result.
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r-- | sql/sql_explain.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h index 7970d778a21..203235f9f5c 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -27,6 +27,11 @@ public: ha_rows r_rows; /* How many rows we've got after that */ 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 */ + + ha_rows get_avg_rows() + { + return r_scans ? round((double) r_rows / r_scans): 0; + } }; |