Oracle has developed a new branch of the MySQL DBMS 9.0.0. The MySQL Community Server 9.0.0 builds are prepared for all major Linux distributions, FreeBSD, macOS, and Windows. Under the release model introduced last year, MySQL 9.0 falls under the 'Innovation' branches, which will also include the upcoming significant releases MySQL 9.1 and 9.2. Innovation branches are recommended for those who want to access new features earlier; they are published every 3 months and are supported only until the next significant release (for example, support for the 9.0 branch will cease after the release of 9.1). An LTS release is planned to be formed approximately a year from now, which will be recommended for implementations requiring predictability and long-term maintenance of consistent behavior. Following the LTS branch, a new Innovation branch, MySQL 10.0, will be created.
Key changes in MySQL 9.0:
- The ability to save output in JSON format to a user variable has been added when executing the 'EXPLAIN ANALYZE INTO' construct, allowing it to be used as an argument in JSON manipulation functions.
EXPLAIN ANALYZE FORMAT=JSON INTO @variable select_stmt
- The expressions 'CREATE EVENT', 'ALTER EVENT', and 'DROP EVENT' can now be formatted as parameterized queries within stored procedures. Creating a parameterized query is done using the PREPARE statement, and execution is done using the EXECUTE statement.
CREATE PROCEDURE sp(n INT)
BEGIN
SET @s1 = 'CREATE EVENT e ON SCHEDULE EVERY ';
SET @s2 = ' SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 10 SECOND
ENDS CURRENT_TIMESTAMP + INTERVAL 2 MINUTE
ON COMPLETION PRESERVE
DO
INSERT INTO d.t VALUES ROW(NULL, NOW(), FLOOR(RAND()*100));SET @s = CONCAT(@s1, n, @s2);
PREPARE ps FROM @s;
EXECUTE ps;
DEALLOCATE PREPARE ps;
END - Two new system tables have been added, containing information about system variables: variables_metadata — contains information about the names, scopes, types, and value ranges of all system variables supported by the MySQL server; global_variable_attributes — contains the values of attributes set for global variables, such as offline_mode and read_only.
- The previously deprecated server plugin mysql_native_password, which provided authentication using passwords, has been removed. It is recommended to transition to using the caching_sha2_password plugin, which employs the SHA2 algorithm for hashing instead of SHA1.
- Fifteen variables have been added for configuring and inspecting the MLE (Multilingual Engine Component), allowing the use of code in stored procedures and functions in languages other than SQL.
Source: opennet.ru
