[MDEV-13123] POLYGON not accepted in MULTIPOLYGON column (works on MySQL 5.6.36-82.0) Created: 2017-06-19 Updated: 2017-11-03 Resolved: 2017-11-03 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | GIS |
| Affects Version/s: | 10.0.30, 10.1.21 |
| Fix Version/s: | 10.0.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Mario DE WEERD | Assignee: | Alexey Botchkov |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Compatibility, upstream | ||
| Environment: |
Debian, Windows |
||
| Sprint: | 10.1.29 |
| Description |
|
Mariadb does not accept a "POLYGON" in a "MULTIPOLYGON" table. The MySql documentation says: The following works with MySQL 5.6, not MariaDB. Compatibility is broken. This incompatibility is not listed (Incompatibilities 5.6).
|
| Comments |
| Comment by Alice Sherepa [ 2017-06-19 ] | ||||||||||
|
MariaDB 10.2.6 does not accept also a POINT in a MULTIPOINT column, and LINESTRING in a MULTILINESTRING. (e.g.ERROR 1366 Incorrect MULTILINESTRING value: 'LINESTRING' for column ) Just for the reference, mysql 5.7 does not accept it also and throws ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field | ||||||||||
| Comment by Mario DE WEERD [ 2017-06-19 ] | ||||||||||
|
Thank you for checking this. I have updated the test case (the next lines suppose that the table is created). The code below works in my 5.6 versions, but not in 5.7 for the "POLYGON" while the "MULTIPOLYGON" works. It looks like I'm going to have a little bit of fun at upgrading the server (and the app).
| ||||||||||
| Comment by Elena Stepanova [ 2017-06-25 ] | ||||||||||
|
le_top, thanks for the report and test case, and alice, for checking MySQL 5.7, it really changes things. If it was an intentional change in MySQL, then it is not an issue of compatibility, we can't be compatible with two mutually exclusive behaviors. However, I also couldn't find anything that would clearly state that POLYGON is not a MULTIPOLYGON etc., so I'm assigning it to holyfoot to clarify and maybe make a note about it in the documentation (or fix it, if it turns out to be an oversight after all). | ||||||||||
| Comment by Alexey Botchkov [ 2017-11-03 ] | ||||||||||
|
Mysql 5.6 just doesn't control geometry types at all. For instance POINT can be inserted there into MYLTIPOLYGON column, not just POLYGON. |