--
Ticket URL: <https://code.djangoproject.com/ticket/26657>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* cc: claudep (added)
Comment:
From the
[https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-7.html#mysqld-5-7-7
-spatial-support MySQL 5.7 release notes]:
The `ST_Buffer()`, `ST_Difference()`, `ST_Distance()`,
`ST_Intersection()`, `ST_IsSimple()`, `ST_SymDifference()`, and
`ST_Union()` functions have been reimplemented to use the functionality
available in `Boost.Geometry`. The functions may raise an exception for
invalid geometry argument values when the previous implementation may not
have.
An example failing query from
`gis_tests.geoapp.test_functions.GISFunctionsTests.test_union`:
{{{ #!sql
SELECT geoapp_city.id, geoapp_city.name,
AsText(geoapp_city.point),
AsText(ST_Union(geoapp_city.point, GeomFromText('POINT
(-95.3631510000000020 29.7633739999999989)', 4326))) AS union
FROM geoapp_city
WHERE geoapp_city.name = 'Dallas'
}}}
A minimal query to reproduce is:
{{{ #!sql
SELECT ST_Union(geoapp_city.point, ST_GeomFromText('POINT (-95.3631510
29.763373999)', 4326)) FROM geoapp_city
}}}
Any advice, Claude?
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:1>
Comment (by claudep):
Sorry, no clue :-(
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:2>
Comment (by sir-sigurd):
SRID of geometry from the table is 0, SRID of the given point is 4326,
[https://dev.mysql.com/doc/refman/5.7/en/spatial-function-argument-
handling.html MySQL requires arguments to have the same SRID].
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:3>
Comment (by timgraham):
Not sure I understand. For the union test,
`City.objects.get(name='Dallas').point.srid` gives 4326 which is the same
as the `Point` in the test. If you are able, feel free to send a patch,
Sergey.
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:4>
* owner: nobody => sir-sigurd
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:5>
* has_patch: 0 => 1
Comment:
[PR https://github.com/django/django/pull/6821]
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:6>
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:7>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/6948 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:8>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9031a4c13bdb1ee4d0f1253fcfcad73d26c25740" 9031a4c1]:
{{{
#!CommitTicketReference repository=""
revision="9031a4c13bdb1ee4d0f1253fcfcad73d26c25740"
Fixed #26657 -- Made GeomValue omit SRID for MySQL.
This fixes some test failures on MySQL 5.7+.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:10>
Comment (by Tim Graham <timograham@…>):
In [changeset:"9805726ddcdef22c471fd8cf39e77f19b6937c28" 9805726]:
{{{
#!CommitTicketReference repository=""
revision="9805726ddcdef22c471fd8cf39e77f19b6937c28"
[1.10.x] Fixed #26657 -- Made GeomValue omit SRID for MySQL.
This fixes some test failures on MySQL 5.7+.
Backport of 9031a4c13bdb1ee4d0f1253fcfcad73d26c25740 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:11>
Comment (by Tim Graham <timograham@…>):
In [changeset:"4178488881f4e703c4e47ea78720dd61e0230ce5" 4178488]:
{{{
#!CommitTicketReference repository=""
revision="4178488881f4e703c4e47ea78720dd61e0230ce5"
Refs #26657 -- Fixed a crash induced by invalid WKT returned by MySQL
5.7.5+.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:12>
Comment (by Tim Graham <timograham@…>):
In [changeset:"3771019de9681260a25532498fca710f8c6c335c" 3771019d]:
{{{
#!CommitTicketReference repository=""
revision="3771019de9681260a25532498fca710f8c6c335c"
[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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:13>
Comment (by Tim Graham <timograham@…>):
In [changeset:"25581e63823e2961dd67e2beb65f0c927749b712" 25581e6]:
{{{
#!CommitTicketReference repository=""
revision="25581e63823e2961dd67e2beb65f0c927749b712"
[1.10.x] Refs #26657 -- Fixed a crash induced by invalid WKT returned by
MySQL 5.7.5+.
Backport of 4178488881f4e703c4e47ea78720dd61e0230ce5 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:14>