WL#2388: GeomCollection synonym for GeometryCollection
MySQL currently supports only a non-standard name for the geometry collection data type, "GEOMETRYCOLLECTION". This WL adds the OGC SFA and SQL/MM compliant name "GEOMCOLLECTION".
The standard compliant name, "GEOMCOLLECTION", will be the default, and "GEOMETRYCOLLECTION" will be an alias accepted in user input. That means that INFORMATION_SCHEMA, SHOW CREATE TABLE and other places that type names are output by the server, "GEOMCOLLECTION" will be used.
The geometry collection construction function, "GEOMETRYCOLLECTION", is named after the column type. An alias "GEOMCOLLECTION" will be added for this function. The new name will be the default and visible, e.g., in EXPLAIN output.
- The data type GEOMCOLLECTION MUST be allowed in column definitions as an alias for type GEOMETRYCOLLECTION.
- The column DATA_TYPE in view INFORMATION_SCHEMA.COLUMNS MUST contain "GEOMCOLLECTION" as data type for geometry collection columns.
- The column GEOMETRY_TYPE_NAME in view INFORMATION_SCHEMA.ST_GEOMETRY_COLUMNS MUST contain "GEOMCOLLECTION" as data type for geometry collection columns.
- SHOW CREATE TABLE MUST contain "GEOMCOLLECTION" as data type for geometry collection columns.
- The ST_GEOMETRYTYPE function MUST return "GEOMCOLLECTION" if called with a geometry collection argument.
- Function GEOMCOLLECTION MUST behave as function GEOMETRYCOLLECTION.
- EXPLAIN output (the warning that displays the query) MUST show the function name "GEOMCOLLECTION" where the GEOMCOLLECTION or GEOMETRYCOLLECTION functions are used.
- No new files.
- Interface SQL01 is extended with a new name, "GEOMCOLLECTION", for the geometry collection data type.
Interface SQL01 is extended with a new name, "GEOMCOLLECTION", for the geometry collection construction function GEOMETRYCOLLECTION.
- No new commands.
- No new tools.
- No changes to the semantics of existing functionality. The data type name returned by INFORMATION_SCHEMA views and function ST_GEOMETRYTYPE changes from "GEOMETRYCOLLECTION" to "GEOMCOLLECTION".
- No new errors or warnings. The data types printed in some error messages changes from "GEOMETRYCOLLECTION" to "GEOMCOLLECTION".
The names of the data type and the geometry collection construction function is defined in the parser. The parser is extended with a new GEOMCOLLECTION_SYM symbol to allow both "GEOMETRYCOLLECTION" and "GEOMCOLLECTION" as names for the data type and function.
The type name for column DATA_TYPE in view INFORMATION_SCHEMA.COLUMNS and in SHOW CREATE TABLE comes from Field_geom::sql_type(). This function is changed to return "geomcollection".
Column GEOMETRY_TYPE_NAME in view INFORMATION_SCHEMA.ST_GEOMETRY_COLUMNS comes from INFORMATION_SCHEMA.COLUMNS. The WHERE condition in the view is updated to pick up geometry collection columns that now are reported to have a different data type.
Item_func_spatial_collection::func_name() is modified to return the function name "geomcollection" for geometry collections. This affects EXPLAIN output and error messages.
A similar change is made to gis::Functor so that error messages will contain the new default data type.
The WKT parser and generators rely on the Geometry::Class_info classes to recognize and produce geometry type names. Since the default data type name is no longer the same as the WKT name for the geometry, these are overridden.
Geometry::find_class() is only used when parsing WKT, so it is modified to only recognize "GEOMETRYCOLLECTION", even if the Geometry::Class_info name is "GEOMCOLLECTION". Similarly, Geometry::as_wkt() is modified to produce "GEOMETRYCOLLECTION" instead of the Geometry::Class_info name.