title: MySQL - bulk inserting data with datetime and timestamp fields
body: <p>So, I'm playing around with a database trying to learn MySQL. I've got a script together that creates a database and am not trying to bulk populate the data. Everything seems fine except for my fields that are datetime and timestamp.</p>
  
  <p>Here's the table I'm having the issue with:</p>
  
  <pre><code>DROP TABLE IF EXISTS TestMsgs;
  CREATE TABLE TestMsgs (
      msg_id int NOT NULL AUTO_INCREMENT, 
      user_id int,
      content varchar(200), 
      time_submitted datetime,
      last_update timestamp,
      PRIMARY KEY (msg_id)
  ) ENGINE=INNODB;
  </code></pre>
  
  <p>So, I want to manually set the datetime when a record is added, and then auto update the timestamp every time a record is updated.</p>
  
  <p>When I try to batch populate the following data:</p>
  
  <pre><code>LOAD DATA LOCAL INFILE "testmsgs.txt" REPLACE INTO TABLE TestMsgs
      FIELDS TERMINATED BY '|' (user_id, content, time_submitted);
  
  content of testmsgs.txt:
      1|test1|10/22/2013 10:30
      1|test2|10/22/2013 10:31
      1|test3|10/22/2013 10:32
  </code></pre>
  
  <p>I get the following results:</p>
  
  <pre><code>+----------+---------+---------+---------------------+-------------+
  |  msg_id  | user_id | content | time_submitted      | last_update |
  +----------+---------+---------+---------------------+-------------+
  |        1 |       1 | test1   | 0000-00-00 00:00:00 | NULL        |
  |        2 |       1 | test2   | 0000-00-00 00:00:00 | NULL        |
  |        3 |       1 | test3   | 0000-00-00 00:00:00 | NULL        |
  +----------+---------+---------+---------------------+-------------+
  </code></pre>
  
  <p>What gives? What is the proper way to do this?</p>