Opened 7 years ago

Last modified 6 years ago

#28661 new New feature

Auto-truncate indexes on MySQL when max index size is reached

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

Description

We have been hit several times in Django by this MySQL limitation when wanting to extend the length of some indexed char fields. One example is #19515.

I suggest to automatically limit indexes when the size of the indexed field is too long to be completely indexed by MySQL. This auto-truncation would be limited to single-indexed fields, because I don't see trivial automatic rules when more than one field is indexed (proportional shortening, maybe?).

Change History (5)

comment:1 by Claude Paroz, 7 years ago

Has patch: set

comment:2 by Claude Paroz, 7 years ago

Also note that this is a step toward activating the utf8mb4 charset by default (#18392).

comment:3 by Tim Graham, 7 years ago

Triage Stage: UnreviewedAccepted

comment:4 by Carlton Gibson, 6 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Tim Graham, 6 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted
Note: See TracTickets for help on using tickets.
Back to Top