• Alexey Kopytov's avatar
    Backport of WL #2934: Make/find library for doing float/double · b4f9ccaf
    Alexey Kopytov authored
                          to string conversions and vice versa" 
    Initial import of the dtoa.c code and custom wrappers around it 
    to allow its usage from the server code. 
     
    Conversion of FLOAT/DOUBLE values to DECIMAL ones or strings 
    and vice versa has been significantly reworked. As the new 
    algoritms are more precise than the older ones, results of such 
    conversions may not always match those obtained from older 
    server versions. This in turn may break compatibility for some 
    applications. 
     
    This patch also fixes the following bugs: 
    - bug #12860 "Difference in zero padding of exponent between 
    Unix and Windows" 
    - bug #21497 "DOUBLE truncated to unusable value" 
    - bug #26788 "mysqld (debug) aborts when inserting specific 
    numbers into char fields" 
    - bug #24541 "Data truncated..." on decimal type columns 
    without any good reason" 
    b4f9ccaf
sql_string.cc 18.6 KB