Opened 13 years ago

Closed 13 years ago

#17300 closed Bug (fixed)

Creating an already existing cache table shouldn't crash

Reported by: Claude Paroz Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When you run ./manage.py createcachetable two times with the same table argument, the command crashes the second time. I think we should display a proper error message instead.

Attachments (3)

17300-1.diff (2.3 KB ) - added by Claude Paroz 13 years ago.
Catch database error and display error message
17300-2.diff (3.0 KB ) - added by Claude Paroz 13 years ago.
Same patch with mysql returning utils.DatabaseError
17300-3.diff (2.3 KB ) - added by Claude Paroz 13 years ago.
New patch after 17513 resolution

Download all attachments as: .zip

Change History (8)

by Claude Paroz, 13 years ago

Attachment: 17300-1.diff added

Catch database error and display error message

comment:1 by Claude Paroz, 13 years ago

Has patch: set
Patch needs improvement: set

The attached patch is currently failing with MySQL as the error raised is MySQLdb.OperationalError instead of db.utils.DatabaseError.

comment:2 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

by Claude Paroz, 13 years ago

Attachment: 17300-2.diff added

Same patch with mysql returning utils.DatabaseError

comment:3 by Claude Paroz, 13 years ago

Patch needs improvement: unset

comment:4 by Claude Paroz, 13 years ago

The MySQL OperationalError issue has been filed separately in #17513

by Claude Paroz, 13 years ago

Attachment: 17300-3.diff added

New patch after 17513 resolution

comment:5 by Aymeric Augustin, 13 years ago

Resolution: fixed
Status: newclosed

In [17363]:

Fixed #17300 -- Prevented createcachetable from crashing when the cache table already exists. Thanks Claude Paroz.

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