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:
@ -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);
|
||||
|
Reference in New Issue
Block a user