The database engine is also known as the database kernel. PolarDB for MySQL provides three major engine versions: 5.6, 5.7, and 8.0.

Components of the engine version and their relationships

The major version is the most important part that is used to identify an engine version of PolarDB for MySQL. A major version may have one or more minor versions. For example, major version 5.6 has only a single minor version, 5.6.16, while major version 8.0 has two minor versions, 8.0.1 and 8.0.2. Features of different minor versions are significantly different. We recommend that you pay special attention to the selection of minor versions. In most cases, a minor version has multiple revision versions. A revision version provides optimizations and improvements to their corresponding minor version or delivers new features. Newer minor and revision versions also deliver stronger security protection and better performance.
Release notes of engine versions
Compatibility of engine versions
- Complies with ANSI and ISO SQL standards. PolarDB for MySQL allows you to enable the ANSI session mode by setting the sql_mode parameter of your cluster to ANSI. For more information about how to modify the cluster parameters, see Specify cluster and node parameters.
- Supports Open Database Connectivity (ODBC) versions 0 to 3.51.
- Supports XML features that comply with W3C and XPath standards.
- PolarDB for MySQL 5.7 and 8.0 support the native JSON data types that comply with RFC 7159 and ECMA-262 standards.
Engine version | Fully compatible MySQL minor version |
---|---|
8.0.2 | 8.0.18 and earlier |
8.0.1 | 8.0.13 and earlier |
5.7 | 5.7.28 and earlier |
5.6 | 5.6.16 and earlier |
Compatibility between PolarDB for MySQL 8.0.2.2.0 or later and MySQL
PolarDB for MySQL 8.0.2.2.0 or later may have syntax compatibility issues with other MySQL databases. This section provides solutions to these issues.
create table
- Method 1: Execute the SHOW CREATE TABLE statement. Example:
CREATE TABLE `t1` (c1 int) ENGINE=InnoDB UNIQUE CHECK IGNORE=1 PARTITION BY HASH (`c1`) PARTITIONS 4; -- result SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` int(11) DEFAULT NULL ) /*!99990 800020200 UNIQUE CHECK IGNORE=1 */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci /*!50100 PARTITION BY HASH (`c1`) PARTITIONS 4 */
- Method 2: Use the mysqldump tool. Example:
CREATE TABLE `t1` (c1 int) UNIQUE CHECK IGNORE=1 ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci PARTITION BY HASH (`c1`); --result mysqldump --compact test t1 include/mysqlbinlog.inc /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; # [empty] # original_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ) # immediate_commit_timestamp= MICROSECONDS-FROM-EPOCH (YYYY-MM-DD HOURS:MINUTES:SECONDS TZ) /*!80001 SET @@session.original_commit_timestamp= MICROSECONDS-FROM-EPOCH*//*!*/; /*!80014 SET @@session.original_server_version= ORIGINAL_SERVER_VERSION*//*!*/; /*!80014 SET @@session.immediate_server_version= IMMEDIATE_SERVER_VERSION*//*!*/; SET @@SESSION.GTID_NEXT= '#'/*!*/; use `test`/*!*/; SET TIMESTAMP=#/*!*/; SET @@session.pseudo_thread_id=#/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=1168113696/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C utf8mb4 *//*!*/; SET @@session.character_set_client=255,@@session.collation_connection=255,@@session.collation_server=255/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; /*!80011 SET @@session.default_collation_for_utf8mb4=255*//*!*/; /*!80013 SET @@session.sql_require_primary_key=0*//*!*/; CREATE TABLE `t1` ( `c1` int(11) DEFAULT NULL ) /*!99990 800020200 UNIQUE CHECK IGNORE=1 */ ENGINE=InnoDB /*!50100 PARTITION BY HASH (`c1`) PARTITIONS 4 */ /*!*/; ......
- Method 3: Use binary log synchronization. In the following example, binary logs are synchronized from PolarDB for MySQL 8.0.2.2.0 to MySQL 8.0.27.
- Use DTS to synchronize PolarDB for MySQL binary logs to another MySQL database. For more information, see Synchronize data from a PolarDB for MySQL cluster to an ApsaraDB RDS for MySQL instance.
- View the binary log synchronization result on PolarDB for MySQL 8.0.2.2.0 and on the destination MySQL database. Sample result on PolarDB for MySQL:Sample result on the destination MySQL database:
As shown in the preceding figures, the features provided by PolarDB for MySQL are not displayed in the result on the destination MySQL database.
Note After PolarDB for MySQL data is synchronized to other MySQL databases, the features provided by PolarDB for MySQL are no longer available.
DDL statements other than CREATE TABLE
/*!99990 800020200 Special new PolarDB Syntax SQL supported >= version 2.2.0 */
CREATE TABLE `t1` (c1 int)
/*!99990 900020200 UNIQUE CHECK IGNORE=1 */
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
/*!50100 PARTITION BY HASH (`c1`) */;
SHOW CREATE TABLE t1;
DROP TABLE `t1`;
Query the engine version
You can use the following methods to query the engine version of a cluster:
- Log on to the PolarDB console. On the Overview page of the cluster whose engine version you want to query, check the value of the Kernel Version parameter.
- Execute the
show variables like "%polardb_version%";
orshow variables like '%rds_release_date%';
statement to query the engine version.Note- You can execute only the
show variables like '%rds_release_date%';
statement to query the engine version of a PolarDB for MySQL 5.6 cluster. - For more information about the components of the PolarDB for MySQL engine version, see Components of the engine version and their relationships.
- You can execute only the
Upgrade the engine version
- Upgrade major versions and minor versions
- Upgrade DB versions
Major version upgrades allow you to upgrade DB versions, such as from PolarDB for MySQL 5.6 to PolarDB for MySQL 8.0.
- Upgrade minor versions
In PolarDB for MySQL, you cannot upgrade minor versions. However, you can use DTS to migrate or synchronize data from the cluster of the source version to the cluster of the destination version. For more information about how to migrate or synchronize data, see Overview.
- Upgrade DB versions
- Upgrade revision versions
For more information about how to upgrade revision versions, see Upgrade the revision version.