• Alexander Barkov's avatar
    BUG#13354387 - CRASH IN IN MY_DECIMAL::OPERATOR FOR VIEW AND FUNCTION UNIX_TIME · 15229239
    Alexander Barkov authored
    Fixing the 5.5 part (the 5.6 part will go in a separate commit soon).
    
    Problem:
      Item_direct_ref::get_date() incorrectly calculated its "null_value",
      which made UNIX_TIMESTAMP(view_column) incorrectly return NULL
      for a NOT NULL view_column.
    
    Fix:
      Make Item_direct_ref::get_date() calculate null_value
      in the similar way with the other methods 
      (val_real,val_str,val_int,val_decimal):
      copy null_value from the referenced Item.
    
    modified:
      mysql-test/r/func_time.result
      mysql-test/t/func_time.test
      sql/item.cc
    15229239
func_time.test 38.5 KB