Other SQL feature differences
This page describes SQL features where AnalyticDB for MySQL differs from MySQL 5.6 — either by not supporting them, or by supporting them with different behavior. Even when a statement is listed as "Supported," its semantics may differ from MySQL. Review the notes in each section before migrating.
MySQL 5.6 features not supported by AnalyticDB for MySQL
The following MySQL 5.6 feature categories are not supported:
Database management
Plug-ins and user-defined functions
SET
Compound query
Data replication
Stored objects
Transactional and locking statements
User-defined functions
Character sets and collations
AnalyticDB for MySQL supports only UTF-8.
mysql> SHOW CHARACTER SET;
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
1 row in set (0.00 sec)
mysql> SHOW COLLATION;
+-----------------+---------+------+---------+----------+---------+
| Collation | Charset | Id | Default | Compiled | Sortlen |
+-----------------+---------+------+---------+----------+---------+
| utf8_general_ci | utf8 | 33 | Yes | Yes | 1 |
| binary | binary | 63 | Yes | Yes | 1 |
+-----------------+---------+------+---------+----------+---------+
2 rows in set (0.00 sec)Case sensitivity
Data is case-sensitive in AnalyticDB for MySQL, unlike MySQL.
Database management
Some statements listed as "Supported" have behavioral differences from MySQL. Read the notes carefully before using them.
Category | MySQL | AnalyticDB for MySQL | Definition |
Account management | ALTER USER | Not supported | Modifies a user. |
CREATE USER | Supported. For more information, see CREATE USER. | Creates a new user. | |
DROP USER | Supported. For more information, see DROP USER. | Deletes one or more users and their permissions. | |
GRANT | Supported. For more information, see GRANT. | Grants a permission to a user. | |
RENAME USER | Supported. For more information, see RENAME USER. | Renames an existing user. | |
REVOKE | Supported. For more information, see REVOKE. | Lets a system administrator revoke user permissions. | |
Table maintenance | ANALYZE TABLE | Supported. The collected statistics differ, but this is transparent to users. | Analyzes and stores the key distribution for a named table. |
CHECK TABLE | Not supported | Checks one or more tables for errors. | |
CHECKSUM TABLE | Not supported | Returns the checksum of the table content. | |
OPTIMIZE TABLE | Support | Reorganizes the physical storage of table data and associated index data to reduce storage space and improve I/O efficiency when accessing the table. | |
REPAIR TABLE | Not supported | Repairs a possibly corrupted table. This operation is only for specific storage engines. | |
SHOW | SHOW AUTHORS | Not supported | Displays developer information. |
SHOW BINARY LOGS | Not supported | Displays the binary log files on the server. | |
SHOW BINLOG EVENTS | Not supported | Displays events in the binary log. | |
SHOW CHARACTER | Supported | Displays all available character sets. | |
SHOW COLLATION | Supported | Displays the collations supported by the server. | |
SHOW COLUMNS FROM | Supported Note AnalyticDB for MySQL does not support filter conditions. For example, the `show columns from xxx` statement displays all columns. | Displays information about the columns in a given table. It also applies to views. | |
SHOW CONTRIBUTORS | Not supported | Displays contributors. | |
SHOW CREATE DATABASE | Not supported | Displays the statement that creates the database. | |
SHOW CREATE EVENT | Not supported | Displays the statement that creates the event. | |
SHOW CREATE FUNCTION | Not supported | Displays the statement that creates the function. | |
SHOW CREATE PROCEDURE | Not supported | Displays the statement that creates the stored procedure. | |
SHOW CREATE TABLE | Support | Displays the statement that creates the table. | |
SHOW CREATE TRIGGER | Not supported | Displays the statement that creates the trigger. | |
SHOW CREATE VIEW | Support | Displays the statement that creates the view. | |
SHOW DATABASES | Support | Displays the databases on the server. | |
SHOW ENGINE | Not supported | Displays the log or status information of a storage engine. | |
SHOW ENGINES | Not supported | Displays the storage engines that the server currently supports. | |
SHOW ERRORS | Not supported | Displays the error messages generated by the last executed statement. | |
SHOW EVENTS | Not supported | Displays information about events in the default database. | |
SHOW FUNCTION CODE | Not supported | For internal server debugging. Displays the internal implementation of a specified stored function. | |
SHOW FUNCTION STATUS | Not supported | Displays information about stored functions. You must create a stored function first. | |
SHOW GRANTS | Supported | Displays the access privileges owned by a specified user. | |
SHOW INDEX | Supported | Displays index information for a specified database. | |
SHOW MASTER STATUS | Not supported | Displays information about the binary log that the master is currently using. | |
SHOW OPEN TABLES | Not supported | Displays a list of non-temporary tables that are registered in the table cache and are open. | |
SHOW PLUGINS | Not supported | Displays plugin information. | |
SHOW PRIVILEGES | Not supported | Displays the privileges that can be granted and their definitions. | |
SHOW PROCEDURE CODE | Not supported | For internal server debugging. Displays the internal implementation of a specified stored procedure. | |
SHOW PROCEDURE STATUS | Not supported | Displays information about stored procedures. You must create a stored procedure first. | |
SHOW PROCESSLIST | Supported. For more information, see SHOW PROCESSLIST. | Displays information about current server activity. | |
SHOW PROFILE | Not supported | Displays the resource usage for statements executed in the current session. | |
SHOW PROFILES | Not supported | Displays the resource usage for statements executed in the current session. | |
SHOW RELAYLOG EVENTS | Not supported | Displays relay log event information. You must set up master-slave replication first. | |
SHOW SLAVE HOSTS | Not supported | Displays a list of replication hosts registered on the master host. You must set up master-slave replication first. | |
SHOW SLAVE STATUS | Not supported | Displays the status information of the slave host. You must set up master-slave replication first. | |
SHOW STATUS | Not supported | Displays MySQL status information. | |
SHOW TABLE STATUS | Not supported | Displays table property information. | |
SHOW TABLES | Support | Displays the names of all tables in the current database. | |
SHOW TRIGGERS | Not supported | Displays trigger information. You must create a trigger first. | |
SHOW VARIABLES | Supported | Displays variable information. | |
SHOW WARNINGS | Not supported | Displays the warning messages generated by the last executed statement. | |
Other | BINLOG | Not supported | The BINLOG statement is for internal use. |
CACHE INDEX | Not supported | Assigns table indexes to a specific key cache. | |
FLUSH | Support | The FLUSH statement has multiple variants that can clear or reload various internal caches, refresh tables, or acquire locks. | |
KILL | Supported. For more information, see KILL PROCESS. | Terminates a running process. | |
LOAD INDEX INTO CACHE | Not supported | The LOAD INDEX INTO CACHE statement preloads table indexes into the key cache to which they were assigned by an explicit CACHE INDEX statement, or into the default key cache otherwise. | |
RESET | Not supported | Clears the status of various server operations. |
Public statements
MySQL | AnalyticDB for MySQL | Definition |
DESCRIBE | Supported | Gets information about table schemas. |
EXPLAIN | Supported. For more information, see Use the EXPLAIN and EXPLAIN ANALYZE commands to analyze execution plans and SQL diagnostics overview. | Queries execution plans. |
HELP | Not supported | Returns online help information from MySQL references. |
USE | Supported | Sets a named database as the default (current) database for subsequent statements. Requires permissions on the database or its objects. |