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
CREATE USERandALTER 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 themysql.usertable. For details, see CREATE USER Statement, and ALTER USER Statement.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 themysql.usertable. See Account Locking.A new statement,
SHOW CREATE USER, shows theCREATE USERstatement that creates the named user. The accompanyingCom_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 logCREATE USER,ALTER USER, andGRANTstatements in backward-compatible (pre-5.7.6) fashion. Enabling this variable promotes compatibility for cross-version replication.The
authentication_stringcolumn in themysql.usertable now stores credential information for all accounts. ThePasswordcolumn, previously used to store password hash values for accounts authenticated with themysql_native_passwordandmysql_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 movesPasswordcolumn values to theauthentication_stringcolumn and removes thePasswordcolumn. For nonupgraded installations that have noaccount_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 version:
Using
GRANTto create users. Instead, useCREATE USER. Following this practice makes theNO_AUTO_CREATE_USERSQL mode immaterial forGRANTstatements, so it too is deprecated.Using
GRANTto modify account properties other than privilege assignments. This includes authentication, SSL, and resource-limit properties. Instead, establish such properties at account-creation time withCREATE USERor modify them afterward withALTER USER.IDENTIFIED BY PASSWORD 'syntax forhash_string'CREATE USERandGRANT. Instead, useIDENTIFIED WITHforauth_pluginAS 'hash_string'CREATE USERandALTER USER, where the'value is in a format compatible with the named plugin.hash_string'-
The
PASSWORD()function is deprecated and should be avoided in any context. Thus,SET PASSWORD ... = PASSWORD('syntax is also deprecated.auth_string')SET PASSWORD ... = 'syntax is not deprecated; nevertheless,auth_string'ALTER USERis now the preferred statement for assigning passwords.WarningThe changes in this release result in a semantic incompatibility for one
SET PASSWORDsyntax:SET PASSWORD ... = 'literal string';Previously,
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.NoteAny application that uses
PASSWORD()to create hash values (a practice that has been discouraged for some time) should be modified to use a different hash-generation method. For suggestions, see the description ofPASSWORD()in Encryption and Compression Functions. The
old_passwordssystem variable. Account authentication plugins can no longer be left unspecified in themysql.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 themysql.usertable. This rendersold_passwordssuperflous.
NoteIt 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 theauthentication_stringcolumn.-
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:
You must include the
--add-drop-tableoptionYou must not include the
--flush-privilegesoption
Load the pre-5.7.6 dump file into the 5.7.6 server before running mysql_upgrade.
Because the
Passwordcolumn is gone in 5.7.6 and up, downgrading to a version older than 5.7.6 requires a special procedure. See Downgrade Notes.
(WL #6054, WL #6409)
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.The new
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, enablingWITH_SYSTEMDresults in an error from CMake. WhenWITH_SYSTEMDis enabled, the newSYSTEMD_SERVICE_NAMEandSYSTEMD_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
-DWITH_SYSTEMD=1CMake option.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)
NoteAny 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. (WL #7895)
Replication: The variable
binlogging_impossible_modewas renamed tobinlog_error_action. (Bug #19507567)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 statementSET GLOBAL SQL_LOG_BINnow produces an error. It remains possible to read the global value ofsql_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 scopesql_log_binis removed in MySQL 8.0. (Bug #67433, Bug #15868071)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)OLD_PASSWORD()is deprecated, but no warning was produced when it was invoked. (Bug #73376, Bug #19285177)-
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 (TIME,DATETIME, andTIMESTAMPcolumns 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:avoid_temporal_upgradecontrols whetherALTER TABLEimplicitly upgrades temporal columns found to be in pre-5.6.4 format. This variable is disabled by default. Enabling it causesALTER TABLEnot to rebuild temporal columns and thereby be able to take advantage of possible fast alterations.show_old_temporalscontrols whetherSHOW CREATE TABLEoutput includes comments to flag temporal columns found to be in pre-5.6.4 format. Output for theCOLUMN_TYPEcolumn of theINFORMATION_SCHEMA.COLUMNStable is affected similarly. This variable is disabled by default.
Both variables are deprecated and will be removed in a future MySQL version. (Bug #72997, Bug #18985760)
-
The following items are deprecated and will be removed in a future MySQL version. Where alternatives are shown, applications should be updated to use them.
The
ENCRYPT(),DES_ENCRYPT(), andDES_DECRYPT()functions, the--des-key-fileoption, thehave_cryptsystem variable, theDES_KEY_FILEoption for theFLUSHstatement, and theHAVE_CRYPTCMake option. ForENCRYPT(), consider usingSHA2()instead for one-way hashing. For the others, consider usingAES_ENCRYPT()andAES_DECRYPT()instead.The
sync_frmsystem variable. This variable will be removed when.frmfiles become obsolete.-
The global
character_set_databaseandcollation_databasesystem variables are deprecated and will be removed in a future MySQL version.Assigning a value to the session
character_set_databaseandcollation_databasesystem variables is deprecated and assignments produce a warning. The session variables will become read only in a future MySQL version 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-db-namesand--fix-table-namesoptions for mysqlcheck and theUPGRADE DATA DIRECTORY NAMEclause for theALTER 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.
(WL #3811, WL #8126, WL #8186, WL #8216)
-
MySQL now supports the specification of generated columns in
CREATE TABLEandALTER 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). TheINFORMATION_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. (WL #411)
-
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 aPasswordcolumn). If so, it permits connections by users who have an empty authentication plugin in theirmysql.useraccount row, as long as they have aPasswordvalue 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 oldermysql.usertable for whichroothas no authentication plugin named. In particular, you can run mysql_upgrade, connecting asroot, with no need to start the server with any special options. Previously, if therootaccount 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
(WL #8350)
-
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 themysqldatabase.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
--initializeor--initialize-insecureoption, depending on whether you want the server to generate a random password for the initial'root'@'localhost'account.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 version. Also, the$HOME/file written by mysql_install_db is no longer needed. If it is present on your system, you can remove it..mysql_secretInitializing 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. (WL #7307)
-
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 propagatedORDER BY, even if it was irrelevant or resulted in an invalid query.For statements such as
DELETEorUPDATEthat modify tables, using the merge strategy for a derived table that previously was materialized can result in anER_UPDATE_TABLE_USEDerror: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 clauseThe 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 theoptimizer_switchsystem variable before executing the statement:mysql> SET optimizer_switch = 'derived_merge=off';The
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 isonto enable merging. Setting the flag tooffprevents merging and avoids the error just described. (Other workarounds include usingSELECT DISTINCTorLIMITin the subquery, although these are not as explicit in their effect on materialization.) If anER_UPDATE_TABLE_USEDerror occurs for a view reference that uses an expression equivalent to the subquery, addingALGORITHM=TEMPTABLEto the view definition prevents merging and takes precedence over the currentderived_mergevalue.For more information, see Optimizing Derived Tables and View References with Merging or Materialization. (WL #5275)
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 andVERSION-winx64-debug-test.zipmysql-for 32-bit. This change was made to reduce the file size of the more common download.VERSION-win32-debug-test.zip-
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 =mysql.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/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/root, with these permissions:Executables: 755
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. (WL #5608, WL #8129)
-
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_sizeThere 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 thememory_summary_global_by_event_nametable.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:
The
performance_schema_max_table_lock_statandperformance_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.The
Performance_schema_table_lock_stat_lostandPerformance_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:
System variables:
global_variables,session_variables, andvariables_by_threadcontain individual system variable values.Status variables:
global_status,session_status, andstatus_by_thread, contain individual status variable values.status_by_account,status_by_host, andstatus_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 VARIABLESandSHOW STATUSstatements and theGLOBAL_VARIABLES,SESSION_VARIABLES,GLOBAL_STATUS, andSESSION_STATUSINFORMATION_SCHEMAtables.The Performance Schema tables offer these advantages:
By using the
variables_by_threadandstatus_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 bySHOW SESSION VARIABLESandSHOW SESSION STATUS.Requests for global variables produce only global variables, whereas for the
SHOW GLOBAL STATUSstatement and theGLOBAL_STATUSINFORMATION_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 theSHOWstatements andINFORMATION_SCHEMAtables do not.
For more information, see Performance Schema System Variable Tables, Performance Schema Status Variable Tables, and Status Variable Summary Tables.
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.The
INFORMATION_SCHEMAtables now are deprecated in preference to the Performance Schema tables and will be removed in a future MySQL version. For advice on migrating away from theINFORMATION_SCHEMAtables to the Performance Schema tables, see Migrating to Performance Schema System and Status Variable Tables.NoteIt is a known issue in this release that the
session_variablesandsession_statustables do not fully reflect all variable values in effect for the current session; they include no rows for global variables that have no session counterpart. This is corrected in MySQL 5.7.8. 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, thesetup_actorstable has anENABLEDcolumn 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 asevents_statements_current.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
performance_schema_max_sql_text_lengthandmax_digest_lengthsystem variables. (The namemax_digest_lengthdoes not begin withperformance_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 theSQL_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
performance_schemadatabase. (WL #6629, WL #7270, WL #7800, WL #7698, WL #7794)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 causeSELECTstatement rewriting.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.
For more information, see Query Rewrite Plugins, and The Rewriter Query Rewrite Plugin.
Thanks to Padraig O'Sullivan for a related code contribution. (WL #7589)
-
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 toNULLto 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. Ifsecure_file_privis set to a nonexistent path, the server writes an error message to the error log and exits.-
Previously, the
secure_file_privsystem variable was empty by default. Now the default value is platform specific and depends on the value of theINSTALL_LAYOUTCMake option, as shown in the following table.INSTALL_LAYOUTValueDefault secure_file_privValueSTANDALONE,WINempty DEB,RPM,SLES,SVR4/var/lib/mysql-filesOtherwise mysql-filesunder theCMAKE_INSTALL_PREFIXvalue To specify the default
secure_file_privvalue explicitly if you are building from source, use the newINSTALL_SECURE_FILE_PRIVDIRCMake option.
(Bug #24679907, Bug #24695274, Bug #24707666, WL #6782)
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.) (WL #7706)
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 betweenPointorMultiPointarguments 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, orNULLif it is invalid.
For details, see Spatial Convenience Functions. (WL #8034)
-
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 withMBRif 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 anMBRprefix, 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.The name with neither prefix sometimes is an alias for the
ST_name (as withArea()andST_Area()), sometimes an alias for theMBRname (as withContains()andMBRContains()),
This release implements the following changes in spatial function naming:
A function with an
ST_prefix is added for each non-MBRfunction that has noST_name.Each function that does not begin with
ST_orMBRis deprecated.The exceptions are the geometry object construction functions, which remain unchanged:
Point(),LineString(),Polygon(),MultiPoint(),MultiLineString(),MultiPolygon(), andGeometryCollection().These functions are deprecated in favor of the
MBRnames:Contains(),Disjoint(),Equals(),Intersects(),Overlaps(),Within().These functions are deprecated in favor of the
ST_names:Area(),AsBinary(),AsText(),AsWKB(),AsWKT(),Buffer(),Centroid(),ConvexHull(),Crosses(),Dimension(),Distance(),EndPoint(),Envelope(),ExteriorRing(),GeomCollFromText(),GeomCollFromWKB(),GeomFromText(),GeomFromWKB(),GeometryCollectionFromText(),GeometryCollectionFromWKB(),GeometryFromText(),GeometryFromWKB(),GeometryN(),GeometryType(),InteriorRingN(),IsClosed(),IsEmpty(),IsSimple(),LineFromText(),LineFromWKB(),LineStringFromText(),LineStringFromWKB(),MLineFromText(),MLineFromWKB(),MPointFromText(),MPointFromWKB(),MPolyFromText(),MPolyFromWKB(),MultiLineStringFromText(),MultiLineStringFromWKB(),MultiPointFromText(),MultiPointFromWKB(),MultiPolygonFromText(),MultiPolygonFromWKB(),NumGeometries(),NumInteriorRings(),NumPoints(),PointFromText(),PointFromWKB(),PointN(),PolyFromText(),PolyFromWKB(),PolygonFromText(),PolygonFromWKB(),SRID(),StartPoint(),Touches(),X(),Y().These
ST_names are added and are preferred over the corresponding non-ST_names, which now are deprecated:ST_MLineFromText(),ST_MLineFromWKB(),ST_MPointFromText(),ST_MPointFromWKB(),ST_MPolyFromText(),ST_MPolyFromWKB(),ST_MultiLineStringFromText(),ST_MultiLineStringFromWKB(),ST_MultiPointFromText(),ST_MultiPointFromWKB(),ST_MultiPolygonFromText(),ST_MultiPolygonFromWKB().ST_GeomCollFromTxt()is added as a synonym forST_GeomCollFromText().ST_Length()is added to implement the same operation as the now-deprecatedGLength(), which has a nonstandard name because a function namedLength()already existed (to calculate string lengths).
Use of deprecated functions produces a warning. The deprecated functions will be removed in a future MySQL version. (WL #8055)
-
Functions for checking spatial relations now use functionality available in Boost.Geometry 1.56 and up:
ST_Contains(),ST_Crosses(),ST_Disjoint(),ST_Equals(),ST_Intersects(),ST_Overlaps(),ST_Touches(),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 andST_Intersects()returned 0 for two polygons that shared only a boundary, and thatST_Intersects()sometimes incorrectly calculated the result for intersections ofLineStringandPolygon. (WL #7224)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). (WL #7420)-
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.The spatial function
MBREquals()has been implemented. It should be used in preference toMBREqual(), which is now deprecated. (The new name is more consistent with the similarEquals()function.)MBRTouches()now correctly uses the geometry MBRs, not the geometries themselves.MBRTouches()andMBRWithin()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.”
(WL #7541)
-
Incompatible Change; InnoDB: The
MERGE_THRESHOLDvalue for index pages is now configurable using aCOMMENTclause withCREATE TABLE,ALTER TABLE, andCREATE INDEXstatements. If the page-full percentage for an index page falls below theMERGE_THRESHOLDvalue when a row is deleted or when a row is shortened by anUPDATEoperation,InnoDBattempts to merge the index page with a neighboring index page. The defaultMERGE_THRESHOLDvalue is 50, which is the previously hard-coded value.This feature adds a
MERGE_THRESHOLDcolumn to the internalSYS_INDEXEStable.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 updatesSYS_INDEXESrecords with the newMERGE_THRESHOLDcolumn. Otherwise,TRUNCATE TABLEorALTER 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. (WL #6747)
-
Incompatible Change: A new C API function,
mysql_real_escape_string_quote(), has been implemented as a replacement formysql_real_escape_string()because the latter function can fail to properly encode characters when theNO_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().NoteApplications should be modified to use
mysql_real_escape_string_quote(), instead ofmysql_real_escape_string(), which now fails and produces anCR_INSECURE_API_ERRerror ifNO_BACKSLASH_ESCAPESis enabled.(WL #8077)
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, WL #7149)InnoDB:
InnoDBsystem tablespace data is now exposed in theINNODB_SYS_TABLESPACESandINNODB_SYS_DATAFILESInformation Schema tables. (WL #6205)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. (WL #4807)-
InnoDB:
InnoDBnow supports the creation of general tablespaces usingCREATE TABLESPACEsyntax.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
CREATE TABLEortbl_name... TABLESPACE [=]tablespace_nameALTER TABLEsyntax.tbl_nameTABLESPACE [=]tablespace_nameFor more information, see CREATE TABLESPACE Statement. (WL #6205)
-
InnoDB:
InnoDBnow supports native partitioning. Previously,InnoDBrelied on theha_partitionhandler, which creates a handler object for each partition. With native partitioning, a partitionedInnoDBtable uses a single partition-aware handler object. This enhancement reduces the amount of memory required for partitionedInnoDBtables.The following changes accompany
InnoDBnative partitioning support:Partition definition (
.par) files are no longer created for partitionedInnoDBtables. Partition definitions are stored in theInnoDBinternal data dictionary. Partition definition (.par) files continue to be used for partitionedMyISAMtables.For partitioned
InnoDBtables,FLUSH TABLESdoes not reset the “next”AUTO_INCREMENTvalue. Instead, the nextAUTO_INCREMENTvalue is kept and used after theFLUSH TABLESoperation. If the highestAUTO_INCREMENTvalue is deleted before aFLUSH 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.
(WL #6035)
-
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 givepage_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 thebuffer_flush_sync_waitsmetric of theINFORMATION_SCHEMA.INNODB_METRICStable.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 theINNODB_METRICStable: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.
(WL #7868)
-
InnoDB: The Performance Schema now instruments stage events for monitoring
InnoDBALTER 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
For more information, see InnoDB Integration with MySQL Performance Schema, and Saving and Restoring the Buffer Pool State. (WL #5889)
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. (WL #6835)InnoDB:
CHECK TABLEfunctionality was enhanced forInnoDBSPATIALindexes. Previously,CHECK TABLEonly performed minimal checks onInnoDBSPATIALindexes. Enhanced functionality includes an R-tree validity check and a check to ensure that the R-tree row count matches the clustered index. (WL #7740)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 nowINNODB. With this change, the Optimizer uses theInnoDBstorage engine instead ofMyISAMfor internal temporary tables. For related information, see Internal Temporary Table Use in MySQL. (WL #6737)InnoDB:
InnoDBnow supports 32KB and 64KB page sizes. For both page sizes, the maximum record size is 16KB.ROW_FORMAT=COMPRESSEDis not supported for 32KB or 64KB page sizes. The extent size is 2MB for the 32KB page size, and 4MB for the 64MB page size. Theinnodb_log_buffer_sizedefault value was increased from 8MB to 16MB to support the new page sizes.innodb_log_buffer_sizeshould be set to a minimum of 16MB when using a 32KB or 64KB page size. (WL #5757)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. (WL #8109)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: There is now a
Previous_gtidsevent in every binary log, regardless of the value ofgtid_mode. In previous versions, it was only generated whengtid_mode=on. Similarly, there is now anAnonymous_gtidevent before every transaction whengtid_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 changegtid_modeonline, this also has a positive impact on the recovery ofgtid_purgedandgtid_executed. (WL #7592)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. (WL #7165)-
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:
The variable
gtid_modeis now dynamic. It can be set bySUPERfrom a top-level statement. The statesOFF_PERMISSIVEandON_PERMISSIVEhave been added.The variable
enforce_gtid_consistencyis now dynamic. It can be set bySUPERfrom 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_anonymous_gtid_violating_transaction_countandOngoing_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 usegtid_next=ANONYMOUSandgtid_next=AUTOMATIC, respectively.
For more information, see Changing Replication Modes on Online Servers (WL #7083)
-
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. (WL #1697)channel -
Group Replication: Added a number of features and enhancements relating to Performance Schema and Group Replication. These additions are listed here:
The Performance Schema
replication_group_membersandreplication_group_member_statstables.The SQL statements
START GROUP_REPLICATIONandSTOP GROUP_REPLICATION.A
GROUP_NAMEcolumn for thereplication_connection_statustable.The
transaction_write_set_extractionsystem variable.A number of errors and error mesages.
(WL #6834, WL #6826, WL #7988, WL #8252, WL #6841)
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 newWIN_DEBUG_NO_INLINECMake option can be used to control inlining. The default value isOFF(inlining enabled); if set toON, inlining is disabled. (Bug #20316320)The new
-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
\Cin thepromptcommand 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)Previously, the
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 theauthentication_stringcolumn of themysql.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)The
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 isOFF. (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)
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:
ALTER TABLESPACE,CREATE TABLESPACE, andDROP TABLESPACE. It also includes DDL statements that affect tablespace contents:ALTER TABLE,CREATE INDEX,CREATE TABLE,DROP INDEX,DROP TABLE,LOCK TABLES,RENAME TABLE, andTRUNCATE TABLE. (WL #7957)-
For queries that combine
ORDER BYwithLIMIT, the optimizer may switch to an index that applies to theORDER 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. (WL #6986)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
start-error-numberlines inNsql/share/errmsg-utf8.txt, with each such line resetting the numbering toN. (WL #8206)-
Refactoring within the optimizer resulted in the following improvements to
EXPLAINoutput:Output that showed
ORDER BYfor implicitly grouped queries no longer does so.col_nameOutput for
INSERTstatements involving partition pruning now shows only the partitions actually used, not all partitions in the table.Output for
UPDATE,INSERT, orDELETEstatements no longer shows “Using join buffer” in cases when join buffering was not used.
In addition, for killed queries where the previously returned error was “Unknown error”, the error is now “Query execution was interrupted”. (WL #7870)
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
InnoDBandMyISAMtables.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.
For more information see ngram Full-Text Parser, and MeCab Full-Text Parser Plugin. (WL #6607)
-
The
pluginandserverstables in themysqlsystem database now areInnoDB(transactional) tables. Previously, these wereMyISAM(nontransactional) tables.In consequence of this change,
INSTALL PLUGINandUNINSTALL PLUGINare now included among the statements that cause an implicit commit (see Statements That Cause an Implicit Commit).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
mysqldatabase. (WL #7160) The new
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 passingSESSION_TRACK_GTIDSas thetypeargument to themysql_session_track_get_first()andmysql_session_track_get_next()functions. For more information, see Server Tracking of Client Session State. (WL #6128, WL #6972)
-
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 unknownFIL_PAGE_TYPEvalues are now reset toFIL_PAGE_TYPE_UNKNOWN.However, you may still encounter a failure when a non-index page that contains an invalid
FIL_PAGE_INDEXorFIL_PAGE_RTREEvalue in theFIL_PAGE_TYPEfield is written to disk. You can address the failure by modifying the data file to replace the invalidFIL_PAGE_TYPEvalues withFIL_PAGE_UNKNOWN. The error log message provides the tablespace ID and page number of the page with the invalidFIL_PAGE_TYPEvalue.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 bytes0x45 0xbf(FIL_PAGE_INDEX) or0x45 0xbe(FIL_PAGE_RTREE). Replace these bytes with0x00 0x0d(FIL_PAGE_UNKNOWN).If the page contains the strings
infimumandsupremumat byte offset 99 or 101 (75 or 77 bytes after the start of theFIL_PAGE_TYPE), the page could be an index page, and there may be actual corruption.WarningDo 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.
If
FIL_PAGE_TYPEis reset toFIL_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 aFIL_PAGE_TYPEfield in theInnoDBpage checksum that is still set to the previousFIL_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 theFIL_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)InnoDB: The
NAMEcolumn of theINFORMATION_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)
InnoDB: On
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 an.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 aFULLTEXTindex is stored in theCONFIGtablevaluecolumn which is defined as CHAR(50). An assertion was raised when the last optimized word was greater than 50 characters in length. TheCONFIGtablevaluecolumn is defined as CHAR(200) as of MySQL 5.6.24 and MySQL 5.7.6.If your
innodb_ft_max_token_sizesetting is greater than 50, it is recommended that you recreate existingInnoDBFULLTEXTindexes 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: The
innodb_optimize_point_storageoption and related internal data types (DATA_POINTandDATA_VAR_POINT) were removed. (Bug #20415831)InnoDB:
fts_optimize_thread()set a NULLexit_eventwhen the server started to shut down, and beforefts_optimize_threadwas started. (Bug #20389745)InnoDB: The memcached
process_arithmetic_commandraised an assertion. The wrong error code was returned for a nonexistentdecrkey. (Bug #20386835)InnoDB: The expiration time (
exptime) defined using the memcachedsetcommand 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)InnoDB: The
innobase_close_thdfunction and related wrapper functions and pointers were removed. The functions and pointers were introduced with theInnoDBmemcached 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)InnoDB: The
INFORMATION_SCHEMA.TABLESUPDATE_TIMEfield, enabled forInnoDBtables in MySQL 5.7.2, was not updated forXA COMMITof recovered transactions that were inXA PREPAREstate. (Bug #20303205)InnoDB: An incorrect expression was used in
/storage/innobase/trx/trx0trx.cc.trx->lock.rec_pool.empty()was used instead oftrx->lock.table_pool.empty(). (Bug #20294158, Bug #75373)InnoDB: In
/storage/innobase/handler/ha_innodb.cc, ava_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 fromib_logfile101toinnodb_redo_log. The new name aligns with other MySQL 5.7 internal tablespace names that use an “innodb_” prefix. (Bug #20204978)InnoDB: An
ALTER TABLE ... ADD INDEXoperation raised an assertion due to assertion code that did not allow an online index status ofONLINE_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)InnoDB: The
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)InnoDB: The
INNODB_METRICSadaptive_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.
InnoDB: The
commit_nodemember from thetab_node_tandind_node_tquery graph objects, used during table and index creation, were removed. Thecommit_nodemember was initialized but never used. UnusedTABLE_COMMIT_WORKandINDEX_COMMIT_WORKexecution steps were also removed. (Bug #20060218)InnoDB: An
ALTER TABLE ... RENAMEfailure on a table with aFULLTEXTindex raised an assertion. (Bug #20043707)InnoDB: A duplicate key error encountered during a
REPLACEoperation on a temporary table raised an assertion. (Bug #20040791)InnoDB: An
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)InnoDB:
ALTER TABLEfailed to check if the table is corrupted. AnALTER TABLEoperation that affectsInnoDBmetadata should be refused if the clustered index is corrupted or the table is marked as corrupted. AnALTER TABLEoperation should also be refused if the table is not rebuilt and a corrupted secondary index would remain after theALTER TABLEoperation. (Bug #20015132, Bug #74810)InnoDB: A row update operation raised an assertion in
row_upd_sec_index_entry(). Inrow_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)InnoDB: An
ALTER TABLEoperation on a table with aFULLTEXTindex raised an assertion. The table was already present in the cache and theFULLTEXTindexes were already initialized. When the table was reloaded, theFULLTEXTindexes were initialized again, causing the assertion. (Bug #19978288)InnoDB: An
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: Error messages regarding a size limitation on
BLOBorTEXTdata inserted in a single transaction were revised. (Bug #19975322)InnoDB: Server logs reported a vector subscript out of range error. (Bug #19955501)
InnoDB:
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 afil_space_tpointer instead of a numeric tablespace identifier.The
fil_extend_space_to_desired_sizefunction was renamed tofil_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.
(Bug #19949683)
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)
-
InnoDB: An
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
DBUG_RETURN()inha_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)InnoDB: An
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)InnoDB: Some
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: The
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 theInnoDBsource 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 toROW_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)InnoDB: A
FLUSH TABLESoperation raised an assertion. (Bug #19803418)InnoDB: The
dict_boot()function did not set the maximum length of columns used for index fields, resulting indict_index_node_ptr_max_size()returning incorrect values. (Bug #19791849)InnoDB: When dummy tables are created, the
autoinc_mutexmember of the of thedict_table_tobject was created unnecessarily. Similarly, thezip_pad.mutexobject ofdict_index_tobject was created unnecessarily for dummy indexes. To avoid unnecessary mutex contention,autoinc_mutexandzip_pad.mutexobjects are now allocated and initialized on the first lock attempt. (Bug #19788198, Bug #73361)-
InnoDB:
log_sys->mutexwas not held when reading thefil_space_t::max_lsnfield, causing a race condition. (Bug #19729855)References: This issue is a regression of: Bug #18645050.
InnoDB:
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)InnoDB:
InnoDBperformed unnecessary table lookups in the change buffer during tablespace export operations. (Bug #19724300)InnoDB: The
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 infil_io()that returnsDB_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 fromha_innobase::create(). Redundant conditional branching and an unused local variable were removed fromha_innobase::delete_table(). (Bug #19712822)InnoDB: Unused code related to UTF-8 handling for
InnoDBFULLTEXTindexes was removed. (Bug #19712059)InnoDB: The
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 todict_drop_index_tree(). (Bug #19710798)InnoDB: The
InnoDBchange buffer tree, which was created inside theInnoDBdata dictionary cache unnecessarily, is now created directly, bypassing the cache. This patch also removes theDICT_UNIVERSALflag, which was set in connection withDICT_IBUF. Neither of the flags is used for persistent data structures, which makesDICT_UNIVERSALunnecessary. (Bug #19710650)InnoDB: The
fil_space_t::tablespace_versionfield, introduced to keep track ofALTER TABLE...DISCARD TABLESPACEfollowed byALTER TABLE IMPORT TABLESPACEoperations, was removed. Thetablespace_versionfield ensured that a change buffer merge would not occur for old buffered entries while a tablespace with the samespace_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 quotingFOREIGN KEYconstraints and column names inSHOW 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 asTEMP_INDEX_PREFIX).TEMP_INDEX_PREFIXwas also used in theInnoDBdata dictionary cache, resulting in complications when displaying or comparing index names. To address this problem, a newdict_index_t::uncommittedflag was introduced along with accessor methodsis_committed()andset_committed(). Before this change, someInnoDBINFORMATION_SCHEMAtables displayed uncommitted index names with a preceding question mark. The question mark prefix is now omitted. (Bug #19702328)InnoDB:
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)InnoDB: For
FULLTEXTindexes, a lookup for theFTS_DOC_ID_INDEXwas performed during DML operations. To avoid the costly lookups, a pointer toFTS_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 theCREATE 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)InnoDB: An
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 thelog_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((const))orattribute((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 theattribute((const))orattribute((pure))code.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)InnoDB: The
modify_clockvalue is now stored to allow thebuf_page_optimistic_get()function, used to get optimistic access to a database page, to succeed in most cases. An unnecessaryPAGE_HEAP_TOP(record heap top pointer) andFIL_PAGE_TYPE(file page type) set was removed frombtr0bulk.cc. (Bug #19611367)InnoDB: The
dict_set_corrupted()function attempted to update the clustered index of theSYS_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.handapi0api.ccsource files. (Bug #19579149)InnoDB: The
DICT_TF2_USE_FILE_PER_TABLEflag should be tested by thedict_table_use_file_per_tablefunction to verify that the table uses a file-per-table tablespace. (Bug #19578222)InnoDB: With
innodb_create_intrinsicenabled, temporary tables created duringALTER TABLEoperations were marked as optimized temporary tables, resulting in an assertion. Enablinginnodb_create_intrinsicshould only affectCREATE TABLEandCREATE 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)
InnoDB: An
INSERToperation on a spatial index resulted in a crash insplit_rtree_node(). Thembr_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::info,ib::warn,ib::error, andib::fatal). (Bug #19495721)InnoDB: The
InnoDBdata dictionary was not updated when aALTER TABLE ... CHANGE COLUMNoperation changed the case of the column name. (Bug #19465984)InnoDB:
InnoDBreturned a table not found error for a missing tablespace file. (Bug #19419026)InnoDB:
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 theCREATE INDEXbulk insert enhancement introduced in MySQL 5.7.5. (Bug #19316315, Bug #19308426)InnoDB: On non-Windows platforms,
os-file_preadandos_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)InnoDB: The
fil_inc_pending_ops()andfil_decr_pending_ops()functions have been replaced byfil_space_acquire()andfil_space_release(). This change removes a space ID lookup. The new functions are implemented inbuf_load(),fsp_get_available_space_in_free_extents(), andlock_rec_block_validate(), which is a debug function. The patch for this bug also removedfil_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)InnoDB: A
CREATE TABLEoperation failed with a table is full error when running a MySQL server withinnodb_flush_method=O_DIRECTon a Linux system with an ext3 file system. The error was due to an internalposix_fallocate()failure that occurs whenO_DIRECTis specified. To allow the file operation to proceed, the internalposix_fallocate()failure now prints an error message to the error log. (Bug #18903979)-
InnoDB: As part of a cleanup of
InnoDBINSERTcode paths, assertion code was added toha_innobase::end_stmt()and other places at the start of DDL. Debug code was added torow_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 theInnoDBinternal 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 aDROP TABLEoperation, and theInnoDBMonitor encountered an assertion inbuf_page_get_gen. (Bug #18062698, Bug #71343, Bug #18173184, Bug #68116)InnoDB: A
CREATE TABLEoperation that failed wheninnodb_strict_modewas enabled succeeded without printing a warning wheninnodb_strict_modewas disabled. (Bug #17852083)InnoDB:
buf_LRU_free_page()would callbuf_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 inrw_lock_free_func(). (Bug #13364876, Bug #62692, Bug #18870970, Bug #72809)InnoDB: A memcached
appendoperation on anINTcolumn caused a segmentation fault.appendoperations onINTcolumns are not supported and are now blocked. (Bug #75200, Bug #20209756)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 anALTER TABLEthat usesALGORITHM=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 byKEY; instead, you must use a copyingALTER TABLEto perform the change. (Bug #17896265)Replication: The locking behavior of replication administration statements has changed to make
SHOW SLAVE STATUSmore concurrent. This makes theNONBLOCKINGclause redundant forSHOW SLAVE STATUSand it has been removed, along with theCom_show_slave_status_nonblockingstatus variable. (Bug #20593028)Replication: When
enforce_gtid_consistencywas set toWARN, 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, aPrevious_gtidslog event is added to every log. This fix ensures that aPrevious_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, executingSHOW 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,START SLAVEorSTOP SLAVEresulted in a crash. This has now been fixed and the multithreaded slave can be restarted in a multi-source replication setup. (Bug #19784641)Replication: The
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 forREPLICATE_DO_TABLE,REPLICATE_IGNORE_TABLE,REPLICATE_WILD_DO_TABLE, orREPLICATE_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, usingexpire_logs_daysto purge binary logs caused a restart to crash the server. This problem arose after the fix for Bug #17283409. The fix ensures thatcurrent_thdis checked before callingDEBUG_SYNC(). (Bug #19553099)Replication: When using a multithreaded slave, the slave receiver (SQL) thread stopped with an
ER_MTS_CANT_PARALLELerror when issuing aLOAD DATAstatement 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 handlingDELETE_FILEevents. The fix ensures that a multithreaded slave handlesDELETE_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
ROTATE_EVENTandFORMAT_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 ifMASTER_AUTO_POSITIONis enabled, then the worker rolls back the partial group, finishes its work, and then applies the new complete copy of the group. IfMASTER_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 oneRows_log_eventin succession caused a crash. This was due to the temporary tables generated as part of theslave_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'sserver_idand not the slave'sserver_id,the previous events were not being skipped correctly. This fix ensures that the events inPrevious_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, setslave_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 theBINLOGstatement 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 ingtid_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 togtid_executedin the same commit order without gaps. (Bug #74328, Bug #19982543)Replication: When
gtid_mode=ONandlog-bin=OFF, committed transaction GTIDs are added to themysql.gtid_executedtable. In such a configuration, the committed transaction GTID was not being correctly added togtid_purgeduntil the next time the server was restarted. The fix ensures that committed transaction's GTIDs are added togtid_purgedat the time of commit. (Bug #74279, Bug #19781336)-
Replication: In a replication topology where:
the slave had
GTID_MODE=ONandMASTER_AUTO_POSITION=1the 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 theMASTER_POS_WAITfunction would never finish, or would time out. This was caused because after a server restart, the master's binary log ends with aPrevious_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 thePrevious_gtidslog event is replicated correctly, so that the slave becomes aware of the correct binary log position on the master, ensuring that theMASTER_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 becauseRelay_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'sRelay_Master_Log_FileandRelay_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 ofgtid_executedandgtid_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'sgtid_executedandgtid_retreivedset did not contain the master'sgtid_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 aPrevious_gtidslog event not being correctly filtered in such a setup and reaching the worker thread. The fix ensures thatPrevious_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 aRESET MASTERstatement was issued on the slave to clean up itsgtid_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'sgtid_executedset, and it now only adds a GTID to theRetrieved_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 byPrevious_gtidslog events being written to the slave's relay log with a timestamp behind the master, and then being used to calculate theSeconds_Behind_Master. This fix ensures that events generated on the slave that are added to the relay log and are not used when calculatingSeconds_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
utf8arguments forRPAD()could overflow and cause a server exit. (Bug #20316028)mysqltest had a memory leak if another process shut down the server. (Bug #20221262)
The
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)mysql_list_fields()andmysql_stmt_prepare()could leak memory. This problem was introduced in MySQL 5.7.5 as a result of the change to EOF packet handling. (Bug #20065461, Bug #20065517)Some queries with argumentless functions,
GROUP BY, andWITH ROLLUPcaused an assertion to be raised. (Bug #20034943)A user with a name of
event_schedulercould view the Event Scheduler process list without thePROCESSprivilege. (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 theinnodb_checksum_algorithmsystem variable was modified during the operation. (Bug #19931177)The
LIKEoperator could produce unreliable results of theESCAPEclause contained an expression that was constant at execution time but unknown prior to that. (Bug #19931126)Execution of certain
BINLOGstatements while temporary tables were open byHANDLERstatements could cause a server exit. (Bug #19894987, Bug #20449914)A malformed
mysql.proctable row could result in a server exit forDROP DATABASEof the database associated with theprocrow. (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 semijoin 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 fortransaction_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)RPM and DEB packages set the default
sql_modevalue incorrectly (they did not setONLY_FULL_GROUP_BY, which is now included in the default value). (Bug #19766800)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 formcol_name=expr,(. Now it handles the latter as well. (Bug #19687724)col_name, ...) = (col_name, ...)Certain
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)lock_name, -1)If a DML statement containing a subquery caused a deadlock inside
InnoDB,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 insideInnoDB. (Bug #19670163)With
default_authentication_pluginset tosha256_password, password hashes written to the binary log were in the wrong format. (Bug #19660998)GROUP BYorORDER BYon aCHAR(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 theevents_waits_currentPerformance Schema table. (Bug #19658933)ST_AsGeoJson()could fail when given an illegalmax_dec_digitsoroptionsargument. (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 ofCREATE 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 semijoin 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 semijoin 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 aER_GIS_INVALID_DATAerror instead. (Bug #19584716)CMake configuration was adjusted to handle new warnings reported by Clang 3.5, using the
-Wpointer-bool-conversionand-Wundefined-bool-conversioncompiler options. (Bug #19584183)If a
CREATE TABLEorALTER TABLEpartitioning statement was executed in strict SQL mode and anER_WRONG_TYPE_COLUMN_VALUE_ERRORerror occurred, thesql_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)
Illegal
CREATE TABLEstatements could fail to create the table (as expected), but still generate table statistics in the Performance Schema. (Bug #19535945)Setting
session_track_system_variablestoNULLcould 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)
A
UNIONstatement for which the first query block returned aPOINTcolumn and the second returned a geometric column with a non-POINTvalue failed if the query usedInnoDBtemporary tables or stored the result in anInnoDBtable. (Bug #19471564)An assertion could be raised for queries evaluated using a semijoin LooseScan if an index scan was used on one index and a range scan on another index. (Bug #19465034)
In strict SQL mode, some
SELECTstatements could execute differently within and without stored procedures. (Bug #19418619)-
If the
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)
With the
validate_passwordplugin activated and dictionary lookups enabled, passing a user-defined variable toPASSWORD()could cause a server exit. (Bug #19388163)Statements that used Geohash spatial functions could not be prepared. (Bug #19383904)
-
The XPath
number()function failed when invoked with no argument. Now MySQL treatsnumber()as if it had been invoked for the current context node (in other words, as ifnumber(.)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)
Certain
GRANT PROXYstatements affected only in-memory privileges and were reverted byFLUSH PRIVILEGESor a server restart. (Bug #19309652)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)
Previously,
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 theREFERENCESprivileges for the parent table to create a foreign key. (Bug #18790730, Bug #11746917)The server could exit due to an optimizer failure to allocate enough memory for resolving outer references. (Bug #18782905, Bug #19892803)
The
mysql_session_track_get_first()andmysql_session_track_get_next()C API functions could cause a client crash if passed invalid arguments. (Bug #18769620)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)Copying
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)The
validate_passwordplugin did not properly enforce password constraints for accounts authenticated by thesha256_passwordauthentication plugin. (Bug #18140348)For
UPDATEandDELETEstatements, the server could exit after attempting to access an uninitialized data structure. (Bug #18036143)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)
FLUSH TABLESon aFEDERATEDtable failed if the table had been idle longer than thewait_timeouttime plus the TCP keepalive time. (Bug #17599258)For
FEDERATEDtables,IGNOREhandling forDELETE 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)Creating a
FEDERATEDtable with anAUTO_INCREMENTcolumn using aLIKEclause 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
rootpassword to$HOME/.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)
For JSON-format
EXPLAINoutput, thefilteredvalue 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
LIMIT,EXPLAINcould indicate that execution would be done usingfilesort, 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)
A bulk
INSERTfollowed by other statements followed byLOAD DATAcould produce incorrectAUTO_INCREMENTvalues. (Bug #75068, Bug #20126635)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)
Enabling the
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)
For subqueries that used
GET_LOCK()orRELEASE_LOCK()in decimal context, the server could create ill-defined temporary tables, resulting in a raised assertion. (Bug #74859, Bug #20031761)default_password_lifetimewas markedvolatile, 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 frommysqld.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)
For the
table_io_waits_summary_by_tablePerformance Schema table, there was an off-by-one error for theCOUNT_FETCHandCOUNT_READvalues. (Bug #74379, Bug #19814559)Depending on contents, geometry collection objects were not properly destroyed, resulting in a memory leak. (Bug #74371, Bug #19813931)
Using
(withrow subquery1) NOT IN (row subquery2)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 aNULLvalue 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.handhandler.ccfiles that are never called or referenced were removed. (Bug #74207, Bug #19729286)The
-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 themysqldatabase, mysql_install_db became much slower for loading the help-table content. This was due to theINSERTstatements 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)The
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-tableUPDATE, queries involving longPRIMARY KEYvalues, and queries involvingDISTINCT 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
Sun DtoOracle D, causing detection of DTrace availability to fail during MySQL configuration. (Bug #73826, Bug #19586917)DROP DATABASEfailed if the database directory contained.cfgfiles (such as created byFLUSH TABLES FOR EXPORT). (Bug #73820, Bug #19573998)On 32-bit systems,
GLength()returned a non-INF value forLineStringvalues 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 underlyinglibmysqlclientlibrary. The output now refers directly tolibmysqlclient. (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)
A server warning error message referred to the obsolete
table_cachesystem variable rather than totable_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 anINSERTstatement on the table for which the column value was not specified, the server producedERROR 1048 "Column cannot be null"rather thanWarning 1364 "Field doesn't have a default value"if there was aBEFOREtrigger with an action type different fromON INSERT. (Bug #73207, Bug #19182009)The
IS_FREE_LOCK()andIS_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 theperformance_schemadatabase returned an access-denied error, rather than an empty result as is done forINFORMATION_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 aWHEREclause. (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)The
ENABLED_LOCAL_INFILECMake option was (incorrectly) 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)
For
FEDERATEDtables,DELETE FROMstatements were sent to the remote server astbl_nameTRUNCATE TABLEstatements, with possible side effects on transaction handling andtbl_nameAUTO_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)