The MySQL Development team is very happy to announce that MySQL 8.0.20 is now available for download at dev.mysql.com. In addition to bug fixes there are a few new features added in this release. Please download 8.0.20 from dev.mysql.com or from the MySQL Yum, APT, or SUSE repositories. The source code is available at GitHub. You can find the full list of changes and bug fixes in the 8.0.20 Release Notes. Here are the highlights. Enjoy!
Optimizer
Add index hints based on new hint infrastructure (WL#13538) This work by Sergey Gluhov implements the three index hints (USE INDEX, FORCE INDEX, IGNORE INDEX) in the new hint infrastructure (see /new-optimizer-hints-in-mysql/). An index hint can be put right after the SELECT|INSERT|REPLACE|UPDATE|DELETE key words and must be enclosed into a /*+ */ comment. See also Bug#89805 and Bug#87670.
BKA outer/semi/anti join in iterator executor (WL#13476) This work by Steinar H. Gunderson adds support for Batch Key Access (BKA) outer joins, semijoins, and antijoins. Queries give the same results as before, except possibly for ordering on queries without ORDER BY.
Add support for hash outer, anti and semi join (WL#13377) This work by Erik Frøseth implements hash join for the remaining types of joins supported in MySQL (outer-, anti- and semijoin). This work complements WL#2241 which added support for hash inner join as a replacement for block nested loop (BNL). With this worklog, MySQL no longer use BNL as a join strategy.
InnoDB
Improved CATS implementation (Lock manager) (WL#13468) This work by Jakub Lopuszanski improves the Contention-Aware Transaction Scheduling (CATS) implementation and fixes some scalability issues. The new CATS implementation covers the historical First Come First Served (FCFS) implementation which is now removed. This work is a part of a bigger effort to rewrite lock_sys. There are no user visible changes except better scalability in some high transaction concurrency scenarios.
Write double write buffer to a separate file to ensure atomic writes (WL#5655) This work by Sunny Bains reduces the IO bottleneck which can occur when double write buffer is enabled. This is done by reducing the contention on the double write mutex which was causing a bottleneck on the IO throughput as well as increasing the write latency. This work also writes the double write buffer to one or more separate files rather than writing it to the system tablespace. See also Bug#56283 and Bug#81376.
Replication
Binary log Compression (WL#3549) This work by Luís Soares implements binary log compression, making use of the popular compression algorithm ZSTD. Compression is done per transaction. Compressed transactions remain compressed when they are replicated between masters and slaves. This means that both storage and network footprint is reduced for handling binlogs.
Enable/disable primary key checks on slaves (WL#13239) This work by Pedro Gomes implements new functionality to control primary key checks on slaves. From the user perspective a new SQL statement clause is added to CHANGE MASTER: CHANGE MASTER TO REQUIRE_TABLE_PRIMARY_KEY_CHECK = [STREAM|ON|OFF]. STREAM means
that the slave follows the legacy behavior, i.e. it sets whatever value comes from the master. The default is the old behavior (STREAM). ON means that the slave requires primary keys on tables. OFF means that the slave does not require primary keys on tables.
X Protocol
Configurable compression level (WL#13034) This work by Grzegorz Szwarc makes the compression level configurable over the X Protocol. This allows the user to make tradeoffs between network costs and CPU costs. The user can choose to spend more CPU to improve the compression ratio, and in this way lower the network cost at the price of a higher CPU cost.
MySQL Router
Authenticating HTTP Component against MySQL Innodb Cluster metadata (WL#12952) This work by Tomasz Stepniak extends the MySQL Router to authenticate HTTP requests against the MySQL Innodb Cluster metadata. Until now the MySQL Router has only supported authentication of HTTP requests against a local file based credential storage (WL#12503). This change allows the user to manage the accounts of the HTTP interface of all routers of a cluster from one central place, i.e. using the MySQL Shell and storing the data in the MySQL InnoDB Cluster.
Pid-file option for router (WL#13705) This work by Thomas Nielsen adds a –pid-file commandline option and a pid_file config file option to the MySQL Router. Prior to 8.0.20, the MySQL Router only writes the PID-file if the ROUTER_PID environment variable is set. The –pid-file commandline option takes precedence over the pid_file config file option which in turn takes precedence over the ROUTER_PID environment variable.
Add “note” and “system” log level (WL#11196) This work by Thomas Nielsen adds the System and Note log levels to the MySQL Router. This is done to harmonize log levels across the MySQL Router and the MySQL Server.
Other
Add a dynamic privilege for stored routine backup (WL#9049) This work by Nischal Tonthanahal implements a new dynamic server privilege called SHOW_ROUTINE. Users with the SHOW_ROUTINE privilege will be able to SELECT the ROUTINE_DEFINITION column of all rows present in information_schema.routines, to view the “Create Procedure” column of all stored procedures using the SHOW CREATE PROCEDURE, etc. The SHOW_ROUTINE privilege is granted to the root user during database initialization. See WL#9049 for details.
Components: implement the minimal chassis (WL#11080) This work by Venkata Sidagam transforms the service registry and dynamic loader into a library called the “minimal chassis”. This work is a code refactoring of the new service infrastructure, separating out the minimal chassis from the server code.
Add new timestamp for JSON error log (WL#13786) This work by Jens Blomsøy adds a new timestamp field to the JSON error log. The new timestamp is of type integer and the value indicates milliseconds since the epoch. There are no changes to the default error log.
Move testcases in perfschema suite that need MyISAM to a separate .test file (WL#13411) This work by Pooja Lamba moves the sections that need MyISAM to a separate .test file. This allows the MTR test suite to run on a server that is built without the MyISAM engine.
Deprecation and Removal
Deprecate syntax: confusing combinations of UNION and INTO (WL#13559) This work by Gleb Shchepa deprecates two combinations of UNION and INTO in 8.0. These combinations will become illegal in a future major release.
Deprecate VALUES syntax in INSERT … ON DUPLICATE KEY UPDATE (WL#13325) This work by Knut Anders Hatlen deprecates the use of VALUES to access the new row values in INSERT … ON DUPLICATE KEY UPDATE statements.
Deprecate ON ERROR before ON EMPTY in JSON_TABLE syntax (WL#13512) This work by Knut Anders Hatlen deprecates ON ERROR before ON EMPTY in JSON_TABLE syntax. MySQL will follow the standard which says that ON EMPTY should come before ON ERROR.
Deprecate system variable max_length_for_sort_data (WL#13600) This work by Steinar H. Gunderson issues a deprecation warning if the user sets the variable max_length_for_sort_data. This variable is no longer in use.
Thank you for using MySQL!