title: How to allow data truncation in a single DB transaction?
body: <p>mysql will throw an error when the inserted data is larger than the destination column. This seems, all in all, to be a positive behavior.</p>
  
  <p>However, I would like to cancel this behavior for the duration of one specific transaction - in this tx, I want truncation to happen, if the data is too large.</p>
  
  <p>Is there a way to disable this behavior, but only for one transaction? Here is <a href="http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-type-conversions.html" rel="nofollow">the documentation</a> of how to this is at the JDBC level:</p>
  
  <blockquote>
    <p>Starting with Connector/J 3.1.0, the JDBC driver issues warnings or
    throws DataTruncation exceptions as is required by the JDBC
    specification unless the connection was configured not to do so by
    using the property jdbcCompliantTruncation and setting it to false.</p>
  </blockquote>