• unknown's avatar
    Bug#29477: Not all fields of the target table were checked to have a default · 72ebb0aa
    unknown authored
    value when inserting into a view.
    
    The mysql_prepare_insert function checks all fields of the target table that
    directly or indirectly (through a view) are specified in the INSERT
    statement to have a default value. This check can be skipped if the INSERT
    statement doesn't mention any insert fields. In case of a view this allows
    fields that aren't mentioned in the view to bypass the check.
    
    Now fields of the target table are always checked to have a default value
    when insert goes into a view.
    
    
    mysql-test/t/view.test:
      Added a test case for the bug#29477: Not all fields of the target table were 
      checked to have a default value when inserting into a view.
    mysql-test/r/view.result:
      Added a test case for the bug#29477: Not all fields of the target table were 
      checked to have a default value when inserting into a view.
    sql/sql_insert.cc:
      Bug#29477: Not all fields of the target table were checked to have a default
      value when inserting into a view.
      Now fields of the target table are always checked to have a default value
      when insert goes into a view.
    72ebb0aa
sql_insert.cc 108 KB