Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Changed MySQL backend so that it fails silently if rollback() isn't s…

…upported (the code catches NotSupportedError exception)

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 024e68e260a70281d6f07e3a562e24140d3ecc2f 1 parent 0660203
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/core/db/backends/
6 django/core/db/backends/
@@ -9,6 +9,7 @@
import MySQLdb as Database
from MySQLdb.converters import conversions
from MySQLdb.constants import FIELD_TYPE
+from _mysql_exceptions import NotSupportedError
import types
DatabaseError = Database.DatabaseError
@@ -40,7 +41,10 @@ def commit(self):
def rollback(self):
if self.connection:
- self.connection.rollback()
+ try:
+ self.connection.rollback()
+ except NotSupportedError:
+ pass
def close(self):
if self.connection is not None:

0 comments on commit 024e68e

Please sign in to comment.
Something went wrong with that request. Please try again.