Author: aaugustin
Date: 2012-01-07 13:42:37 -0800 (Sat, 07 Jan 2012)
New Revision: 17353

Modified:
   django/trunk/django/db/backends/mysql/base.py
   django/trunk/docs/releases/1.4.txt
Log:
Added missing bits of r17352. Refs #17513.


Modified: django/trunk/django/db/backends/mysql/base.py
===================================================================
--- django/trunk/django/db/backends/mysql/base.py       2012-01-07 19:53:20 UTC 
(rev 17352)
+++ django/trunk/django/db/backends/mysql/base.py       2012-01-07 21:42:37 UTC 
(rev 17353)
@@ -105,7 +105,7 @@
             # 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]
 

Modified: django/trunk/docs/releases/1.4.txt
===================================================================
--- django/trunk/docs/releases/1.4.txt  2012-01-07 19:53:20 UTC (rev 17352)
+++ django/trunk/docs/releases/1.4.txt  2012-01-07 21:42:37 UTC (rev 17353)
@@ -745,6 +745,15 @@
 :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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to