• kaa@polly.(none)'s avatar
    Fix for bug #26788 "mysqld (debug) aborts when inserting specific · 7fd9135b
    kaa@polly.(none) authored
    numbers into char fields" and bug #12860 "Difference in zero padding of
    exponent between Unix and Windows"
    
    Rewrote the code that determines what 'precision' argument should be
    passed to sprintf() to fit the string representation of the input number
    into the field.
    We get finer control over conversion by pre-calculating the exponent, so
    we are able to determine which conversion format, 'e' or 'f', will be
    used by sprintf().
    We also remove the leading zero from the exponent on Windows to make it
    compatible with the sprintf() output on other platforms.
    7fd9135b
field.cc 251 KB