• Alexander Nozdrin's avatar
    Patch for Bug#50511 (Sometimes wrong handling of user variables containing NULL). · d91c271b
    Alexander Nozdrin authored
          
    The bug happened under the following condition:
      - there was a user variable of type REAL, containing NULL value
      - there was a table with a NOT_NULL column of any type but REAL, having
        default value (or auto increment);
      - a row was inserted into the table with the user variable as value.
        A warning was emitted here.
    
    The problem was that handling of NULL values of REAL type was not properly
    implemented: it didn't expect that REAL NULL value can be assigned to other
    data type.
    
    Basically, the problem was that set_field_to_null() was used instead of
    set_field_to_null_with_conversions().
    
    The fix is to use the right function, or more generally, to allow conversion of
    REAL NULL values to other data types.
    d91c271b
user_var.result 11.9 KB