Fixed #8575 -- Catch one particular instance of OperationalError in MySQL and
commite4a9ae0e54189e86f828be413fb6aeae9f277ec8
authormtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Fri, 29 Aug 2008 04:30:07 +0000 (29 04:30 +0000)
committermtredinnick <mtredinnick@bcc190cf-cafb-0310-a4f2-bffc1f526a37>
Fri, 29 Aug 2008 04:30:07 +0000 (29 04:30 +0000)
tree64c2a67829d9601307e3455d81e2d3d716353e34
parent3efb2ab75ed167b4ac2ae9fb931b4ffffd66d215
Fixed #8575 -- Catch one particular instance of OperationalError in MySQL and
convert it to an IntegrityError, which seems like the more natural case (and is
consistent with other backends). This makes exception handling in Django much
easier.

The solution is extensible for any other error codes we may wish to add going
forwards.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
django/db/backends/mysql/base.py