3299
MySQLERRORNotableQuery SyntaxHIGH confidence
Invalid combination of options
Production Risk
Low — DDL fails; no data modification occurs.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t1 DISCARD TABLESPACE, IMPORT TABLESPACE;
expected output
ERROR 3299 (HY000): Invalid combination of options: DISCARD TABLESPACE and IMPORT TABLESPACE cannot both be specified.
Fix
Use one operation at a time
Use one operation at a time
ALTER TABLE t1 DISCARD TABLESPACE;
Why this works
DISCARD and IMPORT TABLESPACE are separate, sequential operations.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3299 ER_INVALID_OPTION_COMBINATION
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev