• unknown's avatar
    Fix for bug #6914 "Problems using time()/date() output in expressions". · dd016b59
    unknown authored
    When we cast datetime value to DATE (TIME) type we should throw away its
    time (date) part. This was not done properly if CAST() function was used
    in datetime expressions.
    
    
    mysql-test/r/cast.result:
      Added test for bug #6914 "Problems using time()/date() output in
      expressions".
    mysql-test/t/cast.test:
      Added test for bug #6914 "Problems using time()/date() output in
      expressions".
    sql/item_timefunc.cc:
      Item_time_typecast::get_time()/Item_date_typecast::get_date():
        When we cast datetime value to DATE we should throw away its time part.
        When we cast such value to TIME type we should throw away its date part.
    dd016b59
item_timefunc.cc 70.3 KB