Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#12977 closed (fixed)

Index length errors running tests on MySQL

Reported by: Carl Meyer Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Greg Taylor, aball@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running the tests against MySQL (5.1.37-1ubuntu5.1), default configuration, I get this warning:

Failed to install index for model_inheritance_regress.BirthdayParty_attendees model: (1059, "Identifier name 'model_inheritance_regress_birthdayparty_attendees_birthdayparty_id' is too long")
Failed to install index for model_inheritance_regress.BachelorParty_attendees model: (1059, "Identifier name 'model_inheritance_regress_bachelorparty_attendees_bachelorparty_id' is too long")

Doesn't have any real consequences AFAICT (except possibly slowing down those tests somewhat), but I figured it should be logged.

Change History (8)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 15 years ago

Component: Testing frameworkDatabase layer (models, ORM)

Actually, the problem isn't just the testing framework; Character limits should be enforced for index creation generally.

comment:3 by Greg Taylor, 15 years ago

I've ran into this for one of my projects. I personally use Postgres, which doesn't have this limitation, but some of my users have been complaining about this. Is there any way to manually specify the index name to something shorter?

comment:4 by Greg Taylor, 15 years ago

Cc: Greg Taylor added

comment:5 by anonymous, 15 years ago

Cc: aball@… added

comment:6 by Russell Keith-Magee, 15 years ago

milestone: 1.2

#13434 was a duplicate, contains a patch. That ticket points out that this now more prevalent under 1.2 because m2m fields are now full models with their own indicies; bumping to 1.2 milestone because of this.

comment:7 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [13040]) Fixed #12977 -- Ensure that indexes don't exceed character limits on MySQL. Thanks to carljm for the original report, and hgeerts@… for the patch.

comment:8 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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