This is a milestone release, for use at your own risk. Upgrades between milestone releases (or from a milestone release to a GA release) are not supported. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward. (Making a backup before the upgrade is a prudent precaution in any case.)
Incompatible Change: The
ALTER USERstatements have additional account-management capabilities. Together, they now can be used to fully establish or modify authentication, SSL, and resource-limit properties, as well as manage password expiration and account locking and unlocking. For example,
ALTER USERcan assign passwords, and it can modify the authentication plugin for users, with no need for direct manipulation of the
mysql.usertable. For details, see CREATE USER Syntax, and ALTER USER Syntax.
Account locking control is a new feature that permits administrators to completely disable an account from being used to connect to the server. Account locking state is recorded in the
account_lockedcolumn of the
mysql.usertable. See User Account Locking.
A new statement,
SHOW CREATE USER, shows the
CREATE USERstatement that creates the named user. The accompanying
Com_show_create_userstatus variable indicates how many times the statement has been executed.
A new system variable,
log_backward_compatible_user_definitions, if enabled, causes the server to log
ALTER USER, and
GRANTstatements in backward-compatible (pre-5.7.6) fashion. Enabling this variable promotes compatibility for cross-version replication.
authentication_stringcolumn in the
mysql.usertable now stores credential information for all accounts. The
Passwordcolumn, previously used to store password hash values for accounts authenticated with the
mysql_old_passwordplugins, is removed.
If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate the changes to the
mysqldatabase. mysql_upgrade moves
Passwordcolumn values to the
authentication_stringcolumn and removes the
Passwordcolumn. For nonupgraded installations that have no
account_lockedcolumn, the server treats all accounts as unlocked, and attempts to lock or unlock and account produce an error.
The preceding changes make the following features obsolete. They are now deprecated and support for them will be removed in a future MySQL release:
GRANTto modify account properties other than privilege assignments. This includes authentication, SSL, and resource-limit properties. Instead, establish such properties at account-creation time with
CREATE USERor modify them afterward with
IDENTIFIED BY PASSWORD 'syntax for
GRANT. Instead, use
ALTER USER, where the
'value is in a format compatible with the named plugin.
PASSWORD()function is deprecated and should be avoided in any context. Thus,
SET PASSWORD ... = PASSWORD('syntax is also deprecated.
SET PASSWORD ... = 'syntax is not deprecated; nevertheless,
ALTER USERis now the preferred statement for assigning passwords.Warning
The changes in this release result in a semantic incompatibility for one
SET PASSWORD ... = 'literal string';
SET PASSWORDinterpreted the string as a password hash value to be stored directly. Now,
SET PASSWORDinterprets the string as a cleartext string and hashes it appropriately for the account authentication plugin before storing it.
old_passwordssystem variable. Account authentication plugins can no longer be left unspecified in the
mysql.usertable, so any statement that assigns a password from a cleartext string can unambiguously determine the hashing method to use on the string before storing it in the
mysql.usertable. This renders
It is a known issue in this release that the following
SET PASSWORDsyntax produces an error:
SET PASSWORD ... = PASSWORD('auth_string');
That syntax was to be deprecated, not removed. It will be restored in the next release, but generate a warning due to its deprecated status. These alternatives are available, the first of which is the preferred form:
ALTER USER ... IDENTIFIED BY 'auth_string'; SET PASSWORD ... = 'auth_string';
The change in
mysql.usertable structure has compatibility implications for upgrading and downgrading:
You can perform a binary (in-place) upgrade to MySQL 5.7.6 or later and run mysql_upgrade to migrate the
Passwordcolumn contents to the
If you plan to upgrade by loading a mysqldump dump file from an older (pre-5.7.6) MySQL installation, you must observe these conditions for the mysqldump command used to generate the file:
Load the pre-5.7.6 dump file into the 5.7.6 server before running mysql_upgrade.
Passwordcolumn is gone in 5.7.6 and up, downgrading to a version older than 5.7.6 requires a special procedure. See Changes Affecting Downgrades from MySQL 5.7.
References: See also: Bug #67449, Bug #14845612, Bug #18140348.
The minimum version of the Boost library for server builds is now 1.57.0. (Bug #74666, Bug #19940297, Bug #73432, Bug #19320102)
Work was done to clean up the source code base, including: Removing unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removing function declarations without definitions, replacing locally written functions with equivalent functions from industry-standard libraries.
mysqld now supports a
--daemonizeoption that causes it to run as a traditional, forking daemon. This permits the server to work with operating systems that use systemd for process control. Advantages include automatic restarts after failure, handling of the user and group used to run the daemon, resource control, and temporary-file cleanup.
WITH_SYSTEMDCMake option, when enabled, causes installation of systemd support files. In addition, scripts such as mysqld_safe and the System V initialization script are not installed. On platforms where systemd is not available, enabling
WITH_SYSTEMDresults in an error from CMake. When
WITH_SYSTEMDis enabled, the new
SYSTEMD_PID_DIRoptions may also be used to specify the MySQL service name and directory in which the server creates the PID file, respectively.
Support files for systemd are installed when you install MySQL using an RPM distribution for these Linux platforms:
Red Hat Enterprise Linux 7; Oracle Linux 7; CentOS 7
SUSE Linux Enterprise Server 12
Fedora 20, 21
You also obtain systemd support by installing from a source distribution that is configured with the
To provide better information to management processes, the server now returns one of the exit codes described in the following list. The phrase in parentheses indicates the action taken by systemd in response to the code.
0 = successful termination (no restart done)
1 = unsuccessful termination (no restart done)
2 = unsuccessful termination (restart done)
Any management script written for older servers should be revised to handle three exit values if it checks only for 1 as a failure exit value.
For more information, see Managing MySQL Server with systemd. That section also includes information about specifying options previously specified in
[mysqld_safe]option groups. Because mysqld_safe is not installed when systemd is used, such options must be specified another way.
Replication: The global scope for the
sql_log_binsystem variable has been deprecated, and this variable can now be set with session scope only. The statement
SET GLOBAL SQL_LOG_BINnow produces an error. It remains possible to read the global value of
sql_log_bin, but doing so produces a warning. You should act now to remove from your applications any dependencies on reading this value; the global scope
sql_log_binis removed in MySQL 8.0. (Bug #67433, Bug #15868071)
MySQL now supports the specification of generated columns in
ALTER TABLEstatements. Values of a generated column are computed from an expression included in the column definition. Generated columns can be virtual (computed “on the fly” when rows are read) or stored (computed when rows are inserted or updated). The
INFORMATION_SCHEMA.COLUMNStable shows information about generated columns.
Uses for generated columns include simplifying queries when applications select from a table using a complex expression, simulating functional indexes, or substituting for views. For more information, see CREATE TABLE and Generated Columns.
The mysqld server and mysql_upgrade utility have been modified to make binary (in-place) upgrades from MySQL 5.6 easier without requiring the server to be started with special options. The server checks whether the system tables are from a MySQL version older than 5.7 (that is, whether the
mysql.usertable has a
Passwordcolumn). If so, it permits connections by users who have an empty authentication plugin in their
mysql.useraccount row, as long as they have a
Passwordvalue that is empty (no password) or a valid native (41-character) password hash.
This means that you can connect as
rootand upgrade your system tables even with an older
mysql.usertable for which
roothas no authentication plugin named. In particular, you can run mysql_upgrade, connecting as
root, with no need to start the server with any special options. Previously, if the
rootaccount had an empty plugin value, a procedure involving starting the server with
--skip-grant-tablesand multiple restarts was required. The procedure now is simpler.
Stop the old (MySQL 5.6) server
Upgrade the MySQL binaries in place (replace the old binaries with the new ones)
Start the MySQL 5.7 server normally (no special options)
Run mysql_upgrade to upgrade the system tables
Restart the MySQL 5.7 server
Previously, for a new MySQL installation on Unix and Unix-like systems, initialization of the data directory (including the tables in the
mysqlsystem database) was done using mysql_install_db. On Windows, MySQL distributions included a data directory with prebuilt tables in the
mysql_install_db functionality now has been integrated into the MySQL server, mysqld. To use this capability to initialize a MySQL installation, if you previously invoked mysql_install_db manually, invoke mysqld with the
--initialize-insecureoption, depending on whether you want the server to generate a random password for the initial
As a result of this change, mysql_install_db is deprecated, as is the special
--bootstrapoption that mysql_install_db passes to mysqld. These will be removed in a future MySQL release. Also, the
$HOME/file written by mysql_install_db is no longer needed. If it is present on your system, you can remove it.
Initializing a MySQL installation using mysqld works on all platforms, including Windows. In particular, it is possible to initialize a Windows installation without the set of prebuilt tables for the
mysqldatabase. (However, it is unnecessary to do so for this release because Windows distributions still include the pre-built tables.)
For more information, see Initializing the Data Directory Manually Using mysqld.
To handle a derived table (subquery in the
FROMclause) or view reference, the optimizer can materialize the derived table or view reference to an internal temporary table or merge it into the outer query block. Previously, derived tables were always materialized, whereas equivalent view references were sometimes materialized and sometimes merged. This inconsistent treatment of equivalent queries could lead to performance problems: Unnecessary derived table materialization takes time and prevents the optimizer from pushing down conditions to derived tables.
The optimizer now handles derived tables in consistent fashion; that is, the same as view references. This better avoids unnecessary materialization and enables use of pushed-down conditions that produce more efficient execution plans. For an example, see Optimizing Subqueries with Materialization.
The optimizer also better handles propagation of an
ORDER BYclause in a derived table or view reference to the outer query block, doing so only when this makes sense. Previously, the optimizer always propagated
ORDER BY, even if it was irrelevant or resulted in an invalid query.
mysql> DELETE FROM t1 -> WHERE id IN (SELECT id -> FROM (SELECT t1.id -> FROM t1 INNER JOIN t2 USING (id) -> WHERE t2.status = 0) AS t); ERROR 1093 (HY000): You can't specify target table 't1' for update in FROM clause
The error occurs when merging a derived table into the outer query block results in a statement that both selects from and modifies a table. (Materialization does not cause the problem because, in effect, it converts the derived table to a separate table.) To avoid this error, disable the
derived_mergeflag of the
optimizer_switchsystem variable before executing the statement:
mysql> SET optimizer_switch = 'derived_merge=off';
derived_mergeflag controls whether the optimizer attempts to merge derived tables and view references into the outer query block, assuming that no other rule prevents merging. By default, the flag is
onto enable merging. Setting the flag to
offprevents merging and avoids the error just described. (Other workarounds include using
LIMITin the subquery, although these are not as explicit in their effect on materialization.) If an
ER_UPDATE_TABLE_USEDerror occurs for a view reference that uses an expression equivalent to the subquery, adding
ALGORITHM=TEMPTABLEto the view definition prevents merging and takes precedence over the current
For more information, see Optimizing Derived Tables and View References.
References: See also: Bug #20073366, Bug #59203, Bug #11766159.
Microsoft Windows: For Windows, the noinstall Zip archive was split into two separate Zip archives. The MySQL test suite, MySQL benchmark suite, and debugging binaries/information components (including PDB files) were moved into their own Zip archive named
mysql-for 64-bit and
mysql-for 32-bit. This change was made to reduce the file size of the more common download.
Packaging scripts such as those included in RPM or Debian packages have been modified per the principle that files installed from MySQL distributions should have the most restrictive permissions possible. In the following description, assume that the account used to administer MySQL has owner (user) =
mysql, group =
Installers that create the
mysqlaccount do so with a shell of /bin/false to prevent direct login to the account.
The data directory and its contents are owned by and accessible only to owner/group
mysql, with permissions of 750 for directories, 755 for executable files, 640 for other files.
Others files (including executables and libraries) have owner/group of
root, with these permissions:
Man pages, character set files, header files, test suite files: 644
Library files: Conventions appropriate for the host system
Packaging scripts that perform the preceding actions for installation also perform them for upgrades, with the exceptions that if the
mysqlaccount exists, it is left unchanged, and if the data directory exists, its permissions and ownership are left unchanged.
The Performance Schema incorporates these changes:
The Performance Schema now allocates memory incrementally, scaling its memory use to actual server load, instead of allocating all the memory it needs during server startup. Consequently, configuration of the Performance Schema is easier; most sizing parameters need not be set at all. A server that handles a very low load will consume less memory without requiring explicit configuration to do so.
These system variables are autoscaled:
performance_schema_accounts_size performance_schema_hosts_size performance_schema_max_cond_instances performance_schema_max_file_instances performance_schema_max_index_stat performance_schema_max_metadata_locks performance_schema_max_mutex_instances performance_schema_max_prepared_statements_instances performance_schema_max_program_instances performance_schema_max_rwlock_instances performance_schema_max_socket_instances performance_schema_max_table_handles performance_schema_max_table_instances performance_schema_max_table_lock_stat performance_schema_max_thread_instances performance_schema_users_size
There are new instruments named with the prefix
memory/performance_schema/that expose how much memory is allocated for internal buffers in the Performance Schema. These instruments are displayed in the
For more information about how Performance Schema allocates memory and how to assess the amount currently in use, see The Performance Schema Memory-Allocation Model.
Instrumentation for table indexes and table locks is more flexible and less memory intensive. For a table for which index and table lock instrumentation is disabled (as specified in the
setup_objectstable), the Performance Schema allocates no memory for statistics collection. For a table for which index and table lock instrumentation is enabled, memory allocation for statistics collection is deferred until the table begins to be used.
Configuration for instrumentation of table indexes and table locks now is exposed explicitly:
performance_schema_max_index_statsystem variables configure how many indexes per table and how many table locks are subject to statistics collection. These variables are autoscaling by default, reducing memory allocation for MySQL installations where the default allocation was greater than necessary for a server's workload (for example, when databases contain large numbers of tables). They can be set at startup to place explicit limits on memory allocation.
Performance_schema_index_stat_loststatus variables enable assessing whether the corresponding system variable settings are so low as to result in loss of instrumentation.
System and status variable information is now available in Performance Schema tables:
status_by_thread, contain individual status variable values.
status_by_usercontain session status variable values aggregated per account, host name, and user name.
These Performance Schema tables contain information similar to that available from the
SHOW STATUSstatements and the
The Performance Schema tables offer these advantages:
By using the
status_by_threadtables, it is possible to obtain session variables for any session, not just the current session. It is also possible to obtain only session variables, rather than a mix of session and global variables such as returned by
SHOW SESSION VARIABLESand
SHOW SESSION STATUS.
Requests for global variables produce only global variables, whereas for the
SHOW GLOBAL STATUSstatement and the
INFORMATION_SCHEMAtable, requests produce not only global variables, but also session variables that have no global counterpart.
Access to the Performance Schema tables requires the
SELECTprivilege, whereas the
INFORMATION_SCHEMAtables do not.
The value of the new
show_compatibility_56system variable affects the output produced from and privileges required for system and status variable statements and tables. For details, see the description of that variable in Server System Variables.
INFORMATION_SCHEMAtables now are deprecated in preference to the Performance Schema tables and will be removed in a future MySQL release. For advice on migrating away from the
INFORMATION_SCHEMAtables to the Performance Schema tables, see Migrating to Performance Schema System and Status Variable Tables.
Previously, the Performance Schema enabled instrumentation for new foreground threads if there was a row in the
setup_actorstable that matched the thread user and host. Now, the
setup_actorstable has an
ENABLEDcolumn that indicates whether or not to enable instrumentation for matching foreground threads. This permits instrumentation for matching threads to be disabled explicitly. For more information, see Pre-Filtering by Thread, The setup_actors Table, and The threads Table.
Two previously hardcoded limits on SQL statement handling are now configurable:
The maximum number of bytes from SQL statements to display in the
SQL_TEXTcolumn of statement event tables, such as
The number of bytes available for computing statement digests. Statement digests appear in the
DIGEST_TEXTcolumn of statement event tables.
Previously, both values were fixed at 1024. It is now possible to change them at server startup using the
max_digest_lengthsystem variables. (The name
max_digest_lengthdoes not begin with
performance_schema_because statement digesting is now done at the SQL level even if the Performance Schema is disabled and is available to other aspects of server operation that could benefit from it. For example, query rewrite plugins now make use of statement digests, even if the Performance Schema is disabled.)
The defaults remain at 1024, but the values can be reduced to use less memory or increased to permit longer statements to be distinguished for display and digesting purposes. Each variable has a range from 0 to 1024 × 1024.
Any bytes in excess of
performance_schema_max_sql_text_lengthare discarded and do not appear in the
SQL_TEXTcolumn. Statements differing only after that many initial bytes are indistinguishable in this column.
Any bytes in excess of
max_digest_lengthduring digest computation do not factor into digest values. Statements differing only after that many bytes of parsed statement tokens produce the same digest and are aggregated for digest statistics.
For applications that generate very long statements that differ only at the end, the ability to change
max_digest_lengthvariables enables computation of digests that distinguish statements that previously were aggregated to the same digest. Conversely, administrators can devote less server memory to digest storage by reducing the values of this variable. Administrators should keep in mind that larger values result in correspondingly increased memory requirements, particularly for workloads that involve large numbers of simultaneous sessions. (
max_digest_lengthbytes are allocated per session.)
For more information, see Performance Schema Statement Digests.
If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the
References: See also: Bug #71057, Bug #68514, Bug #16414081.
MySQL Server now supports query rewrite plugins:
A preparse query rewrite plugin enables rewriting of SQL statements arriving at the server before the server processes them. The plugin receives a statement string and may return a different string.
A postparse query rewrite plugin enables statement rewriting based on parse trees. The server parses each statement and passes its parse tree to the plugin, which may traverse the tree. The plugin can return the original tree to the server for further processing, or construct a different tree and return that instead.
MySQL distributions now include a postparse query rewrite plugin named
Rewriter. This plugin is rule based. You can add rows to its rules table to cause
One application of query rewrite plugins is to enable use of newer server capabilities with applications that might not be subject to modification. For example, the plugin can add optimizer hints to statements produced by an older application that cannot be changed.
Incompatible Change: The
secure_file_privsystem variable is used to limit the effect of data import and export operations. The following changes have been made to how the server handles this variable:
secure_file_privcan be set to
NULLto disable all import and export operations.
The server checks the value of
secure_file_privat startup and writes a warning to the error log if the value is insecure. A non-
NULLvalue is considered insecure if it is empty, or the value is the data directory or a subdirectory of it, or a directory that is accessible by all users. If
secure_file_privis set to a nonexistent path, the server writes an error message to the error log and exits.
secure_file_privsystem variable was empty by default. Now the default value is platform specific and depends on the value of the
INSTALL_LAYOUTCMake option, as shown in the following table.
(Bug #24679907, Bug #24695274, Bug #24707666)
yaSSL was upgraded to version 2.3.7. (Bug #19695101, Bug #20201864)
Due to the LogJam issue (https://weakdh.org/), OpenSSL has changed the Diffie-Hellman key length parameters for openssl-1.0.1n and up. OpenSSL has provided a detailed explanation at http://openssl.org/news/secadv_20150611.txt. To adopt this change in MySQL, the key length used in
vio/viosslfactories.cfor creating Diffie-Hellman keys has been increased from 512 to 2,048 bits. (Bug #77275, Bug #21221862, Bug #18367167, Bug #21307471, Bug #21449838)
To make it easier to produce the files required to support encrypted connections using SSL and secure password exchange using RSA over unencrypted connections, MySQL distributions now include the mysql_ssl_rsa_setup utility. This utiliy uses the openssl command, so its use is contingent on having OpenSSL installed on your machine. When invoked, mysql_ssl_rsa_setup checks the data directory for SSL and RSA files and uses openssl to create them if they are missing. For more information, see mysql_ssl_rsa_setup — Create SSL/RSA Files.
Autodiscovery of key and certificate files in the data directory at startup now applies to servers compiled using yaSSL. Previously, this applied only to servers compiled using OpenSSL. See Configuring MySQL to Use Encrypted Connections.
If the server automatically enables encrypted connections, it writes a message to the error log. If the server finds that the CA certificate is self-signed, it writes a warning to the error log. (The certificate will be self-signed if created automatically by the server or manually using mysql_ssl_rsa_setup.)
Spatial functions now allocate memory in larger chunks to reduce number of allocation calls and reduce overhead. (Bug #20073459, Bug #74949)
A new set of spatial convenience functions is available:
ST_Distance_Sphere(): Returns the mimimum spherical distance in meters between
MultiPointarguments on a sphere.
ST_IsValid(): Checks whether a geometry is valid.
ST_MakeEnvelope(): Returns the rectangle that forms the envelope around two points.
ST_Simplify(): Returns a simplified geometry.
ST_Validate(): Returns a validated geometry, or
NULLif it is invalid.
For details, see Spatial Convenience Functions.
The spatial function namespace is being made more consistent, with the ultimate goal that each spatial function name begins with
ST_if it performs an exact operation, or with
MBRif it performs an operation based on minimum bounding rectangles.
Currently, some functions have two implementations and up to three related names: A name with an
ST_prefix, and a name with an
MBRprefix, and a name with no prefix:
The name with an
ST_prefix performs an exact operation.
The name with an
MBRprefix performs an operation based on minimum bounding rectangles.
This release implements the following changes in spatial function naming:
A function with an
ST_prefix is added for each non-
MBRfunction that has no
Each function that does not begin with
These functions are deprecated in favor of the
ST_names are added and are preferred over the corresponding non-
ST_names, which now are deprecated:
ST_GeomCollFromTxt()is added as a synonym for
Use of deprecated functions produces a warning. The deprecated functions will be removed in a future MySQL release.
Functions for checking spatial relations now use functionality available in Boost.Geometry 1.56 and up:
ST_Within(). Specifically, these functions now:
Are able to test the relationship between all pairs of argument types handled by Boost.Geometry.
Raise an exception for invalid argument types when the previous implementation may not have.
This work also corrected issues that
ST_Overlaps()returned 1 and
ST_Intersects()returned 0 for two polygons that shared only a boundary, and that
ST_Intersects()sometimes incorrectly calculated the result for intersections of
References: See also: Bug #68091, Bug #16174580, Bug #71076, Bug #17894858.
GIS code now uses
Boost.Geometry.Rtreeto improve handling of geometry collection arguments in binary GIS functions. The minimum bounding rectangles (MBRs) of geometry collection components are used to set up an rtree index, which is used to search for possible matching components using each MBR of the components of the other geometry collection. The results from the rtree index search are provided to precise computation algorithms to avoid unnecessary (and much more expensive) precise computation. As a result, the time complexity of handling geometry collection arguments in GIS algorithms is reduced from O(N^2) to O(NlogN).
These changes have been made for spatial functions that operate on minimum bounding rectangles (MBRs) of geometry values:
Two new functions test the covering relationship of two geometries using their MBRs.
MBRCovers()indicates whether the MBR of one geometry covers that of another.
MBRCoveredBy()tests the opposite, indicating whether the MBR of one geometry is covered by that of another.
MBRTouches()now correctly uses the geometry MBRs, not the geometries themselves.
MBRWithin()better conform to the Open Geospatial Consortium specification: When a point lies on the boundary of a line segment or polygon, or when a line segment lies totally on the boundary of a polygon, it is not considered “within” but instead “touches.” Also, two identical points are not considered “touches.”
Incompatible Change; InnoDB: The
MERGE_THRESHOLDvalue for index pages is now configurable using a
ALTER TABLE, and
CREATE INDEXstatements. If the page-full percentage for an index page falls below the
MERGE_THRESHOLDvalue when a row is deleted or when a row is shortened by an
InnoDBattempts to merge the index page with a neighboring index page. The default
MERGE_THRESHOLDvalue is 50, which is the previously hard-coded value.
This feature adds a
MERGE_THRESHOLDcolumn to the internal
SYS_INDEXESrecords for tables that were originally created in 5.7.5 or earlier do not include this column. Rebuilding or importing these tables after upgrading to MySQL 5.7.6 or later properly updates
SYS_INDEXESrecords with the new
ALTER TABLE ... RENAME INDEXoperations followed by a server restart or a table reload causes errors. This bug is fixed in MySQL 5.7.8 (Bug #20882432).
For more information, see Configuring the Merge Threshold for Index Pages.
Incompatible Change: A new C API function,
mysql_real_escape_string_quote(), has been implemented as a replacement for
mysql_real_escape_string()because the latter function can fail to properly encode characters when the
NO_BACKSLASH_ESCAPESSQL mode is enabled. In this case,
mysql_real_escape_string()cannot escape quote characters except by doubling them, and to do this properly, it must know more information about the quoting context than is available.
mysql_real_escape_string_quote()takes an extra argument for specifying the quoting context. For usage details, see mysql_real_escape_string_quote().Note
Applications should be modified to use
mysql_real_escape_string_quote(), instead of
mysql_real_escape_string(), which now fails and produces an
References: See also: Bug #19211994.
InnoDB: All remaining code related to the
innodb_file_io_threadssystem variable, which was removed in MySQL 5.5, was removed from the source code. (Bug #19843885)
InnoDB: To modularize and decouple the partitioning engine from the server code base, partitioning operations in the storage engine handler class were moved to a new
partition_handlerbase class, which is now the interface for partitioning-specific storage engine functionality.
InnoDBnow supports the creation of general tablespaces using
CREATE TABLESPACE `tablespace_name` ADD DATAFILE 'file_name.ibd' [FILE_BLOCK_SIZE = n]
General tablespaces can be created outside of the MySQL data directory, are capable of holding multiple tables, and support tables of all row formats.
Tables are added to a general tablespace using
tbl_name... TABLESPACE [=]
For more information, see CREATE TABLESPACE Syntax.
InnoDBnow supports native partitioning. Previously,
InnoDBrelied on the
ha_partitionhandler, which creates a handler object for each partition. With native partitioning, a partitioned
InnoDBtable uses a single partition-aware handler object. This enhancement reduces the amount of memory required for partitioned
The following changes accompany
InnoDBnative partitioning support:
Partition definition (
.par) files are no longer created for partitioned
InnoDBtables. Partition definitions are stored in the
InnoDBinternal data dictionary. Partition definition (
.par) files continue to be used for partitioned
FLUSH TABLESdoes not reset the “next”
AUTO_INCREMENTvalue. Instead, the next
AUTO_INCREMENTvalue is kept and used after the
FLUSH TABLESoperation. If the highest
AUTO_INCREMENTvalue is deleted before a
FLUSH TABLESoperation, it is not reused afterwards.
Minor changes to statistics could result in changed execution plans.
The minimum number of rows estimated for a partitioned
InnoDBtable is 1 instead of 2.
The minimum number of rows estimated for range read on a partitioned
InnoDBtable index is 0 per partition instead of 1.
Instead of only including the largest partitions when calculating matching rows in an index range, all partitions in the read set (after pruning is completed) are included. As a result, statistics for matching index rows are more accurate, but time spent during the Optimizer phase may increase for tables with numerous partitions.
InnoDB: The following buffer pool flushing-related enhancements are included in MySQL 5.7.6:
The adaptive flushing algorithm flushes all pages at the end of the flush list if there is a high distribution of pages associated with the oldest LSN.
Once redo space reaches 30% full, a pre-scan on buffer pool instances determines the oldest modified pages in each buffer pool instance. Based on this information, the adaptive flushing algorithm determines the number of pages to flush from each buffer pool instance during a single flush pass. This approach helps ensure that the oldest modified pages are flushed first.
On Linux platforms where it is possible and where the mysqld execution user is authorized, the
setpriority()system call is used to give
page_cleanerthreads priority over other MySQL/InnoDB threads to help page flushing keep pace with the current workload. mysqld execution user authorization can be configured in
/etc/security/limits.conf. Refer to your Linux operating system documentation for more information.
When the oldest modification LSN is close to the defined maximum (
max_modified_age_sync), a synchronous preflush of buffer pool pages is initiated which may result in a “flush wait” scenario for user threads. To smooth throughput, user threads are only required to wait for a target LSN to be reached instead of waiting for an entire flushing batch to finish. User thread waits are reported as sync flush waits by the
buffer_flush_sync_waitsmetric of the
A block was added to prevent the log write mechanism from overwriting last checkpoint LSN.
A message is printed to the server error log if the
innodb_io_capacity_maxsetting is too high.
New metrics for monitoring
page_cleanerthread activity were added to the
buffer_flush_adaptive_avg_pass: Number of adaptive flushes passed during the recent Avg period.
buffer_flush_adaptive_avg_time_est: Estimated time (ms) spent for adaptive flushing recently.
buffer_flush_adaptive_avg_time_slot: Avg time (ms) spent for adaptive flushing recently per slot.
buffer_flush_adaptive_avg_time_thread: Avg time (ms) spent for adaptive flushing recently per thread.
buffer_flush_avg_pass: Number of flushes passed during the recent Avg period.
buffer_flush_avg_time: Avg time (ms) spent for flushing recently.
buffer_flush_n_to_flush_by_age: Number of pages targeted by LSN Age for flushing.
buffer_LRU_batch_flush_avg_pass: Number of LRU batch flushes passed during the recent Avg period.
buffer_LRU_batch_flush_avg_time_est: Estimated time (ms) spent for LRU batch flushing recently.
buffer_LRU_batch_flush_avg_time_slot: Avg time (ms) spent for LRU batch flushing recently per slot.
buffer_LRU_batch_flush_avg_time_thread: Avg time (ms) spent for LRU batch flushing recently per thread.
buffer_LRU_get_free_loops: Total loops in LRU get free.
buffer_LRU_get_free_waits: Total sleep waits in LRU get free.
InnoDB: The Performance Schema now instruments stage events for monitoring
ALTER TABLEand buffer pool load operations. The new stage events include:
stage/innodb/alter table (read PK and internal sort)
stage/innodb/alter table (merge sort)
stage/innodb/alter table (insert)
stage/innodb/alter table (flush)
stage/innodb/alter table (log apply index)
stage/innodb/alter table (log apply table)
stage/innodb/alter table (end)
stage/innodb/buffer pool load
InnoDB: Replication-related support was added to
InnoDBwhich enables prioritization of slave applier transactions over other transactions in deadlock scenarios. This transaction prioritization mechanism is reserved for future use.
CHECK TABLEfunctionality was enhanced for
CHECK TABLEonly performed minimal checks on
SPATIALindexes. Enhanced functionality includes an R-tree validity check and a check to ensure that the R-tree row count matches the clustered index.
InnoDB: The default setting for the
internal_tmp_disk_storage_engineoption, which defines the storage engine the server uses for on-disk internal temporary tables, is now
INNODB. With this change, the Optimizer uses the
InnoDBstorage engine instead of
MyISAMfor internal temporary tables. For related information, see Internal Temporary Table Use in MySQL.
InnoDBnow supports 32KB and 64KB page sizes. For both page sizes, the maximum record size is 16KB.
ROW_FORMAT=COMPRESSEDis not supported when
innodb_page_sizeis set to 32k or 64k. For
innodb_page_size=32k, extent size is 2MB. For
innodb_page_size=64k, extent size is 4MB. The
innodb_log_buffer_sizedefault value was increased from 8M to 16M to support the new page sizes.
innodb_log_buffer_sizeshould be at least 16M when using a 32k or 64k page size.
InnoDB: To support future development, the code that initializes, validates and handles tablespace and table flags was refactored. Also, the
fil_create_ibd_tablespacefunction was refactored, and some functions and variables related to single tablespaces were renamed.
Replication: When using InnoDB with binary logging enabled, concurrent transactions written in the InnoDB redo log are now grouped together before synchronizing to disk when
innodb_flush_log_at_trx_commitis set to 1, which reduces the amount of synchronization operations. This can lead to improved performance. (Bug #19424075)
Replication: Added a number of features and enhancements relating to Performance Schema and group replication. These additions are listed here:
GROUP_NAMEcolumn to the
A number of errors and error mesages.
Replication: There is now a
Previous_gtidsevent in every binary log, regardless of the value of
gtid_mode. In previous versions, it was only generated when
gtid_mode=on. Similarly, there is now an
Anonymous_gtidevent before every transaction when
gtid_mode=off. These changes ensure that similar per-transaction events are generated regardless of the type of binary logging in use. As well as enabling the newly added ability to change
gtid_modeonline, this also has a positive impact on the recovery of
Replication: A new more general purpose parallelization algorithm is now used when
slave_parallel_type=LOGICAL_CLOCK, replacing the previous algorithm that was limited to transactions on different databases. This improves throughput when transactions on the master do not depend on each other. Now even two concurrent transactions on a master can execute in parallel on a slave, if they hold all of their locks on the master. Additionally, transaction dependency is now tracked on the slave through extra fields added to replication transactions in the binary log.
Replication: It is now possible to change replication mode without having to shut down the server or synchronize the topology. As part of this feature, the following changes have been made:
gtid_modeis now dynamic. It can be set by
SUPERfrom a top-level statement. The states
ON_PERMISSIVEhave been added.
enforce_gtid_consistencyis now dynamic. It can be set by
SUPERfrom a top-level statement.
The status variable
Ongoing_anonymous_transaction_counthas been introduced. This shows the number of ongoing transactions which have been marked as anonymous.
The status variables
Ongoing_automatic_gtid_violating_transaction_counthave been introduced in debug-enabled builds. They are not available in non-debug builds. These variables count the number of ongoing transactions that violate GTID consistency, which use
For more information, see Changing Replication Modes on Online Servers
Replication: MySQL Multi-Source Replication adds the ability to replicate from multiple masters to a slave. MySQL Multi-Source Replication topologies can be used to back up multiple servers to a single server, to merge table shards, and consolidate data from multiple servers to a single server. See MySQL Multi-Source Replication.
As part of MySQL Multi-Source Replication, replication channels have been added. Replication channels enable a slave to open multiple connections to replicate from, with each channel being a connection to a master. To enable selection of particular channels, replication-related SQL statements now support an optional
FOR CHANNELclause. See Replication Channels.
Undocumented functions in the C client library are now hidden. This helps minimize namespace pollution, and permits linking for applications that require functions both from yaSSL (in the client library) and from OpenSSL. (Bug #20476596, Bug #18427840)
CMake support was updated to handle CMake version 3.1. (Bug #20344207)
Previously, debug builds on Windows were built with
/Ob0, which disables function inlining. Builds now use
/Ob1to enable inlining. The new
WIN_DEBUG_NO_INLINECMake option can be used to control inlining. The default value is
OFF(inlining enabled); if set to
ON, inlining is disabled. (Bug #20316320)
-DWITH_UBSAN=ONCMake option enables the Undefined Behavior Sanitizer. This feature is supported by GCC 4.9 and up, and Clang 3.4 and up. (Bug #19587393)
The valid date range of the SSL certificates in
mysql-test/std_datahas been extended to the year 2029. (Bug #18366947)
Overhead was reduced for queries such as tested by the sysbench “order-by-range” test. (Bug #75390, Bug #20296891)
The mysql client program now supports
promptcommand to signify the current connection identifier. Thanks to Tsubasa Tanaka for the patch. (Bug #75242, Bug #20227145)
The server now includes its version number when it writes the initial “starting” message to the error log, to make it easier to tell which server instance error log output applies to. This value is the same as that available from the
versionsystem variable. (Bug #74917, Bug #20052694)
auth_socketauthentication plugin checked the socket user name only against the MySQL user name specified by the client program to the server. Now, if those names do not match, the plugin also checks whether the socket user name matches the name specified in the
authentication_stringcolumn of the
mysql.usertable row. The plugin permits the connection for a match in either case. Thanks to Daniël van Eeden for the patch. (Bug #74586, Bug #20041925)
libmysqlclientversion number has been incremented to 20.0.0. (Bug #74206, Bug #19729266)
A new CMake option,
WITH_MSCRT_DEBUG, is available to control Visual Studio CRT memory leak tracing. The default is
OFF. (Bug #73064, Bug #19031370)
Beginning with MySQL 5.7.2, the server disables at startup any account that has no authentication plugin. The server now writes a more extensive message to the error log in this case to indicate how to reenable such accounts. (Bug #73026, Bug #19011337)
ALTER TABLEdid not take advantage of fast alterations that might otherwise apply to the operation to be performed, if the table contained temporal columns found to be in pre-5.6.4 format (
TIMESTAMPcolumns without support for fractional seconds precision). Instead, it upgraded the table by rebuilding it. Two new system variables enable control over upgrading such columns and provide information about them:
ALTER TABLEimplicitly upgrades temporal columns found to be in pre-5.6.4 format. This variable is disabled by default. Enabling it causes
ALTER TABLEnot to rebuild temporal columns and thereby be able to take advantage of possible fast alterations.
SHOW CREATE TABLEoutput includes comments to flag temporal columns found to be in pre-5.6.4 format. Output for the
COLUMN_TYPEcolumn of the
INFORMATION_SCHEMA.COLUMNStable is affected similarly. This variable is disabled by default.
Both variables are deprecated and will be removed in a future MySQL release. (Bug #72997, Bug #18985760)
The minimum value of the
stored_program_cachesystem variable has been changed from 256 to 16, to enable configuration of a smaller amount of memory devoted to the stored program cache. (Bug #72451, Bug #18661573)
The code in
my_strnxfrm_simple()was suboptimal and was improved. Thanks to Alexey Kopytov for the patch. (Bug #68476, Bug #16403708)
The metadata locking subsystem (see Metadata Locking) has been extended to cover concurrent access to tablespaces. This includes DDL statements that explicitly affect tablespaces:
CREATE TABLESPACE, and
DROP TABLESPACE. It also includes DDL statements that affect tablespace contents:
RENAME TABLE, and
For queries that combine
LIMIT, the optimizer may switch to an index that applies to the
ORDER BY. In some cases, the decision to switch was based on a heuristic rather than on cost. The optimizer now uniformly makes the decision whether to switch on a cost basis. This should result in better performanance when switching would cause a query to read an entire index or a large part of it to find qualifying rows.
References: See also: Bug #78993, Bug #22108385, Bug #73837, Bug #19579507, Bug #16522053.
Server and client errors are numbered in ranges beginning from 1000 and 2000, respectively. However, server error numbers are approaching 2000, leading to a potential conflict with client error numbers. To deal with this, server error numbers for MySQL 5.7 now have a range beginning with 3000. This is implemented by permitting multiple
sql/share/errmsg-utf8.txt, with each such line resetting the numbering to
Refactoring within the optimizer resulted in the following improvements to
Output that showed
ORDER BYfor implicitly grouped queries no longer does so.
INSERTstatements involving partition pruning now shows only the partitions actually used, not all partitions in the table.
In addition, for killed queries where the previously returned error was “Unknown error”, the error is now “Query execution was interrupted”.
References: See also: Bug #70553, Bug #17575172.
MySQL now provides a built-in ngram full-text parser plugin that supports Chinese, Japanese, and Korean (CJK), and an installable MeCab full-text parser plugin for Japanese. The parser plugins can be used with
The built-in MySQL full-text parser uses the white space between words as a delimiter to determine where words begin and end, which is a limitation of the built-in MySQL full-text parser for ideographic languages that do not use word delimiters. The addition of ngram and MeCab full-text parser plugins address this limitation.
serverstables in the
mysqlsystem database now are
InnoDB(transactional) tables. Previously, these were
If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the
The following items are deprecated and will be removed in a future MySQL release. Where alternatives are shown, applications should be updated to use them.
have_cryptsystem variable, the
DES_KEY_FILEoption for the
FLUSHstatement, and the
HAVE_CRYPTCMake option. For
ENCRYPT(), consider using
SHA2()instead for one-way hashing. For the others, consider using
sync_frmsystem variable. This variable will be removed when
.frmfiles become obsolete.
Assigning a value to the session
collation_databasesystem variables is deprecated and assignments produce a warning. The session variables will become read only in a future version of MySQL and assignments will produce an error. It will remain possible to access the session variables to determine the database character set and collation for the default database.
Conversion of pre-MySQL 5.1 database names containing special characters to 5.1 format with the addition of a
#mysql50#prefix. (For information about these conversions, see Mapping of Identifiers to File Names.) Because such conversions now are deprecated, the
--fix-table-namesoptions for mysqlcheck and the
UPGRADE DATA DIRECTORY NAMEclause for the
ALTER DATABASEstatement are also deprecated.
Upgrades are supported only from one major version to another (for example, 5.0 to 5.1, or 5.1 to 5.5), so there should be little remaining need for conversion of older 5.0 database names to current versions of MySQL. As a workaround, upgrade a MySQL 5.0 installation to MySQL 5.1 before upgrading to a more recent release.
session_track_gtidssystem variable configures a session tracker that captures GTIDs and returns them from the server to the client. From the C API, GTID information can be obtained by passing
typeargument to the
mysql_session_track_get_next()functions. For more information, see Server Tracking of Client Session State Changes.
Incompatible Change; InnoDB: If your system contains tablespace data files created prior to MySQL 5.1, read this note carefully before upgrading to MySQL 5.7.6.
Tablespace data files created prior to MySQL 5.1 sometimes contain garbage
FIL_PAGE_TYPEvalues in some pages. To address this issue, a new file page type constant (
FIL_PAGE_TYPE_UNKNOWN) was added, and unknown
FIL_PAGE_TYPEvalues are now reset to
However, you may still encounter a failure when a non-index page that contains an invalid
FIL_PAGE_RTREEvalue in the
FIL_PAGE_TYPEfield is written to disk. You can address the failure by modifying the data file to replace the invalid
FIL_PAGE_UNKNOWN. The error log message provides the tablespace ID and page number of the page with the invalid
Before MySQL 5.6,
InnoDBpage size is always 16384 bytes.
FIL_PAGE_TYPEis defined as 24. So, if page number P of a tablespace data file is affected, the data at byte offset 16384*P+24 should contain the bytes
FIL_PAGE_RTREE). Replace these bytes with
If the page contains the strings
supremumat byte offset 99 or 101 (75 or 77 bytes after the start of the
FIL_PAGE_TYPE), the page could be an index page, and there may be actual corruption.Warning
Do not attempt to modify data files directly unless you know exactly what you are doing and fully understand the implications. Manually modifying the data file is no longer required in MySQL 5.7.7 with the fix for Bug #20691930.
FIL_PAGE_TYPEis reset to
FIL_PAGE_TYPE_UNKNOWNin your pre-MySQL 5.5 data file, you may encounter a page corruption error when restarting the server. The error is due to a
FIL_PAGE_TYPEfield in the
InnoDBpage checksum that is still set to the previous
FIL_PAGE_TYPEvalue. To address the error, rewrite the page checksum using the innochecksum tool. The patch for Bug #20691930 in MySQL 5.7.7 addresses this problem by recomputing the page checksum after resetting the
FIL_PAGE_TYPEvalue. (Bug #17345513, Bug #17332603, Bug #19658698)
InnoDB; Microsoft Windows: On Windows, renaming a
FULLTEXTsearch file name raised an assertion. (Bug #20001827)
InnoDB; Microsoft Windows: The logic used to select native asynchronous I/O (AIO) on Windows was simplified. All Windows versions supported by MySQL 5.7 now support native AIO. The logic required to handle older Windows versions that do not support native AIO was no longer necessary. (Bug #19803939)
InnoDB: Opening and closing of optimized temporary tables caused a negative table reference count in
InnoDBMonitor output. (Bug #20608113)
InnoDB: A duplicate database page corruption error message was removed from
buf0buf.cc. (Bug #20605167)
NAMEcolumn of the
INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFOtable was incorrectly declared as 192 characters wide. The correct length is 64 characters. (Bug #20512578)
InnoDB: A full-text phrase search returned an incorrect result. An empty string was handled incorrectly when tokenizing a newly inserted row. (Bug #20465273, Bug #75755)
InnoDB: A workaround introduced in MySQL 5.7.0, in the patch for Bug #14658648, was removed. The workaround allowed MySQL to disable the query cache during crash recovery. Inconsistent data could be produced during crash recovery if MySQL crashed while XA transactions were in a PREPARED state with the query cache enabled. The bug was fixed in MySQL 5.7.2 by the patch for Bug #16593427. (Bug #20461632)
InnoDB: In debug builds, assertion code related to buffer pool resizing caused a significant increase in Valgrind testing time. (Bug #20461123)
InnoDB: The use of change buffering for a spatial index raised an assertion. Change buffer flags should not be set for spatial indexes. (Bug #20452564, Bug #75718)
ALTER TABLE ... IMPORT TABLESPACE, there was a missing dictionary unlock call on Out-Of-Memory(OOM) that could result in a failure when allocating memory for a
.ibdfile path string. (Bug #20430105)
InnoDB: An undefined reference error occurred when building MySQL with
DWITH_EXTRA_CHARSETS=none. (Bug #20429800)
InnoDB: Optimizing a
FULLTEXTindex raised an assertion. The last optimized word of a
FULLTEXTindex is stored in the
valuecolumn which is defined as CHAR(50). An assertion was raised when the last optimized word was greater than 50 characters in length. The
valuecolumn is defined as CHAR(200) as of MySQL 5.6.24 and MySQL 5.7.6.
innodb_ft_max_token_sizesetting is greater than 50, it is recommended that you recreate existing
FULLTEXTindexes after upgrading to MySQL 5.6.24 or MySQL 5.7.6 to avoid this issue.
FULLTEXTindexes created after upgrading to MySQL 5.6.24 or MySQL 5.7.6 are unaffected. (Bug #20418326)
innodb_optimize_point_storageoption and related internal data types (
DATA_VAR_POINT) were removed. (Bug #20415831)
fts_optimize_thread()set a NULL
exit_eventwhen the server started to shut down, and before
fts_optimize_threadwas started. (Bug #20389745)
InnoDB: The memcached
process_arithmetic_commandraised an assertion. The wrong error code was returned for a nonexistent
decrkey. (Bug #20386835)
InnoDB: The expiration time (
exptime) defined using the memcached
setcommand was ignored.
InnoDBmemcached set the expiration time to an interval value instead of a system time value. (Bug #20381342, Bug #70055)
InnoDB: A NaN value in the GIS-related
mbr_join_squarefunction raised an assertion. (Bug #20379160)
innobase_close_thdfunction and related wrapper functions and pointers were removed. The functions and pointers were introduced with the
InnoDBmemcached plugin but never used. (Bug #20369370)
InnoDB: An assertion was raised when the full-text search
fts_savepoint_release()function released a named transaction savepoint and all subsequent savepoints. Only the initial savepoint should be released. (Bug #20341916)
InnoDB: Table names were displayed inconsistently in diagnostic output for
InnoDBtables that store persistent statistics. (Bug #20330831)
UPDATE_TIMEfield, enabled for
InnoDBtables in MySQL 5.7.2, was not updated for
XA COMMITof recovered transactions that were in
XA PREPAREstate. (Bug #20303205)
InnoDB: An incorrect expression was used in
trx->lock.rec_pool.empty()was used instead of
trx->lock.table_pool.empty(). (Bug #20294158, Bug #75373)
va_end()was missing in returns that were added in MySQL 5.7.5. (Bug #20285744, Bug #75323)
InnoDB: A full-text search optimization operation raised an assertion. (Bug #20281800)
InnoDB: A tablespace export operation set the purge state to
PURGE_STATE_STOP, but the purge thread did not check the purge state until the current purge operation was completed. In the case of a large history list, the tablespace export operation was delayed, waiting for the current purge operation to finish. The purge state is now checked with every purge batch. (Bug #20266847, Bug #75298)
InnoDB: When a page is read from disk, there is a check for pending insert buffer entries which involves acquiring a latch on the insert buffer page. If pending entries are found, they are merged. Because the change buffer is only applicable to B-tree secondary leaf pages in non-temporary tablespaces, insert buffer merge is not necessary for all page types. Using page_type, page_level, and tablespace type information from the page that is read from disk, insert buffer merge is now skipped for non-applicable page types. (Bug #20220909)
InnoDB: The name of the internal pseudo-tablespace that is created for the
InnoDBredo log was changed from
innodb_redo_log. The new name aligns with other MySQL 5.7 internal tablespace names that use an “innodb_” prefix. (Bug #20204978)
ALTER TABLE ... ADD INDEXoperation raised an assertion due to assertion code that did not allow an online index status of
ONLINE_INDEX_ABORTED_DROPPED. The assertion code was relaxed. (Bug #20198726)
InnoDB: Attempting to access the table name for a table that was NULL due to a prior inconsistency caused a crash in
innobase_update_foreign_cache()when printing an error. (Bug #20146176)
InnoDB: An error occurred when the
push_warning_printffunction was invoked during server recovery. This function was previously used to print a warning message to the client. Also,
current_thdwas NULL when the server was restarted. (Bug #20144839)
InnoDB: The last flushing loop on shutdown did not call
buf_flush_wait_LRU_batch_end(), resulting in an assertion failure. (Bug #20137435)
dict_index_t::auto_gen_clust_indexflag, which was used inconsistently and redundant, was removed. (Bug #20136192)
InnoDB: A memory access violation in
fts_optimize_threadcaused the server to halt. A table was freed but not removed from the full-text search optimize queue. (Bug #20125560)
InnoDB: An assertion was raised while updating statistics for referenced tables after a cascade update. (Bug #20125466)
InnoDB: A crash occurred in
btr_cur_latch_leaveswhile performing a load operation. Checking the page state without latching the page caused an inconsistency. The page state should only be checked after the page is latched. (Bug #20111105, Bug #74596)
adaptive_hash_searches_btreecounter failed to report counter data. (Bug #20080942, Bug #74511)
InnoDB: Due to a regression introduced in MySQL 5.6.20, mysqld stop did not stop the mysqld server process while the
InnoDBmemcached plugin was active. (Bug #20078646, Bug #74956)
References: This issue is a regression of: Bug #18409840.
commit_nodemember from the
ind_node_tquery graph objects, used during table and index creation, were removed. The
commit_nodemember was initialized but never used. Unused
INDEX_COMMIT_WORKexecution steps were also removed. (Bug #20060218)
ALTER TABLE ... RENAMEfailure on a table with a
FULLTEXTindex raised an assertion. (Bug #20043707)
InnoDB: A duplicate key error encountered during a
REPLACEoperation on a temporary table raised an assertion. (Bug #20040791)
ALTER TABLEoperation that changed the name of a foreign key column resulted in a failure when reloading the foreign key constraint. The previous column name remained in the data dictionary cache instead of being evicted. (Bug #20031243)
ALTER TABLEfailed to check if the table is corrupted. An
ALTER TABLEoperation that affects
InnoDBmetadata should be refused if the clustered index is corrupted or the table is marked as corrupted. An
ALTER TABLEoperation should also be refused if the table is not rebuilt and a corrupted secondary index would remain after the
ALTER TABLEoperation. (Bug #20015132, Bug #74810)
InnoDB: A row update operation raised an assertion in
row_merge_read_clustered_index(), the cached spatial index was not inserted prior to the mini-transaction commit. Once the mini-transaction was committed, the clustered index page was updated or freed, resulting in the primary key fields for cached spatial index entries pointing to invalid addresses. (Bug #19999469)
InnoDB: An assertion was raised in the
btr_cur_search_to_nth_levelfunction. Both shared locks (s-locks) and shared-exclusive locks (sx-locks) should be permitted for all latch modes. (Bug #19984494)
ALTER TABLEoperation on a table with a
FULLTEXTindex raised an assertion. The table was already present in the cache and the
FULLTEXTindexes were already initialized. When the table was reloaded, the
FULLTEXTindexes were initialized again, causing the assertion. (Bug #19978288)
UPDATEoperation on a compressed temporary table raised an assertion. Shared temporary tablespace attributes were used when extending the tablespace for a compressed temporary table. (Bug #19976331)
InnoDB: Server logs reported a vector subscript out of range error. (Bug #19955501)
CHECK TABLEfailed to check if the table is in a corrupt state before performing validation, resulting in an assertion. (Bug #19954054)
InnoDB: To avoid I/O on tablespaces that are rarely written to, the
fsp_get_available_space_in_free_extentsfunction now accesses metadata from cached fields instead of the tablespace header page in the buffer pool.
This patch also includes the following optimizations:
To avoid lookups,
fsp_fill_free_list()and some other functions now take a
fil_space_tpointer instead of a numeric tablespace identifier.
fil_extend_space_to_desired_sizefunction was renamed to
fil_space_extendand its API was simplified.
A new method,
undo::Truncate::was_tablespace_truncated, was added to avoid a consistency check before flushing of truncated undo tablespace files.
InnoDB: A failed
DROP TABLEoperation could leave a table in an inconsistent state without marking the table as corrupted. (Bug #19946781, Bug #74676)
InnoDB: A wrapper class was added to improve printing of quoted SQL identifiers, such as index, column and tablespace names. (Bug #19933607)
ALTER TABLEoperation raised an assertion. When a foreign key object was removed from the dictionary cache, an incorrect foreign key object was removed from the rb-tree. (Bug #19908343)
References: This issue is a regression of: Bug #18806829.
InnoDB: DML operations on a table with full-text search indexes raised an invalid assertion. (Bug #19905246)
References: This issue is a regression of: Bug #19314480.
InnoDB: A missing
ha_innobase::update_rowraised an assertion. (Bug #19904800)
InnoDB: In debug builds, setting the
innodb_limit_optimistic_insert_debugdebug configuration option to 1 caused an infinite B-tree page split. (Bug #19904003, Bug #74605)
ALTER TABLE ... DROP PRIMARY KEY, ADD PRIMARY KEYoperation that changed the prefix length of the primary key field raised an assertion in the bulk insert code. (Bug #19896922)
InnoDBdiagnostic output to stderr included unnecessary line breaks and lines without a preceding timestamp. Output from multiple threads could become interleaved due to messages being written out in several non-atomic steps. (Bug #19895222)
innodb_create_intrinsicoption, introduced in MySQL 5.7.5, was removed. (Bug #19893327)
InnoDB: As of MySQL 5.7.5, MySQL builds depend on atomic memory access primitives being present on the target platform. To simplify the code,
HAVE_ATOMIC_BUILTINSwas removed from the
InnoDBsource in MySQL 5.7.6.
InnoDBnow depends on Microsoft atomics on Windows, and on GCC-style atomics on other platforms. (Bug #19856411)
InnoDB: A severe error occurred during the log apply phase of an online
ALTER TABLEoperation that was converting a table with a UTF-8 charset to
ROW_FORMAT=REDUNDANT. (Bug #19843246, Bug #19895661, Bug #20219871)
InnoDB: A multiple-table delete operation caused the server to halt. (Bug #19815702)
InnoDB: A buffer pool dump referred to a non-existing tablespace ID. (Bug #19814155)
References: This issue is a regression of: Bug #19149177.
InnoDB: In debug builds,
buf_block_align()could be called from debug assertion code while the buffer pool is being resized, resulting in a race condition. (Bug #19803497)
FLUSH TABLESoperation raised an assertion. (Bug #19803418)
dict_boot()function did not set the maximum length of columns used for index fields, resulting in
dict_index_node_ptr_max_size()returning incorrect values. (Bug #19791849)
InnoDB: When dummy tables are created, the
autoinc_mutexmember of the of the
dict_table_tobject was created unnecessarily. Similarly, the
dict_index_tobject was created unnecessarily for dummy indexes. To avoid unnecessary mutex contention,
zip_pad.mutexobjects are now allocated and initialized on the first lock attempt. (Bug #19788198, Bug #73361)
log_sys->mutexwas not held when reading the
fil_space_t::max_lsnfield, causing a race condition. (Bug #19729855)
References: This issue is a regression of: Bug #18645050.
btr_insert_into_right_sibling()could delete node pointers at the parent page. To avoid latch order violations and deadlocks with other threads, lock intention is now checked for leaf pages as well as upper non-leaf pages. (Bug #19729316)
InnoDBperformed unnecessary table lookups in the change buffer during tablespace export operations. (Bug #19724300)
fil_tablespace_deleted_or_being_deleted_in_mem()function, added in MySQL 4.1, was longer necessary and has been removed. There is a fallback check in
DB_TABLESPACE_DELETED. (Bug #19719727)
InnoDB: To ease future development, the
ha_innobase::createfunction was refactored. (Bug #19718568)
InnoDB: Redundant conditional branching and a redundant a check for
srv_read_only_modewere removed from
ha_innobase::create(). Redundant conditional branching and an unused local variable were removed from
ha_innobase::delete_table(). (Bug #19712822)
InnoDB: Unused code related to UTF-8 handling for
FULLTEXTindexes was removed. (Bug #19712059)
fil_index_tree_is_freed()function, which returned a false negative when the index root page was reallocated, was replaced by improved logic for freeing index trees. This patch also removed a redundant parameter that was passed to
dict_drop_index_tree(). (Bug #19710798)
InnoDBchange buffer tree, which was created inside the
InnoDBdata dictionary cache unnecessarily, is now created directly, bypassing the cache. This patch also removes the
DICT_UNIVERSALflag, which was set in connection with
DICT_IBUF. Neither of the flags is used for persistent data structures, which makes
DICT_UNIVERSALunnecessary. (Bug #19710650)
fil_space_t::tablespace_versionfield, introduced to keep track of
ALTER TABLE...DISCARD TABLESPACEfollowed by
ALTER TABLE IMPORT TABLESPACEoperations, was removed. The
tablespace_versionfield ensured that a change buffer merge would not occur for old buffered entries while a tablespace with the same
space_idwas imported. The field was redundant and no longer required. (Bug #19710564)
InnoDB: Removed unused code related to index name lookup, and replaced a function that permitted duplicate index names. (Bug #19710348)
InnoDB: Column and index names were unnecessarily escaped in
InnoDBdiagnostic messages and interfaces. This patch also adds a new function,
innobase_quote_identifier, for quoting
FOREIGN KEYconstraints and column names in
SHOW CREATE TABLEoutput. (Bug #19704286)
InnoDB: When using the MySQL thread pool, connections encountered long semaphore waits during load testing. (Bug #19703758, Bug #19887285)
InnoDB: Since the introduction of fast index creation in MySQL 5.1, index objects have been added to the
SYS_INDEXESinternal data dictionary table before being committed. Uncommitted entries were identified by a prefix (defined as
TEMP_INDEX_PREFIXwas also used in the
InnoDBdata dictionary cache, resulting in complications when displaying or comparing index names. To address this problem, a new
dict_index_t::uncommittedflag was introduced along with accessor methods
set_committed(). Before this change, some
INFORMATION_SCHEMAtables displayed uncommitted index names with a preceding question mark. The question mark prefix is now omitted. (Bug #19702328)
InnoDBdisplayed tables names inconsistently in diagnostic messages. Some messages displayed table names using an internal representation while other messages displayed table names in a translated form. (Bug #19694618)
FULLTEXTindexes, a lookup for the
FTS_DOC_ID_INDEXwas performed during DML operations. To avoid the costly lookups, a pointer to
FTS_DOC_ID_INDEXis now cached at DDL time. (Bug #19693488)
InnoDB: To simplify code, the
is_redo_skippedflag, introduced in MySQL 5.7.5 with the
CREATE INDEXbulk load feature, was removed. The flag caused redo logging for page allocation to be skipped. Redo logs are now generated for page allocation, even when creating a new tablespace. (Bug #19693192)
MLOG_FILE_NAMEredo log record, which provides the information necessary to identify tablespace files that changed since the last checkpoint, were emitted on log checkpoint even though there were no changes to tablespace files. If a tablespace file is missing or unreadable on crash recovery, the inconsistency should be ignored if there are no redo logs to apply. For related information, see Tablespace Discovery During Crash Recovery. (Bug #19685095)
InnoDB: An unused parameter,
archive_space_id, that was passed and ignored in the
log_group_initfunction, was removed. (Bug #19669129)
References: See also: Bug #16296837.
InnoDB: In read-only mode, a GIS data search using the
MBRCONTAINS()function raised an assertion. (Bug #19664678)
InnoDB: Page reservation for the index tree was not performed before calling
btr_page_alloc(). (Bug #19660261)
InnoDB: Building MySQL 5.7.5 on a Debian 7 32-bit system with GCC resulted in a MySQL server failure. The problem was due to a GCC bug (Debian Bug Report #764220) that causes incorrect code to be emitted when a function that takes a pointer or reference as a parameter is declared as
attribute((pure)). The problem is known to occur on Debian Wheezy 7.6 x86 with g++-4.6 (Debian 4.6.3-14) 4.6.3 or g++ (Debian 4.7.2-5) 4.7.2, and on Debian Jessie/Sid amd64 with gcc (Debian 4.9.1-15) 4.9.1 or g++ (Debian 4.9.1-15) 4.9.1. The bug may exist in other gcc-4.x versions as well any GCC version that accepts the
To avoid the bug, problematic attributes have been removed from MySQL functions that take pointers or references that they are dereferencing.
This patch also removed instances of
attribute((nonnull)), which do not always generate a warning when NULL is passed, and may not emit code for handling the NULL case. (Bug #19632776)
InnoDB: A rollback operation raised an assertion in
lock_rec_free_all_from_discard_page_low()due to stale records locks on empty pages that were being removed from an index tree. (Bug #19628598)
modify_clockvalue is now stored to allow the
buf_page_optimistic_get()function, used to get optimistic access to a database page, to succeed in most cases. An unnecessary
PAGE_HEAP_TOP(record heap top pointer) and
FIL_PAGE_TYPE(file page type) set was removed from
btr0bulk.cc. (Bug #19611367)
dict_set_corrupted()function attempted to update the clustered index of the
SYS_INDEXESdata dictionary table incorrectly. (Bug #19584379)
InnoDB: Compiling with the new Clang 3.5 release resulted in a number of
InnoDBcompilation warnings. (Bug #19579603)
InnoDB: Removed unused API definitions from
api0api.ccsource files. (Bug #19579149)
DICT_TF2_USE_FILE_PER_TABLEflag should be tested by the
dict_table_use_file_per_tablefunction to verify that the table uses a file-per-table tablespace. (Bug #19578222)
innodb_create_intrinsicenabled, temporary tables created during
ALTER TABLEoperations were marked as optimized temporary tables, resulting in an assertion. Enabling
innodb_create_intrinsicshould only affect
CREATE INDEXoperations. (Bug #19565749)
InnoDB: Valgrind testing returned a Conditional jump or move depends on uninitialised value(s) at buf_page_is_zeroes error. The unread portion of the page contained garbage values. (Bug #19536534)
INSERToperation on a spatial index resulted in a crash in
mbr_join_squarefunction failed to check for infinity and NaN (not a number) values. (Bug #19533996, Bug #73776)
InnoDB: With change buffering enabled, a buffered sequence of operations that should not have been buffered resulted in an Unable to purge a record error. (Bug #19528825, Bug #73767)
InnoDB: Pages with a checksum value of zero were incorrectly treated as empty pages. A page should only be considered empty if its checksum value and LSN field values are zero. (Bug #19500258, Bug #73689)
References: This issue is a regression of: Bug #17335427.
InnoDB: The C-style function,
ib_logf(), used for writing log messages, has been removed in favor of C++ style classes (
ib::fatal). (Bug #19495721)
InnoDBdata dictionary was not updated when a
ALTER TABLE ... CHANGE COLUMNoperation changed the case of the column name. (Bug #19465984)
InnoDBreturned a table not found error for a missing tablespace file. (Bug #19419026)
InnoDBshutdown stalled due to a user thread that was in a waiting state. (Bug #19386426)
InnoDB: After upgrading to MySQL 5.7, an
ALTER TABLEoperation on a tables created in MySQL 5.6 and containing GIS data would cause a serious error. (Bug #19368904)
InnoDB: After an online
ALTER TABLE ... ADD INDEXoperation, crash recovery failed due to a regression introduced with the
CREATE INDEXbulk insert enhancement introduced in MySQL 5.7.5. (Bug #19316315, Bug #19308426)
InnoDB: On non-Windows platforms,
os_file_pwritefunctions return -1 when an error occurs. This value was printed in an error message as the number of bytes read or written. Instead of printing the -1 value in the error message, a separate error message indicating a system call failure is now printed. Thanks to David Bennett for the patch. (Bug #19315210, Bug #73365)
InnoDB: A memory access violation caused
fts_optimize_threadand mysqld to terminate. (Bug #19314480)
InnoDB: A procedure, called from a function to perform an operation on a temporary table, caused the server to halt. (Bug #19306524)
InnoDB: Attempting to shut down the server after starting the server with
innodb_force_recovery=6resulted in a hang. (Bug #19265668, Bug #73341)
fil_decr_pending_ops()functions have been replaced by
fil_space_release(). This change removes a space ID lookup. The new functions are implemented in
lock_rec_block_validate(), which is a debug function. The patch for this bug also removed
fil_tablespace_is_being_deleted(), which was an orphaned function. (Bug #19149177)
InnoDB: If the log sequence number (LSN) has not increased, the
log_write_up_to()function should not initiate redo log writing. (Bug #19068569, Bug #73109)
CREATE TABLEoperation failed with a table is full error when running a MySQL server with
innodb_flush_method=O_DIRECTon a Linux system with an ext3 file system. The error was due to an internal
posix_fallocate()failure that occurs when
O_DIRECTis specified. To allow the file operation to proceed, the internal
posix_fallocate()failure now prints an error message to the error log. (Bug #18903979)
InnoDB: As part of a cleanup of
INSERTcode paths, assertion code was added to
ha_innobase::end_stmt()and other places at the start of DDL. Debug code was added to
row_log_table_apply(). Assertion code was added to optimized temporary table-related functions, and unused parameters were removed. (Bug #18894337)
References: This issue is a regression of: Bug #11758237.
InnoDB: A full-text search operation caused a segmentation fault. (Bug #18778259)
InnoDB: Enhancements introduced in MySQL 5.7.5 related to tablespace discovery during crash recovery caused a performance regression. (Bug #18645050)
InnoDB: If a database is named using uppercase letters on a MySQL server with
lower_case_table_names=2(which is default on OS X),
InnoDBstores the database name as specified in the
InnoDBinternal system table (
SYS_TABLES) but stores the name in lowercase on disk. During crash recovery, the case mismatch resulted in a conflict that marked the tablespace
.ibdfile as missing. The patch for this bug converts database names to lowercase on crash recovery. (Bug #18412598, Bug #72043)
InnoDB: A full-text query expansion search using a search phrase plus wildcard operator resulted in InnoDB: Did not find word ... for query expansion search errors. This patch also addressed an issue related to full-text indexes being “unsynced” by DDL rollback. (Bug #18229097, Bug #19831736)
References: This issue is a regression of: Bug #17373659.
InnoDB: In debug builds, the
InnoDBLock Monitor asserted after a
DROP TABLEoperation, and the
InnoDBMonitor encountered an assertion in
buf_page_get_gen. (Bug #18062698, Bug #71343, Bug #18173184, Bug #68116)
buf_page_set_sticky(bpage), needlessly making removed pages sticky in some cases. (Bug #17407091, Bug #70228)
InnoDB: A slow shutdown (
innodb_fast_shutdown=0) after crash recovery raised an assertion. Slow shutdown did not wait for background rollback operations to finish before proceeding. (Bug #16862810)
InnoDB: The criteria used to define a small tablespace was inconsistent. Thanks to Laurynas Biveinis for the patch. (Bug #16696906, Bug #68970)
InnoDB: For explicit cache coherency, a write barrier was added to the head of
os_thread_create_func(), and a read barrier was added to assertion code in
rw_lock_free_func(). (Bug #13364876, Bug #62692, Bug #18870970, Bug #72809)
InnoDB: The integer column value was handled incorrectly for the memcached incr and decr commands. (Bug #69415, Bug #20083106, Bug #74874, Bug #20044123)
Partitioning: When multiple columns are used in
KEYpartitioning, their order may help determine the partition in which the row is placed. Changing this order by means of an
ALTER TABLEthat uses
ALGORITHM=INPLACEcan lead to inconsistency when placing rows in partitions; in other words, a row inserted before such an operation is placed in one partition, but the same row inserted afterwards is placed in a different one. For this reason, altering the order of a multicolumn index online is no longer allowed when that index is also used as the base for partitioning the table by
KEY; instead, you must use a copying
ALTER TABLEto perform the change. (Bug #17896265)
enforce_gtid_consistencywas set to
WARN, if a second GTID consistency violating statement within a transaction was encountered, it was not raising a warning. This was due to the fact that by design the transaction context was marked as GTID violating, hence no other warnings were being issued until the transaction committed. The fix ensures that a warning is raised for all statements inside a transaction correctly. (Bug #20414559)
Replication: After restarting a slave, the first relay log was missing the
Previous_gtidslog event. Since MySQL version 5.7.6, a
Previous_gtidslog event is added to every log. This fix ensures that a
Previous_gtidslog event is correctly added to the first relay log. (Bug #20106390)
Replication: When purging binary logs and the first left binary log contained only a
Previous_gtidslog event, a lost_gtids->is_empty() assertion was caused. This was related to the fix for Bug#16741603 and has now been corrected. (Bug #20075721)
Replication: When using a slave configured to use a special character set such as UTF-16, UTF-32, or UCS-2, the receiver (I/O) thread failed to connect. The fix ensures that in such a situation, if a slave's character set is not supported then default to using the
latin1character set. (Bug #19855907)
Replication: If a client thread on a slave executed
FLUSH TABLES WITH READ LOCKwhile the master executed a DML, executing
SHOW SLAVE STATUSin the same client became blocked, causing a deadlock. The fix ensures that the read lock is only held during the period that the relay log is being updated and the deadlock is avoided. (Bug #19843808)
Replication: When using multi-source replication with multiple channels and with a multithreaded slave enabled, resetting the slave and then executing
RESET SLAVE ALL,
STOP SLAVEresulted in a crash. This has now been fixed and the multithreaded slave can be restarted in a multi-source replication setup. (Bug #19784641)
CHANGE REPLICATION FILTERstatement can be used to create an empty filter, for example when clearing previously configured replication filters. This caused a crash in previous versions when creating an empty filter for
REPLICATE_WILD_IGNORE_TABLE. This fix ensures that these replication filters can be safely cleared by setting the filter to be empty. (Bug #19711674)
Replication: When using a MySQL version that had been compiled with the
WITH_DEBUGoption enabled, using
expire_logs_daysto purge binary logs caused a restart to crash the server. This problem arose after the fix for Bug #17283409. The fix ensures that
current_thdis checked before calling
DEBUG_SYNC(). (Bug #19553099)
Replication: When using a multithreaded slave, the slave receiver (SQL) thread stopped with an
ER_MTS_CANT_PARALLELerror when issuing a
LOAD DATA INFILEstatement that tried to load data into a non-transactional table on the master but failed, for example due to a primary key violation. This was caused by the multithreaded slave applier incorrectly handling
DELETE_FILEevents. The fix ensures that a multithreaded slave handles
DELETE_FILEevents correctly. (Bug #19552923)
Replication: Sometimes the slave I/O thread leaves a partial group in the current relay log, for example when it is killed or stopped. After it is restarted, a new relay log is created on rotation and a pair of
FORMAT_DESCRIPTION_EVENTis replicated from master and written into the new relay log. When using a multithreaded slave, problems such as error 1755 were encountered when applying the remaining part of the group in the relay log. This fix ensures that if
MASTER_AUTO_POSITIONis enabled, then the worker rolls back the partial group, finishes its work, and then applies the new complete copy of the group. If
MASTER_AUTO_POSITIONis disabled, the worker does not roll back the partial group. (Bug #19545298)
Replication: Start log events were not checked by slaves for minimum size. (Bug #19145698)
Replication: When using row-based replication with
slave_type_conversionsenabled, a binary log with more than one
Rows_log_eventin succession caused a crash. This was due to the temporary tables generated as part of the
slave_type_conversionsprocess being released too early. This fix ensures that the temporary tables are not released too early, and also ensures that long transactions do not cause an out of memory error. (Bug #18770469, Bug #19704825)
Replication: When using binary log files that had been manually copied from the master, for example to avoid I/O thread reading delay, a multithreaded slave generated error 1755. Because the
Previous_gtidslog event is logged using the master's
server_idand not the slave's
server_id,the previous events were not being skipped correctly. This fix ensures that the events in
Previous_gtidslog event are always skipped, regardless of whether they are from the relay log (generated on the slave) or from the binary log (generated on the master and manually copied to the slave as the relay log). (Bug #17812024)
Replication: When replicating from an earlier version MySQL master, such as version 4.1, checksums are not used for events. Replicating to a slave running a newer version of MySQL, such as version 5.6, which has
slave_sql_verify_checksumenabled by default meant that the last 4 bytes of events from the older master were being incorrectly interpreted as the checksum. A warning is now generated and to avoid such a situation, set
slave_sql_verify_checksum=0to disable checksums on the slave. (Bug #17276183)
Replication: When using multi-source replication and a multithreaded slave in a situation that required recovery of a channel, such as after a slave applier thread error, or after a crash, the channel was not being recovered correctly. This meant there was no attempt to fix gaps in transaction execution left by the stopped session, which led to some transactions being applied repeatedly. The fix ensures that in such a situation, the correct channel is passed through to multithreaded slave recovery. (Bug #74906, Bug #20046222)
Replication: Ignorable log events were introduced in MySQL 5.6, but were found to not be functioning correctly. This has now been fixed. (Bug #74683, Bug #19949915)
Replication: When an XA transaction was active, executing an internal rollback, for example using the
BINLOGstatement, resulted in an assertion. The fix ensures that a rollback happens only for a slave when a transaction spans multiple binary log files. Rollback does not happen now if the Format_description comes from the
BINLOGstatement being executed in the MySQL client. (Bug #74597, Bug #19928622)
Replication: The GTIDs of transactions committed in a group were not added to
gtid_executedin order and this sometimes caused temporary gaps in
gtid_executed. When these gaps occurred, the server would have to add and remove intervals from the GTID set, and this requires a mutex, which would cause contention and could reduce performance. The fix ensures that GTIDs are added to
gtid_executedin the same commit order without gaps. (Bug #74328, Bug #19982543)
log-bin=OFF, committed transaction GTIDs are added to the
mysql.gtid_executedtable. In such a configuration, the committed transaction GTID was not being correctly added to
gtid_purgeduntil the next time the server was restarted. The fix ensures that committed transaction's GTIDs are added to
gtid_purgedat the time of commit. (Bug #74279, Bug #19781336)
Replication: In a replication topology where:
the slave had
the master had
GTID_MODE=ONand had not executed any transactions since it was started
if the slave used the
MASTER_POS_WAITfunction to wait until it had received the full binary log from the master while the master had not executed any transactions, then the
MASTER_POS_WAITfunction would never finish, or would time out. This was caused because after a server restart, the master's binary log ends with a
Previous_gtidslog event but this event was not being replicated, so the slave was not made aware of the master's binary log position. The fix ensures that the
Previous_gtidslog event is replicated correctly, so that the slave becomes aware of the correct binary log position on the master, ensuring that the
MASTER_POS_WAITfunction can finish. (Bug #73727, Bug #19507923)
Replication: When restarting MySQL with
relay_log_recoveryenabled to recover from a crash, if the SQL thread had never been started, the position from which to start recovery was not correctly initialized because
Relay_Master_Log_Filewas missing. This fix ensures that in such a situation each of the relay logs, starting from the first relay log file, is searched for a rotate event from the master, which specifies where replication started from. This rotate event is then used to set the SQL thread's
Relay_Log_Posand recovery continues as normal. (Bug #73039, Bug #19021091)
Replication: When using GTIDs for replication and with
MASTER_AUTO_POSITIONenabled, if a slave requested GTIDs which had been already been purged by the master, the master was sending all available GTIDs. This happened because the master reads all available binary logs and searches for a binary log which contains a GTID that is not contained in the union of
gtid_retrieved. If such a GTID is found, the master starts sending the information starting from that location. In a situation where the union of the slave's
gtid_retreivedset did not contain the master's
gtid_purgedset, the slave would expect GTIDs which had already been purged by the master. This fix ensures that in such a situation, the slave's I/O thread is aborted with an error "Master has purged binary logs containing GTIDs that the slave requires.". (Bug #73032, Bug #19012085)
Replication: When using a multithreaded slave with GTID based replication, enabling
--replicate-same-server-idcaused the slave thread to stop with an error and replication could not be started. This was caused by a
Previous_gtidslog event not being correctly filtered in such a setup and reaching the worker thread. The fix ensures that
Previous_gtidslog event is correctly processed by the coordinator thread. (Bug #72988, Bug #18967791)
Replication: A kernel mutex contention was being caused because mysqlbinlog was calling localtime() for every event read, which in turn called stat(/etc/localtime). This fix ensures that mysqlbinlog uses localtime_r(), which is optimized to store the read only timezone internal structure. This also means that mysqlbinlog now establishes the time zone at the beginning of processing and you can not change it during processing. This is the same behavior as MySQL server. (Bug #72701, Bug #18808072)
Replication: In normal usage, it is not possible for a slave to have more GTIDs than the master. But in certain situations, such as after a hardware failure or incorrectly cleared
gtid_purged, the master's binary log could be truncated. This fix ensures that in such a situation, the master now detects that the slave has transactions with GTIDs which are not on the master. An error is now generated on the slave and the I/O thread is stopped with an error. The master's dump thread is also stopped. This prevents data inconsistencies during replication. (Bug #72635, Bug #18789758)
Replication: When using a GTID based replication slave with auto positioning enabled, there was a possibility that the last fully received transaction could be requested again by the slave I/O thread when the GTID of the transaction was not in the slave's
gtid_executedset. This situation could occur for example if the SQL thread had not applied the transaction or a
RESET MASTERstatement was issued on the slave to clean up its
gtid_executedset. The fix ensures that a GTID based replication slave using auto positioning does not ask for a fully received transaction twice, regardless of the slave's
gtid_executedset, and it now only adds a GTID to the
Retrieved_Gtid_Setwhen the whole transaction has been received. (Bug #72392, Bug #18629623, Bug #17943188)
Replication: When using
SHOW SLAVE STATUSto monitor replication performance,
Seconds_Behind_Mastersometimes displayed unexpected lag behind the master. This was caused by
Previous_gtidslog events being written to the slave's relay log with a timestamp behind the master, and then being used to calculate the
Seconds_Behind_Master. This fix ensures that events generated on the slave that are added to the relay log and are not used when calculating
Seconds_Behind_Master. (Bug #72376, Bug #18622657)
Microsoft Windows: On Windows, the replace utility did not work. (Bug #16581605)
Solaris: Binary distributions for Solaris built with Sun Studio now ship with the
stlportlibrary due to a dependency of client programs on that library. (Bug #19845068)
Solaris: For 32-bit Solaris builds, alignment problems resulting from improper use of varargs function arguments caused core dumps and incorrect output. (Bug #74395, Bug #19821617)
For debug builds, an assertion could be raised during index selection if a spatial index used a column that was also part of the primary index. (Bug #20451454)
On Linux, trying to install a
.dllplugin (intended for Windows) resulted in a memory leak. (Bug #20439894)
On 32-bit platforms, byte-count calculations for
RPAD()could overflow and cause a server exit. (Bug #20316028)
mysqltest had a memory leak if another process shut down the server. (Bug #20221262)
mysql_session_track_get_first()C API function returned 1 instead of 0 even after a valid query was executed to change the session state. (Bug #20126551)
On Ubuntu 14.10, MySQL install operations could fail to reload AppArmor. (Bug #20092641)
For debug builds, the server could raise an assertion during
DELETEprocessing due to failure to handle a subquery that was required to be a scalar subquery but returned more than 1 row. (Bug #20086791)
Some queries with argumentless functions,
GROUP BY, and
WITH ROLLUPcaused an assertion to be raised. (Bug #20034943)
A user with a name of
event_schedulercould view the Event Scheduler process list without the
PROCESSprivilege. (Bug #20007583, Bug #20754369)
The mysql client could exit prematurely when invoked with the
--xmloption. (Bug #19974879)
InnoDBtable checksum calculation could yield an incorrect result if the value of the
innodb_checksum_algorithmsystem variable was modified during the operation. (Bug #19931177)
LIKEoperator could produce unreliable results of the
ESCAPEclause contained an expression that was constant at execution time but unknown prior to that. (Bug #19931126)
mysql.proctable row could result in a server exit for
DROP DATABASEof the database associated with the
procrow. (Bug #19875331)
SHOW GRANTSafter connecting using a proxy user could display the password hash of the proxied user. (Bug #19817663)
For debug builds, the optimizer could produce a bad index scan cost when creating a temporary table for a derived table, and raise an assertion as a result. (Bug #19793998)
Unlocking a temporary table after locking and truncating it could cause a server exit. (Bug #19786309)
INpredicates could be incorrectly flagged as candidates for semi-join flattening, causing an assertion to be raised when flattening was attempted. (Bug #19779600, Bug #18932813)
Large values of the
transaction_prealloc_sizesystem variable could cause the server to allocate excessive amounts of memory. The maximum value has been adjusted down to 128K. A similar change was made for
transaction_alloc_block_size. Transactions can still allocate more than 128K if necessary; this change reduces the amount that can be preallocated, as well as the maximum size of the incremental allocation blocks. (Bug #19770858, Bug #20730053)
Source RPM packages were missing the proper dependency on the Boost library. (Bug #19714453)
A server exit could occur for queries that compared two rows using the
<=>operator and the rows belonged to different character sets. (Bug #19699237, Bug #20730155)
The Enterprise Encryption plugin could mishandle string arguments. (Bug #19688008, Bug #20730103)
The optimizer detected functional dependency for equality expressions of the form
but not for expressions of the form
(. Now it handles the latter as well. (Bug #19687724)
col_name, ...) = (
InnoDBerrors caused stored function and trigger condition handlers to be ignored. (Bug #19683834, Bug #20094067)
On some 32-bit platforms,
GET_LOCK(returned immediately due to timeout rather than waiting for the lock. (Bug #19674349)
If a DML statement containing a subquery caused a deadlock inside
InnoDBwould roll back the transaction. This would not be noticed in the SQL layer, with the result that execution continued, eventually leading to an assertion being raised inside
InnoDB. (Bug #19670163)
sha256_password, password hashes written to the binary log were in the wrong format. (Bug #19660998)
ORDER BYon a
CHAR(0) NOT NULLcolumn could lead to a server exit. (Bug #19660891)
Under load, the server could exit while attempting to populate the
OBJECT_TYPEcolumn for selects from the
events_waits_currentPerformance Schema table. (Bug #19658933)
ST_AsGeoJson()could fail when given an illegal
optionsargument. (Bug #19657747)
Geohash spatial functions failed when given a geohash argument having a collation other than the default collation. (Bug #19657725)
Checks enforced by
ONLY_FULL_GROUP_BYcannot reliably be run if a grouped query is part of
CREATE VIEW. The MySQL server tried to run those checks and could exit; now only statements that actually use the view run the checks. (Bug #19636980)
For debug builds, an assertion could be incorrectly raised when a grouped query referred to a view. (Bug #19636409)
For debug builds: Adding a unique index to a
POINT NOT NULLcolumn triggered a warning and the key was not promoted to a primary key. Creating a unique index on a different non-
NULLcolumn in the same table then raised an assertion. (Bug #19635706, Bug #24469860)
When there is no change in session state, the OK packet sent from server to the client contained an unneeded byte at the end of the packet. (Bug #19625718)
Debug builds of mysql_install_db did not compile on Solaris 11 U2 due to use of the deprecated
vfork()function. (Bug #19603400)
An assertion could be raised for either of these conditions: 1) A conversion to semi-join intended for scalar subqueries was applied to multiple-row subqueries. 2) An
INpredicate for which the left-hand side was a scalar subquery converted to a semi-join was checked to see whether it could use materialization. (Bug #19586047)
For debug builds, if an intermediate or final result produced NaN or a negative number,
ST_Distance()caused a server exit. This function now produces a
ER_GIS_INVALID_DATAerror instead. (Bug #19584716)
CMake configuration was adjusted to handle new warnings reported by Clang 3.5, using the
-Wundefined-bool-conversioncompiler options. (Bug #19584183)
ALTER TABLEpartitioning statement was executed in strict SQL mode and an
ER_WRONG_TYPE_COLUMN_VALUE_ERRORerror occurred, the
sql_modewas reset to
''and the stack of error handlers was corrupted, leading to a server exit. (Bug #19584181)
Attempting to start the server on a port that was already in use produced Valgrind errors. (Bug #19566148)
Session state was not included with the results of queries saved in the query cache. (Bug #19550875)
CREATE TABLEstatements could fail to create the table (as expected), but still generate table statistics in the Performance Schema. (Bug #19535945)
NULLcould lead to an eventual server exit. (Bug #19514067)
The client protocol tracing plugin did not account for the removal of the EOF packet from the client/server protocol in MySQL 5.7.5. (Bug #19512199)
The default value for the condition filtering effect for equality conditions on nonindexed columns was adjusted from 0.005 to 0.1. The original value caused too-high estimates for the condition filtering effect for columns with low cardinality. (Bug #19505175)
UNIONstatement for which the first query block returned a
POINTcolumn and the second returned a geometric column with a non-
POINTvalue failed if the query used
InnoDBtemporary tables or stored the result in an
InnoDBtable. (Bug #19471564)
An assertion could be raised for queries evaluated using a semi-join LooseScan if an index scan was used on one index and a range scan on another index. (Bug #19465034)
For client programs,
--secure-authis now deprecated and
--skip-secure=authis illegal, but use of
--skip-secure-authresulted in a warning followed by the help message rather than an error. (Bug #19438612)
In strict SQL mode, some
SELECTstatements could execute differently within and without stored procedures. (Bug #19418619)
audit_logplugin encountered a disk-full error, the server would exit.
Now, if the file system to which the audit log is being written fills up, a “disk full” error is written to the error log. Audit logging continues until the audit log buffer is full. If free disk space has not been made available by the time the buffer fills, client sessions will hang, and stopping the server at the time of client sessions hanging will result in audit log corruption. To avoid this if client sessions are hung, ensure that free space is available on the audit logging file system before stopping the server. (Bug #19411485)
validate_passwordplugin activated and dictionary lookups enabled, passing a user-defined variable to
PASSWORD()could cause a server exit. (Bug #19388163)
Statements that used Geohash spatial functions could not be prepared. (Bug #19383904)
number()function failed when invoked with no argument. Now MySQL treats
number()as if it had been invoked for the current context node (in other words, as if
number(.)had been used instead), which is the behavior called for in the XPath specification for this case. (Bug #19323016)
References: This issue is a regression of: Bug #19056196.
With the query cache enabled, certain queries that began with comment sequences could cause invalid memory read errors. (Bug #19322795)
STR_TO_DATE()could mishandle conversion of numeric input to date, resulting in a server exit. (Bug #19047644)
Fixed a Valgrind warning for an out-of-bounds read while parsing
'0E+'. (Bug #19047527)
Under certain conditions,
DATE_FORMAT()could use the same buffer for its format argument and the function result, resulting in invalid memory reads. (Bug #19047488)
Conversion of a string to an IPv6 address could raise a Valgrind warning. (Bug #19047425)
For failure to create a temporary table due to being out of file descriptors, the server exited rather than returning an error. (Bug #18948649)
mysqldump failed to report a disk-full error if the dump destination was located on an NFS mount. (Bug #18817867)
Under certain conditions, a proxy user could expire the password of the proxied user. (Bug #18815349)
InnoDBpermitted a foreign key to be created which referenced a parent table for which the user did not have sufficient privileges. Now, the user must have the
REFERENCESprivileges for the parent table to create a foreign key. (Bug #18790730)
The server could exit due to an optimizer failure to allocate enough memory for resolving outer references. (Bug #18782905, Bug #19892803)
If two internal temporary tables were created based on the same aggregate function, the server could exit. (Bug #18766378)
For some queries that contained a derived table (subquery in the
FROMclause), delay of materialization resulted in a suboptimal execution plan due to a less accurate row-count estimate. (Bug #18607971)
For some multiple-table
UPDATEstatements, the join order of the tables could incorrectly influence the result. (Bug #18449085)
ST_Touches()could cause a server exit for some inputs. (Bug #18304448)
InnoDBtables containing full-text columns from Windows to Linux caused a server exit on Linux during full-text index initialization. (Bug #18285007, Bug #19864963, Bug #73155)
A server running with
--default-authentication-plugin=sha256_passwordrejected connection attempts by MySQL 5.1 clients requiring a password. (Bug #18160400)
validate_passwordplugin did not properly enforce password constraints for accounts authenticated by the
sha256_passwordauthentication plugin. (Bug #18140348)
Execution of a prepared statement with a nested
INsubquery and a view could cause a server exit. (Bug #17973601)
Starting the server with start service or mysqld_safe could result in failure to use the correct plugin directory. (Bug #17619241)
DELETE IGNOREstatements was ignored. (Bug #17564775)
For debug builds, an assertion was raised for
ALTER TABLEwhen accessing an indexed column for which the operation modified the column length, if the length was 767 and was being increased. (Bug #16886196)
Selecting all columns from
INFORMATION_SCHEMA.TABLESdid not reopen tables if they were in the table cache, but selecting a subset of those columns under the same conditions did reopen tables. (Bug #16869534)
FEDERATEDtable with an
AUTO_INCREMENTcolumn using a
LIKEclause results in a server exit. (Bug #12671631)
For debug builds, a missing error check permitted certain
ALTER TABLEstatements that should fail to continue processing. (Bug #76515, Bug #20788817)
For RPM-based installation operations, no information was produced to indicate that mysql_install_db wrote the initial
/.mysql_secret. These operations now use mysqld --initialize, which writes the password to the standard error output. (Bug #75859, Bug #20518217)
For some full-text queries, incomplete optimizer cleanup regarding index use could affect subsequent queries against the same table. (Bug #75688, Bug #20442572, Bug #20261601)
filteredvalue was displayed to an unwarranted number of digits precsion. This value is now limited to two digits following the decimal point. (Bug #75663, Bug #20429156)
Pushed joins were not working for
NDBtables. (Bug #75256, Bug #20234994)
For a slow network connection, the timeout for downloading Boost (600 seconds) could be too short. A new CMake option,
DOWNLOAD_BOOST_TIMEOUT, is now available to configure the timeout. (Bug #75238, Bug #20223893)
For some queries with
EXPLAINcould indicate that execution would be done using
filesort, but execution actually was done using an index read. (Bug #75233, Bug #20219846)
Several spelling errors in error messages and the source code were corrected. Thanks to Otto Kekäläinen for the patch. (Bug #75084, Bug #20135835)
When CMake did not find the required version of Boost, the error message did not indicate the required version. Now it does. (Bug #75026, Bug #20108908)
log_timestampssystem variable incorrectly required binary logging to be enabled. (Bug #75025, Bug #20108866)
During token processing, the parser check whether a token contained 7-bit data could be applied to the wrong token. (Bug #74984, Bug #20086997)
For a privilege error on a table underlying a view, a more general error should be supplied for attempts to access the view, so as not to provide information about the view contents. This did not happen in strict SQL mode. (Bug #74868, Bug #20032855)
volatile, unnecessarily because it is protected with a mutex. Thanks to Stewart Smith for the patch. (Bug #74849, Bug #20029439)
Removed the unused
grant_optionglobal variable from
mysqld.cc. Thanks to Stewart Smith for the patch. (Bug #74847, Bug #20029398)
InnoDBboolean full-text searches incorrectly handled
+combined with parentheses; for example,
+word1 +(>word2 <word3). (Bug #74845, Bug #20028323)
NULLas an expression was not recognized as a literal for calculation of Performance Schema statement digests. (Bug #74813, Bug #20015246)
MySQL failed to compile with GCC 4.9.1 in debug mode. (Bug #74710, Bug #19974500)
An optimizer cost model constructor allocated but did not destroy a cost constant object, resulting in a memory leak. (Bug #74590, Bug #19895764)
Certain queries could raise an assertion when a internal string operation produced a
NULLpointer rather than an empty string. (Bug #74500, Bug #19875294, Bug #13358486, Bug #79988, Bug #22551116)
For mysql_install_db, the
--no-defaultsoption was not passed to mysqld. (Bug #74477, Bug #19863782)
For debug builds, the server could exit due to an optimizer failure to allocate enough memory for group references. (Bug #74447, Bug #19855522)
table_io_waits_summary_by_tablePerformance Schema table, there was an off-by-one error for the
COUNT_READvalues. (Bug #74379, Bug #19814559)
Depending on contents, geometry collection objects were not properly destroyed, resulting in a memory leak. (Bug #74371, Bug #19813931)
row subquery1) NOT IN (
NULLvalues in the left argument could cause an assertion failure. (Bug #74357, Bug #19805761)
Any index comment specified for
ALTER TABLE ... ADD INDEXwas ignored. (Bug #74263, Bug #19779365)
Reading a system variable with a
NULLvalue inside a stored program caused any subsequent reads to return a
NULLvalue even though the variable value might change across invocations of the stored program. (Bug #74244, Bug #19770958)
Storage engine API code and functions in the
handler.ccfiles that are never called or referenced were removed. (Bug #74207, Bug #19729286)
-DENABLED_PROFILING=0CMake option resulted in compilation errors. (Bug #74166, Bug #19730970)
With the change in MySQL 5.7.5 to
InnoDBfor the help tables in the
mysqldatabase, mysql_install_db became much slower for loading the help-table content. This was due to the
INSERTstatements loading with autocommit enabled. Now all the statements execute as a single transaction, not one transaction per statement. (Bug #74132, Bug #19703580)
On CentOS 6, specifying a relative path name for the
--socketoption caused MySQL startup script failure. (Bug #74111, Bug #19775856)
group_concat_max_lensystem variable could be set to its maximum value at runtime, but not in an option file. (Bug #74037, Bug #19670915)
The server incorrectly wrote client-side error messages to the error log: Deadlock found when trying to get lock; try restarting transaction. (Bug #73988, Bug #19656296)
The client part of the
sha256_passwordplugin could not be specified as a default client plugin (
--default-auth=sha256_password) for users authenticating with other server plugins. (Bug #73981, Bug #19651687, Bug #17675203)
Miscalculation of memory requirements for qsort operations could result in stack overflow errors in situations with a large number of concurrent server connections. (Bug #73979, Bug #19678930, Bug #23224078)
REPEAT()wasted time concatenating empty strings. (Bug #73973, Bug #19646643)
The capabililty of using
InnoDBfor temporary tables in MySQL 5.7.5 resulted in certain queries failing: Some queries involving multiple-table
UPDATE, queries involving long
PRIMARY KEYvalues, and queries involving
DISTINCT SUM(). (Bug #73927, Bug #19627741, Bug #73932, Bug #19628808, Bug #73702, Bug #19497209)
On Windows, setting the
max_statement_timesession variable greater than 0 resulted in a memory leak. (Bug #73897, Bug #19605472)
In Solaris 11.2, dtrace -V output changed from
Oracle D, causing detection of DTrace availability to fail during MySQL configuration. (Bug #73826, Bug #19586917)
On 32-bit systems,
GLength()returned a non-INF value for
LineStringvalues of infinite length. (Bug #73811, Bug #19566186)
mysql_config --libs_r produces output containing link flags for
libmysqlclient_r, even though that library was removed in MySQL 5.5 and replaced with a symbolic link to the underlying
libmysqlclientlibrary. The output now refers directly to
libmysqlclient. (The implication is that it is no longer necessary to maintain the symbolic link for the sake of being able to use mysql_config --libs_r.) (Bug #73724, Bug #19506315)
For statement digest calculation, the Performance Schema failed to recognize signed literal numbers as values representable by
?and created multiple digests for statements that should have had the same signature. Now all instances of unary plus and unary minus followed by a number reduce to
?in digests. (Bug #73504, Bug #19389709)
Compilation on Windows using Visual Studio 2013 resulted in “unresolved external symbol” errors. (Bug #73461, Bug #19351573)
OLD_PASSWORD()is deprecated, but no warning was produced when it was invoked. (Bug #73376, Bug #19285177)
A server warning error message referred to the obsolete
table_cachesystem variable rather than to
table_open_cache. Thanks to Daniël van Eeden for the patch to fix some of the instances. (Bug #73373, Bug #19285052, Bug #75081, Bug #20135780)
Certain queries for which subquery materialization or
UNION DISTINCTwas used together with a hash index on a temporary table could produce incorrect results or cause a server exit. (Bug #73368, Bug #19297190)
If a table had a
NOT NULLcolumn, for an
INSERTstatement on the table for which the column value was not specified, the server produced
ERROR 1048 "Column cannot be null"rather than
Warning 1364 "Field doesn't have a default value"if there was a
BEFOREtrigger with an action type different from
ON INSERT. (Bug #73207, Bug #19182009)
IS_USED_LOCK()function implementations contained a race condition due to which they could access freed memory when a user lock was concurrently checked and freed. Accessing freed memory could result in an incorrect function return value or server exit. (Bug #73123, Bug #19070633)
SHOW EVENTSin the
performance_schemadatabase returned an access-denied error, rather than an empty result as is done for
INFORMATION_SCHEMA. Now an empty result is returned. (Bug #73082, Bug #19050141)
LOCK TABLESsometimes acquired an insufficiently strong lock for implicitly locked tables. (Bug #72887, Bug #18913551)
Sort order of output from a view could be incorrect when the view definition includes an
ORDER BYclause but the view is selected from using a
WHEREclause. (Bug #72734, Bug #18838002, Bug #81235, Bug #23207758)
The server no longer logs the following warnings because they are uninformative: Client failed to provide its character set. '
charset' will be used as client character set. (Bug #72543, Bug #18708334)
ENABLED_LOCAL_INFILECMake option incorrectly was enabled by default. (Bug #72106, Bug #18448743)
The server could fail to parse inserted strings for
SETcolumns for which the column definition had exactly 64 elements. (Bug #71259, Bug #18020499)
Use of ODBC-format date literals could produce incorrect query results. (Bug #69233, Bug #16812821)
mysql_setpermission failed to properly quote user names in SQL statements that it generated. (Bug #66317, Bug #14486004)
DELETE FROMstatements were sent to the remote server as
TRUNCATE TABLEstatements, with possible side effects on transaction handling and
AUTO_INCREMENTprocessing. (Bug #42878, Bug #11751864)
A file created for an internal temporary table could cause problems if the file was orphaned for some reason and the file name was reused for later queries. (Bug #32917, Bug #11747548)
mysql_tzinfo_to_sql failed in
STRICT_ALL_TABLESSQL mode if time zone tables contained malformed information. (Bug #20545, Bug #11745851)