Skip to content

Checking your reading list…

Retry verification

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

MySQL 8.0.23 New Features Overview
Databases 10 min read

MySQL 8.0.23 New Features Overview

The article reviews MySQL 8.0.23's maintenance release, detailing new features such as invisible columns, query attributes, security enhancements, InnoDB auto‑extend size, replication terminology changes, X protocol improvements, and various deprecations, providing code examples and links to official documentation.

MySQL 8.0.23 was released as a maintenance version, fixing bugs and adding several new features.

1. Invisible Columns

Columns can be defined as INVISIBLE, so they are omitted from SELECT * results unless explicitly referenced.

# Create table with invisible column (ALTER TABLE also supports)<br/>mysql> CREATE TABLE t1 (col1 INT, col2 INT INVISIBLE);<br/>mysql> INSERT INTO t1 (col1, col2) VALUES(1,2),(3,4);<br/><br/># Query using explicit reference<br/>mysql> SELECT * FROM t1;<br/>+------+<br/>| col1 |<br/>+------+<br/>| 1    |<br/>| 3    |<br/>+------+<br/><br/># Column omitted when not referenced<br/>mysql> SELECT col1, col2 FROM t1;<br/>+------+------+
| col1 | col2 |
+------+------+
| 1    | 2    |
| 3    | 4    |
+------+------+

2. Query Attributes

Applications can set metadata for a query using query_attributes and retrieve it with the mysql_query_attribute_string() UDF.

mysql> query_attributes n1 v1 n2 v2;<br/>mysql> SELECT<br/>    mysql_query_attribute_string('n1') AS 'attr 1',<br/>    mysql_query_attribute_string('n2') AS 'attr 2',<br/>    mysql_query_attribute_string('n3') AS 'attr 3';<br/>+--------+--------+--------+
| attr 1 | attr 2 | attr 3 |
+--------+--------+--------+
| v1     | v2     | NULL   |
+--------+--------+--------+

3. Security Enhancements

Doublewrite File Page Encryption

InnoDB automatically encrypts doublewrite file pages for encrypted tablespaces; pages from unencrypted tablespaces remain unencrypted.

Improved Account Determinism

Host matching now checks IP‑based accounts before hostname‑based ones, supporting plain IP, CIDR, and IP‑with‑netmask specifications.

# Account with IP address<br/>mysql> CREATE USER 'user_name'@'127.0.0.1';<br/>mysql> CREATE USER 'user_name'@'198.51.100.44';<br/><br/># CIDR notation<br/>mysql> CREATE USER 'user_name'@'192.0.2.21/8';<br/>mysql> CREATE USER 'user_name'@'198.51.100.44/16';<br/><br/># IP with netmask<br/>mysql> CREATE USER 'user_name'@'192.0.2.0/255.255.255.0';<br/>mysql> CREATE USER 'user_name'@'198.51.0.0/255.255.0.0';

More Precise FLUSH Privileges

Users with specific FLUSH privileges (e.g., FLUSH OPTIMIZER_COSTS) can execute those statements without the global RELOAD privilege.

4. InnoDB Improvements

Optimized TRUNCATE/DROP

Large tables on instances with big buffer pools, tables with many adaptive hash index pages, and temporary tablespaces are now lazily freed or reused after TRUNCATE/DROP.

NEW AUTOEXTEND_SIZE Attribute

CREATE/ALTER TABLESPACE and CREATE/ALTER TABLE now accept an AUTOEXTEND_SIZE clause to control tablespace growth size.

# Specify auto‑extend size when creating or altering a table<br/>mysql> CREATE TABLE t1 (c1 INT) AUTOEXTEND_SIZE = 4M;<br/>mysql> ALTER TABLE t1 AUTOEXTEND_SIZE = 4M;<br/><br/># Query the attribute<br/>mysql> SELECT NAME, AUTOEXTEND_SIZE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME LIKE 'test/t1';

5. New System Variable temptable_max_mmap

This variable limits the amount of memory that can be allocated from memory‑mapped files for internal temporary tables; setting it to 0 disables mmap allocation.

6. Replication Changes

Terminology Replacement

CHANGE MASTER TO is deprecated in favor of CHANGE REPLICATION SOURCE TO, with related terms (MASTER_HOST → SOURCE_HOST, etc.) renamed accordingly.

GTID Assignment from Non‑GTID Masters

The new ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS option allows data transfer between GTID‑enabled and GTID‑disabled servers.

MDL and ACL Locks in MTS Deadlock Detection

Multi‑threaded replica now integrates MDL and ACL lock serialization into its deadlock detection infrastructure.

7. Group Replication

Automatic failover for asynchronous replication channels now keeps sender lists synchronized with group‑replication membership changes.

8. X Protocol Enhancements

The X protocol now checks connection liveness for queries that use metadata locks or sleep, and the server notifies clients when a connection is closed.

9. Other Improvements

Hash join hash table implementation has been optimized for performance and memory usage, and parts of InnoDB have been modernized to C++11 with stronger atomic semantics.

10. Deprecations and Removals

relay_log_info_repository and master_info_repository are deprecated; FLUSH HOSTS is discouraged in favor of TRUNCATE performance_schema.host_cache.

References: MySQL 8.0.23 Release Notes and related documentation links.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

Report an issue with this article
InnoDBMySQLreplicationsecurityInvisible Columns8.0.23Query Attributes

Reader feedback

Was this useful?

Useful0

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion