• unknown's avatar
    Fix for BUG#8576 · 1e949781
    unknown authored
    The problem was in different representations of double variables depending on
    platform/compiler/compile options. In some cases double variables are represented by
    64 bits (while in memory), or by 80 bits (while in FPU register). As a result equal
    values are not considered "==". As many sources point out,  doubles should not be
    compared by '==' for this reason. This fix subtracts the scaled minimal double
    value X such that 1 + X != 1, to ensure that the inequality holds in any case.
    
    
    sql/opt_range.cc:
      Do not compare double values with == because they may have different representations.
    1e949781
opt_range.cc 263 KB