3270
MariaDBERRORNotableGIS / GeometryHIGH confidence

GIS function not supported for geographic SRS

Production Risk

Medium — spatial queries fail when geographic SRS is used with unsupported functions.

How to reproduce
trigger — this will error
trigger — this will error
SELECT ST_Buffer(ST_GeomFromText('POINT(0 0)', 4326), 100);

expected output

ERROR 3270 (HY000): st_buffer(POINT, ...) has not been implemented for geographic spatial reference systems.

Fix

Use Cartesian SRS

Use Cartesian SRS
SELECT ST_Buffer(ST_GeomFromText('POINT(0 0)', 0), 100);

Why this works

SRID 0 is the default Cartesian SRS and supports all spatial functions.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3270 ER_GIS_FUNC_UNSUPPORTED_FOR_GEOGRAPHIC_SRS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors