Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17513 closed Bug (fixed)

MySQL returns OperationalError instead of DatabaseError

Reported by: claudep 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

Description

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 claudep 3 years ago.
Fix error raised and test

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by claudep

Fix error raised and test

comment:1 Changed 3 years ago by claudep

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

comment:2 Changed 3 years ago by aaugustin

  • Resolution set to fixed
  • Status changed from new to closed

In [17352]:

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

comment:3 Changed 3 years ago by aaugustin

In [17353]:

Added missing bits of r17352. Refs #17513.

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