3611
MariaDBWARNINGCriticalSyntaxHIGH confidence
Deprecated syntax in CASE expression
Production Risk
Low — Warning only; current behavior is preserved.
How to reproduce
trigger — this will error
trigger — this will error
SELECT CASE 1 WHEN 1 THEN 'one' END;
expected output
Warning 3611: Deprecated syntax in CASE expression.
Fix
Use standard searched CASE syntax
Use standard searched CASE syntax
SELECT CASE WHEN col = 1 THEN 'one' ELSE 'other' END FROM t;
Why this works
Uses the ANSI-standard searched CASE form that will remain supported.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 3611 ER_WARN_DEPRECATED_SYNTAX_SEARCHED_CASE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev