#13967 closed (fixed)
GeoDjango always creates SPATIAL INDEXES when using MySQL
Reported by: | Simon Law | Owned by: | jbronn |
---|---|---|---|
Component: | GIS | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | simon@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If you are using MySQL, with the following model, GeoDjango will always create a spatial index for the point
field:
from django.contrib.gis.db import models class Places(models.Model): point = models.PointField(spatial_index=False)
This is because MySQLCreation.sql_indexes_for_field()
does not check if it should do the work, unlike the other backends.
Included is a patch.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | mysql-spatial-index.patch added |
---|
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
(In [13443]) Fixed #13967 -- MySQL spatial backend now respects when
spatial_index=False
. Thanks, Simon Law, for bug report and patch.