This topic describes the compatibility of PolarDB-X Standard Edition and Enterprise Edition with traditional MySQL databases. This topic helps you understand the compatibility issues that may occur when you migrate data from a traditional MySQL database to a PolarDB-X instance and provides related solutions.
PolarDB-X is a distributed database service that features high performance and high availability. It provides interfaces and features that are compatible with MySQL. PolarDB-X instances are available in two editions: Standard Edition (centralized) and Enterprise Edition (distributed). As a database solution designed to meet the requirements of enterprise-grade applications, PolarDB-X Standard Edition is 100% compatible with MySQL syntax and preserves the ease of use and flexibility of MySQL. PolarDB-X Enterprise Edition is compatible with MySQL syntax and significantly enhances the scalability, stability, and reliability of the database by using its advanced distributed architecture.
Standard Edition
PolarDB-X Standard Edition is 100% compatible with MySQL syntax. To enhance security, PolarDB-X Standard Edition denies the requests to execute control-type SQL statements. In the following table, control-type SQL statements that cannot be executed on a PolarDB-X instance of Standard Edition are marked with Disallowed
in the Remarks column.
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 statements | 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 statements | ANALYZE TABLE | Y | |
CHECK TABLE | Y | ||
CHECKSUM TABLE | Y | ||
OPTIMIZE TABLE | Y | ||
REPAIR TABLE | Y | ||
Database administration statements: component, plug-in, 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
PolarDB-X Enterprise Edition is compatible with MySQL. Due to the complexity of its distributed architecture, PolarDB-X Enterprise Edition does not support some advanced MySQL features but supports the syntax of the features. This ensures 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 statements | 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 statements | ANALYZE TABLE | Y | |
CHECK TABLE | Y | ||
CHECKSUM TABLE | Y | ||
OPTIMIZE TABLE | Y | ||
REPAIR TABLE | N | This feature is not supported. | |
Database administration statements: component, plug-in, 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 |