title: Django default isolation level and db binary log format error
body: <p>I'm running a set of tests on my <code>django</code> webserver using <code>pytest-django</code>. I'm trying to switch from a MySQL database server to MariaDB in my testing/CI on travis, and for that I also switched from the <code>mysqldb</code> python package to <code>pymysql</code>.</p>
  
  <p>When using MariaDB, I suddenly get a strange exception for <em>all</em> my database related tests:</p>
  
  <blockquote>
    <p>pymysql.err.InternalError: (1665, 'Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.')</p>
  </blockquote>
  
  <p><em>This exception is below in a stack of several exceptions in all tests for that job, but I've identified it as the root cause for the issue.</em></p>
  
  <p>It's important to note that out of the two jobs that run the test-suite directly on travis, and another that runs it on docker (inside travis), only one fails, the one running on python 3.6. </p>
  
  <p>Although I <em>roughly</em> understand the cause of the problem I could not find a lot of information about the specifics or any reason for it to trigger/manifest all of a sudden. Except this <a href="https://code.djangoproject.com/ticket/28901" rel="nofollow noreferrer">Django documentation issue</a>.</p>
  
  <p>Given it's only triggered for the python3 test job and Django2 dropping support for python2 I assume the issues are related but still I can't seem to figure a reasonable/decent solution. I feel I'm missing at least some of the cause/reasoning behind what's going on in here. </p>
  
  <p>I didn't make any changes to database configuration and all services are running with builtin installations.</p>
  
  <p>For reference, <a href="https://travis-ci.org/nirizr/rematch/jobs/404939831" rel="nofollow noreferrer">this</a> is a travis job for the PR, in case I missed something important out.</p>