Author: jbronn
Date: 2010-07-21 10:28:06 -0500 (Wed, 21 Jul 2010)
New Revision: 13444
Modified:
django/branches/releases/1.2.X/django/contrib/gis/db/backends/mysql/creation.py
Log:
[1.2.X] Fixed #13967 -- MySQL spatial backend now respects when
`spatial_index=False`. Thanks, Simon Law, for bug report and patch.
Backport of r13443 from trunk.
Modified:
django/branches/releases/1.2.X/django/contrib/gis/db/backends/mysql/creation.py
===================================================================
---
django/branches/releases/1.2.X/django/contrib/gis/db/backends/mysql/creation.py
2010-07-21 15:23:18 UTC (rev 13443)
+++
django/branches/releases/1.2.X/django/contrib/gis/db/backends/mysql/creation.py
2010-07-21 15:28:06 UTC (rev 13444)
@@ -6,7 +6,7 @@
from django.contrib.gis.db.models.fields import GeometryField
output = super(MySQLCreation, self).sql_indexes_for_field(model, f,
style)
- if isinstance(f, GeometryField):
+ if isinstance(f, GeometryField) and f.spatial_index:
qn = self.connection.ops.quote_name
db_table = model._meta.db_table
idx_name = '%s_%s_id' % (db_table, f.column)
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.