summaryrefslogtreecommitdiff
path: root/sql/sql_explain.h
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2014-06-24 23:58:13 +0400
committerSergei Petrunia <psergey@askmonty.org>2014-06-24 23:58:13 +0400
commitc3cfb6910a50f7ff094b03f9ef0b5d908f5e4760 (patch)
tree71a372728d4e3e3a70eb7a13ee29e2ea9237446c /sql/sql_explain.h
parent06a87d77e62bad8ded0a384a70e13114011bf060 (diff)
downloadmariadb-git-c3cfb6910a50f7ff094b03f9ef0b5d908f5e4760.tar.gz
MDEV-406: ANALYZE $stmt: Scans that never executed will have r_rows=NULL
Diffstat (limited to 'sql/sql_explain.h')
-rw-r--r--sql/sql_explain.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_explain.h b/sql/sql_explain.h
index f9279a406f7..7aa62111a0a 100644
--- a/sql/sql_explain.h
+++ b/sql/sql_explain.h
@@ -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;