3313
MySQLERRORNotableSpatial / GISHIGH confidence
SRS organization and coordsys_id already defined for another SRID
Production Risk
Low — DDL rejected; no existing SRS is altered.
How to reproduce
trigger — this will error
trigger — this will error
CREATE SPATIAL REFERENCE SYSTEM 99999 NAME 'dup' ORGANIZATION 'EPSG' IDENTIFIED BY 4326 DEFINITION '...';
expected output
ERROR 3313 (HY000): The organization and coordsys_id are already defined for SRID 4326.
Fix
Use a unique coordsys_id
Use a unique coordsys_id
CREATE SPATIAL REFERENCE SYSTEM 99999 NAME 'custom' ORGANIZATION 'LOCAL' IDENTIFIED BY 99999 DEFINITION '...';
Why this works
Each ORGANIZATION + IDENTIFIED BY pair must be unique across all SRIDs.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3313 ER_SRS_ORGANIZATION_ALREADY_DEFINED
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev