summaryrefslogtreecommitdiff
path: root/sql/sql_analyze_stmt.h
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-10-26 15:26:06 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-10-26 15:26:06 +0200
commit4519b42e61ba2cac248a2238f63113a739661590 (patch)
tree802c88ad7cdc5cda175e90802dbfee07f18f3e86 /sql/sql_analyze_stmt.h
parentf90d9c347fdac35720f874070797559ede066598 (diff)
parent29633dc0c0c49f27ad3c9a405f4730fbfef4bbb0 (diff)
downloadmariadb-git-4519b42e61ba2cac248a2238f63113a739661590.tar.gz
Merge branch '10.4' into 10.5
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; }
};
-