#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 , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 15 years ago
Component: | Testing framework → Database layer (models, ORM) |
---|
comment:3 by , 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 , 15 years ago
Cc: | added |
---|
comment:5 by , 15 years ago
Cc: | added |
---|
comment:6 by , 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 , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Actually, the problem isn't just the testing framework; Character limits should be enforced for index creation generally.