[Django] #28661: Auto-truncate indexes on MySQL when max index size is reached

12 views
Skip to first unread message

Django

unread,
Sep 30, 2017, 11:30:03 AM9/30/17
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude | Owner: nobody
Paroz |
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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?).

--
Ticket URL: <https://code.djangoproject.com/ticket/28661>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 30, 2017, 11:31:00 AM9/30/17
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/9132 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:1>

Django

unread,
Sep 30, 2017, 12:35:52 PM9/30/17
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Claude Paroz):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:2>

Django

unread,
Oct 6, 2017, 10:56:30 AM10/6/17
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:3>

Django

unread,
Aug 6, 2018, 6:27:03 AM8/6/18
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:4>

Django

unread,
Aug 6, 2018, 8:25:40 AM8/6/18
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:5>

Django

unread,
Sep 9, 2024, 5:53:05 PM9/9/24
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* cc: Clifford Gama (added)

--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:6>

Django

unread,
Sep 14, 2024, 4:37:10 PM9/14/24
to django-...@googlegroups.com
#28661: Auto-truncate indexes on MySQL when max index size is reached
-------------------------------------+-------------------------------------
Reporter: Claude Paroz | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Claude Paroz):

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
--
Ticket URL: <https://code.djangoproject.com/ticket/28661#comment:7>
Reply all
Reply to author
Forward
0 new messages