Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13967 -- MySQL spatial backend now respects when `spatial_inde…

…x=False`. Thanks, Simon Law, for bug report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aaa5dfbf53e20c2dd24268502455e82211250172 1 parent 87a60e2
Justin Bronn authored July 21, 2010
2  django/contrib/gis/db/backends/mysql/creation.py
@@ -6,7 +6,7 @@ def sql_indexes_for_field(self, model, f, style):
6 6
         from django.contrib.gis.db.models.fields import GeometryField
7 7
         output = super(MySQLCreation, self).sql_indexes_for_field(model, f, style)
8 8
 
9  
-        if isinstance(f, GeometryField):
  9
+        if isinstance(f, GeometryField) and f.spatial_index:
10 10
             qn = self.connection.ops.quote_name
11 11
             db_table = model._meta.db_table
12 12
             idx_name = '%s_%s_id' % (db_table, f.column)

0 notes on commit aaa5dfb

Please sign in to comment.
Something went wrong with that request. Please try again.