Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in spatial queries in MariaDB #15109

Closed
kndol opened this issue Mar 26, 2019 · 5 comments · Fixed by #16330
Closed

Problem in spatial queries in MariaDB #15109

kndol opened this issue Mar 26, 2019 · 5 comments · Fixed by #16330
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@kndol
Copy link

kndol commented Mar 26, 2019

ST_GeomFromText('POINT(longitude latitude)', srid)

is a correct query.
But phpmyadmin makes query with

ST_GeomFromText('\'POINT(longitude latitude)\', srid')

, and the result is null.

  • Operating system: UNIX
  • Web server:
  • Database version: 10.1.13-MariaDB
  • PHP version: 7.0.0p1
  • phpMyAdmin version: 4.8.5
@williamdes williamdes added the Bug A problem or regression with an existing feature label Apr 2, 2019
@williamdes
Copy link
Member

@kndol Thanks for the report, totally explains why I could not make the UI work each time I tried !

@williamdes williamdes added this to Medium priority in issues Apr 29, 2019
@williamdes
Copy link
Member

image

@ShailuJain
Copy link
Contributor

Hey @williamdes
I checked into the issue and found that typing 'POINT(1 2)',0 into the text field produces the error but if POINT(1 2),0 is typed there is no error. So how should we proceed with the issue?

@williamdes
Copy link
Member

@ShailuJain If all MySQL and MariaDB versions agree that POINT(1 2),0 is a valid syntax then we can safely remove the quotes
If you find some documentation can you post it here ?

@ShailuJain
Copy link
Contributor

In my opinion if POINT(1 2),1 is given the executing query will be
INSERT INTO table_name (id, shape) VALUES (NULL, ST_GeomFromText('POINT(1 2),0'))
which is a valid query and if given 'POINT(1 2)',1,
INSERT INTO table_name (id, shape) VALUES (NULL, ST_GeomFromText('\'POINT(1 2)\',0'))
is produced which is why this error is produced. But then too if a find some documentation i will post it here.

@williamdes williamdes added this to the 5.0.3 milestone Sep 20, 2020
@williamdes williamdes self-assigned this Sep 20, 2020
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Sep 20, 2020
williamdes added a commit that referenced this issue Sep 20, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Medium priority to Closed Sep 20, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants