• Alexander Barkov's avatar
    MDEV-13240 Wrong warning with MAX(datetime_field) OVER (...) · 25ad623d
    Alexander Barkov authored
    The problem resided in Item_window_func implementation,
    and it was revealed by bb-10.2-ext specific changes:
    
    Item_window_func::save_in_field() works differently in bb-10.2-ext vs 10.2:
    
    - 10.2 goes through val_str()
    - bb-10.2-ext goes through get_date(), due to Type_handler related changes.
      get_date() tries to convert empty string to DATETIME, hence the warning.
    
    During a discussion with Vicentiu, it was decided to fix
    Item_window_func::val_xxx() to return NULL
    (instead of an "empty" value, such as 0 for numbers and '' for strings)
    when force_return_blank is set.
    25ad623d
win_insert_select.result 2.64 KB