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.
Apparently there is no way to do this in MySQLdb (aka. MySQL-python), so we ended up just communicateing the data to subprocess.Popen([mysql, ...], stdin=subprocess.PIPE) and checking the returncode.