Opened 7 years ago
Last modified 3 months 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: | Clifford Gama | 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 (7)
comment:1 by , 7 years ago
Has patch: | set |
---|
comment:2 by , 7 years ago
Also note that this is a step toward activating the utf8mb4
charset by default (#18392).
comment:3 by , 7 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 6 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:5 by , 6 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
comment:6 by , 3 months ago
Cc: | added |
---|
comment:7 by , 3 months ago
For the record, I'm still reading the same index size limitations on version 9: https://dev.mysql.com/doc/refman/9.0/en/innodb-limits.html
PR