[MDEV-30150] ST_GeomFromGeoJSON, 'geometry' before 'type: feature' error Created: 2022-12-02 Updated: 2023-01-09 Resolved: 2022-12-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | GIS |
| Affects Version/s: | 10.5.15, 10.3.37 |
| Fix Version/s: | 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Derick Magnusen | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | GIS, ST_GeomFromGeoJSON, compat57, geometry | ||
| Environment: |
Debian 11 |
||
| Description |
|
The following works in MySQL 8 but fails in MariaDB:
MariaDB requires the following:
Yes, I recognize that only the "geometry" property in the feature is necessary and also works in MySQL, but it caused quite a bit of head scratching and if the function names are going to be the same, then they should work the same. I don't personally have MariaDB setup, I'm just using this functionality in my OSS project and helping a user troubleshoot so I've provided as much info as I can about their environment. |
| Comments |
| Comment by Daniel Black [ 2022-12-03 ] | ||||||||||||||||||||||||||||||||||||
|
Quite right. I assume MySQL just ignores extra JSON fields. Also fails on 10.3 (without even a warning)
| ||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-12-03 ] | ||||||||||||||||||||||||||||||||||||
|
Currently there's an assumption that "feature" comes before "geometry":
Thanks for the bug report turtlesocks. | ||||||||||||||||||||||||||||||||||||
| Comment by Derick Magnusen [ 2022-12-03 ] | ||||||||||||||||||||||||||||||||||||
|
No problem, thanks for the quick replies! | ||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2022-12-03 ] | ||||||||||||||||||||||||||||||||||||
|
bar, can I get your review on https://github.com/MariaDB/server/pull/2354 please. turtlesocks, out of interest, what is your project? | ||||||||||||||||||||||||||||||||||||
| Comment by Alexey Botchkov [ 2022-12-08 ] | ||||||||||||||||||||||||||||||||||||
|
ok to push. |