Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added missing bits of r17352. Refs #17513.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit cd4686304344529538470481ddd452d2534650ae 1 parent ca187fe
@aaugustin aaugustin authored
Showing with 10 additions and 1 deletion.
  1. +1 −1  django/db/backends/mysql/base.py
  2. +9 −0 docs/releases/1.4.txt
View
2  django/db/backends/mysql/base.py
@@ -105,7 +105,7 @@ def execute(self, query, args=None):
# misclassified and Django would prefer the more logical place.
if e[0] in self.codes_for_integrityerror:
raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
- raise
+ raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
except Database.DatabaseError, e:
raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
View
9 docs/releases/1.4.txt
@@ -745,6 +745,15 @@ datetimes are now stored without time-zone information in SQLite. When
:setting:`USE_TZ` is ``False``, if you attempt to save an aware datetime
object, Django raises an exception.
+``MySQLdb``-specific exceptions
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The MySQL backend could raise :class:`MySQLdb.OperationalError`
+when a query triggered an exception. This bug was fixed and
+:class:`django.db.utils.DatabaseError` is now raised instead.
+If you were testing for :class:`MySQLdb.OperationalError`,
+you must update your ``except`` clauses.
+
Database connection's thread-locality
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 comments on commit cd46863

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