Opened 4 years ago

Closed 3 years ago

#17300 closed Bug (fixed)

Creating an already existing cache table shouldn't crash

Reported by: claudep Owned by: nobody
Component: Core (Management commands) Version: master
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 claudep 4 years ago.
Catch database error and display error message
17300-2.diff (3.0 KB) - added by claudep 4 years ago.
Same patch with mysql returning utils.DatabaseError
17300-3.diff (2.3 KB) - added by claudep 3 years ago.
New patch after 17513 resolution

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by claudep

Catch database error and display error message

comment:1 Changed 4 years ago by claudep

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • 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 Changed 4 years ago by aaugustin

  • Triage Stage changed from Unreviewed to Accepted

Changed 4 years ago by claudep

Same patch with mysql returning utils.DatabaseError

comment:3 Changed 4 years ago by claudep

  • Patch needs improvement unset

comment:4 Changed 3 years ago by claudep

The MySQL OperationalError issue has been filed separately in #17513

Changed 3 years ago by claudep

New patch after 17513 resolution

comment:5 Changed 3 years ago by aaugustin

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

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