summaryrefslogtreecommitdiff
path: root/sql/sql_analyze_stmt.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_analyze_stmt.h')
-rw-r--r--sql/sql_analyze_stmt.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_analyze_stmt.h b/sql/sql_analyze_stmt.h
index 990c79fb9ad..968b8d38295 100644
--- a/sql/sql_analyze_stmt.h
+++ b/sql/sql_analyze_stmt.h
@@ -416,12 +416,13 @@ public:
uint get_container_elements() const { return container_elements; }
+ uint get_container_lookups() { return n_checks; }
+
double get_r_selectivity_pct() const
{
- return static_cast<double>(n_positive_checks) /
- static_cast<double>(n_checks);
+ return n_checks ? static_cast<double>(n_positive_checks) /
+ static_cast<double>(n_checks) : 0;
}
size_t get_container_buff_size() const { return container_buff_size; }
};
-