diff options
author | Igor Babaev <igor@askmonty.org> | 2013-04-05 11:24:28 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-04-05 11:24:28 -0700 |
commit | daaa5834c9fb567924c21d467983c1ec3401f832 (patch) | |
tree | 4c5f62da0d45779c5c7bd453f9d1ced35306e988 /sql/sql_statistics.h | |
parent | 4079a5dc3f98a2c7c53567106b362fc04538c7b6 (diff) | |
download | mariadb-git-daaa5834c9fb567924c21d467983c1ec3401f832.tar.gz |
Fixed bug mdev-4370.
Don't try to a histogram if it is not read into the cache for statistical data.
It may happen so if optimizer_use_condition_selectivity is set to 3. This
setting orders the optimizer not use histograms to calculate selectivity.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r-- | sql/sql_statistics.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h index e005ff86291..14ffe3351d0 100644 --- a/sql/sql_statistics.h +++ b/sql/sql_statistics.h @@ -195,6 +195,8 @@ public: void set_values (uchar *vals) { values= (uchar *) vals; } + bool is_available() { return get_size() > 0 && get_values(); } + void set_value(uint i, double val) { switch (type) { |