diff --git a/sql/histograms/histogram.cc b/sql/histograms/histogram.cc index c9a163a82c0..c6d0b02e255 100644 --- a/sql/histograms/histogram.cc +++ b/sql/histograms/histogram.cc @@ -2451,7 +2451,8 @@ bool Histogram::get_raw_range_selectivity(Field *fld, uint flag, 1) Px is for 'fld > x' or 'fld >= x', and x can be any value or -Inf. 2) Py is for 'fld < y' or 'fld <= y', and y can be any value or +Inf. 3) Pnon_null is for (3.1) 'fld > -Inf', (3.2) 'fld < +Inf' or both. - 4) Obviously, Pnull + Pnon_null = 1. + 4) Pnull is the null fraction if 'fld IS NULL' is present, or 0 otherwise. +      5) Obviously, Pnull + Pnon_null = 1 when 'fld IS NULL' is present. Note that a field range, represented by endpoint values in keypart_data format as well as flags, could be any of these forms: