Author: jbronn
Date: 2010-07-21 10:23:18 -0500 (Wed, 21 Jul 2010)
New Revision: 13443

Modified:
   django/trunk/django/contrib/gis/db/backends/mysql/creation.py
Log:
Fixed #13967 -- MySQL spatial backend now respects when `spatial_index=False`.  
Thanks, Simon Law, for bug report and patch.


Modified: django/trunk/django/contrib/gis/db/backends/mysql/creation.py
===================================================================
--- django/trunk/django/contrib/gis/db/backends/mysql/creation.py       
2010-07-20 21:04:51 UTC (rev 13442)
+++ django/trunk/django/contrib/gis/db/backends/mysql/creation.py       
2010-07-21 15:23:18 UTC (rev 13443)
@@ -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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to