We\'re trying to run SQL files containing multiple insert statements as a single query, but it seems rollback fails when any of the statements contain an error.
I think you need to pass multi=True to execute when using multiple statements, see http://dev.mysql.com/doc/connector-python/en/connector-python-api-mysqlcursor-execute.html
Update: This applies to the mysql.connector module, not MySQLdb used in this case.