4138
MariaDBERRORNotableHIGH confidence
Feature not supported by the hypergraph optimizer
Production Risk
Medium — The query fails; disabling the hypergraph optimizer resolves it.
Why it happens
- 1optimizer_switch includes hypergraph_optimizer=on but the query uses a feature the hypergraph optimizer does not yet support.
- 2Certain query patterns, hints, or storage engine combinations are incompatible with the hypergraph optimizer.
Fix
Disable the hypergraph optimizer for this session or query
Disable the hypergraph optimizer for this session or query
SET SESSION optimizer_switch='hypergraph_optimizer=off';
Why this works
Reverts to the classic optimizer which supports the full feature set.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 4138 ER_HYPERGRAPH_UNSUPPORTED_FEATURE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev