Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#17513 closed Bug (fixed)

MySQL returns OperationalError instead of DatabaseError

Reported by: Claude Paroz Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: mysql
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


With other Django database backends, it seems that database errors are always converted to django.db.utils errors. With the MySQL backend, you may obtain OperationalError (specific to the backend).

Attachments (1)

17513-1.diff (1.5 KB) - added by Claude Paroz 5 years ago.
Fix error raised and test

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Claude Paroz

Attachment: 17513-1.diff added

Fix error raised and test

comment:1 Changed 5 years ago by Claude Paroz

Has patch: set
Keywords: mysql added
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 5 years ago by Aymeric Augustin

Resolution: fixed
Status: newclosed

In [17352]:

Fixed #17513 -- Prevented the MySQL backend from leaking MySQLdb-specific exceptions. Thanks Claude Paroz.

comment:3 Changed 5 years ago by Aymeric Augustin

In [17353]:

Added missing bits of r17352. Refs #17513.

Note: See TracTickets for help on using tickets.
Back to Top