PolarDB-X is a distributed database service compatible with MySQL syntax. It comes in two editions: Standard Edition (centralized) and Enterprise Edition (distributed). Both editions support MySQL SQL syntax, but each has a different compatibility profile based on its architecture.
Standard Edition is 100% compatible with MySQL syntax. It blocks certain control-type SQL statements for security reasons — these statements are syntactically accepted but denied at execution time.
Enterprise Edition is compatible with MySQL syntax but does not fully support some advanced MySQL features. These limitations stem from the complexity of the distributed architecture. Unsupported statements are parsed without error to maintain compatibility with upstream and downstream tools, but they do not execute.
Use this page to identify compatibility gaps before migrating from a traditional MySQL database to a PolarDB-X instance.
Standard Edition
Unsupported statements at a glance
The following statements are syntactically accepted but blocked at execution time. This is a security policy, not an architectural limitation.
Control statements (disallowed):
ALTER EVENT,ALTER INSTANCE,ALTER SERVER,ALTER TABLESPACECREATE SERVER,CREATE SPATIAL REFERENCE SYSTEM,CREATE TABLESPACEDROP SERVER,DROP SPATIAL REFERENCE SYSTEMIMPORT TABLE,LOAD DATA,LOAD XMLCHANGE MASTER TO,CHANGE REPLICATION FILTER,CHANGE REPLICATION SOURCE TOSTART REPLICA,START SLAVE,STOP REPLICA,STOP SLAVESTART GROUP_REPLICATION,STOP GROUP_REPLICATIONLOCK INSTANCE FOR BACKUP,UNLOCK INSTANCE
Not supported:
INTERSECTclause
SQL compatibility table
PolarDB-X Standard Edition is 100% compatible with MySQL syntax. To enhance security, it denies requests to execute control-type SQL statements. Statements marked Disallowed in the Remarks column are syntactically valid but blocked at execution time.
| SQL statement type | SQL syntax | Compatible | Remarks |
|---|---|---|---|
| Data definition statements | ALTER DATABASE | Y | |
| ALTER EVENT | Y | Disallowed | |
| ALTER FUNCTION | Y | ||
| ALTER INSTANCE | Y | Disallowed | |
| ALTER PROCEDURE | Y | ||
| ALTER SERVER | Y | Disallowed | |
| ALTER TABLE | Y | ||
| ALTER TABLESPACE | Y | Disallowed | |
| ALTER VIEW | Y | ||
| CREATE DATABASE | Y | ||
| CREATE EVENT | Y | ||
| CREATE FUNCTION | Y | ||
| CREATE INDEX | Y | ||
| CREATE PROCEDURE / CREATE FUNCTION | Y | ||
| CREATE SERVER | Y | Disallowed | |
| CREATE SPATIAL REFERENCE SYSTEM | Y | Disallowed | |
| CREATE TABLE | Y | ||
| CREATE TABLESPACE | Y | Disallowed | |
| CREATE TRIGGER | Y | ||
| CREATE VIEW | Y | ||
| DROP DATABASE | Y | ||
| DROP EVENT | Y | ||
| DROP FUNCTION | Y | ||
| DROP INDEX | Y | ||
| DROP PROCEDURE / DROP FUNCTION | Y | ||
| DROP SERVER | Y | Disallowed | |
| DROP SPATIAL REFERENCE SYSTEM | Y | Disallowed | |
| DROP TABLE | Y | ||
| DROP TRIGGER | Y | ||
| DROP VIEW | Y | ||
| RENAME TABLE | Y | ||
| TRUNCATE TABLE | Y | ||
| Data manipulation statements | CALL | Y | |
| DELETE | Y | ||
| DO | Y | ||
| HANDLER | Y | ||
| IMPORT TABLE | Y | Disallowed | |
| INSERT | Y | ||
| INTERSECT clause | Y | This clause is not supported. | |
| LOAD DATA | Y | Disallowed | |
| LOAD XML | Y | Disallowed | |
| REPLACE | Y | ||
| SELECT | Y | ||
| Subqueries | Y | ||
| UPDATE | Y | ||
| UNION clause | Y | ||
| WITH (common table expressions) | Y | ||
| Transactional and locking statements | START TRANSACTION, COMMIT, and ROLLBACK | Y | |
| SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT | Y | ||
| LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE | Y | Disallowed | |
| LOCK TABLES and UNLOCK TABLES | Y | ||
| SET TRANSACTION | Y | ||
| Statements for controlling replica servers | CHANGE MASTER TO | Y | Disallowed |
| CHANGE REPLICATION FILTER | Y | Disallowed | |
| CHANGE REPLICATION SOURCE TO | Y | Disallowed | |
| START REPLICA | Y | Disallowed | |
| START SLAVE | Y | Disallowed | |
| STOP REPLICA | Y | Disallowed | |
| STOP SLAVE | Y | Disallowed | |
| Statements for controlling group replication | START GROUP_REPLICATION | Y | Disallowed |
| STOP GROUP_REPLICATION | Y | Disallowed | |
| Prepared statements | PREPARE | Y | |
| EXECUTE | Y | ||
| DEALLOCATE PREPARE | Y | ||
| Database administration statements: account management | ALTER USER | Y | |
| CREATE ROLE | Y | ||
| CREATE USER | Y | ||
| DROP ROLE | Y | ||
| DROP USER | Y | ||
| GRANT | Y | ||
| RENAME USER | Y | ||
| REVOKE | Y | ||
| SET DEFAULT ROLE | Y | ||
| SET PASSWORD | Y | ||
| SET ROLE | Y | ||
| Database administration statements: table maintenance | ANALYZE TABLE | Y | |
| CHECK TABLE | Y | ||
| CHECKSUM TABLE | Y | ||
| OPTIMIZE TABLE | Y | ||
| REPAIR TABLE | Y | ||
| Database administration statements: component, plugin, and loadable function statements | CREATE FUNCTION statement for loadable functions | Y | |
| DROP FUNCTION statement for loadable functions | Y | ||
| INSTALL COMPONENT | Y | ||
| INSTALL PLUGIN | Y | ||
| UNINSTALL COMPONENT | Y | ||
| UNINSTALL PLUGIN | Y | ||
| Database administration statements: SET statements | SET syntax | Y | |
| SET CHARACTER | Y | ||
| SET NAMES | Y | ||
| Database administration statements: SHOW statements | SHOW BINARY LOGS | Y | Only users who have the REPLICATION CLIENT permission can execute this statement. |
| SHOW BINLOG EVENTS | Y | Only users who have the REPLICATION SLAVE permission can execute this statement. | |
| SHOW CHARACTER SET | Y | ||
| SHOW COLLATION | Y | ||
| SHOW COLUMNS | Y | ||
| SHOW CREATE DATABASE | Y | ||
| SHOW CREATE EVENT | Y | ||
| SHOW CREATE PROCEDURE | Y | ||
| SHOW CREATE TABLE | Y | ||
| SHOW CREATE TRIGGER | Y | ||
| SHOW CREATE USER | Y | ||
| SHOW CREATE VIEW | Y | ||
| SHOW DATABASES | Y | ||
| SHOW ENGINES | Y | ||
| SHOW ERRORS | Y | ||
| SHOW EVENTS | Y | ||
| SHOW FUNCTION CODE | Y | ||
| SHOW FUNCTION STATUS | Y | ||
| SHOW GRANTS | Y | ||
| SHOW INDEX | Y | ||
| SHOW MASTER STATUS | Y | ||
| SHOW OPEN TABLES | Y | ||
| SHOW PLUGINS | Y | ||
| SHOW PRIVILEGES | Y | ||
| SHOW PROCEDURE CODE | Y | ||
| SHOW PROCEDURE STATUS | Y | ||
| SHOW PROCESSLIST | Y | ||
| SHOW PROFILE | Y | ||
| SHOW PROFILES | Y | ||
| SHOW SLAVE | REPLICA STATUS | Y | ||
| SHOW STATUS | Y | ||
| SHOW TABLE STATUS | Y | ||
| SHOW TABLES | Y | ||
| SHOW TRIGGERS | Y | ||
| SHOW VARIABLES | Y | ||
| SHOW WARNINGS | Y | ||
| Utility statements | DESCRIBE | Y | |
| EXPLAIN | Y | ||
| HELP | Y | ||
| USE | Y |
Enterprise Edition
Unsupported statements at a glance
The following statements are not supported due to the complexity of the distributed architecture. Syntax is parsed without error to preserve tool compatibility, but the statements do not execute.
Data definition statements:
ALTER EVENT,ALTER INSTANCE,ALTER SERVER,ALTER TABLESPACECREATE EVENT,CREATE SERVER,CREATE SPATIAL REFERENCE SYSTEM,CREATE TABLESPACEDROP EVENT,DROP SERVER,DROP SPATIAL REFERENCE SYSTEM
Data manipulation statements:
HANDLER,IMPORT TABLE,LOAD XMLLOAD DATA— syntax is supported but disabled by default
Transactional and locking statements:
LOCK INSTANCE FOR BACKUP,UNLOCK INSTANCELOCK TABLES,UNLOCK TABLES
Statements for controlling replica servers (all unsupported):
CHANGE MASTER TO,CHANGE REPLICATION FILTER,CHANGE REPLICATION SOURCE TOSTART REPLICA,START SLAVE,STOP REPLICA,STOP SLAVE
Statements for controlling group replication (all unsupported):
START GROUP_REPLICATION,STOP GROUP_REPLICATION
Table maintenance: REPAIR TABLE
Component and plugin management (all unsupported):
INSTALL COMPONENT,INSTALL PLUGIN,UNINSTALL COMPONENT,UNINSTALL PLUGIN
SHOW statements: SHOW SLAVE HOSTS | SHOW REPLICAS
SQL compatibility table
PolarDB-X Enterprise Edition is compatible with MySQL. Due to the complexity of its distributed architecture, it does not support some advanced MySQL features but does support their syntax. This preserves compatibility with upstream and downstream ecosystems.
| SQL statement type | SQL syntax | Compatible | Remarks |
|---|---|---|---|
| Data definition statements | ALTER DATABASE | Y | |
| ALTER EVENT | N | This feature is not supported. | |
| ALTER FUNCTION | Y | ||
| ALTER INSTANCE | N | This feature is not supported. | |
| ALTER PROCEDURE | Y | ||
| ALTER SERVER | N | This feature is not supported. | |
| ALTER TABLE | Y | ||
| ALTER TABLESPACE | N | This feature is not supported. | |
| ALTER VIEW | Y | ||
| CREATE DATABASE | Y | ||
| CREATE EVENT | N | This feature is not supported. | |
| CREATE FUNCTION | Y | ||
| CREATE INDEX | Y | ||
| CREATE PROCEDURE / CREATE FUNCTION | Y | ||
| CREATE SERVER | N | This feature is not supported. | |
| CREATE SPATIAL REFERENCE SYSTEM | N | This feature is not supported. | |
| CREATE TABLE | Y | ||
| CREATE TABLESPACE | N | This feature is not supported. | |
| CREATE TRIGGER | Y | ||
| CREATE VIEW | Y | ||
| DROP DATABASE | Y | ||
| DROP EVENT | N | This feature is not supported. | |
| DROP FUNCTION | Y | ||
| DROP INDEX | Y | ||
| DROP PROCEDURE / DROP FUNCTION | Y | ||
| DROP SERVER | N | This feature is not supported. | |
| DROP SPATIAL REFERENCE SYSTEM | N | This feature is not supported. | |
| DROP TABLE | Y | ||
| DROP TRIGGER | Y | ||
| DROP VIEW | Y | ||
| RENAME TABLE | Y | ||
| TRUNCATE TABLE | Y | ||
| Data manipulation statements | CALL | Y | |
| DELETE | Y | ||
| DO | Y | ||
| EXCEPT clause | Y | ||
| HANDLER | N | This feature is not supported. | |
| IMPORT TABLE | N | This feature is not supported. | |
| INSERT | Y | ||
| INTERSECT clause | Y | ||
| LOAD DATA | N | This feature is supported. By default, this feature is disabled. | |
| LOAD XML | N | This feature is not supported. | |
| REPLACE | Y | ||
| SELECT | Y | ||
| Subqueries | Y | ||
| UPDATE | Y | ||
| UNION clause | Y | ||
| WITH (common table expressions) | Y | ||
| Transactional and locking statements | START TRANSACTION, COMMIT, and ROLLBACK | Y | |
| SAVEPOINT, ROLLBACK TO SAVEPOINT, and RELEASE SAVEPOINT | Y | ||
| LOCK INSTANCE FOR BACKUP and UNLOCK INSTANCE | N | This feature is not supported. | |
| LOCK TABLES and UNLOCK TABLES | N | This feature is not supported. | |
| SET TRANSACTION | Y | ||
| Statements for controlling replica servers | CHANGE MASTER TO | N | This feature is not supported. |
| CHANGE REPLICATION FILTER | N | This feature is not supported. | |
| CHANGE REPLICATION SOURCE TO | N | This feature is not supported. | |
| START REPLICA | N | This feature is not supported. | |
| START SLAVE | N | This feature is not supported. | |
| STOP REPLICA | N | This feature is not supported. | |
| STOP SLAVE | N | This feature is not supported. | |
| Statements for controlling group replication | START GROUP_REPLICATION | N | This feature is not supported. |
| STOP GROUP_REPLICATION | N | This feature is not supported. | |
| Prepared statements | PREPARE | Y | |
| EXECUTE | Y | ||
| DEALLOCATE PREPARE | Y | ||
| Database administration statements: account management | ALTER USER | Y | |
| CREATE ROLE | Y | ||
| CREATE USER | Y | ||
| DROP ROLE | Y | ||
| DROP USER | Y | ||
| GRANT | Y | ||
| RENAME USER | Y | ||
| REVOKE | Y | ||
| SET DEFAULT ROLE | Y | ||
| SET PASSWORD | Y | ||
| SET ROLE | Y | ||
| Database administration statements: table maintenance | ANALYZE TABLE | Y | |
| CHECK TABLE | Y | ||
| CHECKSUM TABLE | Y | ||
| OPTIMIZE TABLE | Y | ||
| REPAIR TABLE | N | This feature is not supported. | |
| Database administration statements: component, plugin, and loadable function statements | CREATE FUNCTION statement for loadable functions | Y | |
| DROP FUNCTION statement for loadable functions | Y | ||
| INSTALL COMPONENT | N | This feature is not supported. | |
| INSTALL PLUGIN | N | This feature is not supported. | |
| UNINSTALL COMPONENT | N | This feature is not supported. | |
| UNINSTALL PLUGIN | N | This feature is not supported. | |
| Database administration statements: SET statements | SET syntax | Y | |
| SET CHARACTER | Y | ||
| SET NAMES | Y | ||
| Database administration statements: SHOW statements | SHOW BINARY LOGS | Y | Only users who have the REPLICATION CLIENT permission can execute this statement. |
| SHOW BINLOG EVENTS | Y | Only users who have the REPLICATION SLAVE permission can execute this statement. | |
| SHOW CHARACTER SET | Y | ||
| SHOW COLLATION | Y | ||
| SHOW COLUMNS | Y | ||
| SHOW CREATE DATABASE | Y | ||
| SHOW CREATE EVENT | Y | ||
| SHOW CREATE PROCEDURE | Y | ||
| SHOW CREATE TABLE | Y | ||
| SHOW CREATE TRIGGER | Y | ||
| SHOW CREATE USER | Y | ||
| SHOW CREATE VIEW | Y | ||
| SHOW DATABASES | Y | ||
| SHOW ENGINES | Y | ||
| SHOW ERRORS | Y | ||
| SHOW EVENTS | Y | ||
| SHOW FUNCTION CODE | Y | ||
| SHOW FUNCTION STATUS | Y | ||
| SHOW GRANTS | Y | ||
| SHOW INDEX | Y | ||
| SHOW MASTER STATUS | Y | ||
| SHOW OPEN TABLES | Y | ||
| SHOW PLUGINS | Y | ||
| SHOW PRIVILEGES | Y | ||
| SHOW PROCEDURE CODE | Y | ||
| SHOW PROCEDURE STATUS | Y | ||
| SHOW PROCESSLIST | Y | ||
| SHOW PROFILE | Y | ||
| SHOW PROFILES | Y | ||
| SHOW RELAYLOG EVENTS | Y | ||
| SHOW REPLICAS | Y | ||
| SHOW SLAVE HOSTS | SHOW REPLICAS | N | This feature is not supported. | |
| SHOW REPLICA STATUS | Y | ||
| SHOW SLAVE | REPLICA STATUS | Y | ||
| SHOW STATUS | Y | ||
| SHOW TABLE STATUS | Y | ||
| SHOW TABLES | Y | ||
| SHOW TRIGGERS | Y | ||
| SHOW VARIABLES | Y | ||
| SHOW WARNINGS | Y | ||
| Utility statements | DESCRIBE | Y | |
| EXPLAIN | Y | ||
| HELP | Y | ||
| USE | Y |