1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

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.
This commit is contained in:
Igor Babaev
2013-04-20 02:16:55 -07:00
parent 9441e53653
commit 09a1f410cb
4 changed files with 100 additions and 1 deletions

View File

@ -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);