• Sergei Golubchik's avatar
    lp:731124 Loss of precision on DISTINCT · edad8ed9
    Sergei Golubchik authored
    many changes:
    * NOT_FIXED_DEC now create hires fields, not old ones.
      As a result, temp tables preserve microseconds (on DISTINCT, GROUP BY)
    * I_S tables force decimals=0 on temporal types (backward compatibility)
    * Item_func_coalesce calculates decimals for temporal types
    * no precision for TIME/DATETIME in CAST means 0, not NOT_FIXED_DEC
    * addtime/timediff calculate decimals from arguments (not NOT_FIXED_DEC)
    
    sql/field.h:
      NOT_FIXED_DEC now create hires fields, not old ones
    sql/item.h:
      force decimals=0 for I_S tables
    sql/item_cmpfunc.cc:
      Item_func_coalesce calculates decimals for temporal types
    sql/item_create.cc:
      no precision for TIME/DATETIME in CAST means 0, not NOT_FIXED_DEC
    sql/item_timefunc.cc:
      addtime calculates decimals from arguments (not NOT_FIXED_DEC)
    sql/item_timefunc.h:
      timediff calculates decimals from arguments (not NOT_FIXED_DEC)
    edad8ed9
item_create.cc 115 KB