rails/rails — pull request #14866 by amatsuda (2014-04-25 00:22:08+00:00)
Title: Partial insert should not skip "not null" columns that have null values

Since AR 4.0, MySQL adapter is defaulted to be "strict" by default, and to bring AR 3.2 behaviour back, `strict: false` option was introduced.
However, this `strict: false` mode is not actually compatible with AR 3.2 concerning "not null" constraint treatment.

When "not null" column was omitted from insert statement in MySQL non-strict mode, MySQL silently puts some value instead of raising an error,
for example, 0 for an integer column, '' for a varchar column, '0000-00-00' for a date column.

This fix brings AR 3.2 behaviour back, so as to raise null constraint error when nil was given to a "not null" column.