• Alexey Kopytov's avatar
    Bug #48537: difference of index selection between rpm binary · 966d6d2f
    Alexey Kopytov authored
                and .tar.gz, windows vs linux..
    
    On Intel x86 machines index selection by the MySQL query
    optimizer could sometimes depend on the compiler version and
    optimization flags used to build the server binary.
    
    The problem was a result of a known issue with floating point
    calculations on x86: since internal FPU precision (80 bit)
    differs from precision used by programs (32-bit float or 64-bit
    double), the result of calculating a complex expression may
    depend on how FPU registers are allocated by the compiler and
    whether intermediate values are spilled from FPU to memory. In
    this particular case compiler versions and optimization flags
    had an effect on cost calculation when choosing the best index
    in best_access_path().
    
    A possible solution to this problem which has already been
    implemented in mysql-trunk is to limit FPU internal precision
    to 64 bits. So the fix is a backport of the relevant code to
    5.1 from mysql-trunk.
    966d6d2f
explain.result 11.6 KB