• Monty's avatar
    MDEV-24958 Server crashes in my_strtod ... with DEFAULT(blob) · 41540957
    Monty authored
    Fixes also:
    MDEV-24942 Server crashes in _ma_rec_pack... with DEFAULT() on BLOB
    
    This was caused by two different bugs, both related to that the default
    value for the blob was not calculated before it was used:
    - There where now Item_default_value::..result() wrappers, which is
      needed as item in HAVING uses these.  This causes crashes when
      using a reference to a DEFAULT(blob_field) in HAVING. It also
      caused wrong results when used with other fields with default value
      expressions that are not constants.
    - create_tmp_field() did not take into account that blob fields with
      default expressions are not yet initialized. Fixed by treating
      Item_default_value(blob) like a normal item expression.
    41540957
having.test 25.4 KB