Summary of the MySQL 8.0.19 new features, released on January 13th, 2020.
==
== Highlights
==
* InnoDB ReplicaSet
* SQL Improvements
=> Table Value Constructors
=> LIMIT in recursive CTE
=> ALTER TABLE… DROP/ALTER CONSTRAINT
=> More information to Duplicate Key Error
* Account Management Enhancements
* Time zone offset for Timestamp & Datetime
* Information Schema views for SQL Roles
* MySQL Document Store Enhancements
* MySQL Shell Enhancements
* MySQL Router Enhancements
* MySQL InnoDB Cluster Enhancements
* MySQL Replication Enhancements
* MySQL NDB Cluster Enhancements
* MySQL Enterprise New Features
* Thanks to the Contributors
2. http://dasini.net/blog/en/
Me, Myself & I
➢
MySQL Geek
✔ Addicted to MySQL for 15+ years!
✔ Playing with databases for 20+ years
➢
MySQL Writer, Blogger and Speaker
✔ Also former : DBA, Consultant, Architect, Trainer, ...
➢
MySQL Principal Solutions Architect EMEA at Oracle
➢
Stay tuned! :
✔ Twitter : @freshdaz
✔ Blog : http://dasini.net/blog
Olivier DASINI
3. http://dasini.net/blog/en/
The following is just a summary of the MySQL 8.0.19 new features.
For a more thorough and exhaustive view please read the following :
➢
The MySQL 8.0.19 Maintenance Release is Generally Available
✔ https://mysqlserverteam.com/the-mysql-8-0-19-maintenance-release-is-generally-available/
➢
Changes in MySQL 8.0.19 (2020-01-13, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html
➢
Changes in MySQL Shell 8.0.19 (2020-01-13, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql-shell/8.0/en/news-8-0-19.html
➢
Changes in MySQL Router 8.0.19 (2020-01-13, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-19.html
And also the MySQL team Blogs :
➢
https://mysqlserverteam.com/
➢
https://mysqlhighavailability.com/
➢
https://mysqlrelease.com/
➢
http://insidemysql.com/
Disclaimer
5. http://dasini.net/blog/en/
Highlights
6
InnoDB ReplicaSet
SQL Improvements
Table Value Constructors
LIMIT in recursive CTE
ALTER TABLE… DROP/ALTER CONSTRAINT
More information to Duplicate Key Error
Account Management Enhancements
Time zone offset for Timestamp & Datetime
Information Schema views for SQL Roles
MySQL Document Store Enhancements
MySQL Shell Enhancements
MySQL Router Enhancements
MySQL InnoDB Cluster Enhancements
MySQL Replication Enhancements
MySQL NDB Cluster Enhancements
MySQL Enterprise New Features
Thanks to the Contributors
7. http://dasini.net/blog/en/
InnoDB ReplicaSet 1/2
➢
MySQL InnoDB Replicaset provides an easy to use management solution
for MySQL Replication
✔ Easy-to-use AdminAPI for MySQL Replication in the MySQL Shell
➢
In just a few easy to use Shell commands, a MySQL Replication database
architecture can be configured from scratch
✔ Only 2 command lines to create a MySQL Replication cluster with 2 nodes
8
MySQL mysql_node1:3306 JS> var replicaset = dba.createReplicaSet('demoRS')
MySQL mysql_node1:3306 JS> replicaset.addInstance('root@mysql_node2:3306')
MySQL mysql_node1:3306 JS> replicaset.status()
10. http://dasini.net/blog/en/
Table Value Constructors (TVC) 1/2
➢
Support explicit table clauses and table value constructors according to the SQL standard
➢
Implemented, respectively, as the TABLE statement and the VALUES statement
➢
TABLE table_name is equivalent to SELECT * FROM table_name
➢
VALUES consists of the VALUES keyword followed by a series of row constructors (ROW()),
separated by commas
11
TABLE city ORDER BY id LIMIT 2507, 1;
+------+----------------+-------------+----------------+------------+
| ID | Name | CountryCode | District | Population |
+------+----------------+-------------+----------------+------------+
| 2508 | Fort-de-France | MTQ | Fort-de-France | 94050 |
+------+----------------+-------------+----------------+------------+
INSERT INTO t1 VALUES ROW(1,2), ROW(10,20), ROW(100,200);
Query OK, 3 rows affected (0,01 sec)
Records: 3 Duplicates: 0 Warnings: 0
TABLE t1 LIMIT 1 OFFSET 2;
+------+------+
| col1 | col2 |
+------+------+
| 100 | 200 |
+------+------+
12. http://dasini.net/blog/en/
LIMIT in recursive CTE
➢
Support for LIMIT in Common Table Expression
✔ The LIMIT is on the total number of rows in the CTE, not on the number of rows
that each iteration may produce
13
Resources
➢
A new, simple way to figure out why your recursive CTE is running away
✔ https://mysqlserverteam.com/a-new-simple-way-to-figure-out-why-your-recursive-cte-is-running-
away/
➢
WL#12534 - Support LIMIT in recursive common table expression
✔ https://dev.mysql.com/worklog/task/?id=12534
13. http://dasini.net/blog/en/
ALTER TABLE… DROP/ALTER CONSTRAINT
➢
Support DROP CONSTRAINT & ALTER CONSTRAINT clauses to the
ALTER TABLE statement
14
Resources
➢
WL#12798 - Implement ALTER TABLE ... DROP/ALTER CONSTRAINT syntax
✔ https://dev.mysql.com/worklog/task/?id=12798
14. http://dasini.net/blog/en/
More information to Duplicate Key Error
➢
Extend the error information given in cases of duplicate key error to
include the table name along with the key name and key value
in the error message
➢
This work is based on a contribution from Facebook
15
Resources
➢
WL#12589 - Add more information to Duplicate Key Error
✔ https://dev.mysql.com/worklog/task/?id=12589
➢
Contribution by Facebook: Add more information to duplicate key error
✔ https://bugs.mysql.com/bug.php?id=92530
16. http://dasini.net/blog/en/
Account Management Enhancements
➢
Configure user accounts such that too many consecutive login failures due to
incorrect passwords cause temporary account locking
➢
Required number of failures and the lock time are configurable per account
17
Resources
➢
CREATE USER Password-Management Options
✔ https://dev.mysql.com/doc/refman/8.0/en/create-user.html#create-user-password-management
➢
WL#13515 - Add Oracle style per user FAILED_LOGIN_ATTEMPTS/PASSWORD_LOCK_TIME counters
✔ https://dev.mysql.com/worklog/task/?id=13515
mysql> CREATE USER 'dj'@'localhost' IDENTIFIED BY 'pwd' FAILED_LOGIN_ATTEMPTS 1
PASSWORD_LOCK_TIME 1;
$ mysql --user=dj
ERROR 3955 (HY000): Access denied for user 'dj'@'localhost'. Account is blocked for 1
day(s) (1 day(s) remaining) due to 1 consecutive failed logins.
mysql> ALTER USER 'dj'@'localhost' ACCOUNT UNLOCK;
18. http://dasini.net/blog/en/
Time zone offset for Timestamp & Datetime
➢
Specify a time zone offset when inserting TIMESTAMP and DATETIME values into a table
✔ e.g. 2019-12-11 10:40:30-05:00 | 2003-04-14 03:30:00+10:00 | 2020-01-01 15:35:45+05:30
➢
Supported range for a timezone offset is -14:00 to +14:00
➢
Offsets are not displayed when retrieving the values
➢
This is a feature request from Booking.com
19
Resources
➢
The DATE, DATETIME, and TIMESTAMP Types
✔ https://dev.mysql.com/doc/refman/8.0/en/datetime.html
➢
MySQL Server Time Zone Support
✔ https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html
➢
WL#10828 - TIMESTAMP/DATETIME VALUES CAN INCLUDE TIMEZONE DETAILS
✔ https://dev.mysql.com/worklog/task/?id=10828
22. http://dasini.net/blog/en/
Document Store Enhancements
➢
Schema validation when create a collection
✔ Implementation of a document schema validator in the X Plugin
✔ Uses the JSON_SCHEMA_VALID(<json_schema>, <json_document>) function
✔ e.g. var coll = schema.createCollection("mycollection", {validator: validationDoc})
23
Resources
➢
JSON Schema Validation Functions
✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html
➢
WL#12965 - X Protocol: add schema validation to create collection
✔ https://dev.mysql.com/worklog/task/?id=12965
➢
WL#13196 – X Protocol: Collection with json schema validation must return error for concrete row
✔ https://dev.mysql.com/worklog/task/?id=13196
➢
WL#13195 - Table with json schema validation constraint should return error for concrete row
✔ https://dev.mysql.com/worklog/task/?id=13195
➢
24. http://dasini.net/blog/en/
MySQL Shell Enhancements
➢
MySQL InnoDB ReplicaSet
✔ MySQL InnoDB Replicaset provides an easy to use management solution for MySQL Replication
➢
Metadata Upgrade and Version Handling
✔ In order to support the new MySQL InnoDB ReplicaSets, the InnoDB Cluster metadata schema was
significantly extended
━
Users who have deployed MySQL InnoDB Clusters using previous versions of the Shell will need to perform a
Metadata Schema Upgrade in their cluster before they can use MySQL Shell 8.0.19 to manage them
➢
MySQL Router Management Functions
✔ New functions on the Admin API to allow viewing and managing this list of registered MySQL Router
instances
➢
Upgrade Checker Extensions
✔ The Upgrade checker tool has been improved for migrations from 5.7 to 8.0
25
Resources
➢
MySQL Shell 8.0.19 – What’s New?
✔ https://mysqlserverteam.com/mysql-shell-8-0-19-whats-new/
26. http://dasini.net/blog/en/
MySQL Router Enhancements
➢
Router now utilizes metadata version 2.0
➢
Added MySQL InnoDB ReplicaSet Cluster support
✔ Extend the MySQL Router to understand the concept of InnoDB ReplicaSets
━
Loading and caching the topology information from the metadata schema
━
Regularly updating the status information of the setup in order to perform the correct routing operations
➢
New bootstrap option to allow reuse of an existing account
✔ Add a startup option to specify the account the router should use when talking to the server
✔ The router needs a server account to be able to talk to the InnoDB Cluster
27
Resources
➢
Upgrading MySQL InnoDB Cluster Metadata
✔ https://mysqlserverteam.com/upgrading-mysql-innodb-cluster-metadata/
➢
WL#13417 - Handle the metadata upgrade in the Router
✔ https://dev.mysql.com/worklog/task/?id=13417
➢
WL#13188 - Add support for InnoDB ReplicaSet in Router
✔ https://dev.mysql.com/worklog/task/?id=13188
➢
WL#13177 - New bootstrap option (--account) to allow reuse of an existing account
✔ https://dev.mysql.com/worklog/task/?id=13177
28. http://dasini.net/blog/en/
InnoDB Cluster Enhancements
29
➢
MySQL InnoDB ReplicaSet
✔ The brand new integrated solution using MySQL Replication
➢
New Metadata schema version and deployments upgrade
✔ The Metadata schema version was upgraded to support InnoDB ReplicaSet & to improve its
capabilities
➢
Router management - List Routers
✔ Command that allows users to obtain information about the cluster’s/replicaset’s Router instances
➢
Router management - Remove Router from Metadata
✔ Command that allows users to remove a Router instance registry from the Metadata
Resources
➢
The all new MySQL InnoDB ReplicaSet
✔ https://mysqlserverteam.com/introducing-mysql-innodb-replicaset/
➢
MySQL Shell AdminAPI – What’s new in 8.0.19?
✔ https://mysqlserverteam.com/mysql-shell-adminapi-whats-new-in-8-0-19/
➢
Upgrading MySQL InnoDB Cluster Metadata
✔ https://mysqlserverteam.com/upgrading-mysql-innodb-cluster-metadata/
30. http://dasini.net/blog/en/
Replication Enhancements 1/2
➢
Configure Replication Applier to Require Row-based Replication only
✔ CHANGE MASTER parameter REQUIRE_ROW_FORMAT allows the user to specify that for a given
replication channel, it will only replicate from a server that is logging in ROW mode
━
Avoid common issues associate to statement based replication like the replication of LOAD DATA
instructions or replication of temporary tables and related data
➢
Preserve commit order on the replication applier, even if binary log is disabled
✔ Be able to turn on parallel replication on a replica that has no binary log enabled without
having different commit histories between the master and the slave
➢
TLSv1.3 configuration support for Replication Channels
✔ The user can now restrict cipher suites on the primary, and then configure the replication channels
on the secondaries as well, ensuring that there is a matching TLSv1.3 configuration between the
servers
33
31. http://dasini.net/blog/en/
Replication Enhancements 2/2
34
Resources
➢
Restrict MySQL replication to row based events
✔ https://mysqlhighavailability.com/restrict-replication-to-row-based-events/
➢
WL#12968 - Configure replication applier to require row-based replication
✔ https://dev.mysql.com/worklog/task/?id=12968
➢
Preserving commit order on replicas with binary log disabled
✔ https://mysqlhighavailability.com/preserve-commit-order-on-binlogless-replicas/
➢
WL#7846 - MTS: slave-preserve-commit-order when log-slave-updates/binlog is disabled
✔ https://dev.mysql.com/worklog/task/?id=7846
➢
WL#13392 - Support for TLS 1.3 in Asynchronous Replication
✔ https://dev.mysql.com/worklog/task/?id=13392
➢
WL#12361 - Support TLS 1.3 in the server and libmysql
✔ https://dev.mysql.com/worklog/task/?id=12361
33. http://dasini.net/blog/en/
NDB Cluster Enhancements
36
➢
MySQL NDB Cluster 8.0.19 GA is a completely new generation of the world’s highest throughput
transactional datastore
➢
Starting with the 8.0 version NDB is developed in, built from, and released with the MySQL 8.0 source
code tree
➢
We aim to release all 8.0 releases on the same schedule as MySQL Server and with the respective
latest MySQL Server version
Resources
➢
NDB Cluster 8.0 is Generally Available
✔ https://mysqlhighavailability.com/ndb-cluster-8-0-is-generally-available/
➢
What is New in NDB Cluster
✔ https://dev.mysql.com/doc/refman/8.0/en/mysql-cluster-what-is-new.html
➢
Automatic Schema Synchronization in NDB Cluster 8.0: Part 1
✔ https://mysqlhighavailability.com/automatic-schema-synchronization-ndb-cluster-8-0-part-1/
➢
Automatic Schema Synchronization in NDB Cluster 8.0: Part 2
✔ https://mysqlhighavailability.com/automatic-schema-synchronization-in-ndb-cluster-8-0-part-2/
➢
Faster restarts with local and partial checkpoints in MySQL NDB Cluster
✔ https://mysqlhighavailability.com/faster-restarts-with-local-and-partial-checkpoints/
35. http://dasini.net/blog/en/
Enterprise New Features
➢
MySQL Enterprise Backup
✔ Now includes the configuration files auto.cnf and mysqld-auto.cnf from a server in its
backup
✔ When fail to connect to a server, the warning returned by mysqlbackup now includes the
hostname and port number for TCP connections, and the socket information for socket
connections
➢
Binary Log Master Key Rotation
✔ Master key rotation for binary log encryption on the server in between a full and an incremental
backup, as well as between 2 incremental backups performed by mysqlbackup, is now supported
38
Resources
➢
MySQL Enterprise Backup User's Guide (Version 8.0.19)
✔ https://dev.mysql.com/doc/mysql-enterprise-backup/8.0/en/
➢
Binary Log Master Key Rotation
✔ https://dev.mysql.com/doc/refman/8.0/en/replication-binlog-encryption-key-rotation.html
37. http://dasini.net/blog/en/
Thanks to the Contributors
Facebook
Satya Bodapati
Nikolai Kostrigin
Oleksandr Peresypkin
40
If you have patches you would like to contribute you can do so from :
➢
MySQL’s GitHub repository : https://github.com/mysql
➢
Requires signing the Oracle Contributor Agreement :
https://www.oracle.com/technetwork/community/oca-486395.html
38. http://dasini.net/blog/en/
The complete list of new features in MySQL 8.0
41
There are 250+ new features in MySQL 8.0...
https://mysqlserverteam.com/the-complete-list-of-new-features-in-mysql-8-0/