MySQL Blog Archive
For the latest blogs go to blogs.oracle.com/mysql
The MySQL 8.0.13 Maintenance Release is Generally Available

The MySQL Development team is very happy to announce that MySQL 8.0.13 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.13 from dev.mysql.com or from the MySQL  YumAPT, 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.13 Release Notes. Here are the highlights. Enjoy!

SQL Default Values

Permit default value to be a function or expression (WL#9418) This work by Catalin Besleaga adds the capability to use functions as default values as well as allowing default values for GIS and JSON datatypes. Until now, MySQL has only permitted a literal value as column default, for example CREATE TABLE t1 ( a INT DEFAULT 0 ); With this change MySQL allows for things like CREATE TABLE t2 (a BINARY(16) DEFAULT uuid_to_bin(uuid())); Moreover, you can now specify defaults for geometry datatypes (e.g. DEFAULT POINT(0,0)) and defaults for the JSON datatype (e.g. DEFAULT '[]').

SQL Functional Indexes

Add support for functional index (WL#1075) This work by Erik Frøseth adds the possibility to create functional indexes in MySQL. An index/key consists of one or more key parts.  A functional key part is a key part that is an expression, and not a column. For instance, CREATE INDEX idx1 ON t1 (col1, (col2 + 2)); creates one index where the first key part is a “normal” key part and the second key part (col2 + 2) is a functional key part. Note that it is not possible to specify a prefix length for functional key parts like it is for regular key parts.

Loose Index Range Scans

Support Skip Scan Range Access Method for low Cardinality (WL#11322) This work by Sergey Gluhov improves the optimizer range scans for certain queries. See WL#11322 for details. The work is based on the patch provided by Facebook (Bug#88103).

SELECT COUNT(*)

Improve SELECT COUNT(*) performance by using handler::records(index) in execution phase (WL#10398) This work by Sreeharsha Ramanavarapu improves performance of COUNT(*) queries on InnoDB tables (with no conditions / group by etc) since the optimizer will be allowed to choose the appropriate index to count the number of rows. This improvement will be seen only for single-threaded workloads. This work fixes the issue reported in Bug#80580, Bug#81854, and Bug#82313.

Multiple addresses for –bind-address

Support multiple addresses for the –bind-address command option (WL#11652) This work by Dmitry Shulga adds support for specifying multiple addresses as a value for the command-line parameter –bind-address. This allows the end user to set up a server which listens to more than one interface and still restricts it to listen to only a specific set of interfaces. See also Nils Goroll’s “request for more than just one bind-address” in Bug#14979.

User Defined Temporary Tables

Reclaim disk space occupied by temporary tables online (WL#11613) This work by Satya Bodapati and Rahul Agarkar ensures that the space allocated for temporary tables is freed up when a session disconnects. On startup, a pool of temporary tablespaces will be created in innodb_temp_tablespaces_dir. The first request to create a user defined temporary table will allocate a tablespace from the reserved temporary tablespace pool. Once a temporary tablespace is attached to a session, all temporary tables from this session will use it. On session disconnect the tablespace will be truncated and released back the pool. The pool will extend itself when the number of sessions grows larger than the pool size.

Optimizer Defined Temporary Tables

Support for BLOBs in temp table engine (WL#11452) This work by Krzysztof Kapuscik  adds support for blob columns (blob, text, json, geometry) in temp tables. This will speed up queries which need to store temporary results containing BLOB data. These queries can now use the faster temp table engine rather than using either InnoDB or MyISAM for temporary results.

Security

Current password required for SET PASSWORD (WL#11544) This work by Rahul Sisondia enhances the security by authorizing the users to change their password only if they could provide the current password. The new behavior is controlled by the password_require_current global system variable.

Support Transparent Data Encryption for Shared Tablespaces (WL#9286) This work by Mayank Prasad extends tablespace encryption to general/shared tablespaces. Encryption ON/OFF can be specified either at create time or later with the SQL Syntax CREATE/ALTER TABLESPACE my_tablespace ENCRYPTION='Y'/'N'; (default is unencrypted). Encryption is handled at the tablespace level, so either all or none of the tables in the tablespace are encrypted.

Ensure foreign key error does not reveal information about parent table for which user has no access privileges (WL#8910) This work by Nisha Gopalakrishnan work ensures that parent table information is not exposed in the error message if the user does not have access to the parent table. In such cases the generic error message “Cannot add or update a child row: a foreign key constraint fails” is displayed.

GIS

ST_Transform (WL#8684) This work by Norvald Ryeng implements ST_Transform(<geometry>, <srid>), which transforms the input geometry to the specified spatial reference system (SRS), identified by SRID. The current implementation is limited to geographic SRSs (latitude-longitude on an ellipsoid). The transformation algorithms are provided by Boost.Geometry. See also feature request Bug#88871 reported by Yoshiaki Yamasaki.

Ellipsoidal ST_Validate (WL#11087) This work by Torje Digernes extends ST_Validate() to detect that its parameter is in a geographic (ellipsoidal) SRS and to compute on the ellipsoid.

Ellipsoidal ST_Area (WL#10726) This work by Aleksander Wasaznik extends ST_Area() to detect that its parameter is in a geographic (ellipsoidal) SRS and to compute the area on the ellipsoid.

Option to Disallow Tables without a Primary Key

Add system variable which prohibits pk-less tables (WL#11807) This work by Dyre Tjeldvoll adds a system variable sql_require_primary_key, which if set, causes CREATE or ALTER statements that would yield a table without primary key, to fail with ER_TABLE_WITHOUT_PK. This feature has been requested by many users, for example by Simon Mudd as seen in Bug#69845. The general motivation is that tables without primary keys may cause performance problems, especially in the context of row based replication. Some users therefore want to disallow tables without primary keys in some or in all of their deployments.

RENAME TABLES under LOCK TABLES

Allow RENAME TABLES under LOCK TABLES (WL#9826) This work by Dmitry Lenev implements an atomic RENAME TABLE. This has been requested by Shlomi Noach to be used in the context of the final stage of an online schema change executed by tools like Gh-ost. Such tools build a new, changed table in parallel with users using the existing old table. When the new table is up to date there is a need to do an atomic swap of the two tables. This can now be achieved by LOCK TABLES tbl WRITE; (stop updates to old table) and then RENAME TABLE tbl TO tbl_del, new_tabl TO tbl; (swap when new_table is up to date).

XA

Enable MDL Locking for Recovered and Detached Prepared XA Transaction (WL#9335) This work by Ajo Robert and Dmitry Shulga fixes two scenarios related to XA where MDL locks are not properly taken/held. The solution is to implement a MDL backup mechanism to hold MDL locks during absence of active connection (THD object). This work fixes Bug#79940 reported by George Lorch. See WL#9335 for additional details.

Information Schema

Implement I_S.VIEW_TABLE_USAGE and I_S.VIEW_ROUTINE_USAGE (WL#11864) This work by Gopal Shankar implements the SQL standard information schema tables called VIEW_TABLE_USAGE and VIEW_ROUTINE_USAGE. The VIEW_TABLE_USAGE contains the table names that are used by a view. The VIEW_ROUTINE_USAGE contains function names that are used by a view. Essentially, these information schema tables track view dependencies, and information about such dependencies can be used by for example backup and restore tools like mysqldump. See also Bug#61961 reported by A Ramos.

Error Logging

Implement an interface to suppress error logs of type warning or note (WL#11393) This work by Tatjana Nurnberg adds the option to filter away specific warnings or notes, to avoid writing them to the error log. The user can specify this by setting a system variable called log_error_suppression_list. For example, if a user generally wants to see Warnings, but it gets too noisy, the user can eliminate some warnings from the output stream.

Convert syslog/eventlog-related system-variables to component variables (WL#11828) This work by Tatjana Nurnberg makes the Unix syslog and Windows eventlog to use component variables rather than global system variables. See also Error Log Components.

Log error messages with unique error numbers from logging methods using error_log_printf() (WL#11678) This work by Praveenkumar Hulakund replaces the generic error log message ER_LOG_PRINTF_MSG with more specific ones. The user benefits from more accurate information about errors.

Replication

Allow CREATE TEMPORARY/DROP TEMPORARY in transaction when GTID_MODE=ON in RBR (WL#8872) This work by Daogang Qu allows the creation and dropping of temporary DDLs inside a transaction when using global transaction identifiers and row based replication. See also contribution by Laurynas Biveinis in Bug #89467.

Add retries field to replication applier status by worker P_S table (WL#9131) This work by Maria Couceiro introduces eight new columns in the performance schema table replication_applier_status_by_worker that report the number of retries for the last transaction applied by the worker and the transaction the worker is currently applying, and the number, message and timestamp of the last transient error causing a retry. This feature gives the end user insight into replication lag when it is caused by transactions retries due to transient errors.

Group Replication

Options to defer member eviction after a suspicion (WL#11570) This work by Filipe Campos separates the act of suspecting from the act of expelling a member from the group. Expelling a member from a group is done after a user configurable time delay, the  group_replication_member_expel_timeout parameter. This feature makes the group tolerant to network and machine delays,  avoiding their eviction if communication is resumed before the timeout elapses.

Allow XCom’s event horizon value to be configurable (WL#11512) This work by Tiago Vale gives the user the ability to fine tune XCom’s pipelining. This may be useful in some cases. For instance, when the network latency between members is high enough to impact throughput, the user can make the pipeline larger, giving the system the opportunity to run more messaging rounds in parallel. This gives the system a chance to try to cope with
the extra network latency and not exhibit throughput degradation in such cases.

Group single/multi primary mode change and primary election (WL#10378) This work by Pedro Gomes implements a framework to do group-wide configuration changes. For example, the user will be able to change single_primary_mode without having to stop group replication, and they will also be able to trigger the election of a specific member as the new primary.

X Plugin

Global notification for GR membership changes (WL#10655) This work by Lukasz Kotula broadcasts group replication view changes. This ensures that clients get immediate notification about changes in group membership and enables them to take timely action on such changes.

Router

Integrate MySQL Router into MySQL Server repository (WL#10799) This work by Jan Kneschke, Andrzej Religa, Tor Didriksen, and Release Engineering team, ensures that the MySQL Router becomes an integral part of the MySQL Server environment. This includes alignment on source code, CMake, and Packaging. This makes life easier for the end user as the router will be aligned with the server in future server releases.

Code Refactoring

Robust event deserialization by libbinlogevents (WL#11567) This work by Joao Gramacho implements a buffer reader interface and class in libbinlogevents to ease and standardize events deserialization with respect to avoiding reads out of buffer boundaries. The MySQL server must be robust by default and must not crash or leak data when replicating corrupt events, regardless of the use of binary logging checksums.

Binlog storage access API (WL#10956) This work by Libing Song implements a storage layer abstraction interface, making it possible to decouple the act of capturing changes and persisting them.

Refactor the gcs pipeline to support multiple versions and stages (WL#11763) This work by Alfranio Correia extends GCS so it will figure out a common protocol version among nodes as well as refactoring GCS so it supports a different message set and a message pipeline stage per protocol version and makes the solution easily extensible.

Refactor the ACL DDLs rewrite APIs (WL#12007) This work by Rahul Sisondia improves the SQL query rewrite APIs so that it becomes easy to extend and maintain query rewriting in future. In addition, ACL DDLs are now rewritten consistently in general, slow and audit logs.

MTR – Test Enhancements

Review the general warning patterns in mtr_warnings.sql file (WL#11627) This work by Malika Agarwal reviews warnings present in “mysql-test/include/mtr_warnings.sql” and moves rarely used patterns to the corresponding MTR tests.

Review the VALGRIND warning patterns in mtr_warnings.sql file (WL#11625) This work by Malika Agarwal (similar to WL#11627) reviews the Valgrind related warnings in “mysql-test/include/mtr_warnings.sql” and moves rarely used patterns to the corresponding MTR tests.

Rename and enhance [disable|enable]_parser test commands (WL#11811) This work by Pavan Naik renames [disable|enable]_parser commands to [disable|enable]_testcase. When disabled, mysqltest ignores everything until enable_testcase. These commands are useful for disabling a section causing an issue inside a test without having to disable the entire test. This work also enforces bug number as the mandatory argument to disable_testcase command, i.e. to document why the test fragment has been disabled.

Set mysqlx=on as default for MTR tests (WL#11538) This work by Horst Hunger adds the option to run MTR tests over the X Protocol. The former default was to use only the classic protocol (mysqlx=off) for MTR tests.

Deprecation and Removal

Remove the non-standard syntax for GROUP BY ASC and DESC in 8.0 (WL#8693) This work by Chaithra Gopalareddy removes the syntax for GROUP BY ASC and DESC. With this and the earlier 8.0 removal of implicit sorting for GROUP BY, we can remove code which currently presumes that GROUP BY always sorts. This syntax was deprecated in MySQL 5.7.23.

Remove metadata_locks_hash_instances and metadata_locks_cache_size system variables (WL#12212) This work by Dyre Tjeldvoll removes the metadata_locks_hash_instances and metadata_locks_cache_size system variables. These system variables were deprecated in MySQL 5.7.4.

Deprecate SQL_MODE PAD_CHAR_TO_FULL_LENGTH in 8.0 (WL#12129) This work by Steinar Gunderson marks the SQL_MODE PAD_CHAR_TO_FULL_LENGTH as deprecated, signaling that it will be removed in the future. MySQL plans to use the current default behavior (strip spaces on conversion) as the only alternative in the future. The ANSI behavior is to add spaces when converting e.g. CHAR(10) to something else, e.g. ‘foo’ becomes ‘foo       ‘ on CONCAT. However, this is not nearly universal; e.g. Postgres and SQLite both have the same behavior as default MySQL.

Thank you for using MySQL !