• Tatiana A. Nurnberg's avatar
    Bug#48525: trigger changes "Column 'id' cannot be null" behaviour · e0fbc5d2
    Tatiana A. Nurnberg authored
    CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL;
    UPDATE...SET...NULL on NOT NULL fields behaved differently after
    a trigger.
    
    Now distinguishes between IGNORE and ERROR_FOR_NULL and save/restores
    check-field options.
    
    mysql-test/r/trigger.result:
      Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
      when run after a trigger.
    mysql-test/t/trigger.test:
      Show that UPDATE...SET...NULL on NOT NULL columns doesn't behave differently
      when run after a trigger.
    sql/field_conv.cc:
      CHECK_FIELD_IGNORE was treated as CHECK_FIELD_ERROR_FOR_NULL.
      Distinguish between the two.
    sql/sp_head.cc:
      raise error as needed
    sql/sql_class.cc:
      Save and restore check-fields options.
    sql/sql_class.h:
      Make room so we can save check-fields options.
    sql/sql_insert.cc:
      raise error as needed
    e0fbc5d2
field_conv.cc 24 KB