Fixed #26657 -- Made GeomValue omit SRID for MySQL.

This fixes some test failures on MySQL 5.7+.
This commit is contained in:
Sergey Fedoseev 2016-06-24 15:34:15 +05:00 committed by Tim Graham
parent 0ba179194b
commit 9031a4c13b
2 changed files with 5 additions and 0 deletions

View File

@ -74,6 +74,9 @@ class GeomValue(Value):
def as_sql(self, compiler, connection):
return '%s(%%s, %s)' % (connection.ops.from_text, self.srid), [connection.ops.Adapter(self.value)]
def as_mysql(self, compiler, connection):
return '%s(%%s)' % (connection.ops.from_text), [connection.ops.Adapter(self.value)]
def as_postgresql(self, compiler, connection):
if self.geography:
self.value = connection.ops.Adapter(self.value, geography=self.geography)

View File

@ -11,3 +11,5 @@ Bugfixes
* Fixed invalid HTML in template postmortem on the debug page
(:ticket:`26938`).
* Fixed some GIS database function crashes on MySQL 5.7 (:ticket:`26657`).