MySQL 8.0.17
New Features
Summary
Olivier DASINI
MySQL Principal Solutions Architect
Blog: http://dasini.net/blog/en/
Twitter: @freshdaz
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
http://dasini.net/blog/en/
The following is just a summary of the MySQL 8.0.17 new features.
For a more thorough and exhaustive view please read the following :
➢
The MySQL 8.0.17 Maintenance Release is Generally Available
✔ https://mysqlserverteam.com/the-mysql-8-0-17-maintenance-release-is-generally-available/
➢
Changes in MySQL 8.0.17 (2019-07-22, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-17.html
➢
Changes in MySQL Shell 8.0.17 (2019-07-22, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql-shell/8.0/en/news-8-0-17.html
➢
Changes in MySQL Router 8.0.17 (2019-07-22, General Availability)
✔ https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-17.html
And also the MySQL team Blogs :
➢
https://mysqlserverteam.com/
➢
https://mysqlhighavailability.com/
➢
https://mysqlrelease.com/
➢
http://insidemysql.com/
Disclaimer
http://dasini.net/blog/en/
The world's most popular open source database
http://dasini.net/blog/en/
Highlights
➢
CLONE Plugin - Native automatic provisioning in the server
➢
Multi-valued indexes
➢
JSON functions using multi-valued indexes
➢
JSON schema validation
➢
New binary collation for utf8mb4
➢
MySQL Shell Enhancements
➢
MySQL Router Enhancements
➢
InnoDB Cluster Enhancements
➢
Group Replication Enhancements
➢
Replication Enhancements
➢
Thanks to the Contributors
5
http://dasini.net/blog/en/
CLONE Plugin
Native automatic provisioning
http://dasini.net/blog/en/
CLONE Plugin 1/2
➢
Clone data locally or from a remote server instance
➢
It allows automatic server provisioning via Cloning
➢
Fully automated and easy to use with MySQL Shell
✔ Add a new server to a running MySQL InnoDB Cluster
7
## Setup
mysql> INSTALL PLUGIN CLONE SONAME "mysql_clone.so";
mysql> SET GLOBAL clone_valid_donor_list = "donor.host.com:3306";
mysql> CREATE USER clone_user IDENTIFIED BY "clone_password";
mysql> GRANT CLONE_ADMIN ON *.* to clone_user;
## execute CLONE SQL statement
mysql> CLONE INSTANCE FROM clone_user@donor.host.com:3306 IDENTIFIED BY
"clone_password";
http://dasini.net/blog/en/
CLONE Plugin 2/2
8
Resources
➢
The Clone Plugin
✔ https://dev.mysql.com/doc/refman/8.0/en/clone-plugin.html
➢
Cloning for Distributed Recovery
✔ https://dev.mysql.com/doc/refman/8.0/en/group-replication-cloning.html
➢
Using MySQL Clone with InnoDB cluster
✔ https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-clone-deployment.html
➢
Clone: Create MySQL instance replica
✔ https://mysqlserverteam.com/clone-create-mysql-instance-replica/
➢
WL#9209 - InnoDB: Clone local replica
✔ https://dev.mysql.com/worklog/task/?id=9209
➢
WL#9210 - InnoDB: Clone remote replica
✔ https://dev.mysql.com/worklog/task/?id=9210
➢
WL#11636 - InnoDB: Clone Remote provisioning
✔ https://dev.mysql.com/worklog/task/?id=11636
➢
WL#9211 - InnoDB: Clone Replication Coordinates
✔ https://dev.mysql.com/worklog/task/?id=11636
➢
WL#9682 - InnoDB: Support cloning encrypted and compressed database
✔ https://dev.mysql.com/worklog/task/?id=9682
http://dasini.net/blog/en/
Multi-valued indexes
http://dasini.net/blog/en/
Multi-valued indexes 1/2
➢
Secondary index defined on a column that stores an array of values
➢
Can have multiple index records for a single data record (N:1)
➢
Make it possible to index JSON arrays
➢
Optimizer uses a multi-valued index to fetch records when using:
✔ MEMBER OF()
✔ JSON_CONTAINS()
✔ JSON_OVERLAPS()
10
=> { "zipcode" : [94568, 94507, 94582] }
CREATE INDEX zips ON customers
(
(
CAST( custinfo->'$.zipcode' AS UNSIGNED ARRAY )
)
);
http://dasini.net/blog/en/
Multi-valued indexes 2/2
11
Resources
➢
Multi-Valued Indexes
✔ https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued
➢
WL#8955: Add support for multi-valued indexes
✔ https://dev.mysql.com/worklog/task/?id=8955
➢
WL#8763: Support multi-value functional index for InnoDB
✔ https://dev.mysql.com/worklog/task/?id=8763
➢
WL#10604: Create multi-value index
✔ https://dev.mysql.com/worklog/task/?id=10604
➢
Improved MySQL Query Performance With InnoDB Mutli Value Indexes
✔ https://elephantdolphin.blogspot.com/2019/08/improved-mysql-query-performance-with.html
http://dasini.net/blog/en/
JSON functions using
Multi-valued indexes
http://dasini.net/blog/en/
JSON functions using MVI 1/2
➢
JSON functions that can take advantage of the new Multi-Value Index (MVI)
feature
➢
Can also be used on JSON arrays
✔ MEMBER OF() - Returns true if value is an element of json_array, otherwise returns false
✔ JSON_OVERLAPS() - Compares two JSON documents. Returns true if the two document
have any key-value pairs or array elements in common
✔ JSON_CONTAINS() - Since 8.0.17, queries that use it can be optimized using multi-
values indexes
13
http://dasini.net/blog/en/
JSON functions using MVI 2/2
14
Resources
➢
MEMBER OF()
✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#operator_member-of
➢
JSON_OVERLAPS()
✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-overlaps
➢
JSON_CONTAINS()
✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-contains
➢
New JSON Functions in MySQL 8.0.17
✔ https://elephantdolphin.blogspot.com/2019/07/three-new-json-functions-in-mysql-8017.html
➢
Creating multi-valued Indexes
✔ https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued
http://dasini.net/blog/en/
JSON schema validation
http://dasini.net/blog/en/
JSON schema validation 1/2
➢
Validation of JSON documents against JSON schemas
✔ Conforming to Draft 4 of the JSON Schema specification
➢
Can be very useful as a CHECK constraint
➢
JSON_SCHEMA_VALID() : tests if the document validates against the schema
➢
JSON_SCHEMA_VALIDATION_REPORT() : returns a JSON document containing detailed
information about the results of the validation
16
mysql> SELECT JSON_SCHEMA_VALID(@schema, @document);
+---------------------------------------+
| JSON_SCHEMA_VALID(@schema, @document) |
+---------------------------------------+
| 0 |
+---------------------------------------+
mysql> SELECT JSON_PRETTY(JSON_SCHEMA_VALIDATION_REPORT(@schema, @document))G
*************************** 1. row ***************************
JSON_PRETTY(JSON_SCHEMA_VALIDATION_REPORT(@schema, @document)): {
"valid": false,
"reason": "The JSON document location '#' failed requirement 'required' at JSON Schema location '#'",
"schema-location": "#",
"document-location": "#",
"schema-failed-keyword": "required"
}
http://dasini.net/blog/en/
JSON schema validation 2/2
17
Resources
➢
JSON Schema Validation Functions
✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html
➢
JSON_SCHEMA_VALID()
✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-valid
➢
JSON_SCHEMA_VALIDATION_REPORT()
✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-validation-report
➢
WL#11999 - Add support for JSON Schema
✔ https://dev.mysql.com/worklog/task/?id=11999
➢
WL#13005 - Implement JSON_SCHEMA_VALIDATION_REPORT
✔ https://dev.mysql.com/worklog/task/?id=13005
➢
JSON Schema Validation with MySQL 8.0.17
✔ https://elephantdolphin.blogspot.com/2019/07/json-schema-validation-with-mysql-8017.html
http://dasini.net/blog/en/
New binary collation for utf8mb4
http://dasini.net/blog/en/
New binary collation for utf8mb4
➢
utf8mb4_0900_bin : New binary collation for utf8mb4
➢
Similar to the utf8mb4_bin collation with the difference that it
✔ uses the utf8mb4 encoding bytes
✔ does not add pad space
➢
The sort order is the same for both collations, but sorting for utf8mb4_0900_bin is much faster
19
Resources
➢
WL#13054 - Add utf8mb4 binary no-pad collation
✔ https://dev.mysql.com/worklog/task/?id=13054
➢
Unicode Character Sets
✔ https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html
SELECT * FROM COLLATIONS WHERE COLLATION_NAME IN ('utf8mb4_bin', 'utf8mb4_0900_bin');
+------------------+--------------------+-----+------------+-------------+---------+---------------+
| COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN | PAD_ATTRIBUTE |
+------------------+--------------------+-----+------------+-------------+---------+---------------+
| utf8mb4_bin | utf8mb4 | 46 | | Yes | 1 | PAD SPACE |
| utf8mb4_0900_bin | utf8mb4 | 309 | | Yes | 1 | NO PAD |
+------------------+--------------------+-----+------------+-------------+---------+---------------+
http://dasini.net/blog/en/
MySQL Shell Enhancements
http://dasini.net/blog/en/
MySQL Shell Enhancements
➢
MySQL Shell Plugins
✔ Now supports user extensions through MySQL Shell Plugins
✔ Plugins can be written in either JavaScript or Python and used from either of these scripting modes
➢
Parallel Data Import
✔ High-performance utility for importing text files into MySQL tables
✔ Format: JSON, CSV, TSV
✔ Files are loaded using multiple parallel threads
21
Resources
➢
MySQL Shell 8.0.17 – What’s New?
✔ https://mysqlserverteam.com/mysql-shell-8-0-17-whats-new/
➢
MySQL Shell Plugins – Introduction
✔ https://mysqlserverteam.com/mysql-shell-plugins-introduction/
➢
Overview on MySQL Shell 8.0.17 Extensions & Plugins and how to write yours !
✔ https://lefred.be/content/overview-on-mysql-shell-8-0-17-extensions-plugins-and-how-to-write-yours/
➢
Parallel Table Importer in MySQL Shell
✔ https://elephantdolphin.blogspot.com/2019/08/parallel-table-importer-in-mysql-shell.html
http://dasini.net/blog/en/
MySQL Router Enhancements
http://dasini.net/blog/en/
MySQL Router Enhancements 1/2
➢
REST API
✔ Applications & users can monitor the Router
✔ Implemented as a plugin; Follow the OpenAPI 2.0 specification
➢
Support Group Replication notifications
✔ Handle quorum loss, view change, role change & state change
✔ Get notified about most of the cluster changes asynchronously, right after
they happened.
23
## Know which server will be reached for RW
$ curl -s -u fred:fred http://192.168.91.2:8080/api/20190715/routes/myCluster_default_rw/destinations
{"items":[{"address":"mysql2","port":3306}]}
http://dasini.net/blog/en/
MySQL Router Enhancements 2/2
24
Resources
➢
MySQL Router 8.0.17 and the REST API
✔ https://lefred.be/content/mysqlrouter-8-0-17-and-the-rest-api/
➢
MySQL Router 8.0.17’s REST API & MySQL Shell Extensions
✔ https://lefred.be/content/mysql-router-8-0-17s-rest-api-mysql-shell-extensions/
➢
WL#8965 - REST interface
✔ https://dev.mysql.com/worklog/task/?id=8965
➢
WL#11890 - REST endpoint for health of routes
✔ https://dev.mysql.com/worklog/task/?id=11890
➢
WL#12441 - REST endpoints for metadata-cache
✔ https://dev.mysql.com/worklog/task/?id=12441
➢
WL#12816 - REST endpoints for routes
✔ https://dev.mysql.com/worklog/task/?id=12816
➢
WL#12817 - REST endpoints for router application
✔ https://dev.mysql.com/worklog/task/?id=12817
➢
WL#10719 - Invalidate Metadata Cache based on Group Replication Notification
✔ https://dev.mysql.com/worklog/task/?id=10719
➢
WL#12905 - Allow mysql_server_mock sending async Notices to the clients connected on X-protocol port
✔ https://dev.mysql.com/worklog/task/?id=12905
http://dasini.net/blog/en/
InnoDB Cluster Enhancements
http://dasini.net/blog/en/
InnoDB Cluster Enhancements 1/2
26
➢
Automatic Node Provisioning
✔ Built-in Clone support using the Clone Plugin
━
Physical snapshots of databases and transfer them over the network to provision servers
✔ Easy and straightforward way to manage a cluster topology
MySQL JS> cluster.addInstance('root@mysql_node2')
Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone): C
Adding instance to the cluster...
Monitoring recovery process of the new cluster member.
Clone based state recovery is now in progress.
* Waiting for clone to finish...
NOTE: mysql_node2:3306 is being cloned from mysql_node1:3306
** Stage DROP DATA: Completed
** Clone Transfer
FILE COPY ############################################################ 100% Completed
PAGE COPY ############################################################ 100% Completed
REDO COPY ############################################################ 100% Completed
** Stage RECOVERY: |
NOTE: mysql_node2:3306 is shutting down…
* Waiting for server restart... ready
* mysql_node2:3306 has restarted, waiting for clone to finish...
* Clone process has finished: 65.84 MB transferred in 3 sec (21.95 MB/s)
http://dasini.net/blog/en/
InnoDB Cluster Enhancements 2/2
27
Resources
➢
MySQL InnoDB Cluster – What’s new in Shell AdminAPI 8.0.17 release
✔ https://mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-shell-adminapi-8-0-17-release/
➢
MySQL InnoDB Cluster – Automatic Node Provisioning
✔ https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning/
➢
A Breakthrough in Usability – Automatic Node Provisioning
✔ https://mysqlhighavailability.com/a-breakthrough-in-usability-automatic-node-provisioning/
➢
MySQL InnoDB Cluster from scratch – even more easy since 8.0.17
✔ https://lefred.be/content/mysql-innodb-cluster-from-scratch-even-more-easy-since-8-0-17/
➢
MySQL InnoDB Cluster, automatic provisioning, firewall and SELinux
✔ https://lefred.be/content/mysql-innodb-cluster-automatic-provisioning-firewall-and-selinux/
➢
MySQL InnoDB Cluster – Easy Recovering and provisioning
✔ http://dasini.net/blog/2019/09/10/mysql-innodb-cluster-easy-recovering-and-provisioning/
http://dasini.net/blog/en/
Group Replication Enhancements
http://dasini.net/blog/en/
Group Replication Enhancements
➢
Clone plugin
✔ Automatically provision instances in the most efficient way
✔ Simplify node provisioning & recovery
➢
Cross-version policies
✔ Compatibility policies to prevent running into incompatible version combinations scenarios
✔ Ensures transactions generated by members are compatible with each member of the group
29
Resources
➢
MySQL 8.0.17 Replication Enhancements
✔ https://mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/
➢
Automatic provisioning in Group Replication
✔ https://mysqlhighavailability.com/automatic-provisioning-in-group-replication/
➢
Improved handling of different member versions in Group Replication
✔ https://mysqlhighavailability.com/improved-handling-of-different-member-versions-in-group-replication/
➢
WL#12827 - Group Replication: Clone plugin integration on distributed recovery
✔ https://dev.mysql.com/worklog/task/?id=12827
➢
WL#12826 - Group Replication: cross-version policies
✔ https://dev.mysql.com/worklog/task/?id=12826
http://dasini.net/blog/en/
Replication Enhancements
http://dasini.net/blog/en/
Replication Enhancements
➢
Encrypt binary log caches at rest
✔ When encrypting binary log files, temporary files created in cases when binary log caches spill to
disk are also encrypted
➢
Protocol compression support for mysqlbinlog
✔ Enabling protocol compression for mysqlbinlog
31
Resources
➢
MySQL 8.0.17 Replication Enhancements
✔ https://mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/
➢
Binary Log Encryption: Encryption of Temporary Capture Files
✔ https://mysqlhighavailability.com/binary-log-encryption-encryption-of-temporary-capture-files/
➢
mysqlbinlog: support for protocol compression
✔ https://mysqlhighavailability.com/mysqlbinlog-support-for-protocol-compression/
➢
WL#12079 - Encrypt binary log caches at rest
✔ https://dev.mysql.com/worklog/task/?id=12079
➢
WL#2726 - Allow compression when using mysqlbinlog against remote server
✔ https://dev.mysql.com/worklog/task/?id=2726
http://dasini.net/blog/en/
Thanks for the Contributions
http://dasini.net/blog/en/
Thanks for the Contributions
Facebook
Daniël van Eeden (from Booking.com)
Mattias Jonsson (from Booking.com)
Simon Mudd (from Booking.com)
Daniel Black
Yibo Cai (from Arm Technology)
Josh Braden
Zhou Mengkang
33
Details
➢
MySQL Server 8.0.17 Thanks for the Contributions
✔ https://mysql.wisborg.dk/2019/07/26/mysql-server-8-0-17-thanks-for-the-contributions/
http://dasini.net/blog/en/
The complete list of new features in MySQL 8.0
34
There are over 250 new features in MySQL 8.0...
https://mysqlserverteam.com/the-complete-list-of-new-features-in-mysql-8-0/
http://dasini.net/blog/en/
Thanks for using !

MySQL 8.0.17 - New Features Summary

  • 1.
    MySQL 8.0.17 New Features Summary OlivierDASINI MySQL Principal Solutions Architect Blog: http://dasini.net/blog/en/ Twitter: @freshdaz
  • 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 isjust a summary of the MySQL 8.0.17 new features. For a more thorough and exhaustive view please read the following : ➢ The MySQL 8.0.17 Maintenance Release is Generally Available ✔ https://mysqlserverteam.com/the-mysql-8-0-17-maintenance-release-is-generally-available/ ➢ Changes in MySQL 8.0.17 (2019-07-22, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-17.html ➢ Changes in MySQL Shell 8.0.17 (2019-07-22, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql-shell/8.0/en/news-8-0-17.html ➢ Changes in MySQL Router 8.0.17 (2019-07-22, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-17.html And also the MySQL team Blogs : ➢ https://mysqlserverteam.com/ ➢ https://mysqlhighavailability.com/ ➢ https://mysqlrelease.com/ ➢ http://insidemysql.com/ Disclaimer
  • 4.
    http://dasini.net/blog/en/ The world's mostpopular open source database
  • 5.
    http://dasini.net/blog/en/ Highlights ➢ CLONE Plugin -Native automatic provisioning in the server ➢ Multi-valued indexes ➢ JSON functions using multi-valued indexes ➢ JSON schema validation ➢ New binary collation for utf8mb4 ➢ MySQL Shell Enhancements ➢ MySQL Router Enhancements ➢ InnoDB Cluster Enhancements ➢ Group Replication Enhancements ➢ Replication Enhancements ➢ Thanks to the Contributors 5
  • 6.
  • 7.
    http://dasini.net/blog/en/ CLONE Plugin 1/2 ➢ Clonedata locally or from a remote server instance ➢ It allows automatic server provisioning via Cloning ➢ Fully automated and easy to use with MySQL Shell ✔ Add a new server to a running MySQL InnoDB Cluster 7 ## Setup mysql> INSTALL PLUGIN CLONE SONAME "mysql_clone.so"; mysql> SET GLOBAL clone_valid_donor_list = "donor.host.com:3306"; mysql> CREATE USER clone_user IDENTIFIED BY "clone_password"; mysql> GRANT CLONE_ADMIN ON *.* to clone_user; ## execute CLONE SQL statement mysql> CLONE INSTANCE FROM clone_user@donor.host.com:3306 IDENTIFIED BY "clone_password";
  • 8.
    http://dasini.net/blog/en/ CLONE Plugin 2/2 8 Resources ➢ TheClone Plugin ✔ https://dev.mysql.com/doc/refman/8.0/en/clone-plugin.html ➢ Cloning for Distributed Recovery ✔ https://dev.mysql.com/doc/refman/8.0/en/group-replication-cloning.html ➢ Using MySQL Clone with InnoDB cluster ✔ https://dev.mysql.com/doc/refman/8.0/en/mysql-innodb-cluster-clone-deployment.html ➢ Clone: Create MySQL instance replica ✔ https://mysqlserverteam.com/clone-create-mysql-instance-replica/ ➢ WL#9209 - InnoDB: Clone local replica ✔ https://dev.mysql.com/worklog/task/?id=9209 ➢ WL#9210 - InnoDB: Clone remote replica ✔ https://dev.mysql.com/worklog/task/?id=9210 ➢ WL#11636 - InnoDB: Clone Remote provisioning ✔ https://dev.mysql.com/worklog/task/?id=11636 ➢ WL#9211 - InnoDB: Clone Replication Coordinates ✔ https://dev.mysql.com/worklog/task/?id=11636 ➢ WL#9682 - InnoDB: Support cloning encrypted and compressed database ✔ https://dev.mysql.com/worklog/task/?id=9682
  • 9.
  • 10.
    http://dasini.net/blog/en/ Multi-valued indexes 1/2 ➢ Secondaryindex defined on a column that stores an array of values ➢ Can have multiple index records for a single data record (N:1) ➢ Make it possible to index JSON arrays ➢ Optimizer uses a multi-valued index to fetch records when using: ✔ MEMBER OF() ✔ JSON_CONTAINS() ✔ JSON_OVERLAPS() 10 => { "zipcode" : [94568, 94507, 94582] } CREATE INDEX zips ON customers ( ( CAST( custinfo->'$.zipcode' AS UNSIGNED ARRAY ) ) );
  • 11.
    http://dasini.net/blog/en/ Multi-valued indexes 2/2 11 Resources ➢ Multi-ValuedIndexes ✔ https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued ➢ WL#8955: Add support for multi-valued indexes ✔ https://dev.mysql.com/worklog/task/?id=8955 ➢ WL#8763: Support multi-value functional index for InnoDB ✔ https://dev.mysql.com/worklog/task/?id=8763 ➢ WL#10604: Create multi-value index ✔ https://dev.mysql.com/worklog/task/?id=10604 ➢ Improved MySQL Query Performance With InnoDB Mutli Value Indexes ✔ https://elephantdolphin.blogspot.com/2019/08/improved-mysql-query-performance-with.html
  • 12.
  • 13.
    http://dasini.net/blog/en/ JSON functions usingMVI 1/2 ➢ JSON functions that can take advantage of the new Multi-Value Index (MVI) feature ➢ Can also be used on JSON arrays ✔ MEMBER OF() - Returns true if value is an element of json_array, otherwise returns false ✔ JSON_OVERLAPS() - Compares two JSON documents. Returns true if the two document have any key-value pairs or array elements in common ✔ JSON_CONTAINS() - Since 8.0.17, queries that use it can be optimized using multi- values indexes 13
  • 14.
    http://dasini.net/blog/en/ JSON functions usingMVI 2/2 14 Resources ➢ MEMBER OF() ✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#operator_member-of ➢ JSON_OVERLAPS() ✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-overlaps ➢ JSON_CONTAINS() ✔ https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-contains ➢ New JSON Functions in MySQL 8.0.17 ✔ https://elephantdolphin.blogspot.com/2019/07/three-new-json-functions-in-mysql-8017.html ➢ Creating multi-valued Indexes ✔ https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-multi-valued
  • 15.
  • 16.
    http://dasini.net/blog/en/ JSON schema validation1/2 ➢ Validation of JSON documents against JSON schemas ✔ Conforming to Draft 4 of the JSON Schema specification ➢ Can be very useful as a CHECK constraint ➢ JSON_SCHEMA_VALID() : tests if the document validates against the schema ➢ JSON_SCHEMA_VALIDATION_REPORT() : returns a JSON document containing detailed information about the results of the validation 16 mysql> SELECT JSON_SCHEMA_VALID(@schema, @document); +---------------------------------------+ | JSON_SCHEMA_VALID(@schema, @document) | +---------------------------------------+ | 0 | +---------------------------------------+ mysql> SELECT JSON_PRETTY(JSON_SCHEMA_VALIDATION_REPORT(@schema, @document))G *************************** 1. row *************************** JSON_PRETTY(JSON_SCHEMA_VALIDATION_REPORT(@schema, @document)): { "valid": false, "reason": "The JSON document location '#' failed requirement 'required' at JSON Schema location '#'", "schema-location": "#", "document-location": "#", "schema-failed-keyword": "required" }
  • 17.
    http://dasini.net/blog/en/ JSON schema validation2/2 17 Resources ➢ JSON Schema Validation Functions ✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html ➢ JSON_SCHEMA_VALID() ✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-valid ➢ JSON_SCHEMA_VALIDATION_REPORT() ✔ https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-validation-report ➢ WL#11999 - Add support for JSON Schema ✔ https://dev.mysql.com/worklog/task/?id=11999 ➢ WL#13005 - Implement JSON_SCHEMA_VALIDATION_REPORT ✔ https://dev.mysql.com/worklog/task/?id=13005 ➢ JSON Schema Validation with MySQL 8.0.17 ✔ https://elephantdolphin.blogspot.com/2019/07/json-schema-validation-with-mysql-8017.html
  • 18.
  • 19.
    http://dasini.net/blog/en/ New binary collationfor utf8mb4 ➢ utf8mb4_0900_bin : New binary collation for utf8mb4 ➢ Similar to the utf8mb4_bin collation with the difference that it ✔ uses the utf8mb4 encoding bytes ✔ does not add pad space ➢ The sort order is the same for both collations, but sorting for utf8mb4_0900_bin is much faster 19 Resources ➢ WL#13054 - Add utf8mb4 binary no-pad collation ✔ https://dev.mysql.com/worklog/task/?id=13054 ➢ Unicode Character Sets ✔ https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html SELECT * FROM COLLATIONS WHERE COLLATION_NAME IN ('utf8mb4_bin', 'utf8mb4_0900_bin'); +------------------+--------------------+-----+------------+-------------+---------+---------------+ | COLLATION_NAME | CHARACTER_SET_NAME | ID | IS_DEFAULT | IS_COMPILED | SORTLEN | PAD_ATTRIBUTE | +------------------+--------------------+-----+------------+-------------+---------+---------------+ | utf8mb4_bin | utf8mb4 | 46 | | Yes | 1 | PAD SPACE | | utf8mb4_0900_bin | utf8mb4 | 309 | | Yes | 1 | NO PAD | +------------------+--------------------+-----+------------+-------------+---------+---------------+
  • 20.
  • 21.
    http://dasini.net/blog/en/ MySQL Shell Enhancements ➢ MySQLShell Plugins ✔ Now supports user extensions through MySQL Shell Plugins ✔ Plugins can be written in either JavaScript or Python and used from either of these scripting modes ➢ Parallel Data Import ✔ High-performance utility for importing text files into MySQL tables ✔ Format: JSON, CSV, TSV ✔ Files are loaded using multiple parallel threads 21 Resources ➢ MySQL Shell 8.0.17 – What’s New? ✔ https://mysqlserverteam.com/mysql-shell-8-0-17-whats-new/ ➢ MySQL Shell Plugins – Introduction ✔ https://mysqlserverteam.com/mysql-shell-plugins-introduction/ ➢ Overview on MySQL Shell 8.0.17 Extensions & Plugins and how to write yours ! ✔ https://lefred.be/content/overview-on-mysql-shell-8-0-17-extensions-plugins-and-how-to-write-yours/ ➢ Parallel Table Importer in MySQL Shell ✔ https://elephantdolphin.blogspot.com/2019/08/parallel-table-importer-in-mysql-shell.html
  • 22.
  • 23.
    http://dasini.net/blog/en/ MySQL Router Enhancements1/2 ➢ REST API ✔ Applications & users can monitor the Router ✔ Implemented as a plugin; Follow the OpenAPI 2.0 specification ➢ Support Group Replication notifications ✔ Handle quorum loss, view change, role change & state change ✔ Get notified about most of the cluster changes asynchronously, right after they happened. 23 ## Know which server will be reached for RW $ curl -s -u fred:fred http://192.168.91.2:8080/api/20190715/routes/myCluster_default_rw/destinations {"items":[{"address":"mysql2","port":3306}]}
  • 24.
    http://dasini.net/blog/en/ MySQL Router Enhancements2/2 24 Resources ➢ MySQL Router 8.0.17 and the REST API ✔ https://lefred.be/content/mysqlrouter-8-0-17-and-the-rest-api/ ➢ MySQL Router 8.0.17’s REST API & MySQL Shell Extensions ✔ https://lefred.be/content/mysql-router-8-0-17s-rest-api-mysql-shell-extensions/ ➢ WL#8965 - REST interface ✔ https://dev.mysql.com/worklog/task/?id=8965 ➢ WL#11890 - REST endpoint for health of routes ✔ https://dev.mysql.com/worklog/task/?id=11890 ➢ WL#12441 - REST endpoints for metadata-cache ✔ https://dev.mysql.com/worklog/task/?id=12441 ➢ WL#12816 - REST endpoints for routes ✔ https://dev.mysql.com/worklog/task/?id=12816 ➢ WL#12817 - REST endpoints for router application ✔ https://dev.mysql.com/worklog/task/?id=12817 ➢ WL#10719 - Invalidate Metadata Cache based on Group Replication Notification ✔ https://dev.mysql.com/worklog/task/?id=10719 ➢ WL#12905 - Allow mysql_server_mock sending async Notices to the clients connected on X-protocol port ✔ https://dev.mysql.com/worklog/task/?id=12905
  • 25.
  • 26.
    http://dasini.net/blog/en/ InnoDB Cluster Enhancements1/2 26 ➢ Automatic Node Provisioning ✔ Built-in Clone support using the Clone Plugin ━ Physical snapshots of databases and transfer them over the network to provision servers ✔ Easy and straightforward way to manage a cluster topology MySQL JS> cluster.addInstance('root@mysql_node2') Please select a recovery method [C]lone/[I]ncremental recovery/[A]bort (default Clone): C Adding instance to the cluster... Monitoring recovery process of the new cluster member. Clone based state recovery is now in progress. * Waiting for clone to finish... NOTE: mysql_node2:3306 is being cloned from mysql_node1:3306 ** Stage DROP DATA: Completed ** Clone Transfer FILE COPY ############################################################ 100% Completed PAGE COPY ############################################################ 100% Completed REDO COPY ############################################################ 100% Completed ** Stage RECOVERY: | NOTE: mysql_node2:3306 is shutting down… * Waiting for server restart... ready * mysql_node2:3306 has restarted, waiting for clone to finish... * Clone process has finished: 65.84 MB transferred in 3 sec (21.95 MB/s)
  • 27.
    http://dasini.net/blog/en/ InnoDB Cluster Enhancements2/2 27 Resources ➢ MySQL InnoDB Cluster – What’s new in Shell AdminAPI 8.0.17 release ✔ https://mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-shell-adminapi-8-0-17-release/ ➢ MySQL InnoDB Cluster – Automatic Node Provisioning ✔ https://mysqlhighavailability.com/mysql-innodb-cluster-automatic-node-provisioning/ ➢ A Breakthrough in Usability – Automatic Node Provisioning ✔ https://mysqlhighavailability.com/a-breakthrough-in-usability-automatic-node-provisioning/ ➢ MySQL InnoDB Cluster from scratch – even more easy since 8.0.17 ✔ https://lefred.be/content/mysql-innodb-cluster-from-scratch-even-more-easy-since-8-0-17/ ➢ MySQL InnoDB Cluster, automatic provisioning, firewall and SELinux ✔ https://lefred.be/content/mysql-innodb-cluster-automatic-provisioning-firewall-and-selinux/ ➢ MySQL InnoDB Cluster – Easy Recovering and provisioning ✔ http://dasini.net/blog/2019/09/10/mysql-innodb-cluster-easy-recovering-and-provisioning/
  • 28.
  • 29.
    http://dasini.net/blog/en/ Group Replication Enhancements ➢ Cloneplugin ✔ Automatically provision instances in the most efficient way ✔ Simplify node provisioning & recovery ➢ Cross-version policies ✔ Compatibility policies to prevent running into incompatible version combinations scenarios ✔ Ensures transactions generated by members are compatible with each member of the group 29 Resources ➢ MySQL 8.0.17 Replication Enhancements ✔ https://mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/ ➢ Automatic provisioning in Group Replication ✔ https://mysqlhighavailability.com/automatic-provisioning-in-group-replication/ ➢ Improved handling of different member versions in Group Replication ✔ https://mysqlhighavailability.com/improved-handling-of-different-member-versions-in-group-replication/ ➢ WL#12827 - Group Replication: Clone plugin integration on distributed recovery ✔ https://dev.mysql.com/worklog/task/?id=12827 ➢ WL#12826 - Group Replication: cross-version policies ✔ https://dev.mysql.com/worklog/task/?id=12826
  • 30.
  • 31.
    http://dasini.net/blog/en/ Replication Enhancements ➢ Encrypt binarylog caches at rest ✔ When encrypting binary log files, temporary files created in cases when binary log caches spill to disk are also encrypted ➢ Protocol compression support for mysqlbinlog ✔ Enabling protocol compression for mysqlbinlog 31 Resources ➢ MySQL 8.0.17 Replication Enhancements ✔ https://mysqlhighavailability.com/mysql-8-0-17-replication-enhancements/ ➢ Binary Log Encryption: Encryption of Temporary Capture Files ✔ https://mysqlhighavailability.com/binary-log-encryption-encryption-of-temporary-capture-files/ ➢ mysqlbinlog: support for protocol compression ✔ https://mysqlhighavailability.com/mysqlbinlog-support-for-protocol-compression/ ➢ WL#12079 - Encrypt binary log caches at rest ✔ https://dev.mysql.com/worklog/task/?id=12079 ➢ WL#2726 - Allow compression when using mysqlbinlog against remote server ✔ https://dev.mysql.com/worklog/task/?id=2726
  • 32.
  • 33.
    http://dasini.net/blog/en/ Thanks for theContributions Facebook Daniël van Eeden (from Booking.com) Mattias Jonsson (from Booking.com) Simon Mudd (from Booking.com) Daniel Black Yibo Cai (from Arm Technology) Josh Braden Zhou Mengkang 33 Details ➢ MySQL Server 8.0.17 Thanks for the Contributions ✔ https://mysql.wisborg.dk/2019/07/26/mysql-server-8-0-17-thanks-for-the-contributions/
  • 34.
    http://dasini.net/blog/en/ The complete listof new features in MySQL 8.0 34 There are over 250 new features in MySQL 8.0... https://mysqlserverteam.com/the-complete-list-of-new-features-in-mysql-8-0/
  • 35.