title: MySQL sets field to current date when value is null
body: <p>I have a table with two timestamp fields. They are not nullable. The problem is that whenever I insert null into those fields, the current date is automatically saved, instead of throwing an error saying "Column 'first_data_dt' cannot be null", just like it happens when I insert a value into another non-nullable field.</p>
  
  <p>There are no triggers associated to this table.</p>
  
  <p>Does anybody know why this is happening?</p>
  
  <p>EDIT to add table definition:</p>
  
  <pre><code>CREATE TABLE `ui_mytable` (
  
    `id` int(11) NOT NULL,
  
    `first_data_dt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  
    `last_data_dt` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
  
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>I understand now why first_data_dt is updated to the current timestamp anytime I insert null. But what about last_data_dt?</p>