mirror of
https://github.com/MariaDB/server.git
synced 2025-10-25 18:38:00 +03:00
MDEV-25272: Wrong function name in error messages upon ST_GeomFromGeoJSON call
- Invalid function name during ER_WRONG_VALUE_FOR_TYPE and ER_GIS_INVALID_DATA
This commit is contained in:
@@ -62,9 +62,9 @@ SELECT st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features":
|
||||
st_astext(st_geomfromgeojson('{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.5] }, "properties": { "prop0": "value0" } }]}'))
|
||||
GEOMETRYCOLLECTION(POINT(102 0.5))
|
||||
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',5));
|
||||
ERROR HY000: Incorrect option value: '5' for function ST_GeometryFromJSON
|
||||
ERROR HY000: Incorrect option value: '5' for function ST_GeomFromGeoJSON
|
||||
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',1));
|
||||
ERROR 22023: Invalid GIS data provided to function ST_GeometryFromJSON.
|
||||
ERROR 22023: Invalid GIS data provided to function ST_GeomFromGeoJSON.
|
||||
SELECT ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',2));
|
||||
ST_AsText(ST_GeomFromGeoJSON('{ "type": "Point", "coordinates": [5.3, 15.0, 4.3]}',2))
|
||||
POINT(5.3 15)
|
||||
|
||||
@@ -145,7 +145,7 @@ String *Item_func_geometry_from_json::val_str(String *str)
|
||||
{
|
||||
String *sv= args[1]->val_str(&tmp_js);
|
||||
my_error(ER_WRONG_VALUE_FOR_TYPE, MYF(0),
|
||||
"option", sv->c_ptr_safe(), "ST_GeometryFromJSON");
|
||||
"option", sv->c_ptr_safe(), "ST_GeomFromGeoJSON");
|
||||
null_value= 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ String *Item_func_geometry_from_json::val_str(String *str)
|
||||
code= ER_GEOJSON_NOT_CLOSED;
|
||||
break;
|
||||
case Geometry::GEOJ_DIMENSION_NOT_SUPPORTED:
|
||||
my_error(ER_GIS_INVALID_DATA, MYF(0), "ST_GeometryFromJSON");
|
||||
my_error(ER_GIS_INVALID_DATA, MYF(0), "ST_GeomFromGeoJSON");
|
||||
break;
|
||||
default:
|
||||
report_json_error_ex(js, &je, func_name(), 0, Sql_condition::WARN_LEVEL_WARN);
|
||||
|
||||
Reference in New Issue
Block a user