title: Maria DB 10.1 DATETIME Blank Value
body: <p>I am supporting a legacy PHP system. They are planning on moving database servers. We are currently on MariaDB 10.1 and the new server is also MariaDB 10.1. I have hundreds (or maybe thousands) of queries that look like this:</p>
  
  <pre><code>UPDATE ontime_assets
  SET AssetName = '117 J19', PlateDate = '20161224', InspectionDate = ''
  WHERE AssetID = 7;
  </code></pre>
  
  <p>On the current database this processes just fine. On the new one I get this error: </p>
  
  <blockquote>
    <p>Error updating record: Incorrect datetime value: '' for column
    'InspectionDate' at row 1.</p>
  </blockquote>
  
  <p>They tell me that the database was migrated and is structurally identical, but obviously it isn't. <code>InspectionDate</code> is a DATETIME that is not required and is set to accept NULL values.</p>
  
  <p>Good code or not, a code rewrite to take out the empty string is not feasible. Does anyone have any idea what MariaDB setting it is, that would allow this query to work currently but would be set differently on the new server?</p>