WL#9450: Forbid using undefined SRIDs

Affects: Server-8.0   —   Status: Complete   —   Priority: Medium

MySQL can't do spatial operations on geometries in unknown spatial reference systems. WL#8579 added a list of spatial reference systems to the data dictionary, and with that information we can enforce that new geometries have to be in one of the known spatial reference systems.

In all functions that take an SRID argument, return an error if the specified SRID doesn't exist.

This applies to functions:

  • ST_GEOMCOLLFROMTEXT
  • ST_GEOMCOLLFROMTXT
  • ST_GEOMCOLLFROMWKB
  • ST_GEOMETRYCOLLECTIONFROMTEXT
  • ST_GEOMETRYCOLLECTIONFROMWKB
  • ST_GEOMETRYFROMTEXT
  • ST_GEOMETRYFROMWKB
  • ST_GEOMFROMGEOJSON
  • ST_GEOMFROMTEXT
  • ST_GEOMFROMWKB
  • ST_LINEFROMTEXT
  • ST_LINEFROMWKB
  • ST_LINESTRINGFROMTEXT
  • ST_LINESTRINGFROMWKB
  • ST_MLINEFROMTEXT
  • ST_MLINEFROMWKB
  • ST_MPOINTFROMTEXT
  • ST_MPOINTFROMWKB
  • ST_MPOLYFROMTEXT
  • ST_MPOLYFROMWKB
  • ST_MULTILINESTRINGFROMTEXT
  • ST_MULTILINESTRINGFROMWKB
  • ST_MULTIPOINTFROMTEXT
  • ST_MULTIPOINTFROMWKB
  • ST_MULTIPOLYGONFROMTEXT
  • ST_MULTIPOLYGONFROMWKB
  • ST_POINTFROMGEOHASH
  • ST_POINTFROMTEXT
  • ST_POINTFROMWKB
  • ST_POLYFROMTEXT
  • ST_POLYFROMWKB
  • ST_POLYGONFROMTEXT
  • ST_POLYGONFROMWKB
  • ST_SRID (*)

(*) Already rejects unknown SRIDs.

F-1
The functions MUST raise ER_SRS_NOT_FOUND if given an SRID argument that doesn't refer to a spatial reference system.
F-2
All geometries returned by the functions MUST be in an SRS that is defined in the data dictionary.
I-1
No new files.
I-2
No new syntax.
I-3
No new commands.
I-4
No new tools.
I-5
The semantics of interface SQL01 are changed: The functions will raise ER_SRS_NOT_FOUND if given an unknown SRID.
I-6
No new errors or warnings.