mirror of
https://github.com/django/django.git
synced 2025-07-19 09:09:13 +00:00
[1.9.x] Fixed #26657 -- Made GeomValue omit SRID for MySQL.
This fixes some test failures on MySQL 5.7+. Backport of 9031a4c13bdb1ee4d0f1253fcfcad73d26c25740 from master
This commit is contained in:
parent
2255b5f8a7
commit
3771019de9
@ -79,7 +79,7 @@ class GeomValue(Value):
|
|||||||
return super(GeomValue, self).as_sql(compiler, connection)
|
return super(GeomValue, self).as_sql(compiler, connection)
|
||||||
|
|
||||||
def as_mysql(self, compiler, connection):
|
def as_mysql(self, compiler, connection):
|
||||||
return 'GeomFromText(%%s, %s)' % self.srid, [connection.ops.Adapter(self.value)]
|
return 'GeomFromText(%s)', [connection.ops.Adapter(self.value)]
|
||||||
|
|
||||||
def as_sqlite(self, compiler, connection):
|
def as_sqlite(self, compiler, connection):
|
||||||
return 'GeomFromText(%%s, %s)' % self.srid, [connection.ops.Adapter(self.value)]
|
return 'GeomFromText(%%s, %s)' % self.srid, [connection.ops.Adapter(self.value)]
|
||||||
|
@ -11,3 +11,5 @@ Bugfixes
|
|||||||
|
|
||||||
* Fixed invalid HTML in template postmortem on the debug page
|
* Fixed invalid HTML in template postmortem on the debug page
|
||||||
(:ticket:`26938`).
|
(:ticket:`26938`).
|
||||||
|
|
||||||
|
* Fixed some GIS database function crashes on MySQL 5.7 (:ticket:`26657`).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user