Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MySQL 8.0.16 New Features Summary

3,510 views

Published on

Presentation of some of the new features of MySQL 8.0.16 released on April 25, 2019

Agenda:
➢ mysql_upgrade is no longer necessary
➢ CHECK Constraints
➢ Constant-Folding Optimization
➢ SYSTEM_USER & partial_revokes
➢ Chinese collation for utf8mb4
➢ Performance Schema keyring_keys table
➢ MySQL Shell Enhancements
➢ MySQL Router Enhancements
➢ InnoDB Cluster Enhancements
➢ Group Replication Enhancements
➢ Size of the binary tarball for Linux
➢ Server quick settings validation

Published in: Data & Analytics

MySQL 8.0.16 New Features Summary

  1. 1. MySQL 8.0.16 New Features Summary Olivier DASINI MySQL Principal Solutions Architect Blog: http://dasini.net/blog/en/ Twitter: @freshdaz
  2. 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. 3. http://dasini.net/blog/en/ The following is just a summary of the MySQL 8.0.16 new features. For a more thorough and exhaustive view please read the following contents : ➢ The MySQL 8.0.16 Maintenance Release is Generally Available ✔ https://mysqlserverteam.com/the-mysql-8-0-16-maintenance-release-is-generally-available/ ➢ Changes in MySQL 8.0.16 (2019-04-25, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-16.html ➢ Changes in MySQL Shell 8.0.16 (2019-04-25, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql-shell/8.0/en/news-8-0-16.html ➢ Changes in MySQL Router 8.0.16 (2019-04-25, General Availability) ✔ https://dev.mysql.com/doc/relnotes/mysql-router/en/news-8-0-16.html And also the MySQL team Blogs : ➢ https://mysqlserverteam.com/ ➢ https://mysqlhighavailability.com/ ➢ https://mysqlrelease.com/ ➢ http://insidemysql.com/ Disclaimer
  4. 4. http://dasini.net/blog/en/ The world's most popular open source database
  5. 5. http://dasini.net/blog/en/ Highlights ➢ mysql_upgrade is no longer necessary ➢ CHECK Constraints ➢ Constant-Folding Optimization ➢ SYSTEM_USER & partial_revokes ➢ Chinese collation for utf8mb4 ➢ Performance Schema keyring_keys table ➢ MySQL Shell Enhancements ➢ MySQL Router Enhancements ➢ InnoDB Cluster Enhancements ➢ Group Replication Enhancements ➢ Size of the binary tarball for Linux ➢ Server quick settings validation 5
  6. 6. http://dasini.net/blog/en/ mysql_upgrade is no longer necessary
  7. 7. http://dasini.net/blog/en/ mysql_upgrade is going away ➢ Move actions from mysql_upgrade client into mysqld ✔ MySQL will upgrade itself ➢ The mysql_upgrade is deprecated ✔ It will be removed in a future MySQL version 7 Resources ➢ MySQL 8.0.16: mysql_upgrade is going away ✔ https://mysqlserverteam.com/mysql-8-0-16-mysql_upgrade-is-going-away/ ➢ WL#12413 - Move actions from mysql_upgrade client into mysqld ✔ https://dev.mysql.com/worklog/task/?id=12413
  8. 8. http://dasini.net/blog/en/ CHECK Constraints
  9. 9. http://dasini.net/blog/en/ CHECK Constraints 1/2 ➢ CHECK constraint is a type of integrity constraint in SQL ➢ It specifies a search condition to check the value being entered into a row ➢ The constraint is violated if the result of a search condition is FALSE for any row of the table 9 mysql> CREATE TABLE checker ( i tinyint, CONSTRAINT i_must_be_between_7_and_12 CHECK (i BETWEEN 7 AND 12 ) ); mysql> INSERT INTO checker (i) VALUES (13); ERROR 3819 (HY000): Check constraint 'i_must_be_between_7_and_12' is violated.
  10. 10. http://dasini.net/blog/en/ CHECK Constraints 2/2 10 Resources ➢ CHECK Constraints ✔ https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html ➢ WL#929 – CHECK constraints ✔ https://dev.mysql.com/worklog/task/?id=929 ➢ MySQL 8.0.16 Introducing CHECK constraint ✔ https://mysqlserverteam.com/mysql-8-0-16-introducing-check-constraint/ ➢ CHECK constraints in MySQL ✔ http://dasini.net/blog/2019/05/14/check-constraints-in-mysql/ ➢ MySQL 8.0.16 Check Constraints ✔ https://elephantdolphin.blogspot.com/2019/04/mysql-8016-check-constraints.html ➢ MySQL 8.0.16: how to validate JSON values in NoSQL with check constraint ✔ https://lefred.be/content/mysql-8-0-16-how-to-validate-json-values-in-nosql-with-check-constraint/
  11. 11. http://dasini.net/blog/en/ Constant-Folding Optimization
  12. 12. http://dasini.net/blog/en/ Constant-Folding Optimization ➢ Comparisons of columns of numeric types with constant values are checked and folded or removed for invalid or out-of-rage values ➢ The goal is to speed up execution at the cost of a little more analysis at optimize time 12 Resources ➢ Constant-Folding Optimization in MySQL 8.0 ✔ http://dasini.net/blog/2019/05/07/constant-folding-optimization-in-mysql-8-0/ ➢ WL#11935 – Add folding of constants when compared to fields ✔ https://dev.mysql.com/worklog/task/?id=11935
  13. 13. http://dasini.net/blog/en/ SYSTEM_USER & partial_revokes
  14. 14. http://dasini.net/blog/en/ SYSTEM_USER & partial_revokes 1/2 ➢ SYSTEM_USER -> Power users ✔ Concept of user account categories, with system and regular users distinguished according to whether they have the new SYSTEM_USER privilege ➢ partial_revokes -> Simplifies the administration of privileges ✔ Makes it possible to revoke privileges partially 14 mysql> SET PERSIST partial_revokes = ON; -- Enable partial_revokes GRANT SELECT, INSERT ON *.* TO u1; REVOKE INSERT ON world.* FROM u1;
  15. 15. http://dasini.net/blog/en/ SYSTEM_USER & partial_revokes 2/2 15 Resources ➢ SYSTEM_USER ✔ https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_system-user ➢ partial_revokes ✔ https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_partial_revokes ➢ Privilege Restriction Using Partial Revokes ✔ https://dev.mysql.com/doc/refman/8.0/en/partial-revokes.html ➢ The SYSTEM_USER Dynamic Privilege ✔ https://mysqlserverteam.com/the-system_user-dynamic-privilege/ ➢ Partial Revokes from Database Objects ✔ https://mysqlserverteam.com/partial-revokes-from-database-objects/ ➢ How to create multiple accounts for an app? ✔ https://mysqlserverteam.com/how-to-create-multiple-accounts-for-an-app/ ➢ WL#12098 – MySQL system users ✔ https://dev.mysql.com/worklog/task/?id=12098
  16. 16. http://dasini.net/blog/en/ Chinese collation for utf8mb4
  17. 17. http://dasini.net/blog/en/ Chinese collation for utf8mb4 ➢ New Chinese collation supported ➢ Named : utf8mb4_zh_0900_as_cs ✔ utf8mb4 is the character set ✔ zh is the ISO code for Chinese ✔ 0900 means this collation follows the Unicode standard 9.0 ✔ as_cs means accent sensitive and case sensitive ➢ Its characteristics are similar to utf8mb4_0900_as_cs except that language-specific rules take precedence where applicable 17 Resources ➢ WL#11825 – Add Chinese collation for utf8mb4 ✔ https://dev.mysql.com/worklog/task/?id=11825
  18. 18. http://dasini.net/blog/en/ Performance Schema keyring_keys table
  19. 19. http://dasini.net/blog/en/ Performance Schema keyring_keys table ➢ performance_schema.keyring_keys table exposes metadata for keys in the MySQL Keyring ➢ It does not expose any sensitive keyring data such as key contents. 19 mysql> SELECT * FROM performance_schema.keyring_keys; +--------------------------------------------------+-----------+----------------+ | KEY_ID | KEY_OWNER | BACKEND_KEY_ID | +--------------------------------------------------+-----------+----------------+ | INNODBKey-00008013-0000-0000-0000-000000008013-1 | | | | audit_log | | | +--------------------------------------------------+-----------+----------------+ Resources ➢ The keyring_keys table ✔ https://dev.mysql.com/doc/refman/8.0/en/keyring-keys-table.html ➢ WL#11543 – instrument the keyring into performance schema ✔ https://dev.mysql.com/worklog/task/?id=11543
  20. 20. http://dasini.net/blog/en/ MySQL Shell Enhancements
  21. 21. http://dasini.net/blog/en/ MySQL Shell Enhancements 1/2 Shell Reporting Framework ➢ Shell commands have been added to enable monitoring through the usage of user-defined reports ✔ The show shell command enables displaying a previously registered report ✔ The watch shell command enables displaying a report using a refresh interval Executing SQL in JavaScript and Python modes ➢ The sql shell command can now receive an optional SQL statement ✔ No switch to the SQL mode will be performed ✔ The SQL statement will be executed using the global session ✔ Its result will be displayed right away 21
  22. 22. http://dasini.net/blog/en/ MySQL Shell Enhancements 2/2 22 Resources ➢ MySQL Shell 8.0.16 – What’s New? ✔ https://mysqlserverteam.com/mysql-shell-8-0-16-whats-new/ ➢ Reporting with MySQL Shell ✔ https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-reporting.html ➢ MySQL Shell 8.0.16: Built-in Reports ✔ https://mysql.wisborg.dk/2019/04/26/mysql-shell-8-0-16-built-in-reports/ ➢ MySQL Shell 8.0.16: User Defined Reports ✔ https://mysql.wisborg.dk/2019/04/27/mysql-shell-8-0-16-user-defined-reports/ ➢ Using the new MySQL Shell Reporting Framework to monitor InnoDB Cluster ✔ https://lefred.be/content/using-the-new-mysql-shell-reporting-framework-to-monitor-innodb-cluster/
  23. 23. http://dasini.net/blog/en/ MySQL Router Enhancements
  24. 24. http://dasini.net/blog/en/ MySQL Router Enhancements ➢ HTTP server plugin ✔ Allow Router to expose REST endpoints and a web-interface ━ Foundation for features like healthcheck, monitoring and management ✔ Support TLS/HTTPS and basic authentication against a secure, file based password storage 24 Resources ➢ MySQL Router 8.0.16: What’s new ✔ https://mysqlserverteam.com/mysql-router-8-0-16-whats-new/ ➢ WL#11891 – HTTP component to MySQL Router ✔ https://dev.mysql.com/worklog/task/?id=11891 ➢ WL#12524 – TLS for HTTP Component ✔ https://dev.mysql.com/worklog/task/?id=12524 ➢ WL#12503 – Authentication for HTTP component ✔ https://dev.mysql.com/worklog/task/?id=12503
  25. 25. http://dasini.net/blog/en/ InnoDB Cluster Enhancements
  26. 26. http://dasini.net/blog/en/ InnoDB Cluster Enhancements ➢ Information about the MySQL Server version ✔ status() now provides information about the MySQL version running on each cluster members in a new attribute named version ✔ rescan() now provides information about the MySQL version of an instance which was found to be part of the cluster but not managed by the AdminAPI ➢ Defining auto-rejoin for cluster members ✔ Configure a number of automatic rejoins to avoid undesired member expels ✔ Useful w/ slow/flaky networks or with a high rate of transient failure ✔ Commands that have been extended with the new option: autorejoinRetries ━ createCluster() / addInstance() / setOption() / setInstanceOption() 26 Resources ➢ MySQL InnoDB Cluster – What’s new in the 8.0.16 release ✔ https://mysqlserverteam.com/mysql-innodb-cluster-whats-new-in-the-8-0-16-release/
  27. 27. http://dasini.net/blog/en/ Group Replication Enhancements
  28. 28. http://dasini.net/blog/en/ Group Replication Enhancements 1/2 Quick Summary ➢ Large Messages Fragmentation Layer for Group Replication ✔ https://dev.mysql.com/worklog/task/?id=11610 ➢ Tunable Paxos Message Cache for Group Replication ✔ https://dev.mysql.com/worklog/task/?id=11615 ➢ Auto-rejoin for Group Replication ✔ https://dev.mysql.com/worklog/task/?id=11284 ➢ SQL command for Binary Log Encryption Key Rotation ✔ https://dev.mysql.com/worklog/task/?id=12080 ➢ Partition metadata into the Binary Log ✔ https://dev.mysql.com/worklog/task/?id=12168 ➢ group_replication_exit_state_action defaults to READ_ONLY ✔ https://dev.mysql.com/worklog/task/?id=12659 28
  29. 29. http://dasini.net/blog/en/ Group Replication Enhancements 2/2 29 Resources ➢ MySQL 8.0.16 Replication Enhancements ✔ https://mysqlhighavailability.com/mysql-8-0-16-replication-enhancements/ ➢ Rotating binary log master key online ✔ https://mysqlhighavailability.com/rotating-binary-log-master-key-online/ ➢ Change group_replication_exit_state_action default option to READ_ONLY ✔ https://mysqlhighavailability.com/change-group_replication_exit_state_action-default-option-to-read_only/ ➢ Enhanced support for large transactions in Group Replication ✔ https://mysqlhighavailability.com/enhanced-support-for-large-transactions-in-group-replication/ ➢ No Ping Will Tear Us Apart – Enabling member auto-rejoin in Group Replication ✔ https://mysqlhighavailability.com/no-ping-will-tear-us-apart-enabling-member-auto-rejoin-in-group-replication/
  30. 30. http://dasini.net/blog/en/ Size of the binary tarball for Linux
  31. 31. http://dasini.net/blog/en/ Size of the binary tarball for Linux ➢ Introduction of a new, “minimal” type of tarball ✔ Removed the debug binaries and stripped all the regular binaries ➢ Whopping 90% off the regular tarball size ✔ Going from 439.4Mb down to 42.2Mb ✔ Including the compression change, the total reduction is around 93% 31 Resources ➢ The Amazing Shrinking Tarball ✔ https://mysqlrelease.com/2019/05/the-amazing-shrinking-tarball/
  32. 32. http://dasini.net/blog/en/ Server quick settings validation
  33. 33. http://dasini.net/blog/en/ Server quick settings validation 1/2 ➢ --validate-config : enable the startup configuration to be checked for problems without running the server in normal operational mode ✔ If no errors are found, the server terminates with an exit code of 0 ✔ If an error is found, the server displays a diagnostic message and terminates with an exit code of 1 ➢ Particularly useful after an upgrade ✔ Check whether any options previously used with the older server are considered by the upgraded server to be deprecated or obsolete 33 $ ./mysqld --defaults-file=./my.cnf --validate-config --log_error_verbosity=2 2019-05-15T09:56:48.026519Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead. 2019-05-15T09:56:48.027064Z 0 [Warning] [MY-010101] [Server] Insecure configuration for --secure-file- priv: Location is accessible to all OS users. Consider choosing a different directory. 2019-05-15T09:56:48.037113Z 0 [ERROR] [MY-000067] [Server] unknown variable 'log-eror=msandbox.err'. 2019-05-15T09:56:48.037189Z 0 [ERROR] [MY-010119] [Server] Aborting
  34. 34. http://dasini.net/blog/en/ Server quick settings validation 2/2 34 Resources ➢ Server Configuration Validation ✔ https://dev.mysql.com/doc/refman/8.0/en/server-configuration-validation.html ➢ validate-config ✔ https://dev.mysql.com/doc/refman/8.0/en/server-options.html#option_mysqld_validate-config ➢ WL#12360 – Add an option to allow server quick settings validation ✔ https://dev.mysql.com/worklog/task/?id=12360
  35. 35. http://dasini.net/blog/en/ Thanks for the Contributions
  36. 36. http://dasini.net/blog/en/ Thanks for the Contributions Facebook Daniel Black Yuhui Wang Wei Zhao Yan Huang Dirkjan Bussink 36 Details ➢ MySQL Server 8.0.16 Thanks for the Contributions ✔ https://mysql.wisborg.dk/2019/05/01/mysql-server-8-0-16-thanks-for-the-contributions/
  37. 37. http://dasini.net/blog/en/ The complete list of new features in MySQL 8.0 37 There are over 250 new features in MySQL 8.0... https://mysqlserverteam.com/the-complete-list-of-new-features-in-mysql-8-0/
  38. 38. http://dasini.net/blog/en/ Thanks for using !

×