Functions That Test Spatial Relations Between Geometry Objects ST_Union()  handles its arguments as described in the introduction to this section. mysql>  SET @g1 = ST_GeomFromText(’LineString(1 1, 3 3)’); mysql>  SET @g2 = ST_GeomFromText(’LineString(1 3, 3 1)’); mysql>  SELECT ST_AsText(ST_Union(@g1, @g2)); +--------------------------------------+ | ST_AsText(ST_Union(@g1, @g2)) | +--------------------------------------+ | MULTILINESTRING((1 1,3 3),(1 3,3 1)) | +--------------------------------------+ The functions described in this section take two geometries as arguments and return a qualitative or quantitative relation between them. MySQL implements two sets of functions using function names defined by the OpenGIS specification. One set tests the relationship between two geometry values using precise object shapes, the other set uses object minimum bounding rectangles (MBRs). The OpenGIS specification defines the following functions to test the relationship between two geometry values  g1  and  g2 , using precise object shapes. The return values 1 and 0 indicate true and false, respectively, except that distance functions return distance values. Functions in this section detect arguments in either Cartesian or geographic spatial reference systems (SRSs), and return results appropriate to the SRS. Unless otherwise specified, functions in this section handle their geometry arguments as follows: Ranges shown are in degrees. If an SRS uses another unit, the range uses the corresponding values in its unit. The exact range limits deviate slightly due to floating-point arithmetic. •If any argument is  NULL  or any geometry argument is an empty geometry, the return value is  NULL . •If any geometry argument is not a syntactically well-formed geometry, an  ER_GIS_INVALID_DATA  error occurs. •If any geometry argument is a syntactically well-formed geometry in an undefined spatial reference system (SRS), an  ER_SRS_NOT_FOUND  error occurs. •For functions that take multiple geometry arguments, if those arguments are not in the same SRS, an ER_GIS_DIFFERENT_SRIDS  error occurs. •If any geometry argument is geometrically invalid, either the result is true or false (it is undefined which), or an error occurs. •For geographic SRS geometry arguments, if any argument has a longitude or latitude that is out of range, an error occurs: • If a longitude value is not in the range ( − 180, 180], an ER_GEOMETRY_PARAM_LONGITUDE_OUT_OF_RANGE  error occurs ( ER_LONGITUDE_OUT_OF_RANGE prior to MySQL 8.0.12). • If a latitude value is not in the range [ − 90, 90], an  ER_GEOMETRY_PARAM_LATITUDE_OUT_OF_RANGE error occurs ( ER_LATITUDE_OUT_OF_RANGE  prior to MySQL 8.0.12). •Otherwise, the return value is non- NULL . 2325 12.17.9 Functions That Test Spatial Relations Between Geometry Objects 12.17.9.1 Spatial Relation Functions That Use Object Shapes