diff options
author | Igor Babaev <igor@askmonty.org> | 2013-04-20 02:16:55 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-04-20 02:16:55 -0700 |
commit | 09a1f410cb2e014156f9d6dee87798ab5b28042b (patch) | |
tree | 33f3bb7992ebb53230cf544e7390d692866b7fee /sql/sql_statistics.cc | |
parent | 9441e536535af3e71aaa81801645ab42bd07e89f (diff) | |
download | mariadb-git-09a1f410cb2e014156f9d6dee87798ab5b28042b.tar.gz |
Fixed bug mdev-4406.
This bug in the code of get_column_range_cardinality() could lead to
wrong estimates of number of records in ranges for non-nullable columns.
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index 4df4b4d257d..f355f2c7760 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -3520,7 +3520,7 @@ double get_column_range_cardinality(Field *field, { double sel, min_mp_pos, max_mp_pos; - if (min_endp && !min_endp->key[0]) + if (min_endp && !(field->null_ptr && min_endp->key[0])) { store_key_image_to_rec(field, (uchar *) min_endp->key, min_endp->length); |