summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.h
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-10-24 10:15:11 -0700
committerIgor Babaev <igor@askmonty.org>2016-10-26 20:45:35 -0700
commit9d4a0dde0ae3e0d46b4c5c0967c25862d467e94e (patch)
tree51da4792c18533900c08cfb9b07d3bd12af97819 /sql/sql_statistics.h
parent26b87c332ff78a7aca04930ad86fbf7acc793222 (diff)
downloadmariadb-git-9d4a0dde0ae3e0d46b4c5c0967c25862d467e94e.tar.gz
Fixed bug mdev-11096.
1. When min/max value is provided the null flag for it must be set to 0 in the bitmap Culumn_statistics::column_stat_nulls. 2. When the calculation of the selectivity of the range condition over a column requires min and max values for the column then we have to check that these values are provided.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r--sql/sql_statistics.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index 46e5cef22d1..8e5f8107849 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -388,6 +388,11 @@ public:
avg_frequency= (ulong) (val * Scale_factor_avg_frequency);
}
+ bool min_max_values_are_provided()
+ {
+ return !is_null(COLUMN_STAT_MIN_VALUE) &&
+ !is_null(COLUMN_STAT_MIN_VALUE);
+ }
};