Problem/Motivation

MySql: 5.7
SQL Error (1210): Incorrect arguments to st_distance_sphere

Proposed resolution

ST_Distance_Sphere uses fixed SRID = 0 longitude/latitude ordering and not SRID = 4326 latitude/longitude ordering
see https://dev.mysql.com/doc/refman/5.7/en/spatial-convenience-functions.ht...

The geometry arguments should consist of points that specify (longitude, latitude) coordinate values:

Longitude and latitude are the first and second coordinates of the point, respectively.

Both coordinates are in degrees.

Longitude values must be in the range (-180, 180]. Positive values are east of the prime meridian.

Latitude values must be in the range [-90, 90]. Positive values are north of the equator.

CommentFileSizeAuthor
incorrect_arguments.patch827 bytesslasher13

Comments

slasher13 created an issue. See original summary.

  • slasher13 authored 45382f1 on 8.x-3.x
    Issue #3145703 by slasher13: SQL Error (1210): Incorrect arguments to...
christianadamski’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.