Databases 10 min read

What’s New in MySQL 9.1.0? A Deep Dive into Features and Fixes

MySQL 9.1.0, released on October 15, 2024, introduces DDL atomicity, improved audit handling, new JavaScript defaults, VECTOR type support, enhanced GROUP REPLICATION logging, expanded EXPLAIN output, and numerous bug fixes across SQL syntax, performance, and security, while the 8.4.3 LTS patch remains feature‑free.

ITPUB
ITPUB
ITPUB
What’s New in MySQL 9.1.0? A Deep Dive into Features and Fixes

Release Overview

MySQL Innovation Edition 9.1.0 was officially released on 2024‑10‑15, alongside patch releases 8.0.40 and 8.4.3. Version 8.4.3 is the current LTS release and will receive only bug‑fix updates, no new features.

Key Feature Highlights

DDL Atomicity

DDL operations are now fully atomic. Previously, CREATE DATABASE and DROP DATABASE could leave orphaned directories if the statement failed after the OS directory was created or removed. The new version resolves this crash‑safety issue.

Audit and Firewall

The audit and firewall components no longer reject user names that start with non‑alphabetic characters (e.g., $foo), fixing a validation bug.

Compilation Improvements

Many compatibility problems were fixed. Notably, the internal SQL_I_list now uses a member field next for pointer tracking, and custom move constructors and assignment operators have been added to handle empty lists correctly.

SQL Function Fixes

The DATABASE() function now works correctly when used in a UNION query, preventing output truncation.

SUM with DISTINCT

When DISTINCT is used, SUM() now returns consistent results. Example:

mysql> SELECT SUM(b'1100'), SUM(DISTINCT b'1100');
+--------------+-----------------------+
| sum(b'1100') | sum(DISTINCT b'1100') |
+--------------+-----------------------+
| 12           | 9                     |
+--------------+-----------------------+

The change stems from the creation of a temporary table to store distinct values, now respecting the original data type and length.

JavaScript Stored Procedures

Default character set for JavaScript stored procedures is now utf8mb4 with collation utf8mb4_0900_ai_ci (previously shown as latin1).

BLOB values returned from prepared statements remain valid after the statement is freed.

When using the statement‑handle API, user‑defined variables are now correctly reset after sub‑statement execution, preventing server crashes. SqlResult now supports iteration, e.g.:

let result = session.runSql("SELECT * FROM t");
for (let row of result) {
  console.log(row.c1 + row.c3);
}

JavaScript stored procedures fully support the VECTOR type for input, output, bind parameters, and return values.

Keyring and Authentication

All MySQL keyring components have removed insecure AES‑ECB support. The SET PERSIST bug that prevented Authentication_ldap_simple_bind_root_pwd from saving passwords has been fixed.

SQL Syntax Changes

Derived table column references using the db_name.tbl_name format are no longer allowed.

The IF NOT EXISTS clause is now supported with CREATE VIEW. If the view already exists, the statement succeeds with a warning and does not alter the definition. IF NOT EXISTS and OR REPLACE are mutually exclusive for CREATE VIEW.

mysql> CREATE VIEW v1 AS SELECT c1, c3 FROM t1;
Query OK, 0 rows affected (0.01 sec)
mysql> CREATE VIEW IF NOT EXISTS v1 AS SELECT c2 FROM t1;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> SHOW WARNINGS;
+-------+------+---------------------------+
| Level | Code | Message                   |
+-------+------+---------------------------+
| Note  | 1050 | Table 'v1' already exists |
+-------+------+---------------------------+

VECTOR Data Type Enhancements

The STRING_TO_VECTOR() function now trims trailing spaces in the string representation, allowing inputs such as "[1 ,2]", "[1,2 ]", " [1,2]", and "[1,2] ".

System Variables and Defaults

innodb_log_writer_threads

defaults to OFF on systems with fewer than 32 logical CPUs.

Two new status variables track temporary table conversions: TempTable_count_hit_max_ram and Count_hit_tmp_table_size. TOTAL_ROW_VERSIONS maximum increased from 64 to 255, applied via ADD COLUMN and DROP COLUMN with INSTANT algorithm.

Group Replication Logging

New INFO‑level log messages are added for actions starting on all nodes, blocked message sends, and internal message counters decrementing.

EXPLAIN Output Enhancements

When explain_json_format_version=2 or EXPLAIN FORMAT="TREE" is used, spaces are added around the = sign in lookup conditions. EXPLAIN FORMAT="TREE" now includes the half‑join strategy used.

When MRR is used with index range scans and explain_json_format_version=2, the JSON output adds "multi_range_read":true.

Client and Telemetry Options

The MySQL client gains a --system-command option (default OFF) to enable or disable system commands.

OpenTelemetry component now supports exporting telemetry logs to OpenTelemetry collectors.

For a complete list of bug fixes and additional details, refer to the official MySQL documentation.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

performancedatabasemysqlVectorDDLReleaseNotesGroupReplication
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

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.