summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2015-10-31 08:02:19 +0500
committerClaude Paroz <claude@2xlibre.net>2015-11-02 19:25:53 +0100
commit7127eb287fb08b89a31bc97097a1fb6b08ada463 (patch)
treeb01a227ce7733c6a68744b71e47c9dd2ac065420 /django
parentb78226cd3d2dd578ac57341e0c55754b31ab66ba (diff)
Fixed #25659 -- Added missing support for MySQL 5.6.1 GIS functions
Added support for ST_Difference/ST_Intersection/ST_SymDifference.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/db/backends/mysql/operations.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/django/contrib/gis/db/backends/mysql/operations.py b/django/contrib/gis/db/backends/mysql/operations.py
index cfd780022f..de64bc95db 100644
--- a/django/contrib/gis/db/backends/mysql/operations.py
+++ b/django/contrib/gis/db/backends/mysql/operations.py
@@ -34,8 +34,11 @@ class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
}
function_names = {
+ 'Difference': 'ST_Difference',
'Distance': 'ST_Distance',
+ 'Intersection': 'ST_Intersection',
'Length': 'GLength',
+ 'SymDifference': 'ST_SymDifference',
'Union': 'ST_Union',
}
@@ -48,12 +51,12 @@ class MySQLOperations(BaseSpatialOperations, DatabaseOperations):
def unsupported_functions(self):
unsupported = {
'AsGeoJSON', 'AsGML', 'AsKML', 'AsSVG', 'BoundingCircle',
- 'Difference', 'ForceRHR', 'GeoHash', 'Intersection', 'MemSize',
+ 'ForceRHR', 'GeoHash', 'MemSize',
'Perimeter', 'PointOnSurface', 'Reverse', 'Scale', 'SnapToGrid',
- 'SymDifference', 'Transform', 'Translate',
+ 'Transform', 'Translate',
}
if self.connection.mysql_version < (5, 6, 1):
- unsupported.update({'Distance', 'Union'})
+ unsupported.update({'Difference', 'Distance', 'Intersection', 'SymDifference', 'Union'})
return unsupported
def geo_db_type(self, f):