This release is no longer available for download. It was
removed due to a critical issue that could cause data in
InnoDB
tables having added
columns to be interpreted incorrectly. Please upgrade to MySQL
8.0.30 instead.
-
Important Note: The server now uses
utf8mb3
rather thanutf8
in the following cases:In the output of
SHOW
SQL statements (SHOW CREATE TABLE
,SHOW CREATE VIEW
,SHOW CREATE DATABASE
)When reporting invalid strings.
(Bug #33385252, Bug #33395007)
-
The server now uses
utf8mb3
in place of the aliasutf8
for character set names when populating data dictionary tables from built-in character sets. This affects the display of character set and related information in the MySQL Information Schema tables listed here:This change also affects the output of the SQL
SHOW CHARACTER SET
,SHOW COLLATION
,SHOW CREATE DATABASE
, andSHOW CREATE TABLE
statements. (Bug #30624990)
InnoDB: After addressing the associated issues, the C4100, C4127, C4245 and C4389 MSVC++ level 4 compiler warnings were re-enabled. (Bug #33437498, Bug #33571677)
GCC 11 is now a supported compiler for building MySQL on EL7 or EL8. This compiler is available in the
devtoolset-11
(EL7) orgcc-toolset-11
(EL8) package. It is also recommended to use GCC 11 when building third-party applications that are based on thelibmysqlclient
C API library. (Bug #33730302)The server could not be compiled with Bison 3.8.1 or newer. (Bug #33488047)
-
Important Change: Previously, MySQL allowed arbitrary delimiters and an arbitrary number of them in
TIME
,DATE
,DATETIME
, andTIMESTAMP
literals, as well as an arbitrary number of whitespaces before, after, and between the date and time values inDATETIME
andTIMESTAMP
literals. This behavior is now deprecated, and you should expect it to be removed in a future version of MySQL. With this release, the use of any nonstandard or excess delimiter or whitespace characters now triggers a warning of the form Delimiter 'char
' in positionpos
in datetime value 'value
' at rowrownum
is superfluous and is deprecated, followed by Please remove, or in cases in which a suitable replacement can be suggested, Prefer the standard 'replacementchar
'.A deprecation warning is returned only for the first nonstandard delimiter or whitespace character encountered in the literal value. An example is shown here:
mysql> SELECT DATE"2020/02/20"; +------------------+ | DATE"2020/02/20" | +------------------+ | 2020-02-20 | +------------------+ 1 row in set, 1 warning (0.00 sec) mysql> SHOW WARNINGS\G *************************** 1. row *************************** Level: Warning Code: 4095 Message: Delimiter '/' in position 4 in datetime value '2020/02/20' at row 1 is deprecated. Prefer the standard '-'. 1 row in set (0.00 sec)
Such warnings are not elevated to errors in strict mode.
For more information and examples, see String and Numeric Literals in Date and Time Context. (WL #13601)
-
Replication: The
replica_parallel_type
system variable is now deprecated; whenever this variable is read or set, or the equivalent option is set inmy.cnf
, the server now issues a deprecation warning, as shown here:mysql> SELECT @@replica_parallel_type; SHOW WARNINGS\G +-------------------------+ | @@replica_parallel_type | +-------------------------+ | LOGICAL_CLOCK | +-------------------------+ 1 row in set, 1 warning (0.00 sec) *************************** 1. row *************************** Level: Warning Code: 1287 Message: '@@replica_parallel_type' is deprecated and will be removed in a future release. 1 row in set (0.00 sec)
You should expect this variable and the equivalent server option
--replica-parallel-type
to be removed in a future MySQL release. -
The
myisam_repair_threads
system variable and myisamchk--parallel-recover
option are deprecated; expect support for both to be removed in a future release of MySQL.Values other than 1 (the default) for
myisam_repair_threads
produce a warning. (WL #14937) -
The server system variables
query_prealloc_size
andtransaction_prealloc_size
are now deprecated, and setting either or both of these no longer has any effect in the MySQL server. Expect them to be removed in a future MySQL release.For more information, see the descriptions of these variables in the documentation (Server System Variables). (WL #13720)
References: See also: Bug #26940369.
The
--abort-slave-event-count
and--disconnect-slave-event-count
options for mysqld, previously used in testing, and not normally required in a production setting, have been deprecated. Expect them to be removed in a future version of MySQL. (WL #14526)
Aggregate functions based on expressions comparing values with a
NULL
were not ignoring theNULL
correctly. (Bug #33624777, Bug #105762)-
When an aggregation function is evaluated during optimization, it is presumed that the
WHERE
condition has already been evaluated; thus, it can be removed. Before the removal, the optimizer verifies whether theWHERE
condition has any table-independent conditions by making a call tomake_cond_for_table()
. When a condition was considered expensive (for example, it used a stored procedure), it was incorrectly assumed that there was a table-independent condition. We fix this by excluding expensive conditions in the call tomake_cond_for_table()
.In addition, a constant condition which was expensive to evaluate, such as
f() = 1
where functionf()
did not use any tables, often led to incorrect results. In most cases, if a condition is constant for execution, it is evaluated when optimizing theWHERE
condition, skipping it if it is considered too expensive. The present issue arose due to skipping the condition while optimizing an implicitly grouped query. To avoid this, we now evaluate such conditions prior to aggregation. (Bug #33305617) Columns used by the
DEFAULT()
function were not marked internally asREAD
when fixing its arguments. (Bug #33142135)
If the column of a table being loaded using
LOAD DATA
was used in theWHERE
clause of a subquery used inside aSET
statement, the column was reported asunknown
. (Bug #33714885)-
Aggregated queries that performed an index lookup (
eq_ref
) could in some cases return wrong results. This was seen when the execution plan used streaming aggregation instead of aggregation in temporary tables.We fix this by disabling
eq_ref
caching below aggregate nodes. (Bug #33491183)References: This issue is a regression of: Bug #100614, Bug #31790217.
-
The derived materialized table condition pushdown optimization can now be used with most unions. This means that an outer
WHERE
condition can now be pushed down to every query block of the query expression of the materialized derived table or view.Suppose we create tables
t1
andt2
, and then the viewv
based on these two tables, using the SQL statements shown here:CREATE TABLE t1 ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, c1 INT, KEY i1 (c1) ); CREATE TABLE t2 ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, c1 INT, KEY i1 (c1) ); CREATE OR REPLACE VIEW v AS SELECT id, c1 FROM t1 UNION ALL SELECT id, c1 FROM t2;
Now, when the query
SELECT * FROM v WHERE c1 = 12
is executed, the conditionc1 = 12
is pushed down to both query blocks of viewv
, as shown here in the output ofEXPLAIN
:mysql> EXPLAIN FORMAT=TREE SELECT * FROM v WHERE c1 = 12\G *************************** 1. row *************************** EXPLAIN: -> Table scan on v (cost=1.26..2.52 rows=2) -> Union materialize (cost=2.16..3.42 rows=2) -> Covering index lookup on t1 using i1 (c1=12) (cost=0.35 rows=1) -> Covering index lookup on t2 using i1 (c1=12) (cost=0.35 rows=1) 1 row in set (0.00 sec)
This can now be done for most
UNION
queries. For exceptions, and additional information, see Derived Condition Pushdown Optimization. (Bug #24012, Bug #36802, Bug #106006, Bug #11746156, Bug #11748590, Bug #13650627, Bug #30587347, Bug #33318096, Bug #33738597, WL #13730)
-
New Performance Schema instrumentation collects information about whether a query was processed on the
PRIMARY
orSECONDARY
engine, where thePRIMARY
engine isInnoDB
and theSECONDARY
engine is HeatWave. This instrumentation is intended for use with MySQL Database Service with HeatWave.Two new Performance Schema table columns were added:
An
EXECUTION_ENGINE
column that indicates whether a query was processed on thePRIMARY
orSECONDARY
engine was added to the Performance Schema statement event tables (see Performance Schema Statement Event Tables), and to theperformance_scema.threads
andperformance_scema.processlist
tables.A
COUNT_SECONDARY
column that indicates the number of times a query was processed on theSECONDARY
engine was added to the Performance Schema statement summary tables (see Statement Summary Tables).
An
execution_engine
column was also added to thesys.processlist
andsys.x$processlist
views in the MySQLsys
Schema. (WL #14346)
For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 1.1.1n from 1.1.1l. Issues fixed in OpenSSL are described at https://www.openssl.org/news/cl111.txt and at http://www.openssl.org/news/vulnerabilities.html. (Bug #33840722, Bug #33970835)
-
An
IF NOT EXISTS
option is now supported for the statementsCREATE FUNCTION
,CREATE PROCEDURE
, andCREATE TRIGGER
.For
CREATE FUNCTION
, when used to create a stored function, and forCREATE PROCEDURE
, this option prevents an error from occurring if there is already a routine having the same name. ForCREATE FUNCTION
, when used to create a loadable function, the option prevents an error in the event there already exists a loadable function having that name. ForCREATE TRIGGER
, the option prevents an error from occurring if there is already a trigger with the same name, on the same table, and in the same schema. This is intended to improve ease of use for these statements in scripting, rapid (re)deployment, replication, and other instances of potential repeated use.This enhancement makes the syntax of these statements more consistent with that of
CREATE DATABASE
,CREATE TABLE
,CREATE USER
, andCREATE EVENT
, all of which already supportIF NOT EXISTS
. This also provides a complement to theIF EXISTS
option already supported byDROP PROCEDURE
,DROP FUNCTION
, andDROP TRIGGER
.For more information, see Stored Objects, as well as Function Name Resolution. See also Replication of CREATE TABLE ... SELECT Statements. (Bug #15287, Bug #11745440, WL #14722)
References: See also: Bug #33301931.
Null pointers now are checked to reduce
heap-use-after-free
errors under Valgrind with the--async-client
option. (Bug #33702755)
-
Group Replication: Group replication in some scenarios faced problems because it was not possible to commit an XA transaction prepared on another connection. To address such issues, MySQL now supports detached XA transactions; once prepared, an XA transaction is no longer connected to the current session. This happens as part of executing
XA PREPARE
. The prepared XA transaction can be committed or rolled back by another connection, and the current session can then initiate another XA or local transaction without waiting for the prepared XA transaction to complete.Support for this feature can be disabled, and the classic behavior reinstated, by setting the
xa_detach_on_prepare
system variable introduced in this release toOFF
. The default isON
, which is recommended, especially in a replication setting.You should be aware that, when detached XA transaction support is enabled (
xa_detach_on_prepare = ON
), it is not possible to use temporary tables within XA transactions.For more information, see XA Transaction States, as well as Server Instance Configuration. (Bug #100163, Bug #31599926, WL #14700)
A difference in format between Unix socket lock files for classic MySQL protocol and X Protocol meant that the server could not start if the file for the other protocol was present. For the benefit of instances where it is not possible to remove the file manually, such as MySQL Database Service instances, the protocols now use the same format for the file. (Bug #31468581)
-
Incompatible Change: MySQL Server now has the capability to store securely persisted system variable values containing sensitive data such as private keys or passwords, and to restrict viewing of the values. No MySQL Server system variables are currently marked as sensitive, but the new capability allows system variables containing sensitive data to be persisted securely in the future. A keyring component must be enabled on the MySQL Server instance to support secure storage for persisted system variable values, rather than a keyring plugin, which do not support the function.
ImportantAs part of this this change, component keyring files are now loaded prior to initializing the MySQL Server data directory. This means that it is no longer possible to keep such files in the MySQL data directory.
In the operating system file where persisted system variables are stored, the names and values of sensitive system variables are stored in an encrypted format, along with a generated file key to decrypt them. The generated file key is in turn encrypted using a master key that is stored in a keyring. After upgrading to MySQL 8.0.29, the format of the
mysqld-auto.cnf
option file remains the same until the first time aSET PERSIST
orSET PERSIST ONLY
statement is issued, and at that point it is changed to a new format, even if the system variable involved is not sensitive. An option file using the new format cannot be read by older releases of MySQL Server.The new system variable
persist_sensitive_variables_in_plaintext
controls whether the server is permitted to store the values of sensitive system variables in an unencrypted format, if keyring component support is not available at the time whenSET PERSIST
is used to set the value. The default setting,ON
, encrypts the values if keyring component support is available, and persists them unencrypted (with a warning) if it is not. This setting also allows the server to start if encrypted system variable values cannot be decrypted, in which case their defaults are used. Whenpersist_sensitive_variables_in_plaintext
is set toOFF
, which is the most secure setting, sensitive system variable values cannot be persisted if keyring component support is unavailable, and the server does not start if encrypted system variable values cannot be decrypted.The values of sensitive system variables are also protected when they are handled. If a
SET
statement is issued for a sensitive system variable, the query is rewritten to replace its value withredacted
before it is logged to the general log and audit log. The new privilegeSENSITIVE_VARIABLES_OBSERVER
allows a holder to view the values of sensitive system variables in the Performance Schema tablesglobal_variables
,session_variables
,variables_by_thread
, andpersisted_variables
, to issueSELECT
statements to return their values, and to track changes to them in session trackers for connections. Users without this privilege cannot view those system variable values. (WL #13469) InnoDB: To improve code quality and facilitate debugging, instances of
#define
in theInnoDB
sources were replaced byconstexpr
specifiers or inline functions. (WL #14680)-
InnoDB:
InnoDB
now supportsALTER TABLE ... DROP COLUMN
operations usingALGORITHM=INSTANT
.Operations that support
ALGORITHM=INSTANT
only modify metadata in the data dictionary. Table data is unaffected, making the operations instantaneous. If not specified explicitly,ALGORITHM=INSTANT
is used by default by DDL operations that support it.Prior to MySQL 8.0.29, an instantly added column could only be added as the last column of the table. From MySQL 8.0.29, an instantly added column can be added to any position in the table.
Instantly added or dropped columns create a new row version. Up to 64 row versions are permitted. A new
TOTAL_ROW_VERSIONS
column was added to theINFORMATION_SCHEMA.INNODB_TABLES
table to track the number of row versions.For more information about DDL operations that support
ALGORITHM=INSTANT
, see Online DDL Operations. (WL #13899) -
Replication: Automatic purging of binary log files by the server is now controlled using the
binlog_expire_logs_auto_purge
system variable introduced in this release. By default, automatic purging is enabled (binlog_expire_logs_auto_purge
set toON
); to disable it, set the value of this variable toOFF
.The interval to wait before purging is controlled by
binlog_expire_logs_seconds
andexpire_logs_days
. Setting both of these system variables to 0 stops automatic purging from taking place, even whenbinlog_expire_logs_auto_purge
is set toON
. (WL #14930) Microsoft Windows: Added jemalloc support on Windows, and enabled it for official MySQL binaries. The new
WITH_WIN_JEMALLOC
CMake option accepts a directory containingjemalloc.dll
that's copied to the same directory asmysqld.exe
and/ormysqld-debug.exe
and utilizes it for memory management operations. Standard memory functions are used ifjemalloc.dll
is not found or does not export the required functions. An INFORMATION level log message records whether or not jemalloc is found and used. (WL #14633)The new
clone_delay_after_data_drop
variable permits specifying a delay period immediately after removing existing data on the recipient MySQL Server instance at the start of a remote cloning operation. The delay is intended to provide enough time for the file system on the recipient host to free space before data is cloned from the donor MySQL Server instance. Certain file systems free space asynchronously in a background process. On these file systems, cloning data too soon after dropping existing data can result in clone operation failures due to insufficient space. The maximum delay period is 3600 seconds (1 hour). The default setting is 0 (no delay). (Bug #32826134, WL #14857)-
The
group_replication_set_as_primary
function appoints a specified group member as the new primary and overrides the election process. Previously, the function waited for all active transactions on the existing primary to end, including incoming transactions after the function was used, before making the current primary read only and changing to the new primary. There was no upper limit to the wait time.An optional
timeout
parameter is now available to let you set a timeout for running transactions. You can set a timeout from 0 seconds (immediately) up to 3600 seconds (60 minutes) for transactions that are running when you use the function. There is no default setting for the timeout, so if you do not set it the former behavior of the function still applies, with no upper limit to the wait time. When the timeout expires, for any transactions that did not yet reach their commit phase, the client session is disconnected so that the transaction does not proceed. Transactions that reached their commit phase are allowed to complete. When you set a timeout, it also prevents new transactions starting on the primary from that point on. Explicitly defined transactions (with aSTART TRANSACTION
orBEGIN
statement) are subject to the timeout, disconnection, and incoming transaction blocking even if they do not modify any data. To allow inspection of the primary while the function is operating, single statements that do not modify data, as listed in Permitted Queries Under Consistency Rules, are permitted to proceed. (WL #14585) The
keyring_okv
keyring plugin, which uses the Key Management Interoperability Protocol (KMIP) to communicate securely, is used with MySQL’s keyring service to store keyring data in a KMIP-compatible back end keyring storage product such as Oracle Key Vault, Gemalto SafeNet KeySecure Appliance, Townsend Alliance Key Manager, and Entrust KeyControl. The plugin now allows you to specify more than one standby server to provide backup connections to the back end keyring storage product if the primary server is unavailable. You can add up to 64 standby servers by editing theokvclient.ora
file to specify the IP addresses and port numbers of the servers as a comma-separated list in the value of theSTANDBY_SERVER
variable. The plugin iterates over the standby servers until it can establish a connection, with a 20-second wait for each connection attempt. You should therefore ensure that the list of standby servers is kept short, accurate, and up to date, and servers that are no longer valid are removed, as they can significantly affect thekeyring_okv
plugin’s connection time and therefore the server startup time. (WL #14363)Isolation of access to system variables is now better enforced in the server code that parses, resolves, and executes SQL statements accessing or updating such variables. (WL #14529)
-
MySQL Server now supports SSL session reuse by default with a timeout setting to control how long the server maintains a session cache that establishes the period during which a client is permitted to request session reuse for new connections. All MySQL client programs support session reuse. For server-side and client-side configuration information, see Reusing SSL Sessions.
In addition, C applications now can use the C API capabilities to enable session reuse for encrypted connections (see SSL Session Reuse). (WL #13075)
InnoDB: A failure occurred when attempting to purge undo records for a table with an instantly added column. (Bug #33924532)
InnoDB: High-priority transactions were not permitted to stop waiting when interrupted or to timeout while waiting for a lock, preventing deadlocks from being resolved. In cases where the blocking transaction is also high-priority, high-priority transactions are now permitted to stop waiting when interrupted or timeout when exceeding the lock wait timeout period. If a blocking transaction is not high-priority, high-priority transactions wait for the blocking transaction to release its locks. (Bug #33856332)
InnoDB: The AIO synchronization queue used on Windows was removed. The synchronous file I/O read-write function (
SyncFileIO::execute
) was revised to handle files opened for both normal and overlapped I/O, as it does on Linux. (Bug #33840645)InnoDB: Table version metadata was not reset after truncating all partitions of a table with an instantly added column. (Bug #33822729)
-
InnoDB: The
srv_error_monitor_thread()
function, which prints warnings about semaphore waits, failed to handle a long semaphore wait as expected. To address this issue, a blocking call was moved to a more appropriate location. Related monitor thread code was simplified and improved, and missing shutdown signals were added for several server threads.Enabling and disabling of the standard monitor by InnoDB is now performed independently of the user-settable
innodb_status_output
variable. This change addresses an issue in which the monitor was enabled byInnoDB
in a particular scenario but not set back to its previous value. Thanks to Yuhui Wang for the contribution. (Bug #33789526, Bug #93878) InnoDB: Valgrind testing identified an off-by-one error in
rec_convert_dtuple_to_rec_old()
in the InnoDB sources. (Bug #33784672)InnoDB: The
UNIV_DEBUG
variant of themem_heap_alloc()
function in theInnoDB
sources was modified to improve Valgrind error detection. (Bug #33783709)InnoDB: A fast shutdown did not wait for all active I/O operations to finish before closing all files. (Bug #33768584)
InnoDB: A Clang warning reported an incorrectly placed
@return
command. (Bug #33734011)InnoDB: Values of the new record locks array (
m_prebuilt->new_rec_locks[]
) were not properly synchronized when switching between partitions, causing an assertion failure due to locks being freed or not freed as expected. (Bug #33724166)InnoDB: A race condition in the function that updates the double write buffer when a write request is completed caused a long semaphore wait error. (Bug #33712370)
InnoDB: A function wrongly assumed that changing a record in an indexed column always requires creating a new record in the secondary index, resulting in an lock-related assertion failure. To address this and other similar cases, the
lock_rec_convert_impl_to_expl()
function that converts an implicit record lock to an explicit record lock is now used only when an implicit record lock is actually held. (Bug #33657235)InnoDB: A number of Doxygen issues in the
InnoDB
sources were addressed. (Bug #33603036)InnoDB: A missing null pointer check for an index instance caused a failure. (Bug #33600109)
InnoDB: Starting the server after an incremental backup failed with an error indicating that page tracking was unusable. (Bug #33521528)
InnoDB: An assertion failure was raised during
InnoDB
recovery. The failure was due to a server exit that occurred after pages were freed in a local mini-transaction before the free list and index list could be reset. The free list and index list, which spanned the freed pages, were traversed during recovery. (Bug #33454557)InnoDB: The
btr_insert_into_right_sibling()
B-tree function, which is inserts a tuple into the right sibling page when the cursor is at the end of a page, caused an ACID violation due to an incorrect lock function call. (Bug #33405696)InnoDB: When using
COMPACT
orREDUNDANT
row format, it was possible to create a table that exceeded the maximum row size, which could eventually result in 'Row size too large' errors when inserting data. BLOB prefixes were not included in the record size check performed during theCREATE TABLE
operation. (Bug #33399379)InnoDB: A function that retrieves the master encryption key (
get_master_key()
) tried to acquire the master key ID mutex (master_key_id_mutex
), which was not yet initialized. (Bug #33067891)InnoDB: A redundant and costly check was removed from the
lock_sec_rec_read_check_and_lock
lock system function, which is used to place a lock on a secondary index record. (Bug #33059387)InnoDB: The
TempTable
storage engine did not properly handle a file-full error. (Bug #32929392)InnoDB: A DDL log error encountered during an
ALTER TABLE ... ALGORITHM=COPY
operation was not handled, causing a failure during a subsequentALTER TABLE ... ALGORITHM=INPLACE
operation. (Bug #32716838)InnoDB: Purge threads processed undo records of an encrypted table for which the tablespace was not loaded, causing a failure. (Bug #32586721)
InnoDB: A thread posted an asynchronous I/O operation and closed itself, resulting in an operating system file operation error. (Bug #30567295)
InnoDB: Incorrect
AUTO_INCREMENT
values were generated when the maximum integer column value was exceeded. The error was due to the maximum column value not being considered. The previous validAUTO_INCREMENT
value should have been returned in this case, causing a duplicate key error. (Bug #87926, Bug #26906787)-
InnoDB: Transaction lock priority was modified so that a transaction holding a shared lock and waiting to upgrade to an exclusive lock is prioritized ahead of a another transaction waiting for an exclusive lock on the same row. In other words, the transaction that already holds a shared lock is granted an exclusive lock first. Some other transaction holding a shared lock on the same row can still prevent an exclusive lock from being a granted in this scenario.
The
lock_rec_find_set_bit
andlock_rec_has_expl
functions in the transaction lock system sources were optimized. (Bug #21356, Bug #11745929) Partitioning: In some cases, establishing a connection to MySQL server could fail if the
.ibd
file for a partition was missing. (Bug #33459653)Partitioning: Following work done in MySQL 8.0.17 to cause all
NOT IN
andNOT EXISTS
subqueries to be transformed into antijoins, the inner part of a nested outer join produced by this transformation was not considered while pruning table partitions. (Bug #33060953)Replication: In a replication group with
group_replication_consistency=AFTER
set, if a new primary was elected and then the previous primary was restarted, the new primary left the group with an error message. The handling of delayed view changes and transaction prepares has been adjusted to prevent this situation. (Bug #33755920)Replication: A deadlock caused when the network provider was being stopped could cause
STOP GROUP_REPLICATION
to wait indefinitely on some group members. (Bug #33044886)Group Replication: Group Replication checked too late in the auto-rejoin process that a rejoining member was the only type of instance allowed to enter a group while in an error state. The issue has now been fixed. (Bug #33615493)
Group Replication: Group Replication could log a warning message about a member joining while a group configuration operation was running, in situations where there was no joining member, just a view change. The message is now only logged when appropriate. (Bug #33378364)
Group Replication: Group Replication now logs operating system errors returned when there is a problem connecting to the local XCom instance, so it is easier to resolve issues such as a firewall blocking the connection. (Bug #33189767, Bug #104523)
Group Replication: To help prevent a primary election from hanging, Group Replication stops waiting for a confirmation from any members that leave the group during the election. If all the members for which confirmation was pending leave, Group Replication declares that the primary election completed successfully. Previously, if the primary member was one of the members that left, a primary change was incorrectly stated as having happened when that had not been able to take place. Now, if the primary member leaves during an election, Group Replication declares the primary election as an unsuccessful election with no primary change. (Bug #33059773)
Microsoft Windows: On Windows, added WinFlexBison support. (Bug #33788290)
On EL6/EL7, a mysql-community-server-debug installation was not obsoleted by installing commercial packages. (Bug #33956760)
MySQL Server would not build EL7 on ARM when building against shared libraries that are copied by the cmake build system, such as a non-system OpenSSL. Now --page-size is set as reported by getconf. (Bug #33904267)
An anonymous user with the
PROCESS
privilege could not select rows from theprocesslist
table. (Bug #33869388)The range optimizer did not take into account the session memory limit. (Bug #33869004)
When sorting subqueries, the same filesort operation may be executed many times, with different input, and so the longest add-on column may change between executions, but the buffer for this column was not reallocated when necessary. Now, when the previously allocated buffer is sufficiently large, we reuse it, otherwise we allocate a new one. (Bug #33865094)
-
An invalid result was obtained from a common table expression that was materialized and used in multiple query blocks, where, in the first query block that used the CTE, there were multiple possible key definitions, which caused the internal function
JOIN::finalize_derived_keys()
to move the definition of the key used into position zero, and the second query block using the CTE manipulated an index that occupied the same position as the original position for the key chosen for the first query block. This happened as an unintended side effect of work done in MySQL 8.0.22 to prepare DML statements once only.For more information, see WITH (Common Table Expressions). (Bug #33856374)
Improved error handling when executing stored procedures and stored functions. (Bug #33851256)
A trigger that selected from a view did not always yield the expected result. (Bug #33847722)
Computations performed while loading time zone information require negative values of
my_time_t
. Normally, that type's minimum value is zero, corresponding to the start of the UNIX Epoch (1970-01-01 00:00:00
, with no time zone offset), which is reflected in the constantMYTIME_MIN_VALUE
. This minimum value did not work correctly for setting up theTIME_ZONE_INFO
data structures in all cases, since some time zone offsets are negative. This fix permits negative values formy_time_t
while populating the time zone information database cache. (Bug #33837691)If a MySQL instance stopped unexpectedly or was restarted shortly after a
SET PERSIST
statement was used to record system variable settings, the configuration filemysqld-auto.cnf
could be left empty, in which case the server restart could not proceed. The persisted system variables are now written to a backup file, which is only renamed tomysqld-auto.cnf
after the success of the write has been verified, leaving the originalmysqld-auto.cnf
file still available. On a restart, if a backup file with valid contents is found, the server reads from that file. Otherwise themysqld-auto.cnf
file is used and the backup file is deleted. (Bug #33830493)-
filesort
did not always check the lengths of string values properly when calculating sort keys. (Bug #33830073)References: This issue is a regression of: Bug #29739778.
A primary key comprising the
GROUP_ID
andMEMBER_ID
columns was added to themysql.firewall_membership
table. (Bug #33824544)-
A fix made in MySQL 8.0.20 for an inconsistency in the
rows matched
value when updating an updatable view havingWITH CHECK OPTION
handled this issue for an update of a single table only. In this release, we fix the issue for multi-tableUPDATE
statements as well. (Bug #33815426)References: See also: Bug #30158954.
The linked ProtoBuf library for MySQL Server has been updated to version 3.19.4. Issues fixed in the new Protobuf version are described at https://github.com/protocolbuffers/protobuf/releases. (Bug #33813846)
It was possible to insert invalid characters into a
utf32
column. (Bug #33810558)Reinstalling the MySQL Enterprise Firewall plugin caused a failure. The failure was due to a call to update a previously persisted firewall system variable before the plugin was fully initialized. (Bug #33809478)
-
Hash joins using
VARCHAR
orDECIMAL
join columns returned an excessive number of rows. An example usingVARCHAR
is shown here:# Create and populate table CREATE TABLE t(a VARCHAR(10), b VARCHAR(10)); INSERT INTO t VALUES ('x', 'xx'), ('xx', 'x'); # No indexes, so uses a hash join SELECT * FROM t AS t1, t AS t2 WHERE t1.a = t2.a AND t1.b = t2.b;
Prior to the fix, the query just shown returned four rows; now it returns two rows as expected. (Bug #33794977)
The
INFORMATION_SCHEMA.KEY_COLUMN_USAGE
table did not list invisible key columns. (Bug #33781534)The server did not perform proper cleanup after accessing a view created from a view. (Bug #33777821)
In a grouped query using
WITH ROLLUP
and a window function which ordered on an aggregate already present in theSELECT
list, an extra (and unnecessary) aggregate was added as a hidden column when resolving the window's ordering clause. (Bug #33769911)The data masking
mask_ssn()
function returned a 'String argument width too large' error for a valid non-constant value (data read from a database row as opposed to a hard-coded value). Additionally, validation was not performed for zero-length constant and non-constant values (empty strings) or for constant values that are too small. These issues were addressed for all data masking functions that string inputs with length boundaries. (Bug #33759276)ROLLUP
was not handled correctly in some cases withORDER BY
and a window function. (Bug #33753245)Corrected a number of issues in Doxygen comments. (Bug #33734001, Bug #33734035, Bug #33734062, Bug #33734075, Bug #33734104, Bug #33734117, Bug #33734129, Bug #33734143, Bug #33734155, Bug #33734181, Bug #33734188, Bug #33734206)
Statements that cannot be parsed (due, for example, to syntax errors) are no longer written to the slow query log. (Bug #33732907)
The message describing MySQL Enterprise Thread Pool’s initial configuration is now issued as a SYSTEM message rather than informational, so that it is visible at the default logging level. (Bug #33729821)
A pre-locking optimization related to session tracking caused recursive locking in some scenarios. (Bug #33728209)
A union involving an
IN
subquery was not always handled properly when it also used anORDER BY
clause. (Bug #33725507)The mysqlpump client utility could stop unexpectedly when a password prompt was requested using command line options. If an error is encountered during this process an appropriate error message is now returned before the client exits. (Bug #33688141)
Implemented standard package policy to ship separate debuginfo RPMs for the following platforms: SLES/openSUSE, and community EL6 and EL7. Commercial versions of EL6 and EL7 are now built with the RelWithDebInfo build type instead of Debug, which greatly decreases their size. (Bug #33663811, Bug #33684418, Bug #33664929)
It was not possible to run
mysqld
with the trace log enabled. (Bug #33653824)When the
--fido-register-factor
option was used at startup for FIDO device registration, the mysql client could use incorrect syntax in theALTER USER
statement, resulting in a failure. The issue has now been fixed. (Bug #33650498)-
When searching a
SET
column value, a user variable passed as the first argument toFIND_IN_SET()
did not produce the same result as a constant value used in the same manner.Example: Consider the table
t1
created and populated as shown here:CREATE TABLE t1 (c1 SET('a', 'b', 'c', 'd')); INSERT INTO t1 (c1) VALUES ('a, c, d'), ('c');
The values shown for
var
andstr
should be the same in both rows of the output from the following query, but were not:SET @a = 'c'; SELECT FIND_IN_SET(@a, c1) AS var, FIND_IN_SET('c', c1) AS str FROM t1;
Now we make sure in such cases to return the position of the match within the set used for the column definition whether the value sought is a constant or a column value. (Bug #33635637)
A
SET PASSWORD
operation using an authentication method that does support it produced a warning instead of an expected error. (Bug #33635445)If the plugin directory was not specified at MySQL Server startup, and a user attempted FIDO device registration, the mysql client stopped unexpectedly. The situation is now handled and an appropriate error is reported. (Bug #33631144)
-
A change made in MySQL 8.0.27 moved the
EXPLAIN
output for composite access paths including filter and sort from inside the table path to theMATERIALIZE
access path, but did not includeINDEX_RANGE_SCAN
among the composite access paths. This could in some cases result in undefined behavior. (Bug #33611545)References: This issue is a regression of: Bug #32788576.
It was not possible to revoke the
DROP
privilege on the Performance Schema. (Bug #33578113)The internal
CreateIteratorFromAccessPath()
function has been rewritten so that it is no longer employs recursion; this is expected to reduce stack usage significantly when executing queries. (Bug #33569770)The mysql client could stop unexpectedly when attempting FIDO device registration with a challenge-response error. The issue has now been fixed. (Bug #33568944)
An
INFORMATION_SCHEMA.FILES
orINFORMATION_SCHEMA.TABLES
query executed by prepared statement or stored function returned stale data. Cached data was reported after the data had changed. (Bug #33538106, Bug #105450)-
A query returned an incorrect result when it met all of the following conditions:
The result set contained a column with a nondeterministic element.
The column did not refer to a table.
There was implicit grouping.
The query plan used aggregation from a temporary table. This temporary table was empty.
Given an empty table
t
with columnc1
, the statementINSERT INTO t SELECT MAX(t.c1), RAND(0) AS x FROM t
provides an example of such a query; by inserting into the same table, we ensure that the query plan aggregates from a temporary table. The temporary table has a column forc1
, and the (single) result row picksc1
from the first row of the temporary table. If the temporary table was empty, there was no first row, andc1
became 0; this led to the insertion of(NULL, 0)
rather than, for example,(NULL, 0.155)
intot
.We fix this by not storing such columns in the temporary table. (Bug #33535379)
References: See also: Bug #32384355.
Following changes in password handling in MySQL 8.0.27, if the mysql client was interrupted with Ctrl + C, a password prompt could be issued requiring the user’s password in order to action the interrupt. The password is now recorded when it is provided in response to a prompt (as well as when it is provided on the command line at startup), so it can be used automatically by the new connection that is established for the interrupt. (Bug #33514253)
The internal
keyread
flag indicates reading only index entries and not full rows. When this flag was set for an index merge scan during initialization, it was subsequently reset when initializing the individual range scans picked as part of the index merge scan, which indicated reading rows instead of index entries. We fix this by setting the indexes chosen as covering indexes while reading the index entries. (Bug #33499071)-
Data copying stalled when cloning page-compressed tables where the compressed data size on the donor host was equivalent to the available disk space on the recipient host. The holes punched on the recipient host were smaller than the page size, resulting in disk fragmentation that limited the amount of space available for cloned data. The process for handling page-compressed tables on the recipient host was modified to reduce fragmentation and improve data copying speed.
To improve the rate of flushing, the clone plugin now uses the
fsync
flush method when flushing page-compressed tables on file systems that support hole punching. (Bug #33482747) It was possible, when creating a view, for a subquery to be evaluated during resolution when it was deemed constant. (Bug #33438883)
Nominally, in
EXPLAIN FORMAT=TREE
output, we write a number of rows only as an integer. For a result of zero, it was difficult to determine whether this was 0.49 or 0.00001, so we add enough precision to get one leading digit in such cases. (Bug #33426283)VALUES
in some instances did not function as specified. (Bug #33414289)In debug builds, certain combinations of user variables of type
MYSQL_TYPE_DOUBLE
hit an assert when used in the context ofCAST()
orCONVERT()
. (Bug #33406728)When setting up multiple equalities, the optimizer added an outer reference when it was not required. (Bug #33394701)
-
The minimum supported version of the Boost library for MySQL builds has now been raised to 1.77.0. (Bug #33353637)
References: See also: Bug #33052171.
Redundant
init
andcheckout_access_maps
function code was removed from theSecurity_context
class. (Bug #33339129, Bug #104915)-
The sys schema view
schema_unused_indexes
did not update correctly.schema_unused_indexes
retrieves unused index information fromtable_io_waits_summary_by_index_usage
, returning no data if the index was used to query a row which is not present in the table.As of this release,
schema_unused_indexes
is updated even if the row is not found. (Bug #33302400) Some queries using common table expressions were not handled correctly by
EXPLAIN
. (Bug #33300271)The server did not obtain index statistics correctly for certain complex queries. (Bug #33270516)
-
Under certain circumstances, when executing
TRUNCATE TABLE performance_schema.status_by_thread;
a race condition could occur.Our thanks to Facebook for their contribution to this fix. (Bug #33165726)
A page cleaner thread timed out as it waited for an exclusive lock on an index page held by a full-text index creation operation on a large table. (Bug #33101844)
-
For an
InnoDB
table, a secondary index is extended to include the table's primary key; that is, all columns that are part of the primary key are marked as being part of all secondary indexes. An exception to this is when a secondary index is defined as unique, server does not use the primary key extension. This could lead to problems while setting up the read sets for dynamic range scan. We fix this issue by making sure in the case of a unique seconary index to include all primary key parts in the read set. (Bug #33101025)References: This issue is a regression of: Bug #30417361.
An existing foreign key constraint that referenced a non-existing table could result in a connection error after the table was created or renamed. (Bug #33054071)
-
While creating a value list for an empty
VALUES
during execution of anINSERT
statement, a hidden element was added, which subsequently led to an assertion in debug builds. To fix the problem, we now skip any hidden elements when theVALUES
list is created.See INSERT ... ON DUPLICATE KEY UPDATE Statement, for more information. (Bug #32774799)
Aliases to
SELECT
list items inORDER BY
which were part of expressions were not resolved in the same way as standalone aliases, so thatORDER BY
was resolved correctly, butalias
ORDER BY
was not. (Bug #32695670)function
(alias
)An offline keyring migration from an empty or non-existing keyring source (specified by
keyring_file_data
) appeared to complete successfully, without warning. The keyring migration process now checks for errors when fetching keys. If no keys are found at the specified keyring source, a warning message is written to the error log indicating that the keyring has no keys. (Bug #32327411)-
When removing a condition which was always true, a subquery referring to a view was removed even though the subquery was itself referred to elsewhere in the query. (Bug #31946448)
References: See also: Bug #31216115.
An
EXPLAIN
statement, if used with multiple-tableUPDATE
statements that contained derived tables, could cause the server to exit. (Bug #31884434)A memory leak occurred if mysqldump was used on more than one table with the
--order-by-primary
option. The memory allocated for sorting each table’s rows is now freed after every table, rather than only once. (Bug #30042589, Bug #96178)mysqld_safe log message textual errors were corrected. Thanks to Bin Wang at China Mobile for the contribution. (Bug #106590, Bug #33903639)
Equivalent queries could return different results because the execution paths differed slightly. For example,
Item::val_int_from_string()
andItem_string::val_int()
should use the same algorithm for string to integer conversion. (Bug #106517, Bug #33881339)Updated CMake rules to handle the deprecated
PermissionsStartOnly
systemd option. The alternative executable prefix was added in systemd 231 (July 2016) while PermissionsStartOnly was deprecated in systemd 240 (Dec 2018). The preferred executable prefix is now used where available. (Bug #106468, Bug #33862323)Following work done in MySQL 8.0.22 to implement condition pushdown for materialized derived tables, an implicitly grouped query with an aggregation function in some cases returned an empty set instead of
NULL
. (Bug #106414, Bug #33838439)-
A prepared and executed query like
'SELECT ?'
with aDATE
,TIME
,DATETIME
, orTIMESTAMP
as the bound argument could return the wrong column type. The issue is fixed by restoring the previous logic that reprepared such queries to give each dynamic parameter its literal value. (Bug #106352, Bug #33813951)References: This issue is a regression of: Bug #32915973.
-
A null-safe comparison (
≪=>
) did not evaluate correctly for aTIMESTAMP
column in a trigger. (Bug #106286, Bug #33790919)References: This issue is a regression of: Bug #32942327.
-
When writing
DECIMAL
values to the hash join buffer, the values were first normalized. This normalization could in some cases unintentionally alter the values, which made the values fall into the wrong hash bucket and caused incorrect results to be returned from the join.The problem was that the normalization removed leading zeros in a manner which caused some values to lose some of their least significant digits. We fix this by calculating the desired precision and passing the calculated value instead of changing the original value. (Bug #106272, Bug #33787914)
A query having a
WHERE
condition of the formc NOT
BETWEEN
NULL AND
COALESCE(a, b)
, havingDATETIME
columnsa
,b
, andc
, with columnsa
andc
created asNOT NULL
, did not return correct results. Further investigation showed that, in such cases, when the second or third argument toBETWEEN
wasNULL
, the comparison results were inverted, causing it to evaluate asNULL
forFALSE
, andFALSE
forNULL
. (Bug #106267, Bug #33788832)A NULL-safe comparison between
0
(FALSE
) andNULL
could returnTRUE
, even though the implementation responsible for evaluating an object of this type can never result inNULL
and should always returnFALSE
. (Bug #105773, Bug #33630225)-
The
QUICK_RANGE
constructor used the main thread memory root for allocating keys, rather than the same memory root as used for allocating theQUICK_RANGE
object itself. This resulted in unexpectedly high memory usage when executing multiple queries using a range check for the query plan. (Bug #105331, Bug #33516707)References: See also: Bug #28805105, Bug #28857990.
-
SELECT DISTINCT
on aVARCHAR
column returned 2 distinct values when the column contained an empty string and a string consisting of a single whitespace character when the TempTable storage engine was used (internal_tmp_mem_storage_engine
= TempTable
). This behavior was incorrect when using autf8_bin
collation withPAD SPACE
; trailing spaces should have been ignored when selecting distinct values.For temporary tables created using the
TempTable
storage engine, the two strings were hashed to different values, since theTempTable
hashing function always hashed zero-length data to0
. (In the case just described, the empty string was hashed to0
while the space character from the other string was used to generate a nonzero hash value.)This is now fixed by removing any special handling for zero-length data in the
TempTable
storage engine's hashing function.Our thanks to Brian Yue for the contribution. (Bug #105316, Bug #33506241)
SELECT
COUNT(*)
using a multi-valued index reported the wrong number of rows. (Bug #104898, Bug #33334928)-
The test program
main.ssl-big
failed with Too many connections.Our thanks to Facebook for the contribution. (Bug #104377, Bug #33139204, Bug #33165693)
-
The two types of histograms supported by MySQL, singleton and equi-height, previously stored their collections of buckets in a map and a set, respectively. This release changes both histogram types such that they now store buckets in dynamic arrays instead, which reduces space overhead and speeds up selectivity estimation due to reduced indirection when performing binary search on the buckets.
Because both types of histograms are constructed by inserting buckets in sorted order, and buckets are serialized to JSON in sorted order, there is no additional work involved in switching to a dynamic array. (Bug #104109, Bug #33045204)
An invalid conversion between signed and unsigned variables led to incorrect result from a query of the form
SELECT ALL t1.c1,t2.c1 FROM t1,t2 WHERE t1.c1 > t2.c1
. (Bug #102025, Bug #32302724)As of this release, the Performance Schema is collation-aware (Bug #98545, Bug #30881109)
An assert error could occur when inserting data larger than 32 bytes in the
ROLE
column ofsetup_actors
. As of this release, theROLE
column is increased from CHAR(32) to CHAR(96). (Bug #74678, Bug #19947842)