ERROR 1235 (42000): This version of MySQL doesn't yet support '<feature>' is raised when a SQL statement uses a feature or syntax that exists in the SQL standard or a newer MySQL release but is not implemented in the MySQL version currently running. The error symbol is ER_NOT_SUPPORTED_YET.
Impact
The query is rejected immediately before any rows are read or written. No partial execution occurs, and if the statement is part of an explicit transaction, the transaction is not rolled back — but the failing statement has no effect. The error is returned to the client as a fatal SQL error with SQLSTATE 42000 (Syntax Error or Access Rule Violation).
Developers most commonly encounter this error after writing queries against MySQL 8.x documentation while running a MySQL 5.7 server, or when using advanced window function syntax, CTEs, or JSON operators on older installations. ORMs that generate SQL dynamically — such as SQLAlchemy, Hibernate, or ActiveRecord — may surface it as a generic database error wrapping the original message, so always inspect the underlying SQL.
Common Causes
Using Common Table Expressions (CTEs) on MySQL 5.7 or earlier. Recursive and non-recursive
WITHclauses were introduced in MySQL 8.0. Running aWITH ...query on 5.7 produces this error.Using window functions on MySQL 5.7 or earlier.
ROW_NUMBER(),RANK(),DENSE_RANK(),LAG(),LEAD(), andOVER()clauses are MySQL 8.0+ features.Using
INTERSECTorEXCEPTset operators. These were only added in MySQL 8.0.31. Earlier versions support onlyUNION.Using
LATERALderived tables. TheLATERALkeyword for correlated derived tables requires MySQL 8.0.14+.Using subquery options in
LIMITclauses inside subqueries. MySQL has historically restrictedLIMITin certain subquery positions; the exact constraint depends on the version.Using certain JSON or GIS functions introduced in a newer minor release. Functions like
JSON_TABLE()require 8.0.4+, and specific spatial functions have graduated across releases.Replication-related statements on older replicas. When a primary runs MySQL 8.x and a replica runs 5.7, statements valid on the primary may fail during replay on the replica.
Troubleshooting and Resolution Steps
Identify the exact MySQL version you are running:
SELECT VERSION();Compare the result against the MySQL documentation for the feature you are using. The official changelog at dev.mysql.com lists the version in which each feature was introduced.
Reproduce the minimal failing statement by stripping the query down to its essential structure. For example, if your ORM generates a CTE, try running:
WITH cte AS (SELECT 1) SELECT * FROM cte;If this fails, CTEs are not supported on your server version.
Rewrite the query using syntax supported by your version. For example, replace a CTE with a derived table subquery:
-- MySQL 8.0+ CTE (fails on 5.7) WITH ranked AS ( SELECT id, name, ROW_NUMBER() OVER (PARTITION BY dept ORDER BY salary DESC) AS rn FROM employees ) SELECT * FROM ranked WHERE rn = 1; -- Equivalent query compatible with MySQL 5.7 SELECT id, name FROM ( SELECT id, name, @rn := IF(@dept = dept, @rn + 1, 1) AS rn, @dept := dept FROM employees, (SELECT @rn := 0, @dept := NULL) AS init ORDER BY dept, salary DESC ) AS t WHERE rn = 1;Upgrade MySQL if the feature is essential. To upgrade in-place on Linux:
# Check current version mysql --version # On Ubuntu/Debian with MySQL APT repo sudo apt-get install mysql-server-8.0 sudo mysql_upgrade -u root -pAlways test on a staging environment and review the MySQL 8.0 upgrade guide for breaking changes (default charset, authentication plugin, removed functions).
Check the replica version if the error appears during replication:
SHOW REPLICA STATUS\G -- Look for: Replica_SQL_Running_State, Last_SQL_ErrorThe
Last_SQL_Errorfield will contain the 1235 message. The fix is to upgrade the replica to match the primary.Check the
sql_modefor syntax restrictions that can trigger 1235 in edge cases involving subqueries withLIMITorORDER BY:SELECT @@GLOBAL.sql_mode; SELECT @@SESSION.sql_mode;
Additional Information
- SQLSTATE
42000is shared with syntax errors (1064) and access denied errors (1142). The error number 1235 is the distinguishing factor. ER_NOT_SUPPORTED_YETis distinct fromER_FEATURE_DISABLED(error 1289), which is raised when a feature exists in the binary but was disabled at compile time or via configuration.- When running Percona Server or MariaDB, some MySQL 8.0 features may be available on 5.7-compatible releases, or vice versa — check the specific distribution's documentation rather than assuming feature parity.
- Connection poolers such as ProxySQL and tools that log SQL (e.g., pt-query-digest) will pass the error through unchanged, making it straightforward to capture the offending statement from slow query or general query logs.
Frequently Asked Questions
Why does my query work in MySQL Workbench but fail in production?
MySQL Workbench connects to whichever server you point it at. If your local machine runs MySQL 8.0 and production runs 5.7, a query valid on 8.0 will succeed locally and fail in production. Always verify SELECT VERSION() against the target environment.
Can I enable the feature without upgrading? No. Error 1235 indicates the feature is not implemented in the server binary — there is no configuration flag to enable it. The only paths are to upgrade MySQL or rewrite the query using supported syntax.
Does this error roll back my transaction? The 1235 error aborts only the specific statement. An open transaction is left open but the failing statement has no effect. You must either commit or roll back the transaction explicitly. Some client libraries and ORMs will automatically roll back on any SQL error — check your framework's error handling behavior.
My application uses an ORM — how do I find the generated SQL? Enable MySQL's general query log temporarily to capture all statements:
SET GLOBAL general_log = 'ON';
SET GLOBAL general_log_file = '/tmp/mysql-general.log';
-- reproduce the error, then:
SET GLOBAL general_log = 'OFF';
Most ORMs also expose a debug or echo mode: SQLAlchemy's echo=True, Hibernate's show_sql=true, or ActiveRecord's ActiveRecord::Base.logger.