MySQL 9.1: New Features, Deprecations, and Important Updates

MySQL 9.1 introduces key updates, including enhanced trigger handling, optimized EXPLAIN output, OpenID Connect support, and more.

MySQL 9.1, a widely adopted open-source RDBMS, is here, bringing improvements, new features, and a few deprecations. Among the most striking novelties is how triggers are handled, particularly during read-only operations.

In earlier versions, triggers associated with a table were fully loaded and parsed each time the table was accessed, even for read-only statements like SELECT. This not only wasted memory but also increased execution time unnecessarily.

Now, in MySQL 9.1, triggers are handled in two distinct phases. Initially, only the trigger metadata is read, and parsing is deferred until it’s actually needed (i.e., when modifying data). This significantly reduces the resource consumption for read-only queries and improves overall performance.

On top of that, new server status variables like Table_open_cache_triggers_hits and Table_open_cache_triggers_misses have been introduced to track cache usage, further enhancing monitoring capabilities.

The EXPLAIN command, used for understanding query execution plans, has also received several updates. The output now includes more detailed information regarding multi-range reads, semijoin strategies, and consistent formatting of condition strings. This helps developers gain more insights into query performance and optimize their databases effectively.

Another noteworthy addition is support for the IF NOT EXISTS clause in the CREATE VIEW statement. This allows users to attempt creating a view without worrying if it already existsโ€”if it does, no changes are made, and a warning is issued instead of an error.

MySQL 9.1 also introduces crash-safe CREATE DATABASE and DROP DATABASE statements. This means that as long as tables use a storage engine supporting atomic DDL operations, like InnoDB, database creation and deletion are now fully transactional.

What is the benefit of this? In short, it helps avoid inconsistencies in case of unexpected server shutdowns or errors during database creation or deletion.

MySQL 9.1 RDBMS
MySQL 9.1 RDBMS

Regarding flexibility, MySQL 9.1 now supports VECTOR data types in JavaScript-stored programs. This means that VECTOR values can be used as input and output arguments in stored procedures, which is particularly beneficial for applications utilizing advanced vector operations.

For MySQL Enterprise users, introducing new replication applier metrics greatly improves the observability of replication processes. Administrators can now monitor replication progress more effectively and gather useful statistics, making it easier to troubleshoot and maintain a stable replication environment.

Moreover, MySQL 9.1 now supports OpenID Connect to enhance authentication flexibility and enable integration with modern single sign-on systems. This feature is available in MySQL Enterprise Edition, making user management more seamless, particularly in large-scale environments.

Additionally, the new Option Tracker component helps monitor MySQL server options, including those related to installed plugins and components. This component is also available as part of MySQL Enterprise Edition and provides a clear view of all options enabled on the server.

Lastly, while MySQL 9.1 has introduced many useful features, it also marks the deprecation of certain elements. Some features are deprecated, which means they will be removed in future releases. Developers should start updating their applications to avoid relying on these deprecated features.

In addition, some features have already been removed in MySQL 9.1, which might affect older applications. So, the database administrators should review their usage of MySQL 9.0 features and adjust accordingly to ensure compatibility before moving to 9.1.

For more in-depth details, check out theย release notesย or look here to review all the novelties this release brings.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%