Problem
sp_generateShortCode is check-then-insert with no retry on a UQ_shortcode_org collision; concurrent creates can surface a generic failure instead of producing a fresh code.
Affected
web/_sql/procedures/sp_generateShortCode.sql
web/Go2My.Link/_functions/shorturl_create.php (createShortURL())
Fix
Make creation atomic, or catch mysqli errno 1062 in createShortURL() and retry sp_generateShortCode a bounded number of times.
Acceptance criteria
From the 2026-06-04 schema review — see docs/SCHEMA_REVIEW_2026-06-04.md.
Problem
sp_generateShortCodeis check-then-insert with no retry on aUQ_shortcode_orgcollision; concurrent creates can surface a generic failure instead of producing a fresh code.Affected
web/_sql/procedures/sp_generateShortCode.sqlweb/Go2My.Link/_functions/shorturl_create.php(createShortURL())Fix
Make creation atomic, or catch mysqli errno 1062 in
createShortURL()and retrysp_generateShortCodea bounded number of times.Acceptance criteria
From the 2026-06-04 schema review — see
docs/SCHEMA_REVIEW_2026-06-04.md.