[Django] #26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')

604 views
Skip to first unread message

Django

unread,
May 24, 2016, 11:28:06 AM5/24/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
-------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+------------------------
Not sure if it's a Django issue, but the following tests fail with
`InterfaceError: (-1, 'error totally whack')`. The commonality seems to be
that these are all
[https://github.com/django/django/blob/a0a1c4fbde4fb652b151a409db46c8ac3829ed2b/django/contrib/gis/db/backends/mysql/operations.py#L74-L75
new functions in MySQL 5.6].
{{{
gis_tests.distapp.tests.DistanceFunctionsTests.test_distance_simple
gis_tests.distapp.tests.DistanceFunctionsTests.test_distance_order_by
gis_tests.geoapp.test_functions.GISFunctionsTests.test_union
gis_tests.geoapp.test_functions.GISFunctionsTests.test_sym_difference
gis_tests.geoapp.test_functions.GISFunctionsTests.test_intersection
gis_tests.geoapp.test_functions.GISFunctionsTests.test_difference
gis_tests.geoapp.test_functions.GISFunctionsTests.test_diff_intersection_union
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26657>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 13, 2016, 10:17:13 AM6/13/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------
Changes (by timgraham):

* 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>

Django

unread,
Jun 13, 2016, 11:38:04 AM6/13/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

Comment (by claudep):

Sorry, no clue :-(

--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:2>

Django

unread,
Jun 14, 2016, 11:56:21 AM6/14/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

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>

Django

unread,
Jun 14, 2016, 5:25:16 PM6/14/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+------------------------------------

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>

Django

unread,
Jun 14, 2016, 11:55:43 PM6/14/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+--------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by sir-sigurd):

* owner: nobody => sir-sigurd
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:5>

Django

unread,
Jun 21, 2016, 4:50:06 PM6/21/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+--------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by sir-sigurd):

* has_patch: 0 => 1


Comment:

[PR https://github.com/django/django/pull/6821]

--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:6>

Django

unread,
Jun 23, 2016, 6:37:01 AM6/23/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+--------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by sir-sigurd):

* has_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:7>

Django

unread,
Jul 21, 2016, 9:30:51 AM7/21/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+--------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+--------------------------------------
Changes (by sir-sigurd):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/6948 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:8>

Django

unread,
Jul 25, 2016, 3:03:04 PM7/25/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------

Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/26657#comment:9>

Django

unread,
Jul 28, 2016, 5:11:21 PM7/28/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Jul 28, 2016, 5:48:10 PM7/28/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------

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>

Django

unread,
Jul 28, 2016, 6:07:59 PM7/28/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------

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>

Django

unread,
Jul 28, 2016, 6:08:05 PM7/28/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------

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>

Django

unread,
Jul 28, 2016, 6:10:59 PM7/28/16
to django-...@googlegroups.com
#26657: MySQL 5.7 GIS test failures: InterfaceError: (-1, 'error totally whack')
---------------------------+---------------------------------------------
Reporter: timgraham | Owner: sir-sigurd
Type: Bug | Status: closed
Component: GIS | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------+---------------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages