Databases 12 min read

Key Features of MySQL 8.0.21 Release

MySQL 8.0.21 introduces numerous enhancements such as dynamic redo log control, optional tablespace path validation, refined lock system, JSON_VALUE function, atomic CREATE TABLE…AS SELECT, optimizer improvements, reduced group replication cache, multi‑address X Plugin support, and various security and deprecation updates.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Key Features of MySQL 8.0.21 Release

MySQL 8.0.21 was released with a set of important feature updates and bug fixes. The release replaces terminology such as Master/Slave and provides detailed release notes on the official site.

InnoDB

• Added a global configuration to enable or disable the redo log (WL#13795). Dynamic redo log start/stop can improve write speed but may increase risk of data loss if the server crashes. It is useful when loading initial data: disable redo log, load data, then re‑enable it.

ALTER INSTANCE ENABLE|DISABLE INNODB REDO_LOG;

• Tablespace filename validation becomes optional via --innodb-validate-tablespace-paths (ON|OFF) , reducing startup time on HDD systems when file moves are not expected.

• Lock system optimization (WL#10314) replaces a single latch protecting all queues with finer‑grained latches, allowing each table and row to be treated as a resource and improving scalability.

• All InnoDB tablespaces are now limited to known directories (datadir, innodb_data_home_dir, innodb_directories, innodb_undo_directory) to prevent accidental file creation in arbitrary locations.

• Undo DDL now supports ACID (WL#11819). Undo tablespace performance and safety are improved; CREATE/TRUNCATE operations are logged to the redo log, avoiding extra checkpoints and fixing issues with CREATE, DROP, and TRUNCATE.

JSON

• Added JSON_VALUE function (WL#12228) to simplify indexing of JSON values. It extracts a value from a JSON document and returns it as a specified type.

SELECT JSON_VALUE('{"name": "Evgen"}', '$.name')

Returns the unquoted string Evgen as VARCHAR(512) .

SELECT JSON_VALUE('{"price": 123.45}', '$.price' RETURNING DECIMAL(5,2))

Returns the numeric value 123.45 as DECIMAL(5,2) .

SQL DDL

• CREATE TABLE … AS SELECT is now an atomic statement (WL#13355), fixing cases where CREATE succeeded but SELECT rolled back.

Optimizer

• New optimizer parameter to disable limit optimization (WL#13929). prefer_ordering_index is enabled by default, allowing the optimizer to switch from a non‑ordering index to a grouping/sorting index when a LIMIT clause is present.

• Semi‑join support for single‑table UPDATE and DELETE (WL#6057) enables these statements to benefit from the optimizer like regular SELECTs.

// Previously these statements could not use semijoin and were slower
UPDATE t1 SET x=y WHERE z IN (SELECT * FROM t2);
DELETE FROM t1 WHERE z IN (SELECT * FROM t2);
// These can now use semijoin and are faster
SELECT x FROM t1 WHERE z IN (SELECT * FROM t2);

Group Replication

• Reduced minimum cache size: group_replication_message_cache_size lowered from 1 GB to 128 MB (WL#13979), allowing deployment on low‑memory hosts.

• Added ability to specify which endpoints may resume traffic during recovery (WL#13767), improving control over network traffic after failures.

• XCom can now be compiled with C++ (WL#13842), leveraging modern language features.

• Important group‑replication log messages are now classified as system messages (WL#13769), ensuring they are always recorded.

• START GROUP_REPLICATION now accepts USER, PASSWORD, DEFAULT_AUTH, and PLUGIN_DIR as optional parameters (WL#13768), avoiding the need to store credentials in files.

• group_replication_autorejoin_tries default increased from 0 to 3 (WL#13706) to enable automatic recovery from network partitions.

• group_replication_member_expel_timeout default increased from 0 to 5 seconds (WL#13773) to reduce unnecessary expulsions on transient network issues.

• Binary log checksum support added for group replication (WL#9038), allowing automatic verification of binlog integrity.

X Plugin

• --mysqlx-bind-address now supports multiple values (WL#12715), enabling the server to bind to several IP addresses.

Router

• User‑configurable log file name (WL#13838) allows logs to be written to a file other than mysqlrouter.log and redirects console output to stdout.

• Support for hiding nodes from applications (WL#13787) adds a metadata attribute to mark instances as hidden, preventing them from receiving client traffic while still being part of the InnoDB Cluster.

Other

• CREATE/ALTER USER now supports a JSON description attribute (WL#13562), storing arbitrary metadata in the user_attributes column of mysql.user .

ALTER USER foo ATTRIBUTE '{ "free_text" : "This is a free form text" }';

• Separate TLS certificate sets are now available for admin connections (WL#13850), allowing distinct certificates for management and regular client ports.

• Asynchronous client compression protocol added (WL#13510) to reduce cross‑data‑center traffic.

• Secure client library LOAD DATA LOCAL INFILE path/directory restrictions (WL#13168) let administrators define allowed and disallowed locations.

Deprecations

• Prefix‑key support in partition functions is deprecated (WL#13588) and will become an error in future releases.

Thank you for using MySQL!

DatabaseJSONInnoDBMySQLFeaturesReleaseNotesGroupReplication
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.