3332
MariaDBERRORCommonSpatial / GISHIGH confidence
Cannot change or drop SRS that is used by a spatial column
Production Risk
High — DDL fails; all spatial data in dependent columns would otherwise become uninterpretable.
How to reproduce
trigger — this will error
trigger — this will error
DROP SPATIAL REFERENCE SYSTEM 4326;
expected output
ERROR 3332 (HY000): Can't change spatial reference system 4326. It is used by column 'geom' in table 'locations'.
Fix
Remove dependent columns first
Remove dependent columns first
ALTER TABLE locations DROP COLUMN geom; DROP SPATIAL REFERENCE SYSTEM 99999;
Why this works
Once no column references the SRS, it can be safely dropped.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3332 ER_CANNOT_CHANGE_SRS_USED_BY_COLUMN
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev