3328
MariaDBWARNINGCriticalServer ConfigurationHIGH confidence
Variable is set but not used
Production Risk
Low — the variable has no effect; intended configuration may be missing.
How to reproduce
trigger — this will error
trigger — this will error
SET GLOBAL some_variable = 1; -- when the variable has no effect
expected output
Warning 3328: Variable 'some_variable' is set but not used.
Fix
Remove unused variable
Remove unused variable
-- Remove the variable from my.cnf or my.ini and restart the server.
Why this works
Keeping unused variables adds confusion without benefit.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3328 ER_UNUSED_BUT_SET_VARIABLE2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev