MySQL Changelog

What's new in MySQL 8.0.34

Jul 19, 2023
  • Account Management Notes:
  • A new password-validation system variable now permits the configuration and enforcement of a minimum number of characters that users must change when attempting to replace their own MySQL account passwords. This new verification setting is a percentage of the total characters in the current password. For example, if validate_password.changed_characters_percentage has a value of 50, at least half of the characters in the replacement account password must not be present in the current password, or the password is rejected.
  • This new capability is one several that provide DBAs more complete control over password management. For more information, see Password Management. (WL #15751)
  • Audit Log Notes:
  • In MySQL 8.0.33, the audit_log plugin added support for choosing which database to use to store JSON filter tables. It is now possible to specify an alternative to the default system database, mysql, when run the plugin installation script. Use the audit_log_database server system variable (or -D database_name) on the command line together with the alternative database name, for example:
  • $> mysql -u root -D database_name -p < audit_log_filter_linux_install.sql
  • For additional information about using audit_log plugin installation scripts, see Installing or Uninstalling MySQL Enterprise Audit. (Bug #35252268)
  • MySQL Enterprise Audit now supports using the scheduler component to configure and execute a recurring task to flush the in-memory cache. For setup instructions, see Enabling the Audit Log Flush Task. (WL #15567)
  • Binary Logging:
  • Several functions now are added to the libmysqlclient.so shared library that enable developers to access a MySQL server binary log: mysql_binlog_open(), mysql_binlog_fetch(), and mysql_binlog_close().
  • Our thanks to Yura Sorokin for the contribution. (Bug #110658, Bug #35282154)
  • C API Notes:
  • In the calling function, len is initialized to 0 and never changed if net->vio is null. This fix adds a check of net before dereferencing vio.
  • Our thanks to Meta for the contribution. (Bug #30809590)
  • A variable in the async client was uninitialized in certain code paths. It is fixed by always initializing the variable.
  • Our thanks to Meta for the contribution. (Bug #30809590)
  • Compilation Notes:
  • Microsoft Windows: For Windows, improved MSVC_CPPCHECK support; and check for MSVC warnings similar to "maintainer" mode. For example, check after all third party configurations are complete. (Bug #35283401)
  • References: See also: Bug #34828882.
  • Microsoft Windows: For Windows builds, improved WIN_DEBUG_NO_INLINE=1 support; usage would exceed the library limit of 65535 objects. (Bug #35259704)
  • Upgraded the bundled robin-hood-hashing from v3.8.1 to v3.11.5. (Bug #35448980)
  • Removed the unused extra/libcbor/doc/ directory as extra/libcbor/doc/source/requirements.txt inspired bogus pull requests on GitHub. (Bug #35433370)
  • Updated the bundled ICU files from version 69.1 to version 73 for the icu-data-files package. (Bug #35353708)
  • ZSTD sources bundled in the source tree were upgraded to ZSTD 1.5.5 from 1.5.0. (Bug #35353698)
  • Initialize the internal MEM_ROOT class memory with garbage using the TRASH macro to make easier to reproduce bugs caused by reading initialized memory allocated from MEM_ROOT. (Bug #35277644)
  • We now determine stack direction at runtime rather than at configure time. (Bug #35181008)
  • Added the OPTIMIZE_SANITIZER_BUILDS CMake option that adds -O1 -fno-inline to sanitizer builds. It defaults to ON. (Bug #35158758)
  • Changed the minimum Bison version requirement from v2.1 to v3.0.4. For macOS, this may require installing Bison via a package manager such as Homebrew. (Bug #35154645, Bug #35191333)
  • MySQL now sets LANG=C in the environment when executing readelf to avoid problems with non-ASCII output.
  • Our thanks to Kento Takeuchi for the contribution. (Bug #111190, Bug #35442825)
  • On macOS, MySQL would not compile if rapidjson was installed via Homebrew. The workaround was to brew unlink rapidjson. (Bug #110736, Bug #35311140)
  • References: This issue is a regression of: Bug #35006191.
  • MySQL would not build with -DWITH_ZLIB=system; it'd complain about not finding the system zlib library despite finding it. (Bug #110727, Bug #110745, Bug #35307674, Bug #35312227)
  • Deprecation and Removal Notes:
  • Important Change: Since MySQL provides other means of performing database dumps and backups with the same or additional functionality, including mysqldump and MySQL Shell Utilities, the mysqlpump client utility program has become redundant, and is now deprecated. Invocation of this program now produces a warning. You should keep in mind that mysqlpump is subject to removal in a future version of MySQL, and move applications depending on it to another solution, such as those mentioned previously. (WL #15652)
  • Replication: The sync_relay_log_info server system variable is deprecated in this release, and getting or setting this variable or its equivalent startup option --sync-relay-log-info now raises a warning.
  • Expect this variable to be removed in a future version of MySQL; applications which make use of it should be rewritten not to depend on it before this happens. (Bug #35367005, WL #13968)
  • Replication: The binlog_format server system variable is now deprecated, and subject to removal in a future version of MySQL. The functionality associated with this variable, that of changing the binary logging format, is also deprecated.
  • The implication of this change is that, when binlog_format is removed, only row-based binary logging, already the default in MySQL 8.0, will be supported by the MySQL server. For this reason, new installations should use only row-based binary logging, and existing ones using the statement-based or mixed logging format should be migrated to the row-based format. See Replication Formats, for more information.
  • The system variables log_bin_trust_function_creators and log_statements_unsafe_for_binlog, being useful only in the context of statement-based logging, are now also deprecated, and are thus also subject to removal in a future release of MySQL.
  • Setting or selecting the values of any of the variables just mentioned now raises a warning. (WL #13966, WL #15669)
  • Group Replication: The group_replication_recovery_complete_at server system variable is now deprecated, and setting it produces a warning. You should expect its removal in a future release of MySQL. (WL #15460)
  • The mysql_native_password authentication plugin now is deprecated and subject to removal in a future version of MySQL. CREATE USER, ALTER USER, and SET PASSWORD operations now insert a deprecation warning into the server error log if an account attempts to authenticate using mysql_native_password as an authentication method. (Bug #35336317)
  • Previously, if the audit_log plugin was installed without the accompanying audit tables and functions needed for rule-based filtering, the plugin operated in legacy filtering mode. Now, legacy filtering mode is deprecated. New deprecation warnings are emitted for legacy audit log filtering system variables. These deprecated variables are either read-only or dynamic.
  • (Read-only) audit_log_policy now writes a warning message to the MySQL server error log during server startup when the value is not ALL (default value).
  • (Dynamic) audit_log_include_accounts, audit_log_exclude_accounts, audit_log_statement_policy, and audit_log_connection_policy. Dynamic variables print a warning message based on usage:
  • Passing in a non-NULL value to audit_log_include_accounts or audit_log_exclude_accounts during MySQL server startup now writes a warning message to the server error log.
  • Passing in a non-default value to audit_log_statement_policy or audit_log_connection_policy during MySQL server startup now writes a warning message to the server error log. ALL is the default value for both variables.
  • Changing an existing value using SET syntax during a MySQL client session now writes a warning message to the client log.
  • Persisting a variable using SET PERSIST syntax during a MySQL client session now writes a warning message to the client log.
  • MySQL enables control of FIPS mode on the server side and the client side using a system variable and client option. Application programs can use the MYSQL_OPT_SSL_FIPS_MODE option to mysql_options() to enable FIPS mode on the client. Alternatively, it is possible to handle FIPS mode directly through OpenSSL configuration files rather than using the current server-side system variable and client-side options. When MySQL is compiled using OpenSSL 3.0, and an OpenSSL library and FIPS Object Module are available at runtime, the server reads the OpenSSL configuration file and respects the preference to use a FIPS provider, if one is set. OpenSSL 3.0 is certified for use with FIPS.
  • To favor the OpenSSL alternative, the ssl_fips_mode server system variable, --ssl-fips-mode client option, and the MYSQL_OPT_SSL_FIPS_MODE option now are deprecated and subject to removal in a future version of MySQL. A deprecation warning prints to standard error output when an application uses the MYSQL_OPT_SSL_FIPS_MODE option or when a client user specifies the --ssl-fips-mode option on the command line, through option files, or both.
  • Prior to being deprecated, the ssl_fips_mode server-side system variable was dynamically settable. It is now a read-only variable (accepts SET PERSIST_ONLY, but not SET PERSIST or SET GLOBAL). When specified on the command line or in the mysqld-auto.cnf option file (with SET PERSIST_ONLY) a deprecation warning prints to the server error log. (WL #15631)
  • The mysql_ssl_rsa_setup program originally provided a simple way for community users to generate certificates manually, if OpenSSL was installed on the system. Now, mysql_ssl_rsa_setup is deprecated because MySQL Community Edition no longer supports using yaSSL as the SSL library, and source distributions no longer include yaSSL. Instead, use MySQL server to generate missing SSL and RSA files automatically at startup (see Automatic SSL and RSA File Generation). (WL #15668)
  • The keyring_file and keyring_encrypted_file plugins now are deprecated. These keyring plugins are superseded by the component_keyring_file and component_keyring_encrypted_file components. For a concise comparison of keyring components and plugins, see Keyring Components Versus Keyring Plugins. (WL #15659)
  • Previously, the MySQL server processed a version-specific comment without regard as to whether any whitespace followed the MySQL version number contained within it. For example, the comments /*!80034KEY_BLOCK_SIZE=1024*/ and /*!80034 KEY_BLOCK_SIZE=1024*/ were handled identically. Beginning with this release, when the next character following the version number in such a comment is neither a whitespace character nor the end of the comment, the server issues a warning: Immediately starting the version comment after the version number is deprecated and may change behavior in a future release. Please insert a whitespace character after the version number.
  • You should expect the whitespace requirement for version-specific comments to become strictly enforced in a future version of MySQL.
  • The MySQL client library currently supports performing an automatic reconnection to the server if it finds that the connection is down and an application attempts to send a statement to the server to be executed. Now, this feature is deprecated and subject to removal in a future release of MySQL.
  • The related MYSQL_OPT_RECONNECT option is still available but it is also deprecated. C API functions mysql_get_option() and mysql_options() now write a deprecation warning to the standard error output when an application specifies MYSQL_OPT_RECONNECT. (WL #15766)
  • IPv6 Support:
  • NDB Cluster: NDB did not start if IPv6 support was not enabled on the host, even when no nodes in the cluster used any IPv6 addresses. (Bug #106485, Bug #33324817, Bug #33870642, WL #15561)
  • Performance Schema Notes:
  • The type used for the Performance Schema clone_status table's gtid_executed column has been changed from VARCHAR(4096) to LONGTEXT. (Bug #109171, Bug #34828542)
  • SQL Syntax Notes:
  • CURRENT_USER() can now be used as a default value for VARCHAR and TEXT columns in CREATE TABLE and ALTER TABLE ... ADD COLUMN statements.
  • When used in this way, these functions are also included in the output of SHOW CREATE TABLE and SHOW COLUMNS, and referenced in the COLUMN_DEFAULT column of the Information Schema COLUMNS table where applicable.
  • If you need to insure that values having the maximum possible length can be stored in such a column, you should make sure that the column can accommodate at least 288 characters (255 for the user name and 32 for the host name, plus 1 for the separator @). For this reason—while it is possible to use one of these functions as the default for a CHAR column, it is not recommended due to the risk of errors or truncation of values. (Bug #17809, Bug #11745618)
  • Functionality Added or Changed:
  • Important Change: For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated from OpenSSL 1.1.1 to OpenSSL 3.0. The exact version is now 3.0.9. More information on changes from 1.1.1 to 3.0 can be found at https://www.openssl.org/docs/man3.0/man7/migration_guide.html. (Bug #35475140, WL #15614)
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 8.1.1. (Bug #35329529)
  • Bugs Fixed:
  • Important Change: The default value of the connection_memory_chunk_size server system variable, when introduced in MySQL 8.0.28, was mistakenly set at 8912. This fix changes the default to 8192, which is the value originally intended. (Bug #35218020)
  • NDB Cluster: The fix for a previous issue introduced a slight possibility of unequal string values comparing as equal, if any Unicode 9.0 collations were in use, and the collation hash methods calculated identical hash keys for two unequal strings. (Bug #35168702)
  • References: See also: Bug #27522732. This issue is a regression of: Bug #30884622.
  • InnoDB: Possible congestion due to purging a large number of system threads has been fixed. (Bug #35289390, Bug #110685)
  • InnoDB: ddl::Aligned_buffer now uses the standard memory allocator and not kernel memory management. (Bug #35194732, Bug #110411)
  • InnoDB: An upgrade from MySQL 5.7 to MySQL 8.0.32 might fail due to deprecated configuration parameters innodb_log_file_size or innodb_log_files_in_group. The workaround is to start MySQL 8.0.32 with --innodb-redo-log-capacity=206158430208. (Bug #35155280)
  • InnoDB: The rules for aggregating entries in the redo log have been fixed. (Bug #34752625, Bug #108944)
  • InnoDB: Several errors due to tablespace deletion and the buffer pool have been fixed. (Bug #34330475, Bug #107689)
  • Packaging; Group Replication: The group replication plugin from the Generic Linux packages did not load on some platforms that lacked a compatible version of tirpc. (Bug #35323208)
  • Replication: Changes in session_track_gtids were not always propagated correctly. (Bug #35401212)
  • Replication: By design, all DDL operations (including binary log operations such as purging the binary log) acquire a shared lock on the BACKUP_LOCK object, which helps to prevent simultaneous backup and DDL operations. For binary log operations, we checked whether any locks existed on BACKUP_LOCK but did not check the types of any such locks. This caused problems due to the fact that binary log operations should be prevented only when an exclusive lock is held on the BACKUP_LOCK object, that is, only when a backup is actually in progress, and backups should be prevented when purging the binary log.
  • Now in such cases, instead of checking for locks held on the BACKUP_LOCK object, we acquire a shared lock on BACKUP_LOCK while purging the binary log. (Bug #35342521)
  • Replication: In all cases except one, when mysqlbinlog encountered an error while reading an event, it wrote an error message and returned a nonzero exit code, the exception being for the active binary log file (or any binary log where the format_description_log_event had the LOG_EVENT_BINLOG_IN_USE_F flag set), in which case it did not write a message, and returned exit code 0, thus hiding the error.
  • Now mysqlbinlog suppresses only those errors which are related to truncated events, and when doing so, prints a comment rather than an error message. This fix also improves the help text for the --force-if-open option. (Bug #35083373)
  • Replication: Compressed binary log event handling was improved. (Bug #33666652)
  • Replication: A transaction consisting of events each smaller than 1 GiB, but whose total size was larger than 1 GiB, and where compression did not make it smaller than 1 GiB, was still written to the binary log as one event bigger than 1 GiB. This made the binary log unusable; in effect, it was corrupted since neither the server nor other tools such as mysqlbinlog could read it.
  • Now, when the compressed data grows larger than 1 GiB, we fall back to processing the transaction without any compression. (Bug #33588473)
  • Group Replication: In a group replication setup, when there was a source of transactions other than the applier channel, the following sequence of events was possible:
  • Several transactions being applied locally were already certified, and so were associated with a ticket, which we refer to as Ticket 2, but had not yet been committed. These could be local or nonlocal transactions.
  • A view is created with Ticket 3, and must wait on transactions from Ticket 2.
  • The view change (VC1) entered the GR applier channel applier and waited for the ticket to change to 3.
  • Another group change, and another view change (VC2), occurred while the transactions from Ticket 2 were still completing.
  • This gave rise to the following issue: There was a window wherein the last transaction from Ticket 2 had already marked itself as being executed but had not yet popped the ticket; VC2 popped the ticket instead but never notified any of the participants. This meant that VC1 continued to wait indefinitely for the ticket to change, and with the additional effect that the worker could not be killed.
  • We fix this by checking for the need to break each second so that this loop is responsive to changes in the loop condition; we also register a new stage, so that the loop is more responsive to kill signals. (Bug #35392640)
  • References: See also: Bug #35206392, Bug #35374425.
  • Group Replication: Removed a memory leak discovered in Network_provider_manager::open_xcom_connection(). (Bug #34991101)
  • Group Replication: When a group action was sent to the group and the connection was killed on the coordinator, group members were in different states, with members which received the coordinated action waiting for the member that executed it, and the member which started execution having nothing to process, which caused problems with coordination of the group.
  • Now in such cases, we prevent this issue from occurring by causing group actions to wait until all members have completed the action. (Bug #34815537)
  • Group Replication: Cleanup of resources used by OpenSSL connections created indirectly by group replication was not carried out as expected at all times. We fix this by adding cleanup functionality that can be called at any time such connections are created by group replication. (Bug #34727136)
  • JSON: When the result of JSON_VALUE() was an empty string and was assigned to a user variable, the user variable could in some cases be set to NULL instead
  • With this fix, the query just shown now returns (1, 0), as expected. (Bug #35206138)
  • JSON: Some JSON schemas were not always processed correctly by JSON_SCHEMA_VALID(). (Bug #109296, Bug #34867398)
  • In rare cases, MySQL server could exit rather than emit an error message as expected. (Bug #35442407)
  • The internal resource-group enhancement added in MySQL 8.0.31 and refactored in MySQL 8.0.32 is now reverted. (Bug #35434219)
  • References: Reverted patches: Bug #34702833.
  • An in-place upgrade from MySQL 5.7 to MySQL 8.0, without a server restart, could result in unexpected errors when executing queries on tables. This fix eliminates the need to restart the server between the upgrade and queries. (Bug #35410528)
  • A fix in MySQL 8.0.33 made a change for ORDER BY items already resolved so as not to resolve them again (as is usually the case when a derived table is merged), but this did not handle the case in which an ORDER BY item was itself a reference. (Bug #35410465)
  • References: This issue is a regression of: Bug #34890862.
  • Changes in session_track_gtids were not always handled correctly. (Bug #35401212)
  • Some pointers were not always released following statement execution. (Bug #35395965)
  • Some instances of subqueries within stored routines were not always handled correctly. (Bug #35377192)
  • Fortified parsing of the network packet data sent by the server to the client. (Bug #35374491)
  • Encryption enhancements now strengthen compliance and remove the use of deprecated APIs. (Bug #35339886)
  • When a column reference given by table name and column name was looked up in the function find_item_in_list(), we ignored that the item searched for might not have a table name, as it was not yet resolved. We fix this by making an explicit check for a null table name in the sought-after item. (Bug #35338776)
  • Deprecated the lz4_decompress and zlib_decompress command-line utilities that exist to support the deprecated mysqlpump command-line utility. (Bug #35328235)
  • Queries using LIKE '%...%' ran more poorly than in previous versions of MySQL. (Bug #35296563)
  • In Bounded_queue::push(), when Key_generator::make_sortkey() returns UINT_MAX (error), then no key has been produced; now when this occurs, we no longer update the internal queue.
  • As part of this fix, push() now returns true on error. (Bug #35237721)
  • The authentication_oci plugin is fixed to allow federated and provisioned users to connect to a DB System as a mapped Proxy User using an ephemeral key-pair generated through the OCI CLI. (Bug #35232697)
  • Some queries using common table expressions were not always processed correctly. (Bug #35231475)
  • The internal function compare_pair_for_nulls() did not always set an explicit return value. (Bug #35217471)
  • Removed the clang-tidy checks that clash with the MySQL coding style. (Bug #35208735)
  • Some subqueries using EXISTS in both the inner and outer parts of the query were not handled correctly. (Bug #35201901)
  • Rotated audit log files now always reset the ID value of the bookmark to zero, rather than continuing the value from the previous file. (Bug #35200070)
  • Errors were not always propagated correctly when evaluating items to be sorted by filesort. (Bug #35195181)
  • References: See also: Bug #35145246.
  • The fix for a previous issue with ROLLUP led to a premature server exit in debug builds. (Bug #35168639)
  • References: This issue is a regression of: Bug #33830659.
  • Simplified the implementation of Item_func_make_set::val_str() to make sure that we never try to reuse any of the input arguments, always using the local string buffer instead. (Bug #35154335, Bug #35158340)
  • When transforming subqueries to a join with derived tables, with the containing query being grouped, we created an extra derived table in which to do the grouping. This process moved the initial select list items from the containing query into the extra derived table, replacing all of the original select list items (other than subqueries, which get their own derived tables) with columns from the extra derived table.
  • This logic did not handle DEFAULT correctly due to the manner in which default values were modelled internally. This fix adds support for DEFAULT(expression) in queries undergoing the transform previously mentioned. This fix also solves an issue with item names in metadata whereby two occurrences of the same column in the select list were given the same item name as a result of this same transform. (Bug #35150085, Bug #35101169)
  • A query of the form SELECT * FROM t1 WHERE (SELECT a FROM t2 WHERE t2.a=t1.a + ABS(t2.b)) > 0 should be rejected with Subquery returns more than 1 row, but when the subquery_to_derived optimization was enabled, the transform was erroneously applied and the query returned an incorrect result. (Bug #35101630)
  • Handling of certain potentially conflicting GRANT statements has been improved. (Bug #35089304)
  • A query using both MEMBER OF() and ORDER BY DESC returned only a partial result set following the creation of a multi-valued index on a JSON column. This is similar to an issue fixed in MySQL 8.0.30, but with the addition of the ORDER BY DESC clause to the prblematic query. (Bug #35012146)
  • References: See also: Bug #106621, Bug #33917625.
  • For index skip scans, the first range read set an end-of-range value to indicate the end of the first range, but the next range read did not clear the stale end-of-range value and applies this stale value to the current range. Since the indicated end-of-range boundary had already been crossed in the previous range read, this caused the reads to stop, causing multiple rows to be missed in the result.
  • We fix this by making sure in such cases that the old end-of-range value is cleared. (Bug #34982949)
  • The debug server asserted on certain operations involving DECIMAL values. (Bug #34973932)
  • All instances of adding and replacing expressions in the select list when transforming subqueries to use derived tables and joins have been changed so that their reference counts are maintained properly. (Bug #34927110)
  • Index Merge (see Index Merge Optimization) should favor ROR-union plans (that is, using RowID Ordered Retrieval) over sort-union plans if they have similar costs, since sort-union requires additionally sorting of the rows by row ID whereas ROR-union does not.
  • For each part of a WHERE clause containing an OR condition, the range optimizer gets the best range scan possible and uses all these range scans to build an index merge scan (that is, a sort-union scan). If it finds that all the best range scans are also ROR-scans, the range optimizer always proposes a ROR-union scan because it is always cheaper than a sort-union scan. Problems arose when the best range scan for any one part of an OR condition is not a ROR-scan, in which case, the range optimizer always chose sort-union. This was true even in cases, where it might be advantageous to choose a ROR-scan (even though it might not be the best range scan to handle one part of the OR condition), since this would eleminate any need to sort the rows by row ID.
  • Now, in such cases, when determining the best range scan, the range optimizer also detects whether there is any possible ROR-scan, and uses this information to see whether each part of the OR condition has at least one possible ROR-scan. If so, we rerun the range optimizer to obtain the best ROR-scan for handling each part of the OR condition, and to make a ROR-union path. We then compare this cost with the cost of a sort-union when proposing the final plan. (Bug #34826692, Bug #35302794)
  • Selecting from a view sometimes raised the error Illegal mix of collations ... for operation '=' when the collation used in the table or tables from which the view definition selected did not match the current session value of collation_connection. (Bug #34801210)
  • Valid MySQL commands (use and status) and C API functions (mysql_refresh, mysql_stat, mysql_dump_debug_info, mysql_ping, mysql_set_server_option, mysql_list_processes, and mysql_reset_connection) could write an error message to the audit log, even though running the command or calling the function emitted no such error. (Bug #33966181)
  • Increased the maximum fixed array size to 8192 instead of 512. This fixes an issue with mysqladmin extended status requests, which can exceed 512 entries.
  • Our thanks to Meta for the contribution. (Bug #30810617)
  • The mysqldump --column-statistics option attempted to select from information_schema.column_statistics against MySQL versions before 8.0.2, but this now generates the warning column statistics not supported by the server and sets the option to false.
  • Our thanks to Meta for the contribution. (Bug #28782417)
  • The function used by MySQL to get the length of a directory name was enhanced. (Bug #28047376)
  • Executing a query with an implicit aggregation should return exactly one row, unless the query has a HAVING clause that filters out the row, but a query with a HAVING clause which evaluated to FALSE sometimes ignored this, and returned a row regardless. (Bug #14272020)
  • For a query with a derived condition pushdown where a column in the condition needs to be replaced, a matching item could not found, even when known to be present, when the replacement item was wrapped in a ROLLUP while the matching item was not. (Bug #111665, Bug #35570065)
  • References: This issue is a regression of: Bug #33349994.
  • The presence of an unused window function in a query, along with an ORDER BY that could have been eliminated, led to an unplanned server exit. (Bug #111585, Bug #35168639, Bug #35204224, Bug #35545377)
  • References: This issue is a regression of: Bug #35118579.
  • ORDER BY RANDOM_BYTES() had no effect on query output. (Bug #111252, Bug #35148945, Bug #35457136)
  • Fixed an issue which could occur when loading user-defined functions. (Bug #110576, Bug #35242734)
  • Concurrent execution of FLUSH STATUS, COM_CHANGE_USER, and SELECT FROM I_S.PROCESSLIST could result in a deadlock. A similar issue was observed for concurrent execution of COM_STATISTICS, COM_CHANGE_USER, and SHOW PROCESSLIST.
  • Our thanks to Dmitry Lenev for the contribution. (Bug #110494, Bug #35218030)
  • The mysqldump utility could generate invalid INSERT statements for generated columns. (Bug #110462, Bug #35208605)
  • During optimization, range-select tree creation uses logic which differs based on the left-hand side of the IN() predicate. For a field item, each value on the right-hand side is added to an OR tree to create the necessary expression. In the case of a row item comparison (example: WHERE (a,b) IN ((n1,m1), (n2, m2), ...)), an expression in disjunctive normal form (DNF) is needed. A DNF expression is created by adding an AND tree with column values to an OR tree for each set of RHS values, but instead the OR tree was added to the AND tree causing the tree merge to require exponential time due to O(n2) runtime complexity. (Bug #108963, Bug #34758905)
  • When using SELECT to create a table and the statement has an expression of type GEOMETRY, MySQL could generate an empty string as the column value by default. To resolve this issue, MySQL no longer generates default values for columns of type GEOMETRY under these circumstances. Our thanks to Tencent for the contribution. (Bug #107996, Bug #34426943)

New in MySQL 8.0.33 (May 2, 2023)

  • Audit Log Notes:
  • MySQL Enterprise Audit previously used tables in the mysql system database for persistent storage of filter and user account data. For enhanced flexibility, the new audit_log_database server system variable now permits specifying other databases in the global schema namespace at server startup. The mysql system database is the default setting for table storage. (WL #15500)
  • Compilation Notes:
  • Microsoft Windows: Added MSVC Code Analysis support for Visual Studio 2017 and higher. This adds a new MSVC_CPPCHECK (defaults to OFF) CMake option that either enables or disables this analysis on the current directory and its subdirectories. (Bug #34828882)
  • Downgraded curl deprecation warnings to -Wno-error for curl versions greater than 7.86 when MySQL is built with a GNU compiler or clang. (Bug #35111625)
  • On macOS, added -framework CoreFoundation and -framework SystemConfiguration when linking the curl interface to link with shared system libraries as needed. (Bug #35104962)
  • Replaced the MY_INCLUDE_SYSTEM_DIRECTORIES macro with library interfaces. (Bug #35018072, Bug #35028089, Bug #35072295)
  • Improved CMake code to support alternative linkers. (Bug #34963568)
  • Removed the deprecated Docs/mysql.info file from the build system. (Bug #34960126)
  • Added a top-level .clang-tidy file and associated .clang.tidy files in the strings/ and mysys/ directories. Also enabled compdb support to enable clang-tidy usage on header files. (Bug #34917075)
  • Removed several unmaintained or unused C++ source files for functionality such as uca-dump and uctypedump. (Bug #34898978)
  • Added a CMake build option to enable colorized compiler output for GCC and Clang when compiling on the command line. To enable, pass -DFORCE_COLORED_OUTPUT=1 to CMake. (Bug #34897192)
  • On Windows, also install .pdb files for associated .dll files if they are found for 3rd-party libraries. (Bug #34863555)
  • Enterprise Linux 8 and Enterprise Linux 9 builds now use GCC 12 instead of GCC 11. (Bug #34829151)
  • Building with -static-libgcc -static-libstdc++ now also builds the bundled protobuf with static libraries, as required.
  • Thanks to Alex Xing for the contribution. (Bug #110216, Bug #35123848)
  • Component Notes:
  • INSTALL COMPONENT now includes the SET clause, which sets the values of component system variables while installing one or more components. The new clause reduces the inconvenience and limitations associated with the other ways of assigning variable values. For usage information, see INSTALL COMPONENT Statement. (WL #10916)
  • Deprecation and Removal Notes:
  • User-defined collations (see Adding a Collation to a Character Set) are now deprecated. Either of the following now causes a warning to be written to the log:
  • Any occurrence of COLLATE followed by the name of a user-defined collation in an SQL statement
  • Use of the name of a user-defined collation as the value of collation_server, collation_database, or collation_connection
  • You should expect support for user-defined collations to be removed in a future version of MySQL. (WL #14277)
  • MySQL Enterprise Notes:
  • MySQL Enterprise Edition now provides data masking and de-identification capabilities based on components, rather than being based on a plugin library that was introduced in MySQL 8.0.13. The component implementation provides dedicated privileges to manage dictionaries and extends the list of specific types to include:
  • Canada Social Insurance Number
  • United Kingdom National Insurance Number
  • International Bank Account Number
  • Universally Unique Identifier (UUID)
  • An improved table-based dictionary registry replaces the file-based dictionary used by the plugin. For a summary of the differences between the component and plugin implementations, see Data-Masking Components Versus the Data-Masking Plugin. Existing plugin users should uninstall the server-side plugin and drop its loadable functions before installing the new MySQL Enterprise Data Masking and De-Identification components. (Bug #33851601, WL #12641)
  • Performance Schema Notes:
  • The Performance Schema Server Telemetry Traces service is added in this release. An interface which provides plugins and components a way to retrieve notifications related to SQL statements' lifetime.
  • For more information on this interface, see the Server telemetry traces service section in the MySQL Source Code documentation.
  • The following were added:
  • Status variable Telemetry_traces_supported. Whether server telemetry traces is supported. (Boolean)
  • TELEMETRY_ACTIVE column was added to the threads table. Indicates whether the thread has an active telemetry session attached.
  • (WL #15059)
  • Functionality Added or Changed:
  • Important Change: For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 1.1.1t. Issues fixed in OpenSSL version 1.1.1t are described at https://www.openssl.org/news/cl111.txt. (Bug #35092429)
  • Replication: As part of ongoing work to change old terminology used in MySQL products, the terms “master”, “slave”, and “MTS” have been replaced in error messages relating to MySQL Replication by “source”, “replica”, and “MTA”, respectively. This includes all error messages listed in messages_to_clients.txt and messages_to_error_log.txt relating to replication; the present task does not perform this replacement for messages used in other contexts.
  • See the MySQL 8.0 Error Message Reference, for more information. (Bug #108422, Bug #34594819, WL #14191)
  • Replication: mysqlbinlog --start-position now accepts values up to 18446744073709551615, unless the --read-from-remote-server or --read-from-remote-source option is also used, in which case the maximum is 4294967295. (Bug #77818, Bug #21498994)
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.88.1. (Bug #34828111)
  • The use of a generated column with DEFAULT(col_name) to specify the default value for a named column is not permitted and now emits an error message. (Bug #34463652, Bug #34369580)
  • Bugs Fixed:
  • NDB Cluster: Occasional temporary errors which could occur when opening a table from the NDB dictionary while repeatedly performing concurrent schema operations were not retried. (Bug #34843889)
  • NDB Cluster: During iteration, ordered index scans retain a cursor position within each concurrently scanned ordered index fragment. Ordered index fragments are modified and balanced as a result of committing DML transactions, which can require scan cursors to be moved within the tree. When running with query threads configured (AutomaticThreadConfig set to 1), multiple threads can access the same index fragment tree structure, and the scans of multiple threads can have their cursors present in the same structure.
  • The current issue arose due to an assumption in the logic for moving scan cursors when committing DML operations that all scan cursors belonged to the LDM thread owning the index fragment, which did not allow for the possibility that such fragments might belong to query threads. (Bug #33379702)
  • References: See also: Bug #32257063.
  • InnoDB: Dead code removal. (Bug #35036850, Bug #109873)
  • InnoDB: Error messages related to innodb_doublewrite moved to the error log. (Bug #34883045, Bug #109330)
  • InnoDB: Prevent online DDL operations from accessing out-of-bounds memory. (Bug #34750489, Bug #108925)
  • InnoDB: ALTER TABLE ... AUTO_INCREMENT could be set to less than MAX + 1 and not forced to MAX + 1. (Bug #33419246, Bug #105092)
  • InnoDB: Innodb_data_pending_fsyncs could show extremely high inaccurate values because of a variable overflow. (Bug #30133150)
  • Partitioning: Some IN() queries on partitioned tables were not always handled correctly. (Bug #34801284)
  • References: This issue is a regression of: Bug #32311183.
  • Partitioning: Queries using the INDEX_MERGE optimizer hint was not handled correctly in all cases. (Bug #34797257)
  • Replication: XA transactions whose XIDs contained null bytes could not be recovered. (Bug #34918985)
  • Replication: When binlog_order_commits was set equal to 1, for any two transactions and for any sub-step of the commit phase, the transaction that was written to the binary log first did not always execute the sub-step first, as expected. (Bug #34703698)
  • Replication: The binary log recovery process did not report all possible error states. (Bug #33658850)
  • Replication: Following CHANGE REPLICATION SOURCE TO SOURCE_CONNECTION_AUTO_FAILOVER=1, failover generated a number of misleading warnings in the log that implied there were problems when in fact conditions were those expected for such a failover. These log messages have been updated accordingly. (Bug #32135376)
  • Replication: When a transaction failed, as a side effect, extraneous error messages relating the replication data repositories were written to the log. Now in such cases, we suppress such error messages, which are not directly related to the issue of the failed transaction or its cause. (Bug #19820134)
  • Replication: Setting binlog_order_commits to OFF could lead to a missed GTID in the next binary log file's Previous_gtids event.
  • Our thanks to Yewei Xu and the Tencent team for the contribution. (Bug #109485, Bug #34930969)
  • Replication: Corrected the SQL statements suggested in the error message text for ER_RPL_REPLICA_ERROR_RUNNING_QUERY.
  • Our thanks to Dan McCombs for the contribution. (Bug #109154, Bug #34822612)
  • Replication: A hash scan builds a hash of changes, scans the target table or index, and applies any matching change for the current entry. In the build phase, it uses only the before image, and skips any after image. Problems arose in some cases because generated columns were computed for the (skipped) after image, leading to replication errors. This is fixed by not computing generated columns any longer for seek-only calls such as hash scans.
  • Our thanks to dc huang for the contribution. (Bug #107366, Bug #34198907)
  • Replication: In certain rare cases, it was possible to set gtid_mode=OFF for one session while another session, after WAIT_FOR_EXECUTED_GTID_SET() was issued by a user in this second session, was still waiting for the next GTID set from the first session. This could result in the second session waiting indefinitely for the function to return. (Bug #99921, Bug #31505993)
  • Group Replication: Accessing the Performance Schema replication_group_communication_information and replication_group_member_stats tables in parallel sometimes caused subsequent group replication operations to hang. (Bug #34870181)
  • Group Replication: In certain cases, the group replication secondary node unexpectedly shut down while purging the relay log. (Bug #34397106)
  • Group Replication: When shutting down the Group Replication plugin, the order in which the associated events were reported the error log sometimes led to confusion. To remove any doubts, we now make sure that Plugin group_replication reported: 'Plugin 'group_replication' has been stopped. is in fact the last log message relating to the shutdown, written only when all other events associated with shutting down the plugin have been logged. (Bug #109345, Bug #34887491)
  • Microsoft Windows: The authentication_fido_client plugin stopped responding during the authentication process if it was unable to find a FIDO device on the Windows client host. (Bug #34918044)
  • In certain cases, CONVERT(utf8mb3_column USING UTF16) was rejected with the error Cannot convert string 'x--...' from binary to utf16. (Bug #35129361)
  • When joining two tables on a string column, and the column from one of the tables has an additional predicate comparing it with a temporal literal, constant propagation in some cases incorrectly caused the join condition to be modified such that it used temporal rather than string semantics when comparing the strings. This caused incorrect results to be returned from the join. (Bug #35115909)
  • Error messages returned after calling the mysql_reset_connection() C API function in a prepared statement did not identify the function name properly. (Bug #35107280)
  • Fixed a regression in a previous fix for an issue with windowing functions.
  • Our thanks to Dmitry Lenev for the contribution. (Bug #35061924)
  • References: This issue is a regression of: Bug #34572136.
  • When replacing subqueries in transforms, the internal flag showing whether a given query block contains any subqueries (PROP_SUBQUERY) was not updated afterwards. (Bug #35060365)
  • A client setting the character set to an impermissible client character set (ucs2, utf16, utf16le, or utf32) could cause unexpected behavior when the client used an authentication plugin. (Bug #35054579)
  • EXPLAIN ANALYZE displayed 0 when the average number of rows was less than 1. To fix this, we now format numbers in the output of EXPLAIN ANALYZE and EXPLAIN FORMAT=TREE such that numbers in the range 0.001-999999.5 are printed as decimal numbers, and numbers outside this range are printed using engineering notation (for example: 1.23e+9, 934e-6). In addition, trailing zeroes are no longer printed, and numbers less than 1e-12 are printed as 0.
  • This helps ensure consistent precision regardless of the number's value and improve readability, while producing minimal rounding errors. (Bug #34990948)
  • The NTILE() function did not work correctly in all cases. (Bug #34986665)
  • Some joins on views did not perform correctly. (Bug #34985359)
  • Transforming a correlated scalar subquery to a derived table led to a wrong result for InnoDB tables when the subquery included duplicate predicates. An example of a query which could be affected by this issue is shown here:
  • SELECT * FROM t1
  • WHERE (
  • SELECT t2.a FROM t2
  • WHERE t2.a = t1.a AND t2.a = t1.a
  • ) > 0;
  • (Bug #34973220)
  • Fixed an assert in sql/item_strfunc.cc that could potentially lead to issues with the SPACE() function. (Bug #34962821)
  • Using ROW_COUNT() as the length argument to LPAD() or RPAD() did not perform as expected. (Bug #34961236)
  • A query with a window function having an expression with a CASE function in its ORDER BY clause could lead to a server exit. (Bug #34933045)
  • The fix for a previous issue introduced an assertion in debug builds when optimizing a HAVING clause. (Bug #34923792)
  • References: This issue is a regression of: Bug #33725415.
  • When using mysqld_multi, the system that obscures "--password" usage as "--password=*****" would also match "--password-history" and "--password-require-current" definitions as "--password", but now explicitly checks for "--password=" instead. (Bug #34918740)
  • In some cases, calling the mysql_bind_param() C API function could cause the server to become unresponsive. (Bug #34869076)
  • The authentication_oci_client plugin was unable to open a valid configuration file if any of its entries contained an equals sign character separated by spaces (for example, key_file = /home/user/.oci/oci_api_key.pem). Now, both 'key=value' and 'key = value' entry formats are supported. (Bug #34864078)
  • Incorrect results were returned when the result of an INTERSECT or EXCEPT operation was joined with another table. This issue affected these operations in such cases when used with either DISTINCT or ALL. (Bug #34843764)
  • When preparing a view query, the operation used the system character set (instead of the character set stored in data dictionary) and then reported an invalid character-string error. (Bug #34800905)
  • Prepared statements that operate on derived tables, including views, could stop unexpectedly due to problems with the code for reopening tables after an error. (Bug #34798403)
  • Removed an assertion raised in certain cases by the RANDOM_BYTES() function in debug builds. (Bug #34781507)
  • There was an issue in how persisted variables were set on startup, causing certain variables not to get properly set to their persisted value. (Bug #34751419)
  • The MAKETIME() function did not perform correctly in all cases. (Bug #34745241)
  • Some functions with multiple arguments did not produce the expected results. (Bug #34741801)
  • A table reference in an ORDER BY outside the parenthesized query block in which the table was used, and which query block had no LIMIT or ORDER BY of its own, raised an error. (Bug #34704011)
  • References: This issue is a regression of: Bug #103954, Bug #32980249.
  • A left join with an impossible condition as part of an ON clause was not optimized as in MySQL 5.7, so that in MySQL 8.0, the query executed more quickly without the impossible condition than with it. An example of such a query, impossible condition included, is SELECT * FROM t1 JOIN t2 ON t1.c1=t2.c1 AND 1=2. (Bug #34668756)
  • When a user defined function was part of a derived table that was merged into the outer query block, or was part of a subquery converted to a semi-join, knowledge of whether this UDF was deterministic (or not) was lost during processing. (Bug #34666531)
  • With JSON logging enabled and an event subclass specified in the audit log filter definition, an empty item ("" : { }) was appended to the end of the logged event. (Bug #34659904)
  • Some subqueries did not execute properly. (Bug #34616553)
  • After the asymmetric_encrypt() component function in a SELECT query encountered a NULL field to decrypt, it could return NULL values for other non-NULL encrypted fields. (Bug #34598912)
  • The server did not always shut down cleanly after uninstalling the audit log plugin. (Bug #34594035)
  • Certain antijoins were not handled correctly by the server. (Bug #34370673)
  • References: This issue is a regression of: Bug #30573446.
  • When the MySQL 5.7 Optimizer has 2 choices for an index to filter rows, one primary and one secondary, it picks a range scan on the secondary index because the range scan uses more key parts. MySQL 8.0 did not use this logic, instead choosing the primary index to filter rows with WHERE clause filtering. Primary key use is not suitable in such cases due to the presence of LIMIT, and due to the nature of data distribution. The secondary index was not considered while resolving order by due to constant elimination. This resulted in much different query plans in MySQL 5.7 and MySQL 8.0 for the same query.
  • We solve this issue in MySQL 8.0 by skipping the constant key parts of the index during order-by evaluation only if the query is constant-optimized, which can be done at this time, but not during LIMIT analysis. (Bug #34291261)
  • The MySQL data dictionary caches failed lookups of se_private_id values (IDs which are not found), which speeds up execution of code specific to InnoDB, relying on the fact that InnoDB does not reuse these IDs. This assumption does not necessarily hold for other storage engines, most notably NDB, where this problem was resolved previously by not using this cache.
  • We extend the previous fix made for NDB so that the cache lookup is now employed only when the table uses the InnoDB storage engine. (Bug #34145006)
  • References: See also: Bug #33824058.
  • Unexpected results were seen in some queries using DENSE_RANK(), possibly with the addition of WITH ROLLUP. (Bug #34099408)
  • Fixed an assert raised in sql/sql_tmp_table.cc following work done previously to reimplement ROLLUP processing. (Bug #33830659)
  • References: This issue is a regression of: Bug #30969045.
  • Some CTEs that did not use any tables were not always handled correctly. (Bug #33725542)
  • References: This issue is a regression of: Bug #27062031.
  • Accessing rows from a window frame of a window function call present only in the query's ORDER BY list raised an error. (Bug #33069747)
  • PERCENT_RANK() used with ORDER BY column did not return the correct result. (Bug #33064174)
  • References: This issue is a regression of: Bug #27484133.
  • The --exclude-tables and --include-tables mysqlpump options did not handle views. (Bug #21303549)
  • Changed the MySQL systemd service unit configuration from After=network-online.target to Wants=network-online.target to ensure that all configured network devices are available and have an IP address assigned before the service is started. (Bug #109996, Bug #35068274)
  • AVG(...) OVER (ROWS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING) did not return the correct result. (Bug #109725, Bug #35013880)
  • References: This issue is a regression of: Bug #108008, Bug #34431996.
  • A query of the form SELECT 1 FROM t1 WHERE NOT EXISTS (VALUES ROW(1), ROW(2)) caused an assert in debug builds when the subquery_to_derived optimizer switch was enabled. (Bug #109723, Bug #35014318)
  • References: See also: Bug #108910, Bug #34746261.
  • mysqlimport did not escape reserved word table names when used with the --delete option. (Bug #109711, Bug #34999015)
  • When cloning a condition to push down to a derived table, characters in strings representing conditions were converted to utfmb4 correctly only for values less than 128 (the ASCII subset), and code points outside the ASCII subset were converted to invalid characters, causing the resulting character strings to become invalid. For derived tables without UNION, this led to problems when a column name from the derived table used characters outside the ASCII subset, and was used in the WHERE condition. For derived tables with UNION, it created problems when a character outside the ASCII subset was present in a WHERE condition.
  • We fix these issues by initializing the string used for representing the condition in such cases to the connection character set. (Bug #109699, Bug #34996488)
  • Using --single-transaction with mysqldump version 8.0.32 required either the RELOAD or FLUSH_TABLES privilege. This requirement now applies only when both gtid_mode=ON (default OFF) and with --set-gtid-purged = ON|AUTO (default AUTO). (Bug #109685, Bug #109701, Bug #34993824, Bug #34998910, Bug #35020512)
  • References: This issue is a regression of: Bug #105761, Bug #33630199.
  • Many joins using eq_ref access did not perform as well as in previous versions. This issue was first reported in MySQL 8.0.29. (Bug #109631, Bug #34891365)
  • Fixed a number of issues present in the internal documentation for the scramble generator algorithm in sha256_scramble_generator.cc and sha2_password_common.cc.
  • Our thanks to Niklas Keller for the contribution. (Bug #109576, Bug #34967141)
  • CREATE USER IF NOT EXISTS added a password history entry even when the user already existed and the password was not updated. This caused a subsequent ALTER USER statement to be rejected. (Bug #109415, Bug #34906592)
  • A hash outer join sometimes incorrectly matched NULL with a decimal zero or an empty string that used a non-padding collation, leading to erroneous results. (Bug #109211, Bug #34837464)
  • References: This issue is a regression of: Bug #33794977.
  • An object used internally by ALTER INSTANCE RELOAD TLS was not freed until the number of readers reached 0, under the assumption is that the number of readers should reach 0 fairly frequently. The read lock held during an SSL handshake is generally an expensive operation, with network calls, so when roundtrips between the client and the server took excessively long, the lock was held for a relatively long amount of time. This meant that, when changing the value of this object and there were a sufficient number of incoming SSL connections being made, the number of readers might not reach 0 in a reasonable length of time, leaving the thread holding the lock using 100% of the CPU until the lock was released.
  • We fix this by adding a wait after setting the pointer to this object to a new value, but before releasing the old object.
  • Our thanks to Sinisa Milivojevic for the contribution. (Bug #107567, Bug #34284186)
  • If mysqldump or mysqlpump could not convert a field's default value to UTF-8 (for instance, if the field was of type BINARY and the default value did not coincide with valid UTF-8), the operation produced results that were not valid to import. Further, using the --hex-blob option did not resolve the issue. We now convert the default value to the system character set. If this fails, the server sends the value as hexadecimal instead to make it more human-readable. (Bug #104840, Bug #33322551)
  • A connection using the C API (libmysqlclient) client library could fail with the FUTURE crypto policy. (Bug #104778, Bug #33316709)
  • While cloning a temporary table for a common table expression which used shared materialization, the cloned temp table was not marked as using hash deduplication, leading to wrong results. We now set the hash field for the cloned temporary table correctly, and update the hidden field count to take this into account. (Bug #102251, Bug #32383712)
  • References: See also: Bug #103052, Bug #32659629.
  • CREATE EVENT and ALTER EVENT assumed that all values passed to them (other than in a DO clause) resolved as scalars without actually checking the values. This led to assertions when any such values actually rows.
  • We now perform an explicit check for the number of columns when resolving such items, and report an error when one produces a row and not a scalar value. (Bug #57552, Bug #11764690)
  • A view reference whose underlying field is a constant is not marked as constant when the reference is part of an inner table of an outer join. It was found that, when pushing a condition down to a derived table, the reference was stripped off and only the underlying field was cloned, which made it a constant, and led to wrong results.
  • To fix this problem, we ensure that we do not push such a condition down to the derived table by adding a check to see first whether the table used by the condition matches the derived table or is a constant expression; only when it is one or the other of these do we actually push the condition down. (Bug #34661, Bug #11747971)

New in MySQL 8.0.32 (Jan 26, 2023)

  • Functionality Added or Changed:
  • Removed distutils support, which is deprecated as of Python 3.10 and removed in Python 3.12.
  • Adopted type hint enforcement for function and class attributes with mypy; this is compliant with PEP 8 for module mysql.connector. The integration includes a git pre-commit hook for mypy.
  • On Windows, added a kerberos_auth_mode connection option that's set to either "SSPI" (default) or "GSSAPI". This allows choosing between SSPI and GSSAPI at runtime for the authentication_kerberos_client authentication plugin on Windows. Previously, only the SSPI mode was supported on Windows. For general usage information, see Kerberos Pluggable Authentication. This connection is ignored on other platforms, such as Linux, as they only support GSSAPI.
  • Limitation: GSSAPI can't be used with the pure Python implementation on Windows using authentication with a username and password, a limitation with the C library used by the python-gssapi package used by the pure Python implementation of Connector/Python.
  • Bugs Fixed:
  • Using USE_TZ=True in the Django settings would raise this exception: ValueError: Not naive datetime (tzinfo is already set).
  • Removed debug messages that showed authentication data. (Bug #34695103)
  • Updated the protobuf version requirement to version >= 3.11.0, <=3.20.3.
  • Connecting to MariaDB could fail with an unsupported character set because the default MySQL character collection is MySQL 8.0 specific. Now the 5.7 character set is used by default, but is switched to a 8.0 character set if the queried server is version 8.0.
  • Incorrect MySQLCursor.statement values were returned with cursor.execute(query_string, multi=True) under the following conditions: The query string contained two or more queries seperated by a semicolon, and the non-first query used a literal or identifier containing either an odd number of backticks, quotes, or double quotes.
  • On Windows, changed the security support provider (SSP) from Kerberos to Negotiate. Using Negotiate will then select either Kerberos or NTLM as the SSP.
  • On Windows, the Connector/Python MSI did would not detect and install with Python 3.11. The workaround is to use pip install mysql-connector-python instead.
  • When using a prepared cursor, if a datetime column contained 00:00:00 as the time, a Python date object was returned instead of datetime.
  • The MySQLCursor.executemany() method failed to batch insert data since the regular expression (RE) sentinel did not detect batch cases correctly; this meant using the one-on-one insert instead, which led to decreased performance.
  • Added a new init_command connection option; an SQL query that's immediately executed after the connection is established.
  • Russian characters were not handled correctly by the c-ext version's X DevAPI driver. String values are now encoded to their byte string representation before being sent to protobuf.
  • When fetching results from a prepared cursor using the pure Python implementation, it would fail if the VARBINARY column contained bytes that could not be decoded. The bytes are now returned if they cannot be decoded.
  • Fixed multiple reference leaks and removed redundant code.
  • The cursors (both pure and c-ext versions) uses a single SELECT query to retrieve procedure result parameters after a procedure call; but one SET call was used per parameter when setting the input parameters. This was optimized to always use a single SET call for one or multiple parameters.
  • Improved warning handling throughout the connector.
  • Added a new MySQLCursorPreparedDict class option that is similar to MySQLCursorPrepared; the difference is that the former returns a fetched row as a dictionary where column names are used as keys while the latter returns a row as a traditional record (tuple).
  • Enable the use of dictionaries as parameters in prepared statements using the '(param)s' format as placeholders.
  • Using MySQLConverter.escape() on datetime objects raised this error: TypeError: an integer is required. Now it does not attempt to escape values that are not bytes or string types.
  • Not all parameters were added to the INSERT statement when using INSERT IGNORE with cursor.executemany().

New in MySQL 5.7.40 (Dec 14, 2022)

  • Functionality Added or Changed:
  • Important Change: The linked OpenSSL library for MySQL Server has been updated to version 1.1.1q. Issues fixed in OpenSSL version 1.1.1q are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html. (Bug #34414695)
  • The linked curl library for MySQL Server (Enterprise Edition) has been updated to version 7.84.0. (Bug #34138733, Bug #34614578)
  • MySQL Server’s AES_ENCRYPT() and AES_DECRYPT() functions now support the use of a key derivation function (KDF) to create a cryptographically strong secret key from information such as a password or a passphrase that you pass to the function. The derived key is used to encrypt and decrypt the data, and it remains in the MySQL Server instance and is not accessible to users. Using a KDF is highly recommended, as it provides better security than specifying your own premade key or deriving it by a simpler method when you use the function. The functions support HKDF (available from OpenSSL 1.1.0), for which you can specify an optional salt and context-specific information to include in the keying material, and PBKDF2 (available from OpenSSL 1.0.2), for which you can specify an optional salt and set the number of iterations used to produce the key.
  • Bugs Fixed:
  • InnoDB: In debug builds, a descending b-tree scan raised a debug assertion failure. (Bug #34144951)
  • InnoDB: An index latch order violation in dict_table_x_lock_indexes() caused an assertion failure. (Bug #32912868)
  • InnoDB: A TRUNCATE TABLE operation failed to free an acquired mutex in specific cases. (Bug #107858, Bug #34380370)
  • The server did not always process nested views as expected. (Bug #33876690)
  • mysqlpump might not be given the correct permissions to use derived tables (tables that are generated by a query FROM clause), causing the dump process to stop if these were present. Derived tables are now handled separately and privileges are set for them. (Bug #33866103)
  • When using --log-timestamps=SYSTEM, ISO 8601 timestamps in log messages did not take account of daylight saving time. (Bug #28632725, Bug #32893161)
  • The GRANT OPTION privilege was treated as related to database operations. (Bug #25203933, Bug #34159579)

New in MySQL 5.7.38 (Oct 3, 2022)

  • Deprecation and Removal Notes:
  • The myisam_repair_threads system variable and myisamchk --parallel-recover option are deprecated; expect support for both to be removed in a future release of MySQL.
  • Values other than 1 (the default) for myisam_repair_threads produce a warning.
  • SQL Function and Operator Notes:
  • When the mysql client was started with --default-character-set=utf8mb4, successive calls to the UUID() function returned duplicate values. (Bug #33334507)
  • References: See also: Bug #26395601, Bug #32224507.
  • Security Notes:
  • The linked OpenSSL library for MySQL Server has been updated to version 1.1.1n from 1.1.1l. Issues fixed in OpenSSL are described at https://www.openssl.org/news/cl111.txt and at http://www.openssl.org/news/vulnerabilities.html. (Bug #33840722, Bug #33970835)
  • Functionality Added or Changed:
  • The default for the group_replication_transaction_size_limit system variable, which sets the maximum transaction size that a replication group accepts, is changed from zero (no limit) to 150000000 bytes (approximately 143 MB), which is the same as the default in MySQL 8.0. Setting a limit for this system variable by default helps to avoid delays or errors caused by excessively large transactions. Transactions above the limit are rolled back and are not sent to Group Replication's Group Communication System (GCS) for distribution to the group. If your Group Replication servers previously accepted transactions larger than the new default limit, and you were allowing group_replication_transaction_size_limit to default to the old zero limit, those transactions will start to fail after the upgrade to the new default. You must either specify an appropriate size limit that allows the maximum message size you need the group to tolerate (which is the recommended solution), or specify a zero setting to restore the previous behavior.
  • Bugs Fixed:
  • InnoDB: A missing null pointer check for an index instance caused a failure. (Bug #33600109)
  • InnoDB: Purge threads processed undo records of an encrypted table for which the tablespace was not loaded, causing a failure. (Bug #32586721)
  • InnoDB: Incorrect AUTO_INCREMENT values were generated when the maximum integer column value was exceeded. The error was due to the maximum column value not being considered. The previous valid AUTO_INCREMENT value should have been returned in this case, causing a duplicate key error. (Bug #87926, Bug #26906787)
  • Partitioning: In some cases, establishing a connection to MySQL server could fail if the .ibd file for a partition was missing. (Bug #33459653)
  • Statements that cannot be parsed (due, for example, to syntax errors) are no longer written to the slow query log. (Bug #33732907)
  • It was not possible to revoke the DROP privilege on the Performance Schema. (Bug #33578113)
  • A page cleaner thread timed out as it waited for an exclusive lock on an index page held by a full-text index creation operation on a large table. (Bug #33101844)
  • A memory leak occurred if mysqldump was used on more than one table with the --order-by-primary option. The memory allocated for sorting each table’s rows is now freed after every table, rather than only once. (Bug #30042589, Bug #96178)
  • mysqld_safe log message textual errors were corrected. Thanks to Bin Wang at China Mobile for the contribution. (Bug #106590, Bug #33903639)

New in MySQL 8.0.30 (Jul 26, 2022)

  • Important Change: A previous change renamed character sets having deprecated names prefixed with utf8_ to use utf8mb3_ instead. In this release, we rename the utf8_ collations as well, using the utf8mb3_ prefix; this is to make the collation names consistent with those of the character sets, not to rely any longer on the deprecated collation names, and to clarify the distinction between utf8mb3 and utf8mb4. The names using the utf8mb3_ prefix are now used exclusively for these collations in the output of SHOW statements such as SHOW CREATE TABLE, as well as in the values displayed in the columns of Information Schema tables including the COLLATIONS and COLUMNS tables. (Bug #33787300)
  • Important Change: When more than one language had the same collation definition, MySQL implemented collations for only one of the languages. This meant that some languages were covered only by utf8mb4 Unicode 9.0 collations that are specific to other languages. This release fixes such issues by adding language-specific collations for those languages that were previously covered only by language-specific collations for other languages.
  • Compilation Notes:
  • On Enterprise Linux, fixed ADD_LINUX_RPM_FLAGS so that the initial values of CMAKE_C_FLAGS and CMAKE_CXX_FLAGS are used before modifying them. (Bug #34131794)
  • References: This issue is a regression of: Bug #33730302.
  • Added a new SHOW_SUPPRESSED_COMPILER_WARNINGS CMake option. Enable it to show suppressed compiler warnings, and do so without failing with -Werror. It defaults to OFF. (Bug #34046748)
  • On Windows, deprecation warnings (C4996) were globally disabled with the /wd4996 command-line option; now deprecation warnings are disabled on the localized level where appropriate. (Bug #33975638)
  • Improved GCC 8 support to include -lstdc++fs in order to use std::filesystem. (Bug #33939798)
  • Deprecation and Removal Notes:
  • Replication: Setting the replica_parallel_workers system variable (or the equivalent server option --replica-parallel-workers) to 0 is now deprecated, and doing so now raises a warning.
  • To achieve the same result (that is, use single threading) without the warning, set replica_parallel_workers=1 instead.
  • The --skip-host-cache server option is now deprecated, and subject to removal in a future release.
  • Use a statement such as SET GLOBAL host_cache_size = 0, or set host_cache_size in the my.cnf file, instead.
  • The --old-style-user-limits option causes the server to enforce user limits as they were prior to MySQL 5.0.3, and is intended for backwards compatibility with very old releases. This option is now deprecated, and using it now raises a warning. You should expect this option to be removed in a future release of MySQL, and so you are advised to begin now to remove any dependency your MySQL applications might have on this option.
  • Generated Invisible Primary Keys (GIPKs):
  • MySQL 8.0.30 now supports GIPK mode, which causes a generated invisible primary key (GIPK) to be added to any InnoDB table that is created without an explicit primary key. This enhancement applies to InnoDB tables only.
  • The definition of the generated key column added to an InnoDB table by GIPK mode is is shown here:
  • my_row_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT INVISIBLE PRIMARY KEY
  • The name of the generated primary key is always my_row_id; you cannot, while GIPK mode is in effect, use this as a column name in a CREATE TABLE statement that creates a new InnoDB table unless it includes an explicit primary key.
  • GIPKs are not enabled by default. To enable them, set the sql_generate_invisible_primary_key server system variable (also introduced in this release) to ON. This setting has no effect on replication applier threads; this means that a replica never generates a primary key for a replicated table that was not created on the source with a primary key.
  • You cannot alter a generated invisible primary key while GIPKs are in effect, with one exception: You can toggle the visibility of the GIPK using ALTER TABLE tbl CHANGE COLUMN my_row_id SET VISIBLE and ALTER TABLE tbl CHANGE COLUMN my_row_id SET INVISIBLE.
  • By default, generated invisible primary keys can be seen in the output of SHOW CREATE TABLE and SHOW INDEX; they are also visible in MySQL Information Schema tables such as the COLUMNS and STATISTICS tables. You can make them hidden instead by setting show_gipk_in_create_table_and_information_schema to OFF.
  • You can exclude generated invisible primary keys from the output of mysqldump using the --skip-generated-invisible-primary-key option added in this release. mysqlpump also now supports a --skip-generated-invisible-primary-key option which excludes GIPKs from its output.
  • For more information and examples, see Generated Invisible Primary Keys. For general information on invisible column support in MySQL, see Invisible Columns. (Bug #34092605)
  • Keyring Notes:
  • The keyring_aws plugin has been updated to use the latest AWS Encryption SDK for C (version 1.9.186).
  • The keyring_aws_region variable supports the additional AWS regions supported by the new SDK. Refer to the variable description for a list of supported AWS regions.
  • Pluggable Authentication:
  • The SASL LDAP plugin failed to properly parse Kerberos Key Distribution Center (KDC) host information read from the Kerberos configuration file, resulting in SASL authentication error. (Bug #31862170)
  • Security Notes:
  • It is now possible to compile the MySQL server package (mysqld + libmysql + client tools) using OpenSSL 3.0 on supported platforms, which should not change the behavior of the server or client programs. For additional information, see https://wiki.openssl.org/index.php/OpenSSL_3.0.
  • Spatial Data Support:
  • Previously, the ST_TRANSFORM() function added in MySQL 8.0.13 did not support Cartesian Spatial Reference Systems. Beginning with this release, support is provided by this function for the Popular Visualisation Pseudo Mercator (EPSG 1024) projection method, used for WGS 84 Pseudo-Mercator (SRID 3857).
  • SQL Syntax Notes:
  • It is now possible to determine whether a REVOKE statement which cannot be executed raises an error or a warning. This is implemented with the addition of two new statement options, listed here with brief descriptions:
  • IF EXISTS causes REVOKE to raise a warning rather than an error as long as the target user or role does not exist.
  • IGNORE UNKNOWN USER causes REVOKE to raise a warning instead of an error if the target user or role is not known, but the statement would otherwise succeed.
  • For a single target user or role and a given privilege or role to be removed, using the IF EXISTS and IGNORE UNKNOWN USER options together in the same REVOKE statement means that the statement succeeds (albeit doing nothing, and with a warning), even if both the target user or role and the privilege or role to be removed are unknown, as long as the statement is otherwise valid. In the case of multiple targets, multiple privileges or roles to be removed, or both, the statement succeeds, performing those removals which are valid, and issuing warnings for those which are not.
  • For more information, see REVOKE Statement. (Bug #102232, Bug #32495441)
  • XA Transaction Notes:
  • Replication: Previously, recovery was not guaranteed when a server node in a replication topology unexpectedly halted while executing XA PREPARE, XA COMMIT, or XA ROLLBACK. To address this problem, MySQL now maintains consistent XA transaction state across a topology using either MySQL “classic” Replication or MySQL Group Replication when a server node is lost from the topology and then regained. This also means that XA transaction state is now propagated so that nodes do not diverge while doing work within a given transaction in the event that a server node halts, recovers, and rejoins the topology.
  • For any multi-server replication topology (including one using Group Replication), the XA transaction state propagates consistently, so that all servers remain in the same state at all times. For any such topology of any size (including a single server, as long as binary logging is enabled), it is now possible to recover any server to a consistent state after it has halted unexpectedly and been made to rejoin the topology after dropping out.
  • This enhancement is implemented for the case of a single server by adding support for a two-phase XA prepare between the storage engine and the server's internal transaction coordinator (ITC), with the state of the prepare retained by both. This means that the ITC can purge its internal logs safely, without the risk of losing state, should the server halt following the purge. In the single-node case, imposing order of execution between the storage engine and the binary log prevents externalization of GTIDs before the corresponding changes become visible to the storage engine; in a topology comprising multiple servers, this keeps the transaction state from being broadcast to the topology before it is guaranteed to be locally consistent and persistent. In all cases, the state of the XA transaction is extracted from the last binary log file to be written and synchronized with the transaction state obtained from the storage engine.
  • A known issue in this release can be encountered when the same transaction XID has been used to execute XA transactions sequentially. If there a disruption in operation occurs while the server is processing XA COMMIT ... ONE PHASE using this same XID, after the transaction has been prepared in the storage engine, the state between the binary log and the storage engine can no longer be reliably synchronized. See
  • For more information, see XA Transactions.
  • Functionality Added or Changed:
  • Important Change: Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.83.1. (Bug #34138733)
  • Important Change: For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 1.1.1o. Issues fixed in OpenSSL version 1.1.1o are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html. (Bug #34133985)
  • Important Change: The fido2 library included with MySQL, used with the authentication_fido plugin, has been upgraded to version 1.8.0. (Previously, version 1.5.0 was included with MySQL.)
  • For more information, see FIDO Pluggable Authentication.
  • InnoDB: The innodb_doublewrite system variable, which enables or disables the doublewrite buffer, has two new settings, DETECT_ONLY and DETECT_AND_RECOVER. With the DETECT_ONLY setting, database page content is not written to the doublewrite buffer, and recovery does not use the doublewrite buffer to fix incomplete page writes. This lightweight setting is intended for detecting incomplete page writes only. The DETECT_AND_RECOVER setting is equivalent to the existing ON setting. For more information, see Doublewrite Buffer.
  • Thanks to Facebook for the contribution. (Bug #32727919, Bug #103211)
  • InnoDB: InnoDB now supports dynamic configuration of redo log capacity. The innodb_redo_log_capacity system variable can be set at runtime to increase or decrease the total amount of disk space occupied by redo log files.
  • With this change, the number of redo log files and their default location has also changed. From MySQL 8.0.30, InnoDB maintains 32 redo log files in an #innodb_redo directory in the data directory. Previously, InnoDB created two redo log files in the data directory by default, and the number and size of redo log files were controlled by the and innodb_log_files_in_group and innodb_log_file_size variables. These two variables are now deprecated.
  • When an innodb_redo_log_capacity setting is defined, innodb_log_files_in_group and innodb_log_file_size settings are ignored; otherwise, those settings are used to compute the innodb_redo_log_capacity setting (innodb_log_files_in_group * innodb_log_file_size = innodb_redo_log_capacity). If none of those variables are set, redo log capacity is set to the innodb_redo_log_capacity default value, which is 104857600 bytes (100MB).
  • Several status variables are provided for monitoring the redo log and redo log capacity resize operations.
  • As is generally required for any upgrade, this change requires a clean shutdown before upgrading.
  • For more information about this feature, see Redo Log.
  • Added Ubuntu 22.04 support. (Bug #34123545)
  • The order of the columns in the primary key definition for a few tables in the mysql schema has been changed, so that the columns containing the host name and user name are together in sequence at the start of the primary key. ACL queries on these tables are performed using only the host name and user name, and if those columns are not together in sequence, a full table scan must be performed to identify the relevant record. Placing the host name and user name together means that index lookup can be used, which improves performance for CREATE USER, DROP USER, and RENAME USER statements, and for ACL checks for multiple users with multiple privileges.
  • The changed tables are mysql.db, mysql.tables_priv, mysql.columns_priv and mysql.procs_priv. When you upgrade to MySQL 8.0.30 or later, these tables are modified in the second step of the MySQL upgrade process. Use the --upgrade=FORCE option when performing logical upgrades using a backup or export utility such as mysqldump or mysqlpump, which ensures that the table structures are checked and rebuilt with the new column order. (Bug #33644645, Bug #33637244)
  • The myisam_repair_threads system variable and myisamchk --parallel-recover option were removed. (Bug #31052408)
  • A new mysqldump option --mysqld-long-query-time lets you set a custom value of the long_query_time system variable for mysqldump’s session. Use the new option to increase the elapsed time allowed for mysqldump’s queries before they are written to the slow query log file, in order to avoid unnecessary logging. Thanks to Facebook for the contribution. (Bug #96369, Bug #96369, Bug #30110717)
  • Error log components can now be loaded implicitly at startup before the InnoDB storage engine is available. This new method of loading error log components loads and enables the components defined by the log_error_services variable.
  • Previously, error log components had to be installed first using INSTALL COMPONENT and were only loaded after InnoDB was fully available, as the list of components to load was read from the mysql.components table, which is an InnoDB table.
  • Implicit load of error log components has these advantages:
  • Log components are loaded early in the startup sequence, making logged information available sooner.
  • It helps avoid loss of buffered log information should a failure occur during startup.
  • Loading log components using INSTALL COMPONENT is not required, simplifying error log configuration.
  • For more information about this feature, see Error Log Configuration.
  • If you have previously installed loadable log components using INSTALL COMPONENT and you list those components in a log_error_services setting that is read at startup (from an option file, for example), your configuration should be updated to avoid startup warnings. For more information, see Error Log Configuration Methods.
  • MySQL Enterprise Audit’s audit log file can now be extended with optional data fields to show the query time, the number of bytes sent and received, the number of rows returned to the client, and the number of rows examined. This data is available in the slow query log for qualifying queries, and in the context of the audit log it similarly helps to detect outliers for activity analysis. It is delivered to the audit log through new component services that you set up as an audit log filtering function. The extended data fields can only be added when the audit log is in JSON format (audit_log_format=JSON), which is not the default setting.
  • MySQL Server’s AES_ENCRYPT() and AES_DECRYPT() functions now support the use of a key derivation function (KDF) to create a cryptographically strong secret key from information such as a password or a passphrase that you pass to the function. The derived key is used to encrypt and decrypt the data, and it remains in the MySQL Server instance and is not accessible to users. Using a KDF is highly recommended, as it provides better security than specifying your own premade key or deriving it by a simpler method when you use the function. The functions support HKDF (available from OpenSSL 1.1.0), for which you can specify an optional salt and context-specific information to include in the keying material, and PBKDF2 (available from OpenSSL 1.0.2), for which you can specify an optional salt and set the number of iterations used to produce the key.
  • A new system status variable Tls_library_version shows the runtime version of the OpenSSL library that is in use for the MySQL instance. The version of OpenSSL affects features such as support for TLSv1.3.
  • From MySQL 8.0.30, MySQL Enterprise Encryption’s functions are provided by a component, rather than being installed from the openssl_udf shared library. The new functions provided by the component use only the generally preferred RSA algorithm, not the DSA algorithm or the Diffie-Hellman key exchange method, and they follow current best practice on minimum key size. The component functions also add support for SHA3 for digests (provided that OpenSSL 1.1.1 is in use), and do not require digests for signatures, although they support them.
  • If you upgrade to MySQL 8.0.30 from an earlier release where the functions are installed manually from the openssl_udf shared library file, the functions you created remain available and are supported. However, these legacy functions are deprecated from this release, and it is recommended that you install the component instead. The component functions are backward compatible, so RSA public and private keys, encrypted data, and signatures that were produced by the legacy functions can be used with the component functions. For the component functions to support decryption and verification for content produced by the legacy functions, you must set the new system variable enterprise_encryption.rsa_support_legacy_padding to ON (the default is OFF).
  • The component functions generate public and private RSA keys in PKCS #8 format. They allow a minimum key size of 2048 bits, which is a suitable minimum RSA key length for current best practice. You can set a maximum key size up to 16384 bits using the system variable enterprise_encryption.maximum_rsa_key_size, which defaults to a maximum key size of 4096 bits.
  • Connections whose users have the CONNECTION_ADMIN privilege are not terminated when MySQL Server is set to offline mode, which is done by changing the value of the offline_mode system variable to ON. Previously, checking for connections that had the CONNECTION_ADMIN privilege could cause a race condition because it involved accessing other threads. Now, a flag for each thread caches whether or not the user for the thread has the CONNECTION_ADMIN privilege. The flag is updated if the user privilege changes. When offline mode is activated for the server, this flag is checked for each thread, rather than the security context of another thread. This change makes the operation threadsafe.
  • In addition, when offline mode is activated, connections whose users have the SYSTEM_USER privilege are now only terminated if the user that runs the operation also has the SYSTEM_USER privilege. Users that only have the SYSTEM_VARIABLES_ADMIN privilege, and do not have the SYSTEM_USER privilege, can set the offline_mode system variable to ON to activate offline mode. However, when they run the operation, any sessions whose users have the SYSTEM_USER privilege remain connected, in addition to any sessions whose users have the CONNECTION_ADMIN privilege. This only applies to existing connections at the time of the operation; users with the SYSTEM_USER privilege but without the CONNECTION_ADMIN privilege cannot make new connections to a system in offline mode.
  • Performance Schema provides instrumentation for performance monitoring of Group Replication memory usage.
  • See Monitoring Group Replication Memory Usage with Performance Schema Memory Instrumentation.
  • Bugs Fixed:
  • InnoDB: A TRUNCATE TABLE operation failed to remove data dictionary entries for columns that were dropped using ALGORITHM=INSTANT.
  • Thanks to Marcelo Altmann for the contribution. (Bug #34302445)
  • InnoDB: An incorrect nullable column calculation on tables with instantly added columns caused data to be interpreted incorrectly. (Bug #34243694)
  • InnoDB: After upgrading to MySQL 8.0.29, a failure occurred when attempting to access a table with an instantly added column. (Bug #34233264)
  • InnoDB: Only the physical position of instantly added columns was logged, which was not sufficient for index recovery. The logical position of columns was also required. (Bug #34181432)
  • InnoDB: The field_phy_pos debug variable in the InnoDB sources was not updated for child tables during a cascading update operation. (Bug #34181419)
  • InnoDB: Some instances of the rec_get_instant_row_version_old() function in the InnoDB sources did not check for row versioning. (Bug #34173616)
  • InnoDB: The read_2_bytes() function in the InnoDB sources, which reads bytes from the log buffer, returned a null pointer. (Bug #34173425)
  • InnoDB: In the Performance Schema instrumentation for InnoDB read-write locks, lock acquisition failures and successes for TRY (no-wait) operations were instrumented incorrectly. (Bug #34131395)
  • InnoDB: In a specific locking scenario, an implicit lock was not converted to an explicit lock as expected, triggering a lock_rec_has_expl(LOCK_X | LOCK_REC_NOT_GAP, block, heap_no, trx) debug assertion failure. (Bug #34123159)
  • InnoDB: A check that determines if a table has instantly added columns was performed for each column, which affected the performance of ADD and DROP COLUMN operations on tables with numerous columns. The check is now performed once per table. (Bug #34112147)
  • InnoDB: A workload that generated a large number of lock requests and numerous timeouts caused a long semaphore wait failure. To address this issue, optimizations were implemented to reduce the number of exclusive global lock system latches. (Bug #34097862)
  • InnoDB: The m_flush_bit in the redo log block header, which was set for the first block of multiple blocks written in a single log write call, provided no benefit and has been removed. (Bug #34091444)
  • InnoDB: Functions used by MySQL Enterprise Backup to inform InnoDB that it has started reading redo logs and to advance the cursor to a larger log sequence number (LSN) now require the BACKUP_ADMIN privilege. (Bug #34085310)
  • InnoDB: Fixed clang-tidy and cppcheck warnings, which included the removal of unused code and unnecessary checks. (Bug #33957087)
  • InnoDB: Recovery of a redo log file mini-transaction (mtr) caused a debug assertion failure on a MySQL Server instance with a small innodb_log_buffer_size setting.
  • Thanks to Mengchu Shi for the contribution. (Bug #33945602)
  • InnoDB: Compiling with the WITH_VALGRIND source configuration option produced Wunused-variable warnings. (Bug #33899862)
  • InnoDB: Multiple issues with the lock-free hash table (ut_lock_free_hash_t) were addressed. (Bug #33830934)
  • InnoDB: A query on a generated column with a secondary index caused a failure. The field number representing the position of the generated column was not valid. (Bug #33825077)
  • InnoDB: Memory consumption was greater than expected when updating and inserting rows with multi-valued index columns. The memory allocated for multi-valued columns for each row update was held until the file handle was released. (Bug #33766482)
  • InnoDB: The UT_LOCATION_HERE structure in the InnoDB sources was not used consistently. (Bug #33436161)
  • InnoDB: A table object needed to retrieve an array of values from a multi-valued index column when computing the value of a generated column was unavailable. (Bug #32725063)
  • InnoDB: A 4GB tablespace file size limit on Widows 32-bit systems has been removed. The limit was due to an incorrect calculation performed while extending the tablespace. (Bug #28934351)
  • InnoDB: Hash and random generator functions in the InnoDB sources were improved. (Bug #16739204, Bug #23584861)
  • InnoDB: A DROP TABLE operation on a table with a discarded tablespace caused an unnecessary assertion failure. (Bug #107207, Bug #34135187)
  • InnoDB: A query on a table with a JSON column returned only a partial result set after adding a multi-valued index. (Bug #106621, Bug #33917625)
  • InnoDB: Purging a record with multiple binary large object values raised an insertion failure due to a mini-transaction (mtr) conflict. (Bug #105592, Bug #33574272)
  • InnoDB: Enabling the adaptive hash index (AHI) on a high-concurrency instance caused temporary AHI search latch contention while the hash index was being built.
  • Thanks to Zhou Xinjing from CDB Team at Tencent for the patch. (Bug #100512, Bug #31750840)
  • Packaging: The SASL LDAP clientside plugin was missing from the MySQL Community packages for Windows.
  • Replication: When a table definition diverged between the source and the replica because the replica had an extra primary key, updates and deletes on the replica would fail if that table had an index that was present both on the source and the replica. Primary keys for an InnoDB table are automatically included in all indexes, and the replication applier needs values for all parts of the key to be included in an event in order to search the index. Previously, the applier checked that all the user-defined key parts were present, but the check did not cover hidden primary keys that were automatically included. The applier now validates that both user-defined and automatically included key parts are present in an event before using the index to search the data. (Bug #34122738)
  • Replication: The write sets extracted by MySQL Replication from transactions when the transaction_write_set_extraction system variable is enabled (which is the default) are extracted from primary keys, unique keys, and foreign keys. They are used to detect dependencies and conflicts between transactions. Previously, write sets involving multi-column foreign keys were incorrectly identifying each column as a separate foreign key. The issue has now been fixed and foreign key write sets include all referenced key columns. (Bug #34095747, Bug #34144531)
  • Replication: When row-based replication was in use, a replica could sometimes override the SQL mode value that was sent by the source, in an attempt to avoid issues with additional columns on the slave. In extreme cases this could lead to data divergence. The problem has been corrected so the replica now preserves the source’s SQL mode wherever possible. (Bug #33945038)
  • Replication: The COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE column in the Performance Schema table replication_group_member_stats could persistently show transactions related to view change events (View_change_log_event) that had already been applied. These events are queued in the Group Replication applier channel but applied in the Group Replication recovery channel, causing a race condition that could result in the counter decrement being lost. The increment of the count now takes place at a more suitable point, and the counter for COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE is also now set to zero when the applier is not busy. (Bug #33602354, Bug #33674059)
  • Replication: The message that is recorded when a member tries to rejoin a Group Replication topology when there is an old incarnation of the same server still present, has been upgraded from an informational note to a warning message. (Bug #32651024)
  • Replication: MySQL’s semisynchronous replication did not respect the value of the net_read_timeout system variable and forced a read timeout of one millisecond. This could result in the function experiencing partial reads of acknowledgment messages and packets arriving out of order, while other connections in the MySQL system were functioning correctly. The value of the net_read_timeout system variable is now applied to connections for semisynchronous replication. (Bug #101056, Bug #31976209)
  • Replication: When the --replicate-same-server-id option was used to make the replica not skip events that have its own server ID, if the log file was rotated, replication stopped with an error. The log rotation event now checks and applies the current value of the option. (Bug #89375, Bug #27492990)
  • API: Applications that previously used the MySQL client library to perform an automatic reconnection to the server received the following mysql_query error after the server was upgraded:
  • [4031] The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. (Bug #105229, Bug #34007830)
  • Pushing a condition down to a derived table was not handled correctly in all cases. (Bug #34311090)
  • After pushing down a condition to a derived table having a set operation, while folding an always true boolean condition, the rewrite was not correct due to not setting abort_on_null to true for the cloned condition when making a copy during condition pushdown to a derived table with a set operation. (Bug #34298238)
  • A missing error return when processing an invalid ORDER BY expression in a view definition led to an assert in debug builds. (Bug #34239456)
  • MySQL Server would not compile with the latest version of Visual Studio 2022. (Bug #34231639)
  • While attempting to clone a system variable during condition pushdown, the server sometimes could not determine the correct context of the cloned expression.
  • To prevent this, we disallow condition pushdown to derived tables when they use system variables, or if the underlying expressions in the derived table contain system variables. (Bug #34205559)
  • Added Enterprise Linux 9 (EL9) support. (Bug #34190004)
  • On macOS 11, MySQL Server did not have the correct entitlement to generate a core dump in the event of an unexpected server halt. A build option WITH_DEVELOPER_ENTITLEMENTS has been added to allow a build to generate core dumps. (Bug #34163987)
  • Improved error handling for '-DWITH_LIBEVENT=system' and '-DWITH_EDITLINE=system' on systems missing libevent-devel or libedit-devel. (Bug #34131334, Bug #34123545)
  • The fix for Bug #33830493 in MySQL 8.0.29 addressed the situation where if a MySQL instance stopped unexpectedly or was restarted shortly after a SET PERSIST statement was used to record system variable settings, the configuration file mysqld-auto.cnf could be left empty, in which case the server restart could not proceed. The persisted system variables are now written to a backup file, which is only renamed to mysqld-auto.cnf after the success of the write has been verified, leaving the original mysqld-auto.cnf file still available. On a restart, if a backup file with valid contents is found, the server reads from that file. Otherwise the mysqld-auto.cnf file is used and the backup file is deleted. The file was not flushed to disk by this fix, so it was still possible for the issue to occur. This patch adds those operations. (Bug #34122866)
  • Fixed the -DENABLE_GCOV CMake option. (Bug #34113243)
  • The SENSITIVE_VARIABLES_OBSERVER privilege, introduced in MySQL 8.0.29, is now granted to users with the SYSTEM_VARIABLES_ADMIN privilege during upgrade. Previously, the privilege was not granted to any database user during upgrade. (Bug #34068378)
  • A select from a view that used left joins did not return any results. (Bug #34060289)
  • Under certain circumstances TRUNCATE performance_schema.accounts caused duplicated counts in global_status.
  • This occurred if some hosts were not instrumented. For example, if performance_schema_hosts_size was set to a low value.
  • Our thanks to Yuxiang Jiang and the Tencent team for the contribution. (Bug #34057013, Bug #106939)
  • It was possible under certain conditions for EXPLAIN ANALYZE to attempt access of an iterator that did not exist. (Bug #34051681)
  • References: This issue is a regression of: Bug #33905399.
  • Support was added for compiling the keyring_oci plugin with OpenSSL 3. (Bug #34043013)
  • Events recorded in the Performance Schema tables for thread creation and deletion were retained until server shutdown, instead of being removed when the client connection ended. Thread creation and deletion now takes place after the Performance Schema instrumentation is created for the user session, so it is cleaned up when the session ends. (Bug #34019988)
  • Upgraded the bundled zlib library to zlib 1.2.12. Also made zlib 1.2.12 the minimum zlib version supported, and removed WITH_ZLIB from the WITH_SYSTEM_LIBS CMake option. (Bug #34015600)
  • The CONNECTION_ID() function, since it returns a session ID which remains constant for the lifetime of the session, was treated as a constant function. This caused issues when CONNECTION_ID() was used inside a trigger attached to a table which might be reused by other sessions. We fix this by making the function const for execution, and returning the actual session ID when the function is evaluated. (Bug #34009876)
  • Executed codespell on the majority of source code, and fixed the reported spelling errors in the code comments. (Bug #34006439)
  • The MySQL Enterprise Encryption openssl_udf function library plugin was reimplemented to use OpenSSL 3 APIs. (Bug #33992115)
  • FEDERATED storage engine code was revised to address NULL pointer and variable access issues. (Bug #33962357)
  • Histograms in MySQL returned a selectivity estimate of 0 for values that outside buckets. This meant that values might be missing from the histogram because they were missed during sampling, or because the histogram had grown stale. To prevent this, we introduce a constant lower bound of 0.001 on the selectivity estimates produced by histograms. This choice of lower bound corresponds to the selectivity of a value or range that we are likely to miss during sampling.
  • Using a constant lower bound rather than a statistical estimate for the selectivity of a missing value has the advantage of simplicity and predictability, and provides some protection against underestimating the selectivity due to stale histograms and within-bucket heuristics.
  • For more information about histograms in MySQL, see Optimizer Statistics. (Bug #33935417)
  • For certain queries using a common table expression (CTE), EXPLAIN ANALYZE did not provide any profiling data for the CTE even when the CTE was known to be executed. This happened when the following conditions were met:
  • The CTE was referenced more than once in the query plan.
  • The first reference to the CTE (in the order of the output of EXPLAIN FORMAT=TREE) was never executed.
  • At least one of the subsequent references was executed at least once.
  • The problem was that the CTE plan was always printed when encountering the first reference to the CTE; if that reference was never executed, the CTE was not materialized there; and thus there was no profiling data to print.
  • The fix for this issue ensures that we print the CTE plan when it is first executed, that is, the point at which it is materialized. The output then includes profiling data. If the CTE is never executed, we print the plan at the last reference, when there is no profiling data. (Bug #33905399)
  • The output from the command mysqld --verbose --help previously showed plugin load options as ON even when they were off by default, or turned off using an option. The output now shows the current value for the plugin. (Bug #33870892)
  • The Server now bundles curl (7.83.1) and only uses it when alternative SSL systems are used, such as openssl11 on EL7. (Bug #33859507, Bug #34154806)
  • Debug MySQL binaries can now be built using -0g and -fno-inline. (Bug #33855533)
  • The FIREWALL_EXEMPT privilege, introduced in MySQL 8.0.27, is now granted to users with the SYSTEM_USER during upgrade. Previously, the privilege was not granted to any database user during upgrade. (Bug #33854409)
  • A correlated subquery did not use a functional index as expected. This occurred when an outer column reference used inside the subquery was not considered as constant for subquery execution, which allowed consideration of the functional index to be skipped.
  • We fix this problem by making sure to consider the outer column reference as constant while executing the subquery. (Bug #33851055)
  • Added alternate OpenSSL system package support by passing in openssl11 on EL7 or openssl3 on EL8 to the WITH_SSL Cmake option. Authentication plugins, such as LDAP and Kerberos, are disabled as they do not support these alternative versions of OpenSSL. (Bug #33835934)
  • Prepared statements with subqueries that accessed no tables, but the subquery evaluation raised an error, triggered an assert failure in debug builds. (Bug #33773799)
  • Some stored functions were not executed correctly following the first invocation. (Bug #33754993)
  • When performing a query using a recursive common table expression (CTE) with a removal of a query expression after constant predicate elimination, it is expected that when the reference count of table objects for the CTE temporary table reaches zero, it should be possible once again to recreate the table, but in certain cases one of the table references was not properly recorded as attached to the CTE. (Bug #33725503)
  • References: See also: Bug #32962511.
  • Added a missing error return to the parser. (Bug #33725502)
  • A number of issues with pushdown of conditions making use of outer references, relating to work done in MySQL 8.0.22 to implement condition pushdown for materialized derived tables, have been identified and resolved. (Bug #33725403, Bug #33725500, Bug #33725508, Bug #33725534, Bug #33725545)
  • The plan generated for a SELECT using a common table expression involves table materialization and an index scan on the materialized table. Because the temptable engine does not yet support all index scan methods, such queries might not always execute correctly.
  • With other MySQL engines, the materialization access path has special handling when the access path is not considered basic; for temptable, an index scan was not considered basic, which led to undefined behavior.
  • We fix this issue by considering the index scan access path basic, and thus avoiding use of any index scan access methods on temptable tables. (Bug #33700735)
  • The Data_free column in the INFORMATION_SCHEMA.FILES table was not updated after adding a new data file to the InnoDB system tablespace. (Bug #33508534)
  • If a plugin attempted to register a system variable with a name that duplicated that of an existing system variable, the existing static system variable might be overwritten, and uninstalling the plugin might leave pointers to the freed memory. The issues have now been fixed. (Bug #33451101)
  • SHOW TABLES and SELECT * FROM INFORMATION_SCHEMA.TABLES did not return any results from the Performance Schema if the user had access privileges on individual Performance Schema tables, only. (Bug #33283709)
  • Calling a function relating to the data_masking plugin without first installing the plugin led to an unplanned server shutdown. Functions relating to this plugin are initialized by calling init functions which in turn access the UDF metadata service, but this is valid only when the data masking plugin is installed. We fix this problem by adding a check to verify that the plugin is installed before initializing such functions, and to return an appropriate error message if the plugin providing them is not installed. (Bug #33234046)
  • Under certain conditions, the server did not handle the expiration of max_execution_time or the execution of a KILL statement correctly. (Bug #33218625)
  • mysqlslap, which uses multiple threads to connect to the server, could not run with a user account that used FIDO authentication. The issue has been fixed by an update to the FIDO library allowing the authentication to be performed on multiple threads. (Bug #33067183)
  • A deadlock could occur in Group Replication when a member was interacting with the service infrastructure, such as a joining member checking for incompatible configuration and then leaving the group due to it. The issue has now been fixed. (Bug #32688091)
  • If an incorrect value was set for the binlog_checksum system variable during a session, a COM_BINLOG_DUMP command made in the same session to request a binary log stream from a source failed. The server now validates the specified checksum value before starting the checksum algorithm setup process. (Bug #32442749)
  • For slow query logging, the Slow_queries status variable was not implemented unless the slow query log was enabled, contrary to the documentation. (Bug #28268680, Bug #91496)
  • A prepared statement could accept an empty string as a valid float value, which represents a regression from 8.0.27 behavior. This fix explicitly checks that the length of an interpreted string is non-empty and fully interpreted as a (float) number. In addition, new verification now ensures that:
  • All numeric values are supported with empty strings and strings that are all spaces.
  • Regular numeric values are supported, as well as numeric values with leading and trailing spaces.
  • (Bug #107399, Bug #34213338)
  • References: This issue is a regression of: Bug #32213576.
  • Upgrading to MySQL 8.0.29 led to issues with existing spatial indexes (see Creating Spatial Indexes). The root cause of the problem was a change in how geographic area computations were performed by the included Boost library, which was upgraded to version 1.77.0 in MySQL 8.0.29. We fix this by ensuring that we accommodate the new method whenever such computations are performed. (Bug #107320, Bug #34184111)
  • References: This issue is a regression of: Bug #33353637.
  • When pushing a condition down to derived table for prepared statements, we clone a condition which also includes parameters when a derived table contains unions. When a statement needed to be reprepared during execution—for example, when the signedness of the value specified did not match that of the actual datatype—the parameter was not cloned correctly resulting in errors. This occurred because the value specified for the parameter was used to print the string for reparsing, instead of a literal ? placeholder character.
  • Now in such cases we set a flag QT_NO_DATA_EXPANSION for printing parameters for reparsing which, when enabled, causes the ? placeholder to be printed, rather than the actual value. (Bug #107230, Bug #34148712)
  • On MacOS, improved Boost library detection logic for Homebrew as a potentially incompatible system's Boost version could get used even with -DWITH_BOOST set. (Bug #107151, Bug #34121866)
  • References: This issue is a regression of: Bug #33769505.
  • On RHEL 7.x, fetching the CPU cache line size returned 0 on s390x RHEL 7.x which caused rpl_commit_order_queue and integrals_lockfree_queue to fail.
  • Our thanks to Namrata Bhave for the contribution. (Bug #107081, Bug #34095278)
  • When the mysql client was unable to reconnect to the server following an unexpected server halt, the process of building the completion hash allocated memory that was not freed. The reconnection operation now does not build the completion hash if the client fails to reconnect, and the memory concerned is freed if the client is disconnected. (Bug #106864, Bug #34019571)
  • Added a cycle timer for the s390x architecture.
  • Our thanks to Namrata Bhave for the contribution. (Bug #106824, Bug #33997819)
  • In certain cases, incorrect results could result from execution of a semijoin with materialization, when the WHERE clause of the subquery contained an equality. In some cases, such as when one side of such an equality was an IN or NOT IN subquery, the equality was neither pushed down to the materialized subquery, nor evaluated as part of the semijoin. This also caused issues with some inner hash joins. (Bug #106710, Bug #106718, Bug #33952115, Bug #33957233)
  • References: See also: Bug #84705, Bug #25466100.
  • Comparator functions for queries like (<date column> <non-date column>) IN ((val1, val2), (val3, val4), …) could return the wrong results. (Bug #106567, Bug #33897969)
  • Fixed an assert definition in SetOsLimitMaxOpenFiles; our thanks to hongyuan li for the contribution. (Bug #106555, Bug #33893197)
  • Previously, it was assumed that, when the same non-nullable expression was used as both the first and second arguments to LIKE, the result was always true, and so could be optimized away. This assumption turns out not to be valid, due to the fact that LIKE treats the backslash () as an escape character, even when ESCAPE is not specified. This led to different results when the condition was used in the SELECT list as opposed to the WHERE clause. To fix the problem, we no longer perform this optimization with LIKE, with or without an ESCAPE clause. (Bug #106444, Bug #33852756)
  • In some cases, when arguments other than global transaction IDs (such as column values) were passed to GTID_SUBSET(), the function returned values other than the expected NULL. (Bug #106298, Bug #33793942)
  • A problem with evaluation of general quantified comparison predicates occurred when the left-hand side of the predicate was NULL. In such cases, the value of the subquery evaluation from the last current row is saved, so that it does not need re-evaluation, but the cached value (result_for_null_param) was not cleared between executions, so that the next execution could re-use the result from the previous execution. One consequence of this was that, when a subquery execution first caused zero rows to match from the subquery—which for an ALL predicate should return TRUE—a subsequent execution causing at least one row to match also returned TRUE, even though FALSE was expected.
  • To solve this issue, we now make sure to clear result_for_null_param while cleaning up the subquery predicate following execution. (Bug #106164, Bug #37755139)
  • Test cases executed with the --async-client option and shutdown commands caused mysqltest to halt unexpectedly. (Bug #105797, Bug #33643149)
  • MySQL supports the use of equiheight histograms to improve selectivity estimates. Each bucket in an equiheight histogram for a column should contain roughly the same number of values (rows); keeping the buckets small helps minimize any error.
  • When constructing an equiheight histogram, too many values were sometime placed in the same bucket, which could result in substantial errors in selectivity estimation. We fix this by introducing a new equiheight construction algorithm that guarantees low error, and adapts to the distribution of the data to make efficient use of its buckets. In addition, a new estimator for the number of distinct values in histogram buckets provides improved worst-case error guarantees.
  • See The INFORMATION_SCHEMA COLUMN_STATISTICS Table, and Optimizer Statistics, for more information. (Bug #104789, Bug #33302021)
  • Deprecation warnings returned to client programs were sent to stdout rather than stderr, which in the case of mysqldump could mean that the dump file no longer worked because the warnings were included in it. The issue has now been fixed and the warnings are sent to stderr. (Bug #104769, Bug #33733529)
  • Extended support for chained SSL certificates. (Bug #54158, Bug #27491518)

New in MySQL 8.0.29 (Apr 26, 2022)

  • Audit Log Notes:
  • The new audit_log_disable system variable permits disabling audit logging for all connecting and connected sessions. See Disabling Audit Logging.
  • C API Notes:
  • Building C API client programs on Windows using Clang as the compiler returned various compiler warnings, including an unused variable warning. (Bug #33520805, Bug #33520861)
  • Character Set Support:
  • Incompatible Change: CONVERT(string USING charset) did not compute the correct maximum length for its return value, which should be the same as that calculated for CAST(string AS charset). This meant that some conversions of strings from BINARY to nonbinary character sets which should have been rejected as invalid returned values instead.
  • Prior to upgrading, applications that may rely on the previous CONVERT() behavior should be checked and updated as necessary. In particular, for indexes on generated columns using CONVERT() with invalid values, you should correct such values, drop the index, then re-create it before upgrading to this release. In some cases, it may be simpler to rebuild the table using ALTER TABLE table FORCE, rather than dropping and re-creating the index. See SQL Changes, for more information. (Bug #33199145)
  • The output from EXPLAIN FORMAT=TREE hex-encoded ranges for multi-valued indexes, even when the data type was not a binary one. In addition, ranges using string types were also printed with hex-encoded values, when they had a binary collation. The latter issue also affected regular indexes, but was more visible with multi-valued indexes, since these always use utf8mb4_0900_bin collation. Now, hex-encoding is used only for string types having a binary character set. Strings with non-binary character sets are now printed in EXPLAIN FORMAT=TREE output as plain text, with escaping for any special characters. (Bug #33343948)
  • For some functions, the resolved character set was not always the same as the character set of the first argument. (Bug #32668730, Bug #33238711)
  • Compilation Notes:
  • InnoDB: Compilation issues associated with the following MSVC++ level 4 compiler warnings were addressed: C4201, C4701, C4702, C4703, C4706. The compiler warnings, which were previously disabled, are now enabled. (Bug #33464699)
  • InnoDB: MSVC++ level 4 compiler warnings were enabled. (Bug #33437498)
  • InnoDB: An access violation occurred when building a debug version of MySQL using Visual Studio 2019 version 16.10 or version 16.11. The violation was due to an STL iterator bug. (Bug #33223243)
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.80.0. (Bug #33576431)
  • Data Type Notes:
  • This release fixes the following two issues relating to date and time values:
  • Inserting a CHAR value such as '12:00:00' into a DATE, DATETIME, or TIMESTAMP column raised the wrong error. In the case of a DATE column, this error was similar to Data truncation: Incorrect date value: '2012-00-00' for column 'd' at row 1. This occurred for both the binary and text protocols.
  • Inserting a value with an offset into a DATE or TIME column using the binary protocol gave a wrong result. For example, when the connection time zone was set to GMT-5, inserting '2021-10-10 00:00:00.123+01:00' into a TIME column yielded '18:00:00'; that is, the value was converted to the connection time zone (this should be done only with respect to DATETIME columns).
  • We fix these by recognizing and adjusting for time zone offsets whenever a TIMESTAMP value with a time zone offset is inserted into a TIME or DATE column. (Bug #33616957, Bug #33649009)
  • References: See also: Bug #33539844.
  • A fix in MySQL 8.0.27 for a previous issue changed the resolved type of a boolean expression from signed INT to unsigned BIGINT in order to simplify type handling, but what appeared then as a harmless metadata change turned out to cause problems for some of the MySQL Connectors.
  • We now revert the metadata change and provide a different fix for the original problem, by adjusting the max_length for the negation of an integer to at least two characters. (Bug #33516898)
  • References: This issue is a regression of: Bug #33117410.
  • Sorts of some column types, including JSON and TEXT, sometimes exhausted the sort buffer if its size was not at least 15 times that of the largest row in the sort. Now the sort buffer need only be only 15 times as large as the largest sort key. (Bug #103325, Bug #105532, Bug #32738705, Bug #33501541)
  • References: This issue is a regression of: Bug #30400985, Bug #30804356.
  • Deprecation and Removal Notes
  • The shortcuts ASCII for CHARACTER SET latin1 and UNICODE for CHARACTER SET ucs2 are now deprecated, and you should expect their removal in a future version of MySQL. Using either of these now raises a warning; use CHARACTER SET instead.
  • The character sets listed here, along with all of their collations, are now deprecated, and subject to removal in a subsequent release of MySQL:
  • ucs2
  • macroman and macce
  • dec
  • hp8
  • The use of any of these character sets or their collations in SQL statements or elsewhere in the MySQL server now produces a deprecation warning.
  • You should use utf8mb4 instead of any of the character sets just listed. See also The ucs2 Character Set (UCS-2 Unicode Encoding), West European Character Sets, and Central European Character Sets.
  • Event Scheduler Notes:
  • As a previous convenience, the server automatically restarted the Event Scheduler as needed when the super_read_only system variable was disabled. Now this same convenience is applied independently when the read_only system variable is disabled. Prior to this update, disabling read_only could also disable super_read_only if needed, but because the code was separate, the Event Scheduler was not restarted. (Bug #33539082)
  • Full-Text Search Notes:
  • Due to the fact that, as implemented, MATCH() does not act as a function of its arguments, but rather as a function of the row ID of the current row in the underlying scan of the base table, a query using a rollup column as the argument to this function tended to perform poorly, and with unreliable results. This being the case, the use of a rollup column with MATCH() is no longer permitted whenever the following conditions are true:
  • MATCH() appears in the SELECT list, GROUP BY clause, HAVING clause, or ORDER BY clause.
  • The query uses GROUP BY ... WITH ROLLUP.
  • A grouping column is used as the argument to MATCH().
  • Any such queries are now rejected with ER_FULLTEXT_WITH_ROLLUP. (The use of MATCH() with a rollup column in the WHERE clause is not affected by this change, and is still permitted.)
  • For more information, see Full-Text Search Functions. (Bug #32565923, Bug #32996762)
  • SQL Function and Operator Notes:
  • Important Change: When using prepared statements, the DATE_ADD() and DATE_SUB() functions returned DATETIME values, even when calculations involved combinations of YEAR, MONTH, or DAY parts only (that is, no time parts).
  • Previous to implementing single preparation of prepared statements in MySQL 8.0.22, TIME values were returned in such cases; before this was done, values used as arguments and their types were used to determine the result type of certain temporal functions at resolution time, such as DATE_ADD(), DATE_SUB(), and ADDTIME(). Afterwards, user variable references and dynamic parameters are considered constant for the lifetime of one execution only, requiring that the return type be determined in another fashion, in this case from the function type. For example, the default resolved type for DATE_ADD() was deemed to be DATETIME if the first argument was a dynamic parameter, since DATETIME accomodates all temporal values and thus an implicit reprepare can be avoided.
  • The change just described represents a regression; the problem is better solved by deriving a more precise resolved data type, and performing a reprepare only if that does not match the actual value of the parameter. (Such functionality was already in use in the MySQL server for numeric parameters.) This solution is implemented by this fix.
  • We now parse string and numeric values when temporal values are expected. When a valid temporal value is found, the value is converted. This fix also improves determination of resolved data types for temporal functions.
  • With this fix, the DATE_ADD() and DATE_SUB() functions (and their synonyms functions ADDDATE() and SUBDATE()) resolve types as follows:
  • If the first argument is a dynamic parameter, its resolved type is DATE if the second argument is an interval that contains some combination of YEAR, MONTH, or DAY values only; otherwise, its type is DATETIME.
  • If the first argument is resolved as DATETIME, the resolved type of the function is also DATETIME.
  • If the first argument is a DATE, the resolved type of the function is also DATE, unless the interval argument uses HOUR, MINUTE, or SECOND, in which case it is DATETIME.
  • If the first argument is a TIME value, the resolved type is also TIME, unless the interval argument uses any of YEAR, MONTH, or DAY, in which case the resolved type of the function is DATETIME.
  • If none of the preceding conditions are met, the function is resolved as VARCHAR (as in MySQL 8.0.21 and earlier).
  • The ADDTIME() and SUBTIME() functions now resolve types as follows:
  • If the first argument is a dynamic parameter, the resolved type is TIME, rather than DATETIME.
  • Otherwise, the resolved type of the function is derived from the resolved type of the first argument.
  • In addition, for DATE_ADD() and DATE_SUB(), if the resolved type of the first argument is DATE, and a DATETIME value is provided, the statement is reprepared so that the function has the resolved type DATETIME. Behavior is unchanged when a TIME value is provided.
  • For ADDTIME() and SUBTIME(), there are no forced reprepares. (Bug #103781, Bug #32915973, Bug #33477883, Bug #33539844)
  • Previously, loadable functions and stored functions shared the same namespace and could not have the same name. A subsequent implementation change eliminated the reason to share the same namespace and permitted a stored function to be created with the same name as an existing loadable function. To invoke the stored function, it is necessary to qualify it with a schema name. The server now generates a warning if the stored function name collides with an existing loadable function name. (Bug #33301931)
  • Queries making use of the MBRContains() function did not employ all available spatial indexes. (Bug #32975221)
  • References: This issue is a regression of: Bug #29770705.
  • The FORMAT() function returned a formatted number without showing the thousands separator and grouping between separators when either the es_ES or es_MX locale was specified. (Bug #31374305)
  • The result length of the GROUP_CONCAT() function was wrong when the value of group_concat_max_len was increased. With a small group_concat_max_len value, the result was correct. This issue was caused by arithmetic overflow.
  • Our thanks to Hope Lee for the contribution. (Bug #105380, Bug #33521497)
  • Optimizer Notes:
  • For a query, a range scan can be picked first and the optimizer decide that the same range scan can be used to skip ordering. In some cases, when the requested order is not the same as the index order, a reverse index scan is required. If the requested ordering is on the key part that is not already used by the range scan, we update the number of used key parts for the range scan to reflect the change. The issue occurred because the key part information was not also updated, and when it was necessary to access key part information based on the number of key parts used.
  • We also now note when a reverse scan uses extended key parts, and set the correct flags for evaluation accordingly. (Bug #33615893)
  • References: This issue is a regression of: Bug #33037007.
  • In both optimizer trace and EXPLAIN FORMAT=TREE output, date ranges were printed as binary. Now in such cases we print temporal values as quoted strings. (Bug #33335079)
  • When a condition was pushed down, the result of evaluating assignments to user variables in the SELECT list of the subquery were sometimes affected. For this reason, we now prevent condition pushdown for statements with assignments to user variables.
  • Our thanks to Casa Zhang and the Tencent team for the contribution. (Bug #104918, Bug #33341080)
  • When the join buffer was set to certain arbitrary sizes, the number of chunk files created for hash joins was too small. This meant that each file contained more rows than could fit in the join buffer, so that the probe chunks needed to be read multiple times. This was caused by using integer division when computing how many chunk files are needed; we fix this by using floating-point division instead.
  • Our thanks to Øystein Grøvlen for the contribution. (Bug #104186, Bug #33073354)
  • A query using aggregation on a BIT type could return different results depending on the indexes or join type employed. This was due to the fact that a DML statement using such an aggregation caches the BIT values using an integer type, and later looks up and converts to a string format for output. The current issue arose because this lookup treated the BIT value as an integer, resulting in an incorrect string value.
  • This is fixed by adding a new internal class for cached BIT values which can convert bit values to string formats correctly.
  • Our thanks to Hope Lee for the contribution. (Bug #100859, Bug #31894023)
  • When a DML statement containing an outer DISTINCT query with a subquery inside a HAVING clause, the inner subquery attempts to use a column reference for a column from the outer DISTINCT query, but this should be allowed only if the subquery is used somewhere outside of the HAVING, or if the outer SELECT does not use grouping. The current issue came about because such a query was allowed to run even though neither of these conditions were met.
  • To fix this, the column reference check is expanded to detect an invalid column reference of this sort, and to return an error if it does.
  • Our thanks to Song Zhibai for the contribution. (Bug #97742, Bug #30617496)
  • Packaging Notes
  • The GnuPG build key used to sign MySQL downloadable packages has been updated. The previous GnuPG build key is set to expire on 2022-02-16. For information about verifying the integrity and authenticity of MySQL downloadable packages using GnuPG signature checking, or to obtain a copy of our public GnuPG build key, see Signature Checking Using GnuPG.
  • Due to the GnuPG key update, systems configured to use repo.mysql.com may report a signature verification error when upgrading to MySQL 5.7.37 and higher or to MySQL 8.0.28 and higher using apt or yum. Use one of the following methods to resolve this issue:
  • Manually reinstall the MySQL APT or YUM repository setup package from https://dev.mysql.com/downloads/.
  • Download the MySQL GnuPG public key and add it your system GPG keyring.
  • For MySQL APT repository instructions, see Appendix A: Adding and Configuring the MySQL APT Repository Manually.
  • For MySQL YUM repository instructions, see Upgrading MySQL with the MySQL Yum Repository.
  • (Bug #33587308)
  • Performance Schema Notes:
  • A new statement metric, CPU_TIME, is now available, enabling you to measure the CPU time spent on a query.
  • The following changes were made to support this:
  • A timer, THREAD_CPU, was added to the Performance Schema PERFORMANCE_TIMERS table.
  • A consumer, events_statements_cpu was added to the Performance Schema setup_consumers table.
  • events_statements_cpu is disabled by default.
  • A Performance Schema command option, performance-schema-consumer-events-statements-cpu to enable or disable the consumer, events_statements_cpu.
  • See Performance Schema Command Options for more information.
  • The following columns were added:
  • CPU_TIME column was added to the following Performance Schema tables:
  • events_statements_current
  • events_statements_history
  • events_statements_history_long
  • CPU_TIME is the time spent on CPU for the current thread, expressed in picoseconds.
  • SUM_CPU_TIME column was added to the following Performance Schema tables:
  • events_statements_summary_by_thread_by_event_name
  • events_statements_summary_by_account_by_event_name
  • events_statements_summary_by_user_by_event_name
  • events_statements_summary_by_host_by_event_name
  • events_statements_summary_global_by_event_name
  • events_statements_summary_by_digest
  • events_statements_summary_by_program
  • prepared_statements_instances
  • SUM_CPU_TIME is the CPU time spent on the current thread, expressed in picoseconds, for the corresponding aggregations.
  • CPU_LATENCY column was added to the following sys schema tables:
  • statement_analysis
  • user_summary_by_statement_type
  • user_summary_by_statement_latency
  • host_summary_by_statement_type
  • host_summary_by_statement_latency
  • processlist
  • session
  • CPU latency is the CPU time spent on the current thread, expressed in human-readable form.
  • CPU_LATENCY column was added to the following sys schema x$ tables:
  • x$statement_analysis
  • x$user_summary_by_statement_type
  • x$host_summary_by_statement_type
  • x$processlist
  • x$session
  • x$user_summary_by_statement_latency
  • x$host_summary_by_statement_latency
  • CPU latency is the CPU time spent on the current thread, expressed in picoseconds.
  • Our thanks to Facebook for their contribution to this fix. (Bug #32202060, Bug #101764)
  • Functionality Added or Changed:
  • Important Change: The number of distinct windows which can appear in a given SELECT is now limited to 127. The number of distinct windows is the sum of the named windows and the implicit windows specified as part of any window function's OVER clause.
  • In order to use a large number of windows, it may be necessary to increase the value of the thread_stack server system variable. (Bug #33279604)
  • InnoDB: InnoDB now supports ALTER TABLE ... RENAME COLUMN operations using ALGORITHM=INSTANT.
  • Operations that support ALGORITHM=INSTANT only modify metadata in the data dictionary. No exclusive metadata locks are taken on the table during preparation and execution phases of the operation, and table data is unaffected, making the operations instantaneous. If not specified explicitly, ALGORITHM=INSTANT is used by default by DDL operations that support it.
  • For more information about this and other DDL operations that support ALGORITHM=INSTANT, see Online DDL Operations.
  • It is theoretically possible for a user with sufficient permissions using MySQL Enterprise Audit to mistakenly create an “abort” item in the audit log filter that prevents themselves and other administrators from accessing the system. From MySQL 8.0.28, the AUDIT_ABORT_EXEMPT privilege is available to permit a user account’s queries to always be executed even if an “abort” item would block them. Accounts with this privilege can therefore be used to regain access to a system following an audit misconfiguration. The query is still logged in the audit log, but instead of being rejected, it is permitted due to the privilege.
  • Accounts created in MySQL 8.0.28 or later with the SYSTEM_USER privilege have the AUDIT_ABORT_EXEMPT privilege assigned automatically when they are created. The AUDIT_ABORT_EXEMPT privilege is also assigned to existing accounts with the SYSTEM_USER privilege when you carry out an upgrade procedure with MySQL 8.0.28 or later, if no existing accounts have that privilege assigned.
  • Support for the TLSv1 and TLSv1.1 connection protocols is removed as of MySQL 8.0.28. The protocols were deprecated from MySQL 8.0.26. For background, refer to the IETF memo Deprecating TLSv1.0 and TLSv1.1. Make connections using the more-secure TLSv1.2 and TLSv1.3 protocols. TLSv1.3 requires that both the MySQL Server software and the client application were compiled with OpenSSL 1.1.1 or higher.
  • From MySQL 8.0.28, client programs, including MySQL Shell, that support a --tls-version option for specifying TLS protocols for connections to the MySQL server cannot make a TLS/SSL connection with the protocol set to TLSv1 or TLSv1.1. If a client attempts to connect using these protocols, for TCP connections, the connection fails, and an error is returned to the client. For socket connections, if –ssl-mode is set to REQUIRED, the connection fails, otherwise the connection is made but with TLS/SSL disabled.
  • On the server side, the following settings are changed from MySQL 8.0.28:
  • The default values of the server’s tls_version and admin_tls_version system variables no longer include TLSv1 and TLSv1.1.
  • The default value of the Group Replication system variable group_replication_recovery_tls_version no longer includes TLSv1 and TLSv1.1.
  • For asynchronous replication, replicas cannot set the protocol for connections to the source server to TLSv1 or TLSv1.1 (the SOURCE_TLS_VERSION option of the CHANGE REPLICATION SOURCE TO statement).
  • The tmp_table_size variable now defines the maximum size of individual in-memory internal temporary tables created by the TempTable storage engine. An appropriate size limit prevents individual queries from consuming an inordinate amount global TempTable resources. See Internal Temporary Table Storage Engine.
  • The innodb_open_files variable, which defines the number of files InnoDB can have open at one time, can now be set at runtime using a SELECT innodb_set_open_files_limit(N) statement. The statement executes a stored procedure that sets the new limit.
  • To prevent non-LRU manged files from consuming the entire innodb_open_files limit, non-LRU managed files are now limited to 90 percent of the innodb_open_files limit, which reserves 10 percent of the innodb_open_files limit for LRU managed files.
  • The innodb_open_files limit now includes temporary tablespace files, which were not counted toward the limit previously.
  • The functions FROM_UNIXTIME(), UNIX_TIMESTAMP(), and CONVERT_TZ() now handle 64-bit values on platforms that support them, including 64-bit versions of Linux, MacOS, and Windows.
  • On compatible platforms, FROM_UNIXTIME() now accepts a maximum argument of 32536771199.999999 seconds, corresponding to '3001-01-18 23:59:59.999999' UTC (including the optional fraction of up to 6 digits). If the argument is larger than this, the function returns NULL.
  • On compatible platforms, UNIX_TIMESTAMP() now accepts a maximum value of '3001-01-18 23:59:59.999999' UTC, corresponding to 32536771199.999999 seconds since the Unix Epoch. If the argument is larger than this, the function returns 0.
  • In addition, on compatible platforms, CONVERT_TZ() now performs time zone conversion beyond 2038, up to '3001-01-18 23:59:59.999999' UTC. If the datetime argument exceeds this value, the argument is returned unchanged. This “no-op” behavior is the same as previously with values beyond '2038-01-19 03:14:07.999999' UTC.
  • The behavior of these 3 functions on 32-bit platforms is unchanged.
  • The behavior of the TIMESTAMP type is also unaffected by this change; its maximum allowed value remains '2038-01-19 03:14:07.999999' UTC, regardless of platform. For dates futureward of this, use the MySQL DATETIME type instead.
  • This release introduces monitoring and limiting of memory allocation on a global and per-user basis. You can now observe the total memory consumed by all user connections by checking the value of the Global_connection_memory status variable, which must be enabled by setting global_connection_memory_tracking = 1.
  • The total includes memory used by system processes, or by the MySQL root user, although these users are not subject to disconnection due to memory usage.
  • Memory used by the InnoDB buffer pool is not included in the total.
  • You can control indirectly how often the status variable is updated by adjusting connection_memory_chunk_size; Global_connection_memory is updated only when the total memory usage varies by more than this amount.
  • You can specify limits on resource consumption per user connection by setting connection_memory_limit; any user whose memory usage exceeds this amount cannot issue additional queries. You can also impose a global memory limit by setting global_connection_memory_limit. Whenever Global_connection_memory exceeds the global limit, no regular users can issue new queries requiring memory usage. System users such as MySQL root are not bound by these limits.
  • Bugs Fixed:
  • InnoDB: The minimum I/O buffer size calculated during an index creation operation did not align with the I/O block size, permitting a record to exceed the buffer boundary. (Bug #33570629)
  • InnoDB: The sync_array_detect_deadlock algorithm used by the semaphore deadlock checker in debug builds was simplified in terms of code and time complexity, and an implementation of the algorithm was introduced for use in release builds. (Bug #33538505)
  • InnoDB: The ut::make_unique library function in the InnoDB sources now permits specifying the type of field allocated. (Bug #33538461)
  • InnoDB: A Performance Schema instrumentation was added for tracking redo log buffer memory allocations. (Bug #33527660)
  • InnoDB: Warnings printed to the error log for long semaphore waits did not provide information about the latch owner. (Bug #33509386)
  • InnoDB: A latch release and reacquisition mechanism was introduced to reduce the amount of time that threads spend in critical sections protected by a global lock system latch. (Bug #33502610, Bug #33563523)
  • InnoDB: A hole punch operation on Windows caused a failure. The operation was performed as an overlapped (asynchronous) operation, which requires a OVERLAPPED structure containing a handle to an event object. The OVERLAPPED structure was not provided. (Bug #33496778)
  • InnoDB: The ut_time() infrastructure in the InnoDB sources was replaced with a type-checked standard library implementation. (Bug #33460092)
  • InnoDB: Numerous Trying to access missing tablespace errors were printed to the error log following a restore operation. (Bug #33437625)
  • InnoDB: Performance Schema aware ut::make_unique and ut::make_shared memory management library functions were added to the InnoDB sources. Similar functions (ut::make_unique_aligned and ut::make_shared_aligned) were added for types with extended alignment. (Bug #33420694)
  • InnoDB: The buf_validate() function in the InnoDB sources was optimized, improving performance on debug builds.
  • Thanks to Hobert Lu for the contribution. (Bug #33417058, Bug #104967)
  • InnoDB: On a NUMA-enabled system, the page size of memory chunks allocated to the buffer pool did not align with the system page size in certain scenarios, causing in the following error: Failed to set NUMA memory policy of buffer pool page frames to MPOL_INTERLEAVE. (Bug #33406701)
  • References: This issue is a regression of: Bug #32714144.
  • InnoDB: Two instances of std::unique_ptr with mem_heap in the InnoDB sources now use the Scoped_heap() wrapper, which uses a stateless function object instead of a pointer to a function. (Bug #33405520)
  • InnoDB: The m_end_range flag in the prebuilt struct, which is set to true when the end of the range is exceeded while populating the prefetch cache, was not set to false when the prefetch cache was reset (initialized). As a result, in cases where the end of the range is not exceeded and the handler is reused, the m_end_range flag could be set incorrectly the next time the prefect cache is used. (Bug #33384537)
  • InnoDB: Column metadata in the data dictionary was not updated when a new table ID was assigned to a table after discarding the table's tablespace during a table import operation. (Bug #33319149)
  • InnoDB: Setting the innodb_interpreter debug-only system variable to NULL caused a failure. (Bug #33316661)
  • InnoDB: Full-text index creation file management was improved. (Bug #33270893)
  • InnoDB: An update operation that inserted a new row into a temporary table used for aggregation caused the temporary table to be moved to disk and the update operation to be retried on the new on-disk temporary table. A BLOB pointer in the record data prepared before the temporary table was moved to disk was rendered stale, causing a failure. (Bug #33242407)
  • InnoDB: Memory allocation is now performed by a new standards-compliant custom memory allocator which is compatible with Performance Schema. (Bug #33159210)
  • InnoDB: A race condition between threads attempting to deinitialize and initialize statistics for the same table raised and assertion failure. (Bug #33135425)
  • InnoDB: An innodb_flush_log_at_trx_commit setting other than 1 or a long running transaction could have resulted in an inconsistent rate of redo log flushing. (Bug #33128461)
  • InnoDB: Allocation of large pages is now handled by a library designed to handle this. In cases where the large page allocation mechanism cannot be used, a fallback mechanism allocates regular aligned pages. Fallback can occur when large page address space is exhausted, when large page support is disabled by the underlying hardware or operating system architecture, or when large page support in MySQL is disabled explicitly (--large-pages=0). Occurrences of ut_allocator functions for allocation and deallocation of large pages have been replaced by the new library functions. (Bug #33119009, Bug #33118309, Bug #33149501, Bug #32135935)
  • InnoDB: Handling of regular 4K page-aligned allocations is now performed by a self-contained library which is compatible with Performance Schema. (Bug #33118362)
  • InnoDB: Functions belonging to a new InnoDB library responsible for dynamic storage management of suitably aligned types has replaced the functions previously used for this purpose. (Bug #33110341)
  • InnoDB: Dynamic allocation of suitably aligned types is now handled by a library which is compatible with Performance Schema. (Bug #33110312)
  • InnoDB: While a purge thread was freeing LOB pages at end of a purge batch, a required index data structure was freed, causing a failure. (Bug #32918325)
  • InnoDB: Inconsistencies in Performance Schema instrumentation logic for dynamic memory management functions (ut_* functions) were addressed. (Bug #32715466)
  • InnoDB: InnoDB dynamic allocation routine limitations prevented dynamic allocation of an array of constructible types. The limitations have been addressed, permitting allocation of default constructible types, non-default constructible types, and types that are both default and non-default constructible. (Bug #32714047)
  • InnoDB: When using READ COMMITTED or READ UNCOMMITTED, certain queries executed on a table inside of a trigger or function prevented concurrent transactions on the same table. The acquired locks were too restrictive. (Bug #32636792)
  • InnoDB: Hole punch functionality was not working as expected for tablespace pages that were encrypted and compressed, for most pages on Windows, and for Windows volumes that do not implement Microsoft volume management functions. (Bug #32136255)
  • Partitioning: Creating a table with nondeterministic functions in generated column expressions should not be possible, but this was not enforced in all cases; a series of one or more ALTER TABLE statements could be employed to arrive at a partitioned table with one or more such generated columns. When attempting to execute the CREATE TABLE statement obtained by running SHOW CREATE TABLE against this table, MySQL rejected the statement with a misleading error message referring to the partitioning expression rather than to the problematic column, despite the fact that the partitioning expression itself was legal.
  • This was caused by the result of a check for any unsafe expressions defined for a generated column (in the internal variable thd->safe_to_cache_query), which was later checked again without being cleared while parsing the partition expression, leading to an error even when the partition expression did not refer to the problematic generated column expression. Now in such cases, we reset thd->safe_to_cache_query before parsing the partition function.
  • The issue of allowing the use of certain nondeterminstic functions (AES_ENCRYPT(), AES_DECRYPT(), RANDOM_BYTES()) in generated columns is handled separately. (Bug #29268656)
  • References: See also: Bug #32592320.
  • Partitioning: A query using an index other than the primary key of a partitioned table sometimes resulted in excessive CPU load. (Bug #104576, Bug #33238010)
  • Replication: Group Replication could stop unexpectedly during the auto-rejoin procedure while the Performance Schema replication group member statistics table was being checked. The concurrency of the operations is now handled correctly. (Bug #33609089)
  • Replication: Group Replication’s selection process for a group member to be the donor for distributed recovery involves the use of the standard random selector defined for the operating system. If this random device was not available and an exception was thrown, the joining member’s joining process stopped. Group Replication now takes this possibility into account and uses a fallback random selector if the one on the operating system returns an error. (Bug #33596124)
  • Replication: A PURGE BINARY LOGS statement could be issued while the instance was locked for backup, which contravened the rules of the backup lock by removing files from the server. The statement now cannot be used while a LOCK INSTANCE FOR BACKUP statement is in effect. (Bug #33437026)
  • Replication: The STOP GROUP_REPLICATION statement stops asynchronous replication channels on the group member, but it does not implicitly commit transactions that are in progress on them like STOP REPLICA does. This is because on a Group Replication group member, an additional transaction committed during the shutdown operation would leave the member inconsistent with the group and cause an issue with rejoining. The server is left in a read-only state after the operation is completed. This situation leads to failed commits for transactions that are in progress while stopping Group Replication, so to avoid these, the STOP GROUP_REPLICATION statement now cannot be issued while a GTID is assigned as the value of the gtid_next system variable. (Bug #33412483)
  • Replication: An expelled group member that was rejoining a group using Group Replication’s auto-rejoin procedure reported its state as RECOVERING too early on, while it was still collecting information from other group members and before the compatibility checks were complete. The state change is now carried out while the view is being installed, which is the point where the rejoining member is actually accepted as a group member. (Bug #33380840)
  • Replication: Replication stopped with an error when reading a table map event if the name of the table or database was over 64 bytes – the limit is 64 characters, so the use of multi-byte characters could cause this situation. The replica now no longer checks the size of the table and database names, and supports the transmission of longer names. (Bug #33305975, Bug #104798)
  • Replication: A lock conflict could occur if the Performance Schema table replication_applier_status_by_worker was queried while a STOP REPLICA command was in progress. The issue has now been resolved. (Bug #33290947)
  • Replication: From MySQL 8.0.26, new versions of the plugins that implement semisynchronous replication are supplied to replace the terms “master” and “slave” with “source” and “replica”. Following this, the UNINSTALL PLUGIN statement incorrectly allowed the old versions of the plugins, rpl_semi_sync_master and rpl_semi_sync_slave, to be uninstalled when replication channels were currently using them. The issue has now been fixed. (Bug #33270401)
  • Replication: When the PAD_CHAR_TO_FULL_LENGTH SQL mode was enabled on a replica server, trailing spaces could be added to a replication channel’s name in the replication metadata repository tables, resulting in errors in replication operations that identified the channel using that data. The issue has now been fixed in MySQL 8.0 by using VARCHAR for character columns, and in MySQL 5.7 by disabling the SQL mode when reading from those tables. Thanks to Brian Yue for the contribution. (Bug #33213841)
  • Replication: If a replica was disconnecting while a SHOW REPLICAS statement was being issued, the server was able to access deleted data. (Bug #33206343, Bug #104566)
  • Replication: In Group Replication, if a SET gtid_next statement is used on a group member to set the GTID for the next transaction, it is possible for the same GTID to be used for a transaction that starts concurrently on another member. If both transactions reach the commit stage, the second one in the total order is rolled back, resolving the situation. However, when the transaction consistency level for Group Replication (the group_replication_consistency system variable) was set to BEFORE or BEFORE_AND_AFTER, members could reach a deadlock with one holding ownership of a GTID in the gtid_owned set, and another waiting for ownership to be released before committing the transaction. The wait function now only considers the GTIDs for committed transactions and not the GTIDs that are owned but not committed, except where a session owns a GTID that is concurrently committed, in which case the executing session errors out. (Bug #33051454, Bug #104096)
  • Replication: If a replica server with the system variable replica_preserve_commit_order = 1 set was used under intensive load for a long period, the instance could run out of commit order sequence tickets. Incorrect behavior after the maximum value was exceeded caused the applier to hang and the applier worker threads to wait indefinitely on the commit order queue. The commit order sequence ticket generator now wraps around correctly. Thanks to Zhai Weixiang for the contribution. (Bug #32891221, Bug #103636)
  • Replication: The group communication engine for Group Replication (XCom, a Paxos variant) now logs more information in the situation where the existing group members have difficulty in communicating with a joining member, for example due to network issues. This can result in the group remembering an old incarnation of the joining member and not allowing it to attempt to join again. (Bug #32873315)
  • Replication: Group Replication’s Group Communication System (GCS) now differentiates in its records of expelled members between those that had successfully joined the group, and those that never did manage to join the group. (Bug #32630484)
  • Replication: A race condition occurred if the Group Replication group member statistics in the Performance Schema were queried when Group Replication was being started or stopped. (Bug #32392468)
  • Replication: The replication receiver thread stopped with an error if the replication source server sent a heartbeat event containing a binary log file position that was above the 4GB offset, due to the large size of the binary log file. A new heartbeat event (Heartbeat_log_event_v2, log event type 41) that handles the larger value correctly has been added for use in this situation. (Bug #29913991)
  • Microsoft Windows: On Windows, added missing debug and test suite binaries for MySQL Server (commercial) and MySQL NDB Cluster (commercial and community). (Bug #32713189)
  • JSON: When the first argument passed to JSON_TABLE() was a row instead of a single JSON value, an assertion was raised while trying to evaluate the row expression. We fix this by raising an error during function resolution if the first argument is a row, so that the row expression itself is never evaluated. (Bug #33414235)
  • Using LPAD() or RPAD() in the expression for a generated column led to corrupted indexes on the parent table. (Bug #33661337)
  • References: See also: Bug #32668730, Bug #33238711.
  • In some cases where warnings were issued, rows were missing from the results of aggregation using a temporary table. (Bug #33603911)
  • For openSUSE 15, added the libtirpc rpcgen build requirement in mysql.spec to now use TI-RPC. (Bug #33582982)
  • An UPDATE statement acting on multiple tables sometimes adds elements to a list each time it is executed. Elements were never removed from this list, which increased the memory footprint for each execution of the statement. We fix this by clearing the element list following execution. (Bug #33574408)
  • The size of the HOST column of the Performance Schema processlist table is increased from VARCHAR(255) to VARCHAR(261). (Bug #33570218)
  • A keyring migration failure due to an OpenSSL error raised an assertion. The SSL error state was not flushed from the thread's OpenSSL error queue. (Bug #33546207)
  • A process listing function call caused a failure. (Bug #33511690)
  • The commercial Debian server packages contained two testing plugins (component_test_page_track_component.so and component_test_global_priv_registration.so); they were moved to the separate and optional testing package. (Bug #33504443)
  • For Fedora, increased the release package version number from 1 to 10; this to help eliminate potential installation related problems with native Fedora dnf/yum packages of the same version. (Bug #33504443)
  • Increased compat level to 11 for Debian-based packages as the previous level of 9 is deprecated; and replaced calls to dh_systemd_enable + dh_systemd_start with dh_installsystemd to satisfy requirements for compatibility level 10+. (Bug #33458752)
  • A delete operation involving a full-text search query caused a failure. (Bug #33455243)
  • An improperly handled error caused a startup failure when using the keyring_okv plugin. (Bug #33449117)
  • For Debian, added a mysql-community-server dependency to the mysql-community-server-debug package so as to pull in all required packages needed by the debug build. (Bug #33426737)
  • For virtual generated columns of type DECIMAL, we now always store some data, so that we avoid undefined behavior when trying to convert the field buffer to a decimal value. (Bug #33424846)
  • MySQL now supports pushing a condition down to a derived table when an expression from the underlying derived table contains a variable set by a stored procedure. (Bug #33423394)
  • tls_version and admin_tls_version settings are now validated server startup. (Bug #33390209)
  • The admin_tls_version variable accepted an invalid value. (Bug #33389818)
  • If two or more deprecated system variables were persisted using a SET PERSIST statement, when the server was restarted, a deprecation warning was only logged for the first of the deprecated system variables. (Bug #33388488)
  • For an index range scan whose key parts are equal, the range is now shown as an equality. For example, a = 3 is now displayed, instead of 3 <= a <= 3 previous to this change. (Bug #33351123)
  • Replaced /var/run references with /run as /var/run usage is deprecated for tmpfiles.d configuration files. The symlink from /var/run to /run remains to keep current setups functional. (Bug #33351110, Bug #33588618)
  • Executing SHOW PROCESSLIST or accessing INFORMATION_SCHEMA.PROCESSLIST on a server with a specific configuration caused a failure. (Bug #33341623)
  • Added a mapping from ICU error code U_FILE_ACCESS_ERROR to the new MySQL error code ER_REGEXP_MISSING_FILE. (Bug #33326003)
  • A failed keyring function argument validation check caused a failure. (Bug #33319782)
  • Disabling the Group Replication plugin in a MySQL source distribution using the CMake option DWITH_GROUP_REPLICATION=0 did not disable applications and tests related to Group Replication, which caused them to build incorrectly. (Bug #33308513)
  • The index range scan iterator did not always increment the number of rows examined as expected. (Bug #33305632)
  • Enabling the create_admin_listener_thread system variable on the command line could cause a server exit during startup under specific error conditions. (Bug #33300587)
  • The SUBSTR() function did not always correctly handle errors raised when trying to evaluate its arguments. (Bug #33290160)
  • International Components for Unicode version 67 introduced a new implementation for X (match a grapheme cluster), which requires locale data not currently included with MySQL.
  • This means that, when using the version of ICU bundled with MySQL, a query using X raises the error ER_REGEXP_MISSING_RESOURCE; when using ICU supplied by the system, we report ER_WARN_REGEXP_USING_DEFAULT as a Note. (Bug #33290090)
  • A full-text search query on a table stored in the BLACKHOLE storage engine where the chosen query plan used a full-text index scan caused an error instead of returning an empty result set. (Bug #33250020)
  • The LOCK_TIME returned by the performance schema was under evaluated, missing time spent in rows locks, and time spent when locking multiple tables. As of this release, LOCK_TIME accounts for:
  • all the time waited on SQL TABLES
  • all the time waited on DATA locks
  • LOCK_TIME is now reported consistently in the slow log and the performance schema. (Bug #33236909)
  • A new option T for the mysql client prompt prints an asterisk (*) if the current session is inside a transaction block. You can use the option with the --prompt command-line option, in a MySQL option file, or with the MYSQL_PS1 environment variable. Thanks to Murakami Kohei for the contribution. (Bug #33214862, Bug #104598)
  • Constant subqueries in RANGE INTERVAL expressions were not always handled correctly. (Bug #33197418)
  • Decimal expressions which evaluated as NULL were not always handled correctly. (Bug #33169048)
  • A user account that was granted a MySQL role with a global SELECT privilege was denied access to the mysql database. The user account's global privileges were not checked when the role was granted. (Bug #33159353, Bug #104423)
  • When setting up an Item_ref to a SELECT alias, its cached properties are copied (including whether it is part of a ROLLUP expression or not). However, these might not yet be correctly computed, so the computation should to be done first or the values could be wrong. Having the wrong value could cause certain expressions to be materialized in an intermediate step when they should not (because they contain ROLLUP expressions that are not ready for computation, but having the wrong value is unknown at this point). The issue is fixed by forcing cached values to be recomputed when an item is designated as a rollup item. (Bug #33149402, Bug #104394)
  • An invalid comment string detected while upgrading a table from MySQL 5.7 to MySQL 8.0 caused the upgrade to fail with errors that did not provide sufficient contextual information. (Bug #33148961)
  • It was possible in some cases to create a generated column of type SERIAL, which is not allowed.
  • See Numeric Data Type Syntax, and CREATE TABLE and Generated Columns, for more information (Bug #33141966)
  • Statements which commit a transaction implicitly or explicitly are not allowed inside a trigger or a stored function. Both CREATE TRIGGER and CREATE FUNCTION should report an error (ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG) in this case, but did not correctly handle DROP TABLESPACE. (Bug #33141958)
  • A SHOW TABLE STATUS operation raised an assertion failure when run on a table defined with a very large AVG_ROW_LENGTH value. (Bug #33114368)
  • When calculating the maximum number of rows likely to be read from a scan, the intermediate result was a double that could become greater than the maximum allowed value for a 64-bit unsigned integer. This triggered undefined behavior when converting the intermediate double value to an integer, which in some cases could lead to assert failures.
  • We fix this by clamping the result in the range [1, UINT64_MAX]. (Bug #33066458)
  • Queries using both UNION and LIMIT 0 triggered an assert failure in debug builds. (Bug #33066455)
  • References: This issue is a regression of: Bug #32302724.
  • Renaming an event using ALTER EVENT ... RENAME TO did not delete the Performance Schema instrumentation for the original event. (Bug #33059358)
  • An SSL handshake assertion was raised on debug builds when using the thread pool plugin. (Bug #33012398)
  • Some prepared statements using either GROUP BY WITH ROLLUP or one or more window functions could be executed successfully only once. (Bug #33007266)
  • An error occurred for statements of the form INSERT INTO view VALUE(tuple) AS row_alias(id_list). When executing such statements, the server calls the internal function Sql_cmd_insert_base::prepare_values_table() in order to prepare the derived table created as a VALUES alias; this function populates Sql_cmd_insert_base.values_field_list with Item_field objects pointing to the fields the underlying table. When inserting into a view rather than a table, an expected real_item() transform, needed to map from an Item_view_ref referencing the view column to an Item_field representing the corresponding column in the underlying table, was not performed. (Bug #32858783)
  • Some multiply-nested subselects were not handled correctly, and could lead to an unplanned shutdown of the server. (Bug #32547812)
  • Inspection of a session thread object during a SHOW PROCESSLIST operation and a concurrent change to the thread's security context resulted in a race condition. (Bug #32320541, Bug #102052)
  • In cases where there are no operations to be performed on the result of a UNION, the rows are streamed without storing them in a temporary table, although a placeholder for the temporary table still exists in the query block. Since this table is not instantiated, a check for estimates of the cost of reading the rows from the table while calculating the access cost and optimizing for range based access had unpredictable results.
  • We fix this by skipping retrieval of such row estimates in the case of an uninstantiated temporary table. (Bug #32255904)
  • A multi-table DELETE statement using common table expressions was not always handled correctly. (Bug #32238558)
  • References: This issue is a regression of: Bug #98330, Bug #30796015.
  • If a CR_UNKNOWN_ERROR was to be sent to a client, an exception could occur. (Bug #31933415)
  • SSL-related code was revised to avoid a potential memory leak. (Bug #31933295)
  • In some cases, multiple-table UPDATE statements could block concurrent access. (Bug #31731752)
  • Keyring system variables that use an internal slot for complex settings no longer accept a setting of DEFAULT. (Bug #30879700)
  • The Timestamp column in the mysql.tables_priv and myql.columns_priv grant tables was set to a zero timestamp value ("0000-00-00 00:00:00") for GRANT and REVOKE operations, preventing a logical restore of the grant tables. As of MySQL 8.0.28, a valid start time value is written to the Timestamp column.
  • If you have existing grant table records with zero timestamp values that are preventing a logical restore of the grant tables, a workaround is to update records in the grant tables or in the dump files, replacing zero timestamp values with CURRENT_TIMESTAMP.
  • Thanks to Venkatesh Prasad Venugopal for the contribution. (Bug #30863899, Bug #98495)
  • Producing a per-table dump using mysqldump in MySQL 5.7 and 8.0 requires a longer execution time compared to MySQL 5.6. This is because the information_schema.files table, which is queried for information on log file groups by mysqldump, contains information about InnoDB data files as well as NDB data files from MySQL 5.7. In MySQL 8.0, the issue has been fixed by rewriting the query to select only the appropriate data files. In MySQL 5.7, Information Schema tables do not have indexes, so a full table scan is still required. (Bug #29210990, Bug #93875)
  • Keyring memory management was improved. (Bug #25042167)
  • Incorrect values for FORCE INDEX FOR GROUP BY could be set while saving and restoring the presence of FORCE INDEX hints within tables. (Bug #105694, Bug #33604416)
  • If a query with the sql_buffer_result system variable enabled returned just one row, and an attempt was made to insert the result into a table, then an error in setting the output from the temporary table could produce a data exception. (Bug #105351, Bug #33515752)
  • References: This issue is a regression of: Bug #33152269.
  • Resetting of the active slice was not performed in WindowIterator::Read() at the end the end of the input result set for windowing. This led to reading wrong values on reaching the ORDER BY sort, since the number of the active slice was still set to 1—that is, to the items being read from the input table—while the ORDER BY sorting stage needs to read the values after computation of any window functions. For this, it needs the active slice to be that of the last window's output table.
  • We fix this by moving the resetting of the slice to the output slice immediately following the read, so that it is already set correctly when returning at the end of the input set and moving on to the ordering.
  • Our thanks to Casa Zhang and the Tencent team for the contribution. (Bug #105045, Bug #33399696)
  • Code inspection revealed use of strncpy() in the internal function set_parse_error_message() without making sure that the last byte of the buffer being copied into was a null byte. We fix this by using snprintf() instead of strncpy(); this ensures that the result is valid even if it is truncated. (Bug #104856, Bug #33321787)
  • When executing prepared statements that activated a trigger created with the DEFINER clause (or a stored function), invoker privileges were used for checking table access instead of definer privileges. This, in turn, could cause privilege checks on tables used by the trigger or stored function to fail. (Bug #104168, Bug #33064461)
  • When a singleton histogram is constructed, its cumulative frequency is calculated by adding frequencies of previous buckets with the current bucket; because a floating-point value was used for the accumulator, this sometimes led to accumulated float errors, with the final cumulative frequency fractionally greater than 1.0.
  • This fix accumulates the frequency with an integer type instead, to avoid intermediate floating-point errors.
  • Our thanks to Casa Zhang and the Tencent team for the contribution. (Bug #104108, Bug #33045336)
  • Multi-valued indexes were not used for queries executed from within stored functions. (Bug #102359, Bug #32427727)
  • References: See also: Bug #104700, Bug #33268466.
  • An error occurred for an SQL statement having the form shown here:
  • INSERT INTO target_table
  • SELECT aggregate_expression, non_aggregate_expression
  • FROM empty_table;
  • This happened when the query plan used aggregation from a temporary table, and when non_aggregate_expression was constant during one execution of the query, but could vary between executions. Such an expression might, for example, include a function such as NOW() or USER(). This resulted in the temporary table getting a column for non_aggregate_expression, which is unnecessary, since all rows have the same value. In addition, if there were no rows, there was no legal value to insert into target_table, which is what actually triggered the error.
  • We fix this by not using a temporary table column when non_aggregate_expression is const for the current execution. (Bug #102252, Bug #32384355, Bug #33546083)
  • When executing a prepared statement that included values passed in as strings, MySQL attempted to parse them as integers and could return an error unrelated to the input value.
  • After a recent change, dynamic parameter handling was refactored so that the derived data type for parameters was determined based on context. For example, in a comparison such as int_col = ?, the parameter was given the same type as the (integer) column it was compared to. To preserve compatibility with existing MySQL applications, if a decimal or float value was supplied as parameter, the statement was automatically reprepared with new type assigned to the parameter based on the actual value. This handling preserved compatibility for numeric parameters.
  • However, if a string parameter was supplied, it was still interpreted as an integer (the resolved data type) and this behavior was not compatible with older MySQL versions that detected the actual type of the value. The consequences being that if int_col = ? is executed with the parameter value '1.7', only the integer part of the string was used, making the effective comparison int_col = 1.
  • To fix the issue, now when a string parameter is supplied, the parameter is analyzed to determine if it is an integer, a decimal, or a float value and the actual data type of the parameter is updated accordingly. Later, the actual type is compared to the resolved type and if it is incompatible, the statement is reprepared with the new actual type. So, the previous statement now evaluates as int_col = 1.7 and the comparison evaluates using decimal numbers. (Bug #101806, Bug #32213576, Bug #103364, Bug #32787037)

New in MySQL 8.0.27 (Oct 19, 2021)

  • Audit Log Notes:
  • A CREATE USER statement BY 'auth_string' clause was written to the audit log and general query log as an AS 'auth_string' clause. (Bug #33184550)
  • Authentication Notes:
  • Previously, MySQL user accounts authenticated to the server using a single authentication method. MySQL now supports multifactor authentication (MFA), which makes it possible to create accounts that have up to three authentication methods. MFA support entails these changes:
  • CREATE USER and ALTER USER syntax has been extended to permit specification of multiple authentication methods.
  • The authentication_policy system variable enables MFA policy to be established by controlling how many factors can be used and the types of authentication permitted for each factor. This places constraints on how the authentication-related clauses of CREATE USER and ALTER USER statements may be used.
  • Client programs have new --password1, --password2, and --password3 command-line options for specifying multiple passwords. For applications that use the C API, the new MYSQL_OPT_USER_PASSWORD option for the mysql_options4() C API function enables the same capability.
  • In addition, MySQL Enterprise Edition now supports authentication to MySQL Server using devices such as smart cards, security keys, and biometric readers. This authentication method is based on the Fast Identity Online (FIDO) standard, and uses a pair of plugins, authentication_fido on the server side and authentication_fido_client on the client side. The server-side FIDO authentication plugin is included only in MySQL Enterprise Edition distributions.
  • Multifactor authentication can use existing MySQL authentication methods, the new FIDO authentication method, or a combination of both. For more information, see Multifactor Authentication, and FIDO Pluggable Authentication. (Bug #33159968)
  • In cases where an authentication plugin performed no hashing of the authentication string, CREATE USER statements with a BY 'auth_string' clause failed with an error. (Bug #33125289)
  • Compilation Notes:
  • MySQL now can be compiled using C++17. The following minimum version requirements apply for compiler support:
  • GCC 7.1 or Clang 5 (Linux)
  • XCode 10 (macOS)
  • GCC 10 (Solaris)
  • Visual Studio 2019 Update 4 (Windows)
  • In particular, on Solaris, GCC is now the only supported compiler. The code has been cleaned up to remove adaptations and workarounds for Sun Studio, Oracle Studio, and SunPro. (Bug #32907274, Bug #103757, Bug #32907475, Bug #32992125, Bug #32992242, Bug #33004840, Bug #33086882)
  • Connection Management Notes:
  • Previously, if the server restricted a client to the sandbox mode used to handle client connections for accounts with expired passwords, the client could use the SET statement. This is no longer permitted. For more information about sandbox mode, see Server Handling of Expired Passwords. (Bug #16369085)
  • Storage Engine Notes:
  • The BLACKHOLE storage engine maximum key length has been increased from 1000 to 3072 bytes (the same as InnoDB). Thanks to Adam Cable for the contribution. (Bug #32788749, Bug #103371)
  • Firewall Notes:
  • The new FIREWALL_EXEMPT privilege exempts a user from firewall restrictions. This is useful, for example, for any database administrator who configures the firewall, to avoid the possibility of a misconfiguration causing even the administrator to be locked out and unable to execute statements. See MySQL Enterprise Firewall.
  • Keyring Notes:
  • Diagnostics for keyring_hashicorp plugin configuration issues have been improved. (Bug #32075854)
  • Performance Schema Notes:
  • To assist monitoring and troubleshooting, the Performance Schema instrumentation is now used to export names of instrumented threads to the operating system. This enables utilities that display thread names, such as debuggers and the Unix ps command, to display distinct mysqld thread names rather than “mysqld”. This feature is supported only on Linux, macOS, and Windows. For more information, see The setup_instruments Table.
  • Pluggable Authentication:
  • Microsoft Windows: The Kerberos authentication method added in MySQL 8.0.26 for MySQL server and client hosts running Linux is now supported on the client side for Windows. This enables MySQL client applications running on Windows to connect to MySQL accounts on Linux server hosts that authenticate using Kerberos. For details, see Kerberos Pluggable Authentication.
  • Security Notes:
  • For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 1.1.1l. Issues fixed in the new OpenSSL version are described at https://www.openssl.org/news/cl111.txt and and http://www.openssl.org/news/vulnerabilities.html. (Bug #33273138, Bug #33309871)
  • Server Administration:
  • Setting the session value of the following system variables is now a restricted operation and the session user must have privileges sufficient to set restricted session variables:
  • low_priority_updates
  • max_delayed_threads
  • max_error_count
  • min_examined_row_limit
  • preload_buffer_size
  • select_into_buffer_size
  • select_into_disk_sync_delay
  • show_old_temporals
  • For information about the privileges required to set restricted session variables, see System Variable Privileges.
  • Spatial Data Support:
  • The ST_SymDifference() and ST_Intersection() functions now permit the geometry arguments to have a geographic spatial reference system (SRS). Previously, ST_SymDifference() and ST_Intersection() supported only geometry arguments in a Cartesian SRS. See Spatial Operator Functions.
  • Functionality Added or Changed:
  • Important Change: The default_authentication_plugin variable is deprecated as of MySQL 8.0.27; expect support for it to be removed in a future version of MySQL.
  • The default_authentication_plugin variable is still used in MySQL 8.0.27, but in conjunction with and at a lower precedence than the new authentication_policy system variable, which is introduced in MySQL 8.0.27 with the multifactor authentication feature. For details, see The Default Authentication Plugin. (Bug #27515356)
  • Important Change: The BINARY operator is now deprecated, and subject to removal in a future release of MySQL. Use of BINARY now causes a warning. Use CAST(... AS BINARY) instead.
  • Important Change: The system variable group_replication_components_stop_timeout specifies the time that Group Replication waits for each of its modules to complete ongoing processes while shutting down. The component timeout applies after a STOP GROUP_REPLICATION statement is issued, which happens automatically during server restart or auto-rejoin. The timeout is used to resolve situations in which Group Replication components cannot be stopped normally, which might happen if the member is expelled from the group while it is in an error state, or while a process such as MySQL Enterprise Backup is holding a global lock on tables on the member. In such situations, the member cannot stop the applier thread or complete the distributed recovery process to rejoin. The STOP GROUP_REPLICATION statement does not complete until either the situation is resolved (for example, by the lock being released), or the component timeout expires and the modules are shut down regardless of their status.
  • Previously, the timeout value defaulted to 31536000 seconds (365 days), which did not help in situations such as those just described. The new default value is 300 seconds, so that Group Replication components are stopped after 5 minutes if the situation is not resolved before that time, allowing the member to be restarted and to rejoin.
  • References: See also: Bug #31460690, Bug #31648211, Bug #32309647.
  • Replication: Multithreading is now enabled by default for replica servers. A multithreaded applier has a number of applier threads that execute transactions in parallel. This behavior can avoid many cases of unwanted replication lag that can cause temporary divergence between the source and replicas.
  • The following default server settings are used to produce the multithreading behavior:
  • replica_parallel_workers=4. This setting enables multithreading and creates four applier threads on the replica, plus a coordinator thread to manage them. If you are using multiple replication channels, each channel has this number of threads. Four applier threads provide a base level of parallelism, and you can change the setting to specify up to 1024 applier threads.
  • replica_preserve_commit_order=1. This setting ensures that transactions are externalized on the replica in the same order as they appear in the replica's relay log, so the replica never enters a state that the master was not in, and there are no gaps in the sequence of transactions that have been executed from the relay log.
  • replica_parallel_type=LOGICAL_CLOCK. This setting specifies that transactions that are part of the same binary log group commit on a replication source server are applied in parallel on a replica. It is required when replica_preserve_commit_order=1 is set.
  • To override the new defaults and disable multithreading for a replica server, specify replica_parallel_workers=0. This setting disables parallel execution and gives the replica a single applier thread and no coordinator thread. When you apply this setting, the replica_parallel_type and replica_preserve_commit_order options have no effect and are ignored.
  • Replication: In previous releases, Group Replication secured group communication connections and distributed recovery connections between members using its own implementation of the security protocols, including TLS/SSL and the use of an allowlist for incoming Group Communication System (GCS) connections. Replication groups can now use the MySQL Server's own connection security in place of the Group Replication implementation. Using the MySQL protocol means that standard methods of user authentication can be used for granting (or revoking) access to the group in place of the allowlist, and that the latest functionality of the server's protocol is always available on release. Network namespaces are supported for Group Replication when the MySQL communication stack is used.
  • To use the MySQL Server's implementation of the connection security management in place of the Group Replication implementation, set the new system variable group_replication_communication_stack to MYSQL. In addition, the network address set by group_replication_local_address for each group member must be changed to one of the IP addresses and ports which MySQL Server is listening on, as specified by bind_address. If a network namespace is used, this must be configured using the CHANGE REPLICATION SOURCE TO statement in the group_replication_recovery channel.
  • Authentication is carried out using the existing replication user account that Group Replication uses for distributed recovery, as set using CHANGE REPLICATION SOURCE TO, and this user must be given the new GROUP_REPLICATION_STREAM privilege. The TLS/SSL configuration for the connection is taken from Group Replication's existing settings for securing distributed recovery, plus the group_replication_ssl_mode system variable that specifies whether TLS/ SSL is enabled or disabled for group communications. These settings must be configured if they are not already in place. All these settings must be the same on all group members to avoid communication issues.
  • See Configuring a group to use the MySQL Communication Stack for more details.
  • Programs that encounter issues while processing include or includedir directives in option files now produce error messages that are more informative about the cause of the errors. (Bug #32798288, Bug #103397)
  • The default value for the thread_stack system variable has been increased to 1048576 on all supported platforms. (Bug #103912, Bug #32965326)
  • References: See also: Bug #32934187.
  • A default time zone can now be set for a server by using the server option --default-time-zone while starting a MySQL Server Docker container. Before, the container failed to start if the option was used.
  • When GTID-based replication is in use on a replica server, the replication applier and receiver threads still track and have some dependencies on binary log file names and file positions, as used for the alternative binary log file position based replication. A new option for the CHANGE REPLICATION SOURCE TO statement, GTID_ONLY, removes the persistence of file names and file positions from the replication metadata repositories. For replication channels with this setting, in-memory file positions are still tracked, and file positions can still be observed for debugging purposes in error messages and through interfaces such as SHOW REPLICA STATUS statements (where they are shown as being invalid if they are out of date). However, the writes and reads required to persist and check the file positions are avoided in situations where GTID-based replication does not actually require them, including the transaction queuing and application process.
  • The GTID_ONLY option is disabled by default for asynchronous replication channels, but it is enabled by default for group replication channels, and it cannot be disabled for them. To set GTID_ONLY = 1 for a replication channel, GTIDs must be in use on the server (gtid_mode = ON), and row-based binary logging must be in use on the source (statement-based replication is not supported). The CHANGE REPLICATION SOURCE TO options REQUIRE_ROW_FORMAT and SOURCE_AUTO_POSITION must each be set to 1 for the replication channel. When GTID_ONLY is set to 1, the replica uses replica_parallel_workers=1 if that system variable is set to zero for the server, so it is always technically a multi-threaded applier. This is because a multi-threaded applier uses saved positions rather than the replication metadata repositories to locate the start of a transaction that it needs to reapply.
  • The asynchronous connection failover mechanism for MySQL replication now enables a replica that is part of a managed replication group to automatically reconnect to the sender if the current receiver (the primary of the group) fails. The new feature works with Group Replication, on a group configured in single-primary mode, where the group’s primary is a replica that has a replication channel with SOURCE_CONNECTION_AUTO_FAILOVER set to ON. The feature operates by default on a group in this situation, although you can disable it for the group by disabling the new member action mysql_start_failover_channels_if_primary, using the group_replication_disable_member_action() function. The feature is designed for a group of senders and a group of receivers to keep synchronized with each other even when some members are temporarily unavailable. It also synchronizes a group of receivers with one or more senders that are not part of a managed group. A replica that is not part of a replication group cannot use this feature.
  • To configure this feature, the replication channel and the replication user account and password for the channel must be set up on all the member servers in the replication group, and on any new joining members. You can do this using the CHANGE REPLICATION SOURCE TO statement, or if the new servers are provisioned using MySQL’s clone functionality, this all happens automatically. The SOURCE_CONNECTION_AUTO_FAILOVER setting for the channel is broadcast to group members from the primary when they join, and also if it is changed. The source list is broadcast to all members when they join or when it is updated. If the primary goes offline or into an error state, the new primary that is selected for the group has the source list and the channel configuration already in place, and establishes a replacement asynchronous replication connection with the source.
  • A new function asynchronous_connection_failover_reset() is also provided for administrators to remove all settings relating to the asynchronous connection failover mechanism. Use this function to clean up a server that is no longer being used in a managed group.
  • The group communication engine for Group Replication (XCom, a Paxos variant) defaults to using every member of the group as a leader. When the Group Replication communication protocol version is set to 8.0.27 or later, the group communication engine can now use a single leader to drive consensus when the group is in single-primary mode. Operating with a single consensus leader improves performance and resilience in single-primary mode, particularly when some of the group’s secondary members are currently unreachable.
  • The single consensus leader is colocated with the group’s primary, and changes when a new primary is elected. The Performance Schema table replication_group_communication_information shows the preferred and actual consensus leader, or leaders if all members are used as a leader, the communication protocol version, and the write concurrency.
  • To enable the new behavior, set the system variable group_replication_paxos_single_leader to ON (the default is OFF). When Group Replication is running in multi-primary mode, or with earlier communication protocol versions, or when group_replication_paxos_single_leader is set to OFF, the group communication engine operates using every member of the group as a leader.
  • Note that when you manually upgrade the members of a replication group to a new MySQL Server release, the group's communication protocol version is not automatically upgraded to match. If you no longer need to support members at earlier releases, you can use the group_replication_set_communication_protocol() function to set the communication protocol version to the new MySQL Server version to which you have upgraded the members. MySQL InnoDB Cluster manages the communication protocol version automatically for replication groups created using that function.
  • For online DDL operations, storage is usually the bottleneck. With this change we have improved CPU utilization and index building. Scan phase CPU utilization has been improved and the indexes can be built simultaneously instead of serially. Memory management is also tightened to respect the memory configuration limits set by the user.
  • The new innodb_ddl_buffer_size variable defines the maximum buffer size for DDL operations. The default setting is 1048576 bytes (approximately 1 MB). Defining a buffer size limit avoids potential out of memory errors for online DDL operations that create or rebuild secondary indexes.
  • The clone plugin now permits concurrent DDL operations on the donor MySQL Server instance while a cloning operation is in progress. Previously, a backup lock was held during the cloning operation, preventing concurrent DDL on the donor. To revert to the previous behavior of blocking concurrent DDL on the donor during a clone operation, enable the clone_block_ddl variable. See Cloning and Concurrent DDL.
  • Setting a session value for the internal_tmp_mem_storage_engine variable now requires the SESSION_VARIABLES_ADMIN or SYSTEM_VARIABLES_ADMIN privilege.
  • Bugs Fixed:
  • Incompatible Change: For all SELECT statements on a view, the query digest was based on the view definition. As a result, different queries had the same digest and aggregated together in the Performance Schema table events_statements_summary_by_digest, so statistics in that table were not usable for distinguishing distinct SELECT statements.
  • The query digest for each SELECT statement on a view now is based on the SELECT, not the view definition. This enables distinguishing distinct SELECT statements in the events_statements_summary_by_digest table. However, tools that use query digests may need some adjustment to account for this change. For example, MySQL Enterprise Firewall and query rewrite plugins rely on query digests and existing rules for them that are associated with views may need to be updated. (Bug #27540213, Bug #89559, Bug #31761802)
  • Important Change: EXPLAIN FORMAT=TREE now shows whether an index scan uses a covering index, and thus does not need to look up other columns from the table/clustered index. For example, if idx1 is a covering index, the old output Index scan on t1 using idx1 is now shown as Covering index scan on t1 using idx1. Previously, this information was shown only for FORMAT=TRADITIONAL and FORMAT=JSON.
  • This fix also improves the wording used for full-text search to align with this change. For example, the old output Indexed full text search on t1 (which was the same in both the covering and non-covering cases) is now Full-text index search on t1 when there is no covering index, and Full-text covering index search on t1 when a covering index is used. (Bug #32825235)
  • InnoDB: An excessive number of notes were written to the error log when the innodb_open_files limit was temporarily exceeded. (Bug #33343690)
  • InnoDB: An in-place DDL operation failed to flush all modified pages. (Bug #33290335, Bug #33238133)
  • InnoDB: A parallel scan returned an incorrect partition ID when loading data into HeatWave from a subpartitioned InnoDB table. (Bug #33276021)
  • InnoDB: The unused os_event::event_iter field in the InnoDB sources was removed to reduce memory use in the os_event structure.
  • Our thanks to Facebook for the contribution. (Bug #33252468)
  • InnoDB: A workaround was implemented for a Clang issue that causes a build failure on Windows (Bugzilla – Bug 51538). (Bug #33217633)
  • InnoDB: The srv_purge_thread and srv_worker_thread threads were duplicated in the performance_schema.threads table.
  • Thanks to Kaige Ye for the contribution. (Bug #33209066, Bug #104575)
  • InnoDB: Truncation of an undo tablespace during use by an active transaction raised an assertion failure. The transaction was prematurely marked as complete, permitting the truncation operation. (Bug #33162828)
  • InnoDB: When loading data into HeatWave from a partitioned table with concurrent DML modifying the primary key, the partition ID reported in the load callback was found to be incorrect for some records. (Bug #33139692)
  • InnoDB: Instances of MY_ATTRIBUTE((noreturn)) and MY_ATTRIBUTE((unused)) in the InnoDB sources were replaced by C++17 [[noreturn]] and [[maybe_unused]] attributes. (Bug #33112971)
  • InnoDB: Each buffer pool block includes a block->lock_hash_val field. Caching of this value was determined to be unnecessary, as it introduced unnecessary coupling of the buffer and lock system and unnecessary memory usage. (Bug #33072415)
  • InnoDB: A query that performed an index merge with retrieval ordered by row ID raised an assertion failure. The record buffer set up for the index merge could not be used due to the scanned table containing a primary key with a BLOB component. A record buffer cannot be used for reading BLOBs, which are stored outside of the record. The BLOB primary key was not detected when the record buffer was set up, as the primary key column was not yet in the read set. Retrievals ordered by row ID temporarily add the primary key at a later stage when needed. To address this issue, a record buffer is no longer requested for row-ordered retrievals if the primary key has a BLOB component. (Bug #33067554)
  • InnoDB: Deleting or updating a row from a parent table initiated a cascading SET NULL operation on the child table that set a virtual column value to NULL. The virtual column value should have been derived from the base column value.
  • Thanks to Yin Peng at Tencent for the contribution. (Bug #33053297)
  • InnoDB: On a system that was nearing disk capacity, an InnoDB recovery operation involving application of file extension redo log records (MLOG_FILE_EXTEND) could cause a failure. (Bug #33002492)
  • InnoDB: Conflicting explicit locks granted on the same record raised an assertion failure. (Bug #33000142)
  • InnoDB: Freeing the first page of LOB at the end of purge batch raised an assertion failure. The failure was due an invalid root page number. (Bug #32958624)
  • InnoDB: To facilitate failure reporting and resolution, the ib::fatal() function in the InnoDB sources was revised to include the caller's location. (Bug #32957311)
  • InnoDB: Recovery on the clone recipient server failed with the following error: Error reading encryption for innodb_undo_007. The encryption key was not written to encrypted spaces created during the page copy phase of the clone operation. (Bug #32950216)
  • InnoDB: To avoid generating unwanted warning messages, the fil_space_acquire() function in the InnoDB sources was replaced by the fil_space_acquire_silent() function where possible. Both functions are used by background threads to acquire a tablespace. (Bug #32944543)
  • InnoDB: InnoDB CRC32 checksum algorithm implementations have now been optimized for use with ARM and x86/x64 architectures. (Bug #32887066)
  • InnoDB: Startup on an instance with thousands of tables took an excessive amount of time due a large amount of traffic on the error logging subsystem. (Bug #32846656)
  • InnoDB: The INFORMATION_SCHEMA.FILES view did not show the current path of the temporary tablespace file, and the file name shown was different from the one defined by the innodb_temp_data_file_path variable. (Bug #32840635, Bug #103553)
  • InnoDB: On Windows, keeping a file open without a shared write lock while attempting to acquire the fil_shard mutex caused a deadlock with another thread that had acquired the fil_shard mutex and was attempting to access the same file. (Bug #32808809)
  • InnoDB: Starting a MySQL Server instance using the same InnoDB data files as an another running MySQL Server instance resulted in an initialization failure. (Bug #32777654, Bug #103338)
  • InnoDB: The InnoDB recovery process did not recognize that page compression had been applied to data that was being recovered, causing the tablespace data file to increase in size during the redo log apply phase, which could lead to a recovery failure for systems approaching a disk-full state. (Bug #32771259)
  • InnoDB: An assert that traversed a list of file segments which were not full to calculate the number of used pages for comparison with the number of used pages tracked by a field in the file segment inode failed sporadically. (Bug #31685095)
  • InnoDB: A transaction failed to roll back when the server was restarted after failure occurred during an online DDL operation. Table locks could not be resurrected for the uncommitted transaction and the data dictionary table object could not be loaded for the affected table.
  • Thanks to Shaohua Wang for the contribution. (Bug #31131530, Bug #99174)
  • InnoDB: A query that used a temporary table for aggregation exhausted the memory available to the TempTable storage engine, causing an update operation to fail with a table is full error. (Bug #31117893, Bug #99100)
  • Replication: During the Group Replication auto-rejoin procedure, a group member sets its status to RECOVERING. If the group member does not manage to rejoin, it should change the status to ERROR, but if a view change occurred in the meantime, it was possible for the status to remain in RECOVERING. The member status is now set to ERROR after an unsuccessful auto-rejoin procedure, regardless of any ongoing or stuck view changes. (Bug #33276418)
  • Replication: Garbage collection for certification information has been moved from the Group Replication Group Communication System (GCS) thread to a background thread, so that sending and receiving of messages are not blocked while garbage collection is in progress. (Bug #33190276)
  • Replication: When Group Replication is configured with group_replication_consistency = BEFORE_ON_PRIMARY_FAILOVER, in the event of a primary failover, client connections are held until the new primary has the same state as the previous primary. Some monitoring and administration statements are exempt from this hold, so that the new primary can be inspected during the failover process.
  • Previously, DO statements had a blanket exemption from the hold, but now only DO statements that do not use tables or loadable functions are exempt, as for SELECT statements. (Bug #33130768)
  • Replication: The replication applier (SQL) thread overrode retryable errors (such as deadlocks and wait timeouts) from storage engines with a key not found error, causing replication to stop without retrying the transaction. These errors are no longer overridden. (Bug #33107663)
  • Replication: MySQL Server incorrectly permitted reads from Performance Schema tables relating to Group Replication while Group Replication was stopping or restarting, and the data concerned should not have been used. The server now checks whether Group Replication is in OFFLINE status or uninitialized before executing the query. (Bug #33085494)
  • Replication: When Group Replication is configured with group_replication_consistency = BEFORE_ON_PRIMARY_FAILOVER, in the event of a primary failover, client connections are held until the new primary has the same state as the previous primary. Some monitoring and administration statements are exempt from this hold, so that the new primary can be inspected during the failover process. Previously, SHOW statements had a blanket exemption from the hold (with the exception of SHOW CREATE USER), but now only SHOW statements that do not depend on data (only on status or configuration) are exempt. The exempt SHOW statements are listed in the documentation for the feature. (Bug #33082509)
  • Replication: While Group Replication's distributed recovery process was ongoing to synchronize a joining member with the donor, the Performance Schema table replication_group_member_stats table was not updated with the current number of transactions queued on the group_replication_applier channel (the COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE field.) The count is now tracked while new transactions are arriving during distributed recovery, although it remains zero until the joiner has certified the transactions that were received in the first phase of distributed recovery. (Bug #33067441)
  • Replication: For multithreaded replicas (replicas on which replica_parallel_workers is set to a value greater than 0), if replica_parallel_workers is set to 1, the setting for replica_preserve_commit_order is now ignored. When there is a single applier, transactions are always executed and committed in the same order as in the replica's relay log; ignoring the process to preserve the commit order avoids potential performance degradation. (Bug #33048169)
  • Replication: A deadlock could occur when a statement referencing Access Control Lists (ACLs), such as CREATE USER, was executed on the primary of a Group Replication group, and a member joined the group immediately afterwards before the transaction commit was confirmed by the other group members. The distributed recovery process needs a read lock on the ACL cache which is locked by the ACL statement. This situation blocked Group Replication's Group Communication System (GCS) thread until the ACL statement timed out, making the primary unreachable and possibly preventing the new member from joining. The ACL cache lock is now no longer required for the distributed recovery process, although the lock in the situation described is only released after the view change is complete and the ACL statement is committed. Any new connections or statements that require the ACL cache lock, including a member join when Group Replication uses the MySQL communication stack, must therefore wait on this or fail and retry. (Bug #33025231)
  • Replication: An assertion was raised if a replica MySQL Server instance with unpopulated time zones attempted to replicate a statement that set a time zone value that was unknown to the replica. Replicas now handle this situation correctly. (Bug #32986721)
  • Replication: The error messages issued by MySQL Replication when GTIDs required for auto-positioning have been purged could be incorrectly assigned or scrambled in some situations. (Bug #32965864)
  • Replication: If the thread that runs Group Replication’s applier module is stopped, the group cannot function properly because it cannot exchange group transactions and messages. Previously, a member in this situation remained in ONLINE status and ignored the internal errors. The member now changes to ERROR status if the thread is stopped, and takes the action specified by the group_replication_exit_state_action system variable. (Bug #32934479)
  • Replication: If a group member was elected as the primary right before or while it was shutting down, the shutdown process hung while waiting on the primary election process, which was attempting to make the server leave the group since the election had failed due to the shutdown. The error handling process for primary elections now takes this into account, and does not take any further actions if the member is already leaving the group. (Bug #32884709)
  • Replication: The contents of the gtid_executed and gtid_purged GTID sets were not persisted after restoring a dump taken using mysqldump. The dump file sequence has now been changed so that the mysql schema (which contains the mysql.gtid_executed table) is not dropped after the gtid_purged GTID set is written. A new option --skip-mysql-schema is added for mysqldump which lets you choose not to drop the mysql schema at all. (Bug #32843447)
  • Replication: Querying the Performance Schema table replication_asynchronous_connection_failover could return an error if a row was deleted during the query process. In this situation, the row count is now returned as zero, and the query can be retried. (Bug #32701593)
  • Replication: In some situations, a replica that used connection compression was not able to re-establish a lost connection to the source server. The issue has now been fixed. (Bug #32494609)
  • Replication: From MySQL 8.0.22, a replication source server writes a TRUNCATE TABLE statement to the binary log to notify replicas to empty a MEMORY table the first time it is used after a server restart. Previously, the thread where the statement was logged was not registered with the global thread manager, so Group Replication was not able to acknowledge it. The issue has now been corrected. (Bug #32355801)
  • JSON: Made additional improvements in JSON function error handling to those made in MySQL 8.0.23. (Bug #32864910)
  • References: See also: Bug #31856260.
  • JSON: JSON_TABLE() allowed duplicate column names when the names differed in case only, although column names are case-insensitive in MySQL.
  • Now this function compares column names in case-insensitive fashion. (Bug #102824, Bug #32591074)
  • The MySQL client library could contribute to a memory leak if MySQL was linked against OpenSSL 1.0.1, as is the case for builds on EL6. (Bug #33335046)
  • Regular expression functions now report an error when an expression or pattern cannot be converted to a character set which is suitable for the ICU regular expression engine.
  • In addition, error checking in several geometry functions has been improved. (Bug #33290245)
  • Implicitly grouped queries sometimes calculate aggregates during optimization when their values can be easily retrieved from indexes. When a predicate referenced a column that was declared with a NO PAD collation, that predicate might be evaluated using PAD SPACE semantics, and so return wrong results. This was because an internal function that checked for insignificant trailing spaces made the assumption that all nonbinary collations had PAD SPACE semantics, which was true of MySQL 5.7, but is not the case for MySQL 8.0, which has added many collations having NO PAD semantics, including the default collation (utf8mb4_0900_ai_ci).
  • We fix this by explicitly checking the padding attribute of the collation in such cases. (Bug #33282123)
  • A query containing a common table expression with a MATCH() AGAINST() clause executed on a table defined without a full-text index raised an assertion failure. (Bug #33264864)
  • Several Performance Schema tables contained default timestamp values of 0 (zero) which conflicted with the default sql_mode values NO_ZERO_IN_DATE and NO_ZERO_DATE.
  • For example, attempting to create a new table based on such a Performance Schema table resulted in an error similar to the following: ERROR 1067 (42000): Invalid default value for 'FIRST_SEEN'
  • Default timestamp values have been removed from the following tables:
  • performance_schema.events_errors_summary_by_account_by_error
  • performance_schema.events_errors_summary_by_host_by_error
  • performance_schema.events_errors_summary_by_thread_by_error
  • performance_schema.events_errors_summary_by_user_by_error
  • performance_schema.events_errors_summary_global_by_error
  • performance_schema.events_statements_summary_by_digest
  • performance_schema.host_cache
  • performance_schema.replication_applier_filters
  • performance_schema.replication_applier_global_filters
  • (Bug #33240123, Bug #104643)
  • A failed write to the NOTIFY_SOCKET environment variable caused a failure. The ER_SYSTEMD_NOTIFY_WRITE_FAILED error associated with the failed write has two parameters, but only one parameter was passed to the error logging routine. (Bug #33239183)
  • An incorrectly type-casted variable was used when setting the --ssl-fips-mode option. (Bug #33223230)
  • The following threads were not present in the performance_schema.threads table:
  • buf_resize_thread
  • fts_optimize_thread
  • Thanks to Kaige Ye for the contribution.
  • Thanks to Kaige Ye for the contribution. (Bug #33214130, Bug #104582, Bug #33214136, Bug #104583)
  • A recursive call to an internal save function led to an unexpected error. (Bug #33198164)
  • The SPACE() function did not handle certain large or unsigned values correctly. (Bug #33180446)
  • The internal mysqld_list_fields() function failed to remove temporary tables created to evaluate JSON table functions. (Bug #33177686)
  • The code to produce minimal TAR packages added debug symbols to the packages, which caused larger (roughly by 10x) builds. Now DEB/RPM compiler flags are on by default for debug symbol builds, and off by default for minimal sized release builds. (Bug #33151629, Bug #104402)
  • Some multi-table DELETE statements were found to leak memory. (Bug #33151275)
  • References: See also: Bug #18684036.
  • The return value for a copy function internal to the server was not handled as expected. (Bug #33142669)
  • References: This issue is a regression of: Bug #31982292.
  • YEAR values were not always interpreted correctly. (Bug #33142669)
  • References: This issue is a regression of: Bug #31994744.
  • Empty range frames were not always handled correctly. (Bug #33142418)
  • References: This issue is a regression of: Bug #90300, Bug #27808099.
  • Function arguments were not always evaluated correctly during resolution of functions defined within views. (Bug #33142010)
  • References: This issue is a regression of: Bug #29904087.
  • In debug builds, the ALTER TABLE statement could produce an error if it added a new virtual column with the same name as one of the columns later referred to by a foreign key. This fix now ignores a virtual column if the name is duplicated and instead uses existing, non-virtual column names to check conditions. (Bug #33114045)
  • An assert condition to ensure that execution of a stored program instruction is started when there are no errors did not work properly for a CASE statement in a loop. (Bug #33079184)
  • In debug builds, ANALYZE TABLE with the UPDATE HISTOGRAM clause could return a non-success value to the caller, instead of a success value, after successfully clearing the diagnostics area. (Bug #33079073)
  • The mecab_charset system status variable now reports its value as utf8mb4 rather than utf8, which is deprecated. (Bug #33078623)
  • In debug builds, MySQL Enterprise Encryption UDFs did not set the nullable flag when returning NULL. (Bug #33077931)
  • The range optimizer was sometimes called when a plan lock was in force. This caused issues since the range optimizer can call itself, but a plan lock does not allow for recursion. (Bug #33076462)
  • References: This issue is a regression of: Bug #18684036.
  • CAST() and DEFAULT(), when used inside stored routines, were not always handled correctly. (Bug #33075828)
  • String functions that use temporary string buffers during evaluation could lead to unexpected shutdowns. (Bug #33073951)
  • The error message emitted after a host name failed to resolve to an IP address did not include a meaningful errno value. Now, (-2) indicating EAI_NONAME is returned in the message instead of (0). (Bug #33064143)
  • A statement such as CREATE TABLE t SELECT 1 created an InnoDB table that was written incorrectly to the binary log if the value of binlog_format was set to ROW and sql_mode was in ANSI mode. As a result, replication of the statement failed with an error on the replica. Applying the mysqlbinlog utility to such a binary log could also fail.
  • The atomic CREATE...SELECT was implemented by adding a new clause to CREATE TABLE called START TRANSACTION. However, this clause was not added when ANSI mode was enabled. This in turn caused the execution of an ordinary implicitly committed CREATE TABLE in the middle of the transaction and produced an error in GTID mode if the transaction had an assigned GTID. The issue is fixed by removing the SQL mode dependency from the new clause. (Bug #33064062, Bug #104153)
  • A log file containing a malformed ISO8601 timestamp was processed incorrectly. (Bug #33060440)
  • String conversion warnings that previously referred to utf8 now reference utf8mb3 instead. (Bug #33059330)
  • For Enterprise Linux 8 (and Fedora), fixed the debuginfo RPMS packages by disabling REPRODUCIBLE_BUILD in fprofile.cmake. (Bug #33037380)
  • EXPLAIN FORMAT=TREE now shows more precise information than displayed previously about scans generated by the range optimizer. In particular, sub-iterators are now displayed explicitly, and are properly timed with EXPLAIN ANALYZE; index range scans now show the actual ranges being scanned. Descriptions in the output are also more user-friendly than before; for example, index_for_group_by shown for a query using DISTINCT is replaced by index skip scan for deduplication.
  • In addition, a roundoff error causing inaccuracies in row count estimation for read over range intersection scans has been corrected, and optimizer traces for index range scans now correctly displays implicit key parts from InnoDB primary keys when they are used. (Bug #33037007, Bug #33062448)
  • For a query with rollup, when setting an expression as nullable because it had a grouping column, we missed setting all expressions within that expression as nullable, doing so only for the topmost expression. This meant that, during evaluation, a NULL generated by rollup was not always propagated correctly. To fix this, we now set all the expressions having a grouping column as nullable when the query uses rollup. (Bug #33036184)
  • During execution of EXPLAIN, when crossing into a different query block through a streaming or materialization node, this node was counted as the root, rather than the actual root node. (Bug #33030136)
  • Fixed an undefined conversion from double to int64 in sql/join_optimizer/cost_model.cc. (Bug #33024410)
  • The internal function find_in_group_list() did not match up match up all items correctly during ROLLUP processing. We fix this by adding casts to GROUP BY expressions. (Bug #33022742, Bug #33123934)
  • References: This issue is a regression of: Bug #30969045.
  • A missing test for success of a memory allocation in the MySQL client library could lead to a client exit. (Bug #33019026)
  • An audit log function call from a prepared statement caused an error. (Bug #33016004)
  • Avoid adding column names prefixed with !hidden! to ensure that new names do not collide with names used by existing hidden columns for functional indexes. Generated hidden column names now have the following new form that extends the use of functional indexes into environments that do not support names generated by MD5():
  • !hidden!index_name!key_part_number!counter
  • The counter value of a generated name is zero unless a column with that name already exists in the table. In this case, the value is incremented until the name becomes unique. (Bug #32983024)
  • Removed an unnecessary hard-coded dependency on the range optimizer from sql_help.cc. (Bug #32976042)
  • Insufficient buffer space allocation during window function execution could cause an assertion to be raised. (Bug #32975889)
  • When finding the list of tables under a hash join, we did not take into account those that were also hidden under ZERO_ROWS iterators. This could lead to NULL row flags not being set correctly, which also caused problems when weedout wanted to save row IDs for them. (Bug #32975168)
  • The gen_dictionary(), gen_range(), and gen_rnd_pan() data masking functions each could generate the same value if executed in close temporal proximity multiple times. (Bug #32970772)
  • Creation and deletion of temporary tables used in resolution of common table expressions and having table references created within subqueries were not always managed correctly. (Bug #32962511)
  • When the -–binary-as-hex option is enabled for the mysql client, empty strings are now printed as 0x instead of NULL. (Bug #32961656, Bug #103906)
  • The resolver usually terminates the analysis and exits after encountering an error in a statement. In the case of duplicate column analysis, the resolver continued to the end of the column list, possibly adding multiple error messages to the diagnostics object. (Bug #32960158)
  • When a scalar subquery returned multiple rows, the resulting error was not always handled correctly. (Bug #32956779)
  • Changing the server SQL mode after creating a table containing generated columns could cause spurious messages to be written to the error log. (Bug #32954466)
  • Manifest file reading could fail on Windows. (Bug #32950322)
  • Evaluation of the values in an IN() list did not stop immediately on error, which led to assert failures. We fix this by stopping evaluation in such cases as soon as an error has been raised. (Bug #32942328)
  • If an error was raised while evaluating a comparison of two non-nullable values as strings, the result of the comparison was set to NULL, even though the result was non-nullable according to the comparison operator metadata. The error was correctly returned to the user, but an assertion was raised by this inconsistency when running in debug mode.
  • This is fixed by causing Arg_comparator not to set its owner to NULL when the owner is not nullable. (Bug #32942327)
  • An unset variable referenced in an SQL script executed during an upgrade operation caused a failure. (Bug #32939819)
  • Improper error propagation in filesort operations could raise an assertion. (Bug #32932969)
  • Bit functions in window expressions assert that the runtime size of a bit mask is not bigger than its resolve time size. We found several violations of this rule, listed here:
  • ENCRYPT() sometimes computed the maximum size of the result incorrectly.
  • CONVERT(), CONCAT(), CONCAT_WS(), EXPORT_SET(), INSERT(), REPLACE(), and WEIGHT_STRING() did not compute the maximum result length properly for the binary character set.
  • During resolution of REPLACE(str, from_str, to_str) we assumed that the entire length of from_str would be replaced for each match in str, but since from_str may be only 1 character long, it is possible for str to be replaced with multiple copies of to_str.
  • COMPRESS() computed the maximum result length in an arbitrary fashion. Now we use compressBound from the zlib library instead.
  • (Bug #32922688, Bug #33117410, Bug #33275424)
  • In the internal WalkAndReplace() function, errors from set_cmp_func() were not correctly propagated. (Bug #32918927, Bug #33007298)
  • References: This issue is a regression of: Bug #32548377.
  • A deadlock could occur if a RESET REPLICA ALL statement was used while the channel configuration was being read. (Bug #32906709)
  • A potential race condition in accessing the persisted variables cache has been eliminated. (Bug #32901419)
  • The constant propagation performed by the MySQL optimizer could in some cases replace references to a column that was not nullable with a nullable expression. When this occurred, the parent item of the replaced column reference could sometimes have the wrong nullability, leading assert failures later, during execution, when a non-nullable item unexpectedly returned NULL.
  • We fix this by skipping constant propagation in cases where a non-nullable column reference is replaced by a nullable expression. (Bug #32895824)
  • References: This issue is a regression of: Bug #32371039.
  • A column name provided in a query could differ in collation details, or because the name was provided as an expression alias in the query, and still match a column name in the dictionary. The query output contained the column name specified in the query (for example, aaa) rather than the column name from the dictionary (for example, AAA). (Bug #32892045)
  • When the server SQL mode is other than strict mode, certain string functions return NULL to indicate that the result is too large for the result buffer, which could lead to in inconsistent behaviour such as incorrectly sorted output. In addition, the functions LAST_INSERT_ID() and CAST(... AS CHAR) did not maintain nullability properly for all cases. (Bug #32864958)
  • Hidden items added as part of an ORDER BY, windowing function, or a reference to a view were not always handled correctly in implicitly grouped queries. (Bug #32863279, Bug #33079592)
  • Type resolution for negation did not set the proper precision when converting the type from integer to decimal. This is fixed by assigning the same precision as the argument. (Bug #32863037)
  • References: This issue is a regression of: Bug #31348202.
  • Improper error propagation for failed CREATE TABLE ... SELECT statements caused rollback not to occur. (Bug #32855882)
  • When used in a subquery, a VALUES having more than one ROW() was not always handled correctly. (Bug #32851684)
  • The error packet that MySQL Server sends to a client program when the wait timeout expires (ER_CLIENT_INTERACTION_TIMEOUT) used an incorrect sequence number of 2 instead of 0 in the packet header when protocol compression was used. (Bug #32835205, Bug #103412)
  • Concurrent insert operations on multiple tables with full-text indexes caused a large number of full-text index synchronization requests, resulting in an out of memory condition. (Bug #32831765, Bug #103523)
  • The fix for a previous issue, following subsequent work which made it redundant and which led to invalid results from expressions used in window functions, has been reverted. (Bug #32820802)
  • References: Reverted patches: Bug #26389508.
  • In prepared statements, NULLIF() result type determination could be incorrect. (Bug #32816305, Bug #103458)
  • When transforming EXISTS to a semijoin, and when the query contained a view reference, the query was not processed correctly. (Bug #32813550)
  • References: This issue is a regression of: Bug #30671329.
  • Creating and dropping of views within stored routines were not always handled correctly. (Bug #32807430)
  • The fix for a previous issue included a minor refactoring of how the precision and scale of a decimal expression were determined. It later emerged that, for the TRUNCATE() function, we might end up with a precision of zero, which is invalid.
  • We fix this problem by treating a precision of zero as one. (Bug #32802251)
  • References: See also: Bug #31348202.
  • For legacy reasons, we can have composite access paths including Filter and Sort inside table_path. For ease of analysis and better formatting, we move the EXPLAIN output for these previous to the Materialize access path.
  • Constant folding did not always handle errors correctly when evaluating decimal expressions. (Bug #32785804)
  • A call order mismatch in Query_block::prepare_values() caused setup_order() to be called after resolve_subquery(), which meant that, for a VALUES clause that was a subquery, the subquery could be merged into the outer query block before calling setup_order(), leading to inconsistent data structures and an error.
  • We fix this issue by performing setup_order() earlier, and, if the column is not found, resolution is aborted. (Bug #32783943)
  • References: This issue is a regression of: Bug #31387510.
  • In the Performance Schema table variables.info, the system variable skip_slave_start was incorrectly listed as COMPILED when the global value was actually loaded from the persisted variables file, so PERSISTED should have been used. (Bug #32640588)
  • A SELECT query on the INFORMATION_SCHEMA.PROCESSLIST view with concurrent MySQL Server load caused a failure. (Bug #32625376)
  • When a query uses a temporary table for aggregation, the group by item is used as a unique constraint on the temporary table: If the item value is already present, the row is updated; otherwise, a new row is inserted into the temporary table. If the item has a result field or reference item, it it evaluated twice, once to check whether the result exists in the temporary table and, if not, again while constructing the row to be inserted. When the group by item was nondeterministic, the result value used to check for existence differed from that with which an insert was attempted, causing the insert to be rejected if the value already existed in the table.
  • We fix this by using the hash of any nondeterministic items as the unique constraint, so that the hash is evaluated once only. (Bug #32552332)
  • In the case of a lateral derived table, if the creation of the cache invalidator was delayed, the table materialization was emitted without the invalidator, which kept rematerialization from occurring during execution and led to wrong results.
  • The pending cache invalidator was emitted only when the index of the lateral table was less than that of the last table in the table list being considered. When the table index of the pending invalidator was equal to the last table of the join slice, the cache invalidator was skipped and the materialization was emitted without the invalidator.
  • We fix this by creating the pending cache invalidator if the table index of the pending invalidator is less than or equal to that of the last table in the table list of the current join slice. (Bug #32407774)
  • Privilege-checking for table-specific roles was in some contexts not restrictive enough. (Bug #32400788)
  • Inconsistencies in how certain comparison predicates were evaluated (for example, when part of a WHERE clause) could return different results if a function was used instead of a string literal. (Bug #32345941, Bug #102151)
  • Columns of type ENUM or SET are ordered based on numeric comparison, but the comparison function for range expressions (that is, expressions used for ordering in case of a range frame specification) of a window function is set based on the result type of the column, which for ENUM and SET is String. As a result, processing of rows for a window frame (to see whether a row is before or after the frame) did not work correctly; for example, a string comparison might determine that a row occurs before a frame, while a numeric comparison would have placed the row after.
  • To fix this problem, we implement integer cache items for ENUM and SET, as well as integer comparison functions for use when ENUM or SET types are involved in range expressions. (Bug #32328576)
  • A DML statement, when accessing a subquery which had been optimized away and cleaned up, led to an unplanned shutdown of the server. (Bug #32244822)
  • When resolving columns, their names are compared in case-insensitive fashion using utf8_general_ci, which does not always follow the same comparison rules as those for the collation actually used for the table. Previously, when a table had in excess of 32 columns, name lookup was performed using a hash table. Hashing is collation-aware, and so follows the collation's comparison rules; this caused name lookup and duplication detection to be done in an inconsistent fashion. We solve this problem by removing the hash, and performing column name resolution in the same way in all cases regardless of the number of columns. (Bug #32169656)
  • For a nullable column, when adjacent ranges were rounded off to the same value by range optimizer, wrong results were returned. (Bug #31870920)
  • References: See also: Bug #98826, Bug #30988735.
  • Quote handling was improved for the SHOW GRANTS statement. (Bug #31716706)
  • An attempt could be made to write a JSON_TABLE() expression to the optimizer trace before the temporary table backing the table function had been created, causing an assertion to be raised. Now when the column type is not yet available, <column type not resolved yet> is written. (Bug #31578783)
  • Validity checks for mandatory_roles system variable settings are now synchronized with validity checks performed for GRANT role statements. (Bug #31218040)
  • The keyring_hashicorp_update_config() function was not safe for concurrent execution. (Bug #31205028)
  • The gen_dictionary() function now takes latin1 as the character set of its argument, and returns the same character set. (Bug #30389649)
  • The query rewrite plugin failed when refreshing the rewrite rules and the table holding the rewrite rules contained rows that had been marked as deleted, but not physically removed.
  • We fix this by causing the query rewrite plugin to skip the deleted rows instead of failing when it sees them. (Bug #22654105)
  • Refactoring done as part of implementing window functions in MySQL made it possible to refer to aliases of aggregates in ORDER BY clauses but also allowed direct references to such aggregates, even though this should not be allowed. Now the server checks explicitly for such illegal references. (Bug #13633829, Bug #30106081)
  • In certain cases, the view reference cloned when pushing a condition down to a derived table was not always resolved in the desired context. In addition, a check for a null condition was not performed correctly. (Bug #104574, Bug #33209907, Bug #33197276)
  • Otherwise identical strings, using, respectively, the ASCII (collation ascii_general_ci) and UCS2 (collation ucs2_general_ci) character sets did not match as expected in join conditions. (Bug #104571, Bug #33204161)
  • References: See also: Bug #24847620, Bug #30746908, Bug #32244631, Bug #32501472.
  • Given the default collation c1 of a character set cs, and a different collation c2 (that is, not equal to c1), then the statement CREATE DATABASE d COLLATE c2 CHARACTER SET cs created a new database with the default collation set to c1 instead of c2. (Bug #104504, Bug #33183590)
  • Some queries using HAVING COUNT(DISTINCT ...) did not return any rows when one was expected. (Bug #104411, Bug #33152269)
  • References: This issue is a regression of: Bug #31790217.
  • Multi-valued indexes were not used in the following cases:
  • In views
  • In prepared statements
  • In a WHERE containing MEMBER OF() combined using OR with another predicate
  • In addition, MySQL wrongly reported impossible condition for a WHERE clause in the form f() AND f(), where f() was any of MEMBER OF(), JSON_CONTAINS(), or JSON_OVERLAPS().
  • Our thanks to Yubao Liu for the contribution. (Bug #104325, Bug #104700, Bug #104721, Bug #33123079, Bug #33268466, Bug #33275457)
  • References: See also: Bug #102359, Bug #32427727. This issue is a regression of: Bug #30838807.
  • When NULL was passed to a user-created function that called REGEXP_INSTR(), the first invocation of the function returned NULL as expected, but each subsequent invocation of the function also returned NULL without regard to the value passed to it. (Bug #104239, Bug #33089668)
  • Some of the functions defined in mbr_utils.cc threw heap-allocated exceptions in some situations. Memory allocated for the exception object in these cases was never freed, which meant that a small amount of memory leaked each time an exception was thrown.
  • This is fixed by allocating the exception on the stack in such cases, instead. (Bug #104214, Bug #33086286)
  • Column names were not displayed correctly in the results of ROLLUP queries when the subquery_to_derived optimization was enabled. (Bug #104139, Bug #33057397, Bug #33104036)
  • A stored procedure containing an IF statement using EXISTS, which acted on one or more tables that were deleted and recreated between executions, did not execute correctly for subsequent invocations following the first one. (Bug #103607, Bug #32855634)
  • When executing a range query with multiple identical ranges joined by OR (for example, a query with WHERE (a=1 AND b=2 AND c=3) OR (a=1 AND b=2 AND c=3)), the optimizer lost part of the range, and so chose a query plan that was not optimal.
  • Our thanks to Facebook for the contribution. (Bug #102634, Bug #32523520)
  • While evaluating a loose index scan as a possible option for performing grouping and finding the minimum value, the cost calculation did not reflect the fact that the query looked at one group only, due to the equality predicates on the grouping attributes. This resulted in examination of additional rows since grouping is performed after reading the rows from the index.
  • We fix this by determining whether a query produces only one group by checking for the presence of equality predicates on grouping attributes and using these for calculating the cost. This causes the optimizer to pick loose index scan for such cases when doing so is found to be beneficial. (Bug #101838, Bug #32266286)
  • References: See also: Bug #18109609.
  • When resolving integer division, the precision of the result is taken from the dividend. When the divisor is a decimal number, it may be less than 1, which may cause the result to use more digits than the dividend. This yielded incorrect values in some cases in which the result of integer division was a decimal or float. (Bug #100259, Bug #31641064)
  • Added an in-memory estimate to the optimizer trace to indicate how much of a given table is buffered in the buffer pool.
  • Our thanks to Øystein Grøvlen for the contribution. (Bug #99993, Bug #31544522)
  • The EXPLAIN output for a DML statement contains the table identifier, which normally includes the database name, in the output of SHOW WARNINGS. For some statements such as CREATE VIEW, the database name should be omitted, which is enforced by setting the alias_name_used flag to true in the cached table object, but when the cached table was reused following CREATE VIEW, the flag was not reset, which caused the database name to be omitted from the warnings following EXPLAIN for statements run after a CREATE VIEW which access the same cached table as the view.
  • We fix this by ensuring that the alias_name_used flag is always set to an appropriate value during table initialization.

New in MySQL 5.7.35 (Oct 6, 2021)

  • Audit Log Notes:
  • For MySQL Enterprise Audit, the new audit_log_format_unix_timestamp system variable enables inclusion of a time field in each audit record. The field value is an integer that represents the UNIX timestamp value indicating the date and time when the audit event was generated. The time field is supported only for JSON-format log files.
  • Deprecation and Removal Notes:
  • The TLSv1 and TLSv1.1 connection protocols now are deprecated and support for them is subject to removal in a future MySQL version. (For background, refer to the IETF memo Deprecating TLSv1.0 and TLSv1.1.) It is recommended that connections be made using the more-secure TLSv1.2 and TLSv1.3 protocols. TLSv1.3 requires that both the MySQL server and the client application be compiled with OpenSSL 1.1.1 or higher.
  • On the server side, this deprecation has the following effects:
  • If the tls_version system variable is assigned a value containing a deprecated TLS protocol during server startup, the server writes a warning for each deprecated protocol to the error log.
  • If a client successfully connects using a deprecated TLS protocol, the server writes a warning to the error log.
  • On the client side, the deprecation has no visible effect. Clients do not issue a warning if configured to permit a deprecated TLS protocol. This includes:
  • Client programs that support a --tls-version option for specifying TLS protocols for connections to the MySQL server.
  • Statements that enable replicas to specify TLS protocols for connections to the source server. (CHANGE MASTER TO has a MASTER_TLS_VERSION option.)
  • Packaging Notes:
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.77.0. (Bug #33077562)
  • The bundled lz4 library was upgraded to version 1.9.3. (Bug #29747853)
  • Bugs Fixed:
  • InnoDB: After upgrading from MySQL 5.6 to MySQL 5.7 and starting the server with undo log truncation enabled (innodb_undo_log_truncate=ON), a deadlock occurred when an undo tablespace truncate operation was initiated. The deadlock caused a long semaphore wait and an eventual failure. A direct upgrade from MySQL 5.6 to MySQL 5.7.35 or later avoids this potential issue. (Bug #32800020)
  • InnoDB: An integer underflow issue was addressed in the InnoDB mecached plugin sources. (Bug #32620378, Bug #32620398)
  • InnoDB: An index with a key prefix length greater than 767 bytes was permitted on a table defined with the REDUNDANT row format, exceeding the index key prefix length limit for that row format. The ALTER TABLE operation that added the index validated the index key prefix length for the row format defined by the innodb_default_row_format variable instead of the actual row format of the table. The fix ensures that index key prefix length is validated for the correct row format. (Bug #32507117, Bug #102597)
  • InnoDB: An online buffer pool resizing operation freed the previous buffer pool page hash, conflicting with a concurrent buffer pool lookup that required the previous page hash. (Bug #32460315)
  • InnoDB: Numerous system temporary table pages at the tail of the buffer pool flush list caused a performance degradation. The flush_list_mutex was held while the flush list scan traversed over system temporary table pages. The flush list scan now excludes system temporary table pages. (Bug #31060470, Bug #98974)
  • InnoDB: A binary log rotation deadlock occurred on a system using statement-based replication where there was high number of concurrent update operations and low innodb_thread_concurrency setting. (Bug #30215068, Bug #96374)
  • Replication: When the system variable replication_optimize_for_static_plugin_config was set, the plugins for Group Replication and semi-synchronous replication could not be uninstalled cleanly on server shutdown. (Bug #32798287)
  • Replication: A deadlock could occur when START GROUP_REPLICATION and STOP GROUP_REPLICATION statements were issued at the same time that a view change was taking place for the group. (Bug #32738137, Bug #32836868)
  • Replication: A deadlock could occur if a STOP GROUP_REPLICATION statement was issued when a replication channel on a group member was attempting to commit a transaction. The server now rolls back the transaction immediately if it cannot acquire the relevant lock, rather than waiting for the lock and the commit to complete and causing the deadlock. (Bug #32633176)
  • Replication: On a multithreaded replica, the reference to the active event was sometimes managed incorrectly when retrying a transaction. (Bug #32590974)
  • Replication: Replica servers now check and validate the transaction ID part of a GTID before applying and committing the transaction associated with it. (Bug #32103192)
  • Replication: Replication could stop on a multithreaded replica if a unique secondary key was omitted from the writeset hashes used to compute transaction dependencies, leading to errors when executing the transactions on the multithreaded replica. Write set hashes now always include unique secondary keys even if they are not included in the read set and write set. (Bug #31636339)
  • JSON: Passing NULL to a stored procedure expecting a JSON parameter led to an assertion failure in debug builds. (Bug #23209914)
  • Replication could fail if a DML statement was executed immediately after an XA transaction was rejected or forced to rollback due to a deadlock. (Bug #32707060)
  • The mysql_change_user() C API function did not properly parse the COM_CHANGE_USER packet, which could result in silent failure to process optional query attributes that may have been supplied prior to the mysql_change_user() call. Thanks for René Cannaò for the contribution. (Bug #32391415, Bug #102266)
  • Repreparation of a prepared statement at the beginning of an implicit transaction could cause an ER_GTID_NEXT_TYPE_UNDEFINED_GROUP error. (Bug #32326510, Bug #102031)
  • An out-of-memory error occurred when loading large amounts of data into tables with full-text search indexes. Not all of the memory allocated to the full-text search cache was accounted for when inserting data into the full-text search auxiliary tables. (Bug #31576731)
  • A secondary index over a virtual column became corrupted when the index was built online.
  • For UPDATE statements, we fix this as follows: If the virtual column value of the index record is set to NULL, then we generate this value from the cluster index record. (Bug #30556595)
  • Boolean system variables could be assigned a negative value. (Bug #11758439, Bug #50643)

New in MySQL 8.0.25 (May 11, 2021)

  • Packaging Notes:
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.76.0.
  • Bugs Fixed:
  • On Fedora 34, builds from source failed due to an undefined reference to symbol crc32_z@@ZLIB_1.2.9. (Bug #32702860)
  • For a prepared, implicitly grouped SELECT statement in which the WHERE clause was determined always to be false, the result of some aggregate functions could sometimes be picked up from the previous execution of the statement. (Bug #103192, Bug #32717969)

New in MySQL 8.0.24 (Apr 20, 2021)

  • Audit Log Notes:
  • MySQL Enterprise Audit now supports audit log file pruning, for JSON-format log files. See Space Management of Audit Log Files.
  • Compilation Notes:
  • GCC 10 is now a supported compiler for building MySQL on EL7 or EL8. This compiler is available in the devtoolset-10 (EL7) or gcc-toolset-10 (EL8) package. It is also recommended to use GCC 10 when building third-party applications that are based on the libmysqlclient C API library. (Bug #32381003)
  • Connection Management Notes:
  • Previously, if a client did not use the connection to the server within the period specified by the wait_timeout system variable and the server closed the connection, the client received no notification of the reason. Typically, the client would see Lost connection to MySQL server during query (CR_SERVER_LOST) or MySQL server has gone away (CR_SERVER_GONE_ERROR).
  • In such cases, the server now writes the reason to the connection before closing it, and client receives a more informative error message, The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. (ER_CLIENT_INTERACTION_TIMEOUT).
  • The previous behavior still applies for client connections to older servers and connections to the server by older clients.
  • Error Handling:
  • Client connection failure messages now include the port number. For example: Can't connect to MySQL server on '127.0.0.1:63333'.. Thanks to Daniël van Eeden for the contribution. (Bug #30787660, Bug #98311)
  • Keyring Notes:
  • If a keyring component is installed, the new Performance Schema keyring_component_status table provides status information about it. See The keyring_component_status Table.
  • Key migration capabilities have been expanded. Previously, key migration occurred only from one keyring plugin to another. The new --keyring-migration-to-component server option enables key migration from a keyring plugin to a keyring component; this facilitates transitioning a MySQL installation from keyring plugins to keyring components. The new mysql_migrate_keyring utility enables key migration from one keyring component to another. See Migrating Keys Between Keyring Keystores. There is no provision for migrating keys from a keyring component to a keyring plugin.
  • Existing keyring plugins remain available with no change to user-visible characteristics, but their implementation was revised to use the component infrastructure. This is facilitated using the built-in plugin named daemon_keyring_proxy_plugin that acts as a bridge between the plugin and component service APIs. See The Keyring Proxy Bridge Plugin.
  • MySQL Keyring previously implemented keystore capabilities using server plugins, but now is transitioning to use the MySQL component infrastructure, beginning with these keyring components:
  • component_keyring_file stores keyring data in a file local to the server host. This component is available in MySQL Community Edition and MySQL Enterprise Edition distributions. See Using the component_keyring_file File-Based Keyring Component.
  • component_keyring_encrypted_file stores keyring data in an encrypted, password-protected file local to the server host. This component is available in MySQL Enterprise Edition distributions. See Using the component_keyring_encrypted_file Encrypted File-Based Keyring Component.
  • The new keyring components have similarities to the existing keyring_file and keyring_encrypted_file plugins, but are configured differently, use distinct on-disk storage formats, and have fewer restrictions on key type and key size.
  • Keyring components are not loaded using the --early-plugin-load server option during startup or configured during startup or at runtime using system variables:
  • During startup, the server determines which keyring component to load using a manifest file, and the loaded component consults its own configuration file when it initializes. See Keyring Component Installation.
  • At runtime, the new ALTER INSTANCE RELOAD KEYRING statement enables reconfiguring an installed keyring component after changes to its configuration file. See ALTER INSTANCE Statement.
  • Optimizer Notes:
  • The MySQL query optimizer can now apply the derived table optimization to correlated scalar subqueries. This is done by applying an extra grouping and then an outer join on the lifted predicate. For example, a query such as SELECT * FROM t1 WHERE (SELECT a FROM t2 WHERE t2.a=t1.a) > 0 can be rewritten as SELECT t1.* FROM t1 LEFT OUTER JOIN (SELECT a, COUNT(*) AS ct FROM t2 GROUP BY a) AS derived ON t1.a = derived.a WHERE derived.a > 0.
  • If the subquery already has an explicit grouping, MySQL adds the extra grouping to the end of the existing grouping list.
  • MySQL performs a cardinality check to ensure that the subquery does not return more than one row, and raises ER_SUBQUERY_NO_1_ROW if it does. The check is performed as part of evaluating any WHERE or JOIN clause in the rewritten query, before evaluating the lifted predicate.
  • For more information, see Correlated Subqueries, as well as Derived Tables.
  • Packaging Notes:
  • The bundled libedit library was upgraded to version 20190324-3.1. (Bug #32433089)
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.74.0.
  • Performance Schema Notes:
  • Incompatible Change: Instrumentation in the Performance Schema setup_instruments table was revised as follows:
  • There are new memory instruments to account for memory allocated to data dictionary infrastructure and objects
  • Some instruments were renamed for improved uniformity of instrument naming. Affected instrument names are grouped using a key prefix in the same style as C++ namespaces. For example, error-related instruments use a error:: prefix and partition-related instruments use a Partition:: prefix. The following table displays the affected instruments. In addition, the servers instrument is a duplicate of servers_cache and has been removed. Applications that use the old or removed instrument names should be adjusted to account for this change.
  • Several instruments were given a value in the DOCUMENTATION column (it is no longer NULL), improving runtime instrumentation documentation availability.
  • Pluggable Authentication
  • The new caching_sha2_password_digest_rounds system variable enables configuring the number of hash rounds used by the caching_sha2_password authentication plugin for password storage.
  • Security Notes
  • For platforms on which OpenSSL libraries are bundled, the linked OpenSSL library for MySQL Server has been updated to version 1.1.1k. Issues fixed in the new OpenSSL version are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html. (Bug #32680637)
  • Spatial Data Support
  • The new ST_LineInterpolatePoint() and ST_LineInterpolatePoints() functions return a single point or multiple points interpolated between the start point and endpoint of a LineString geometry. The new ST_PointAtDistance() function returns a single point a given distance along a LineString geometry. See Spatial Operator Functions.
  • The new ST_Collect() aggregate function takes multiple geometry arguments and produces from them a single geometry collection value. See Spatial Aggregate Functions
  • The CAST() and CONVERT() functions have been extended to support casting geometry values from one spatial type to another. See Cast Functions and Operators.
  • Functionality Added or Changed
  • InnoDB: The AUTOEXTEND_SIZE maximum setting was increased from 64M to 4GB. The AUTOEXTEND_SIZE option, introduced in MySQL 8.0.23, defines the amount by which InnoDB extends the size of a tablespace when it becomes full. The option is supported with the CREATE TABLE, ALTER TABLE, CREATE TABLESPACE, and ALTER TABLESPACE statements. For more information, see Tablespace AUTOEXTEND_SIZE Configuration. (Bug #32438606)
  • Microsoft Windows: The /RTC1 compiler flag was removed from the debug compiler flags to reduce the time needed to run all tests invoked by the mysql-test-run.pl script when using MSVC on Windows. Initially, this compiler flag was introduced with the CMake program (by default for debug builds) and it generated code to test for stack corruption around function calls and the use of uninitialized variables at runtime. No loss of bug discovery is expected with the removal of the /RTC1 compiler flag. Memory errors, such as stack corruption, are more likely to be found by Address Sanitizer (ASAN) testing and the use of uninitialized variables are detected by compiler warnings. (Bug #32525732)
  • Microsoft Windows: The named_pipe_full_access_group system variable now defaults to an empty string (''), making named pipe connections secure. Previously, '*everyone*' was the default value. A valid Windows local group name may be substituted.
  • The new clone_donor_timeout_after_network_failure Clone plugin variable defines the amount of time the donor allows for the recipient to reconnect and restart a cloning operation following a network failure. The timeout was previously fixed at 5 minutes. The timeout can now be extended up to 30 minutes to provide more time for network issues to be resolved.
  • Thanks to Daniël van Eeden for the contribution. (Bug #32335434, Bug #102103)
  • Client applications and test suite plugins now report utf8mb3 rather than utf8 when writing character set names. (Bug #32164079, Bug #32164125)
  • Group Replication’s allowlist of hosts from which an incoming Group Communication System connection can be accepted, can now be updated while Group Replication is still running. You can therefore add new members to a group controlled by an allowlist without needing to stop and restart Group Replication. The allowlist is specified by the group_replication_ip_allowlist system variable on each group member.
  • The --skip-slave-start command line parameter is used to prevent the replication I/O thread and replication SQL thread from starting when a replica server restarts. However, using the parameter on the command line or in a my.cnf option file might require login access to the server host. The skip_slave_start system variable is now provided to give access to this feature using MySQL Server’s privilege structure, so that database administrators do not need any privileged access to the operating system. The new global system variable is read-only and can be set using a SET PERSIST_ONLY statement. As a system variable, its value can also be queried from a MySQL client and used by MySQL APIs. The --skip-slave-start command line parameter can still be used as an alternative, and it sets the new global system variable.
  • Bugs Fixed
  • Important Note: When a utf8mb3 collation was specified in a CREATE TABLE statement, SHOW CREATE TABLE, DEFAULT CHARSET, the values of system variables containing character set names, and the binary log all subsequently displayed the character set as utf8 which is becoming a synonym for utf8mb4. Now in such cases, utf8mb3 is shown instead, and CREATE TABLE raises the warning 'collation_name' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead. (Bug #27225287, Bug #32085357, Bug #32122844)
  • References: See also: Bug #30624990.
  • InnoDB: Stale pages encountered by the buf_page_create() function were freed and then read from disk again without being reinitialized. (Bug #32622548)
  • InnoDB: C++ enum type values in buffer pool page and buffer pool block data structures in the InnoDB source code were changed from int to uint8_t in MySQL 8.0.23, causing the data to be printed as ascii characters instead of integers in different outputs including messages and INFORMATION_SCHEMA tables.
  • The function that populates the INNODB_BUFFER_PAGE_LRU table did not print the IO_PIN state for the IO_FIX field. (Bug #32575469)
  • InnoDB: The btr_pcur_t::copy_stored_position function, which copies the position of one index tree persistent cursor to another, performed unnecessary free and malloc calls. (Bug #32574835)
  • InnoDB: A function that checks for locks on a table tried to acquire an exclusive lock system (lock_sys) latch, causing long semaphore waits. (Bug #32545030)
  • InnoDB: Counting temporary tablespaces as open files caused the innodb_open_files limit to be exceeded, preventing other files from being opened. Temporary tablespaces are now ignored when counting open files. (Bug #32541241)
  • InnoDB: The buf_flush_ready_for_flush() function identified a stale page as ready to flush without first checking if the page was dirty or I/O fixed, causing an assertion failure. (Bug #32530147)
  • InnoDB: Rollback of a transaction that modified generated columns raised an assertion failure. The failure occurred when attempting to free space occupied by externally stored columns. The update vector containing the externally stored columns did not account for the generated columns. (Bug #32529561)
  • InnoDB: When starting the server with innodb_validate_tablespace_paths disabled, user-created undo tablespaces, which are temporarily set to inactive during the initial stages of the startup process, were not reactivated. (Bug #32493885)
  • InnoDB: Disabling innodb_extend_and_initialize, which causes InnoDB to use fallocate() when allocating space to tablespace files, caused a performance regression for insert-oriented workloads. (Bug #32437020)
  • InnoDB: An unnecessary full flush list scan was removed, improving the speed with which session temporary tablespaces are created. Previously, depending on the size of the buffer pool and the number of dirty pages, creation of session temporary tablespaces could take a long time, affecting write transaction performance. (Bug #32423860)
  • InnoDB: A function that checks if a given page type is valid raised an assertion when testing valid but undefined page type for an undo tablespace. (Bug #32366301)
  • InnoDB: Sharded read-write lock function instrumentation was improved. (Bug #32333168)
  • InnoDB: On Windows, when creating a table with the COMPRESSION option, InnoDB failed to check the error status of a system call before checking the punch hole support flag set by the same system call, which resulted in reading an uninitialized flag. (Bug #32322645)
  • InnoDB: Geometry columns created in MySQL 5.6 caused failure when restarting the server after upgrading from MySQL 5.7 to MySQL 8.0 due to a geometry type change introduced in MySQL 5.7. (Bug #32299738)
  • InnoDB: During recovery, log records for multiple record group mini transactions were parsed twice. The log record from the first parsing operation is now saved to avoid the second pass, which improves recovery performance.
  • Thanks to Zhai Weixiang for the contribution. (Bug #32293797, Bug #102010)
  • InnoDB: In debug builds, an end range condition check for a secondary index raised an assertion failure, and Valgrind testing uncovered an end range condition check for secondary index on a virtual column that read an uninitialized value. (Bug #32291506)
  • InnoDB: With the innodb_log_writer_threads variable disabled, extensive log writing by one thread could block log flushing opportunities for other threads. (Bug #32255538)
  • InnoDB: In SHOW ENGINE INNODB STATUS deadlock information, in cases where a single rw-lock reader thread holds a shared latch, the reader thread id was not printed. (Bug #32252477)
  • InnoDB: Running concurrent SHOW CREATE TABLE and ALTER TABLE operations on the same table raised an assertion failure. The SHOW CREATE TABLE thread referenced a tablespace object that had been made stale by the ALTER TABLE operation. (Bug #32235621)
  • InnoDB: The introduction of sharded rw_lock_stats counters in MySQL 5.7 caused a regression in CPU cache efficiency. To address this issue in MySQL 5.7, the sharding method was changed. For optimal performance, the rw_lock_stats counter is removed in MySQL 8.0. (Bug #32225367)
  • InnoDB: On Windows, stalls were caused by concurrent SELECT COUNT(*) queries where the number of parallel read threads exceeded the number of machine cores. (Bug #32224707, Bug #101789)
  • InnoDB: An IS_STALE column, which indicates whether a buffer pool page is stale, was added to the INFORMATION_SCHEMA.INNODB_BUFFER_PAGE table. (Bug #32194434)
  • InnoDB: In debug builds, the log_free_check() function in the redo log code, which ensures that there is available space in the logs when holding latches on dirty pages, now uses a list of mini-transactions opened by the current thread to search for potential constraint violations. (Bug #32189367)
  • InnoDB: During a slow shutdown on a system with a 64k InnoDB page size and innodb_max_undo_log_size setting that was less than the initial undo tablespace size, the two undo tablespaces were truncated in an endless loop. Undo tablespace truncation is now restricted to undo tablespaces that are larger than the initial undo tablespace size and the innodb_max_undo_log_size setting.
  • The function that retrieves the next redo rollback segment for an undo tablespace was modified to ensure that undo logs are evenly split between two active undo tablespaces when an inactive tablespace is found. (Bug #32173457)
  • InnoDB: Starting the server in upgrade mode following an unexpected stoppage while the undo_001 undo tablespace was being truncated caused failure. When upgrade processing was completed and shutdown initiated, the function that determines if undo truncation is required could not find the undo_001 undo tablespace. To address this issue, undo tablespace truncation is no longer performed when starting the server in upgrade mode. (Bug #32127912)
  • InnoDB: A delete operation on a parent table that initiated a cascading update on a child table with an indexed virtual column and indexed foreign key constraint column caused a virtual column corruption. (Bug #32124113)
  • InnoDB: The open and close sequence for table share instances (m_share objects) and dictionary table instances was modified to prevent accessing old m_share objects that could point to stale dictionary indexes.
  • Thanks to Yuxiang Jiang for the contribution. (Bug #31899685)
  • InnoDB: An debug assertion failure occurred when issuing a TRUNCATE TABLE operation after a successful server restart following a server initialization failure. (Bug #31763837)
  • InnoDB: A fast shutdown (innodb_fast_shutdown=0) raised an assertion failure. The assertion code checks for transactions in the transaction list (mysql_trx_list) before halting purge operations. The check occurred before shutting down the GTID persister background thread, which was still inserting transactions into the transaction list. (Bug #31693627)
  • InnoDB: Undo tablespace truncation error handling was improved, and a Windows-specific InnoDB file deletion procedure was made more POSIX-compatible. (Bug #31684783)
  • InnoDB: Initializing the server with an with a 4K InnoDB page size caused “key too long” errors to be written to the error log. (Bug #31496943, Bug #99892)
  • InnoDB: Creating an index on virtual columns raised an invalid debug assertion failure. (Bug #31279528, Bug #99421)
  • InnoDB: In debug mode, the buf_pool_validate_instance() function accessed the buf_page_t::io_fix field without properly synchronizing with a thread that was modifying the same field in the buf_page_io_complete() function, causing an assertion failure. In addition to correcting that issue, the buf_page_get_io_fix_unlocked() function was replaced by several specific functions that test the buf_page_t::io_fix field for particular values. A series of other small, related code changes were also implemented. (Bug #31027553)
  • InnoDB: The TempTable memory allocator did not track RAM consumption when allocating blocks of memory shared by different queries for a given session, which could result in nonadherence to the temptable_max_ram limit. (Bug #29890126)
  • Partitioning: In some cases, invalid PARTITION clauses were not handled correctly in ALTER TABLE statements. (Bug #32235085)
  • Replication: Binary log transaction compression could not continue if a row event included a BLOB column containing uncompressable data, and the compressed size of the row event was higher than its uncompressed size. The function now handles the additional post-compression bytes correctly. (Bug #32174715, Bug #101611)
  • Replication: If all previous binary log files were purged at startup because their retention period had expired, the new binary log file contained an empty Previous_gtids event, which could cause errors in replication. The order of initialization has now been changed so that previous binary log files are only purged after the previous GTID set has been written to the new binary log file that is created at startup. (Bug #32134875, Bug #101533)
  • Replication: When MySQL Server counted the number of GTIDs in a set, it was possible for the return value to wrap, returning an incorrect result. This could lead to an incorrect decision to use state transfer from the binary log for Group Replication’s distributed recovery, when a remote cloning operation would have been more efficient. The logic has now been corrected. (Bug #32086209)
  • Replication: An assertion was raised in debug builds relating to lost GTIDs if binary log files were removed at startup because their retention period had expired. (Bug #32008512, Bug #101137)
  • Replication: The sql_slave_skip_counter system variable, which is used to make a replica skip a specified number of transactions, ignored transaction payloads that had been compressed using binary log transaction compression (activated using the binlog_transaction_compression system variable). Only events in uncompressed transaction payloads were counted towards the total skipped. (Bug #31973055)
  • Replication: A deadlock could occur if the binary log file was rotated while system variables were being updated and read by different clients. (Bug #31774422)
  • Replication: The output of a SHOW PROCESSLIST statement for a replica’s SQL thread sometimes showed the last query as currently being applied when the replica was actually caught up. (Bug #30521198, Bug #97560)
  • Microsoft Windows: Running MySQL Server (64-bit) on a Windows system with more than 32 logical processors and setting the VCPU attribute of a resource group to greater than 30 produced an incorrect CPU mask value, which is used to set the thread affinity. Under these conditions, the MSVC compiler reported warnings that the 32-bit shift was converted implicitly to 64-bit in the thread_attrs_api_win.cc file. The conversion resulted in the wrong CPU mask calculation on systems that have more than 32 logical processors. This fix ensures that a 64-bit shift is used when calculating the CPU mask by replacing argument 1 of the shift with 1LL. (Bug #32079726)
  • JSON: The IF() function sometimes hit an assertion in debug builds when an error was raised from its first argument; this also could occur under similar circumstances with the additional condition that the function's return type was JSON. (Bug #32231393, Bug #32231620)
  • JSON: A number of JSON functions did not propagate errors correctly, which could lead to assert failures in debug builds. (Bug #32047630)
  • JSON: JSON_TABLE() inside triggers was sometimes handled incorrectly when re-used in different sessions. Fixed by ensuring that JSON_TABLE() and its temporary table are processed in the context of the current session. (Bug #31644193)
  • JSON: A multi-valued index defined on an expression that cast a column into a typed array was not used for speeding up queries. This was because the server, when substituting an expression with an equivalent indexed generated column, did not attempt to replace a reference to a column with a reference to an equivalent generated column; for multi-valued indexes, it makes sense to replace the column reference with a reference to a generated column backing a multi-valued index on an expression that cast that column into a typed array.
  • This fix lifts the restriction that the server attempts to substitute only function expressions and conditional expressions with indexed generated columns, by allowing substitution of column references when they appear in a context where they can make use of a multi-valued index, that is, when they are used as arguments to MEMBER OF(), JSON_CONTAINS(), or JSON_OVERLAPS(). The restriction remains in force for cases in which the column reference is used in a non-array context. (Bug #30838807)
  • JSON: The JSON_SEARCH() function interpreted all search string and path values as utf8mb4 strings, regardless of their actual encoding, which could lead to wrong results. (Bug #102443, Bug #32443143)
  • JSON: In some cases, when used in a left join, some MySQL JSON functions caused the optimizer to transform it into an inner join, even though the inner join was not equivalent to the original left join. This was due to the fact that they return a value which is not NULL, even though one of their arguments is NULL, and the optimizer expected them to return NULL on NULL input.
  • Functions affected by this issue included JSON_ARRAY(), JSON_OBJECT(), JSON_ARRAY_APPEND(), JSON_ARRAY_INSERT(), JSON_INSERT(), JSON_REPLACE(), and JSON_SET(). See JSON Functions, for more information about these functions. (Bug #101861, Bug #32248705)
  • Community packages for generic Linux were not built with the necessary LDAP/SASL/Kerberos dependencies, and did not bundle the associated required libraries. (Bug #32619858)
  • The functions BIT_AND(), BIT_OR(), BIT_XOR(), and JSON_ARRAYAGG() did not always provide proper error handling. (Bug #32594813)
  • The server did not always provide proper error messages when IN was incorrectly used with UNION. (Bug #32593846)
  • It was possible for casting from DECIMAL to a signed integer type to hit an assertion when the result had more digits than the metadata in Item_typecast_signed indicated it would have. This happened because the decimal value is rounded when converted to an integer, and Item_typecast_signed did not take into account that the rounding might increase the number of digits in what was the integer part of the decimal value, such as when rounding 9.9 up to 10.
  • This is fixed by removing the logic that tried to compute a minimal maximum length for the result of the cast, and instead using the default set by the parent class Item_int_func. That default is the maximum width of a 64-bit integer, which should be safe regardless of the input value. (Bug #32591589)
  • References: This issue is a regression of: Bug #32371039.
  • The name my_row_id was not permitted for invisible columns. This restriction has been lifted. (Bug #32586231)
  • On a system with many concurrent connections, execution of grant statements could take excessively long waiting for metadata locks, causing the server to become unresponsive. (Bug #32483597)
  • Windows binaries and libraries were not being properly signed. (Bug #32458533)
  • Privilege checks for INFORMATION_SCHEMA tables could fail to take the lower_case_table_names value into account. (Bug #32448364)
  • LIKE ... ESCAPE, where ESCAPE did not reference a constant value, was not handled correctly within a prepared statement. (Bug #32446728)
  • MySQL has traditionally interpreted an empty value in the ESCAPE clause (that is, ESCAPE '') for LIKE as “no escape character”. Problems could arise when either of the first two arguments to LIKE was a string using a multibyte character set, because the empty value in such cases was interpreted as meaning that the backslash () should be used as the escape character, breaking the expected behavior.
  • This fix causes LIKE to interpret ESCAPE '' as meaning that there is no escape character regardless of character set, restoring the previous, expected behavior.
  • In addition, we now raise an error if the specified escape character cannot be converted to the target character set. This supersedes the original behavior in such cases, which was to fall back silently to using the backslash as the escape character. (Bug #32446508)
  • Windows packages were subject to an OpenSSL vulnerability. (Bug #32431519)
  • User-defined function arguments containing window functions or subqueries could produce unexpected results. (Bug #32424455)
  • Improper handling of temporary tables used for cursors within stored procedures could result in unexpected server behavior. (Bug #32416811)
  • Use of the symbol TRUE in the source resulted in a build failure on some platforms. This was replaced by true. (Bug #32406197, Bug #102308)
  • The privilege check used to determine whether users can see view definitions in the INFORMATION_SCHEMA.VIEWS table worked incorrectly. (Bug #32405811)
  • For recursive common table expressions, an assertion could be raised if it became necessary to convert an in-memory temporary table to on-disk. (Bug #32404597)
  • A prepared statement employing a user-created function was not handled correctly when the function took no arguments. (Bug #32404542)
  • A clone plugin installation failure could cause subsequent installation attempts to fail. (Bug #32402158, Bug #102240)
  • Some internal functions used with temporal column types did not provide proper handling for YEAR values. (Bug #32395335)
  • The internal constants MAX_FLOAT_STR_LENGTH = 12 and MAX_DOUBLE_STR_LENGTH = 22 represent the maximum lengths of strings representing FLOAT and DOUBLE values, respectively. The heuristic employed by the conversion routine my_gcvt for determining whether to use scientific notation sometimes generated strings that were longer than these.
  • These long strings caused problems for some string conversion routines, since their actual lengths could exceed the expected maximums. We fix this by explicitly telling my_gcvt the desired length whenever we fetch a FLOAT or DOUBLE in a string context. (Bug #32385934)
  • Within triggers, use of RAND() with no arguments could lead to unexpected server behavior. (Bug #32372805)
  • A missing tablespace error was reported on the recipient MySQL server instance after a remote cloning operation. The tablespace was not cloned due to the innodb_validate_tablespace_paths variable being disabled on the donor instance, which resulted in the associated tablespace object not being loaded. A check is now performed before a cloning operation to ensure that all tablespace objects are loaded. (Bug #32354908, Bug #102137)
  • Some query blocks containing large numbers of EXISTS subqueries were not always handled correctly. (Bug #32343143)
  • mysqlpump could exit unexpectedly if a SHOW CREATE TABLE statement failed. (Bug #32340208)
  • A long running remote cloning operation failed due to a low wait_timeout setting on the donor MySQL Server instance. Donor threads use the MySQL Server wait_timeout setting when listening for Clone protocol commands. To avoid timeout failures on donor instances with a low wait_timeout setting, the Clone idle timeout is now set to the default wait_timeout setting, which is 28800 seconds (8 hours). Clone network read and write timeout values were also increased. (Bug #32340112, Bug #102097)
  • Replication threads running in the server were visible in the Performance Schema threads table, but failed to appear in the variables_by_thread or status_by_thread tables. Now they appear in all three tables. Thanks to Facebook for the contribution. (Bug #32335496, Bug #102115)
  • A query string was displayed before it had been rewritten. (Bug #32335263, Bug #32628376)
  • For builds compiled using the libedit library, if the mysql client was invoked with the --default-character-set=utf8 option, libedit rejected input of multibyte characters. (Bug #32329078, Bug #32583436, Bug #102806)
  • On Windows, large result sets could cause the mysql client to exit unexpectedly. (Bug #32316323, Bug #102051)
  • Preparing a query expression for repeated execution could raise an assertion if an error occurred during preparation. (Bug #32291841)
  • Functional index creation did not handle the column name as not case-sensitive. (Bug #32287186, Bug #101994)
  • Temporary tables bound to triggers during statement execution could cause an unexpected server exit. (Bug #32267749, Bug #32288089, Bug #32299045)
  • Improved NULL and error handling in calculations involving decimal values. (Bug #32258228, Bug #32497850)
  • An assertion was raised if there was an open handler to a table in a schema when the schema was altered to be read only. (Bug #32248313)
  • Selecting from the Performance Schema replication_group_members table in some cases raised Error 1267 Illegal mix of collations .... This was due to a change in MySQL 8.0.22 in the handling of comparisons between a column value and a system variable. (Bug #32244631)
  • References: See also: Bug #32501472, Bug #32579184.
  • MySQL produced invalid metadata for a number of temporal functions returning integer values. These functions included TO_DAYS(), PERIOD_DIFF(), PERIOD_ADD(), TO_SECONDS(), DAYOFMONTH(), DAYOFYEAR(), HOUR(), and MINUTE(), among others. (Bug #32239578)
  • Table subqueries of a natural join which retrieved only invisible columns were not handled correctly. (Bug #32235285)
  • For debug builds, using ALTER TABLE to set a column to have a DEFAULT value of TRUE raised an assertion. (Bug #32235058)
  • When an error was raised while evaluating a condition that was pushed down to the storage engine using index condition pushdown, the storage engine sometimes ignored the error and returned an error code indicating success, which could lead to assertion failures later.
  • Now in such cases, we make sure that the executor detects that an error has been raised, and stop execution at that point. (Bug #32234773)
  • For debug builds with binary logging disabled, ALTER TABLE ... MODIFY COLUMN with an invalid DEFAULT value raised an assertion. (Bug #32234194)
  • Preparation of an aggregate function sometimes hit an assertion in debug builds when the function took a constant scalar subquery as argument and the scalar subquery raised an error. (Bug #32231698)
  • For debug builds, improper character set handling for NULLIF() evaluated in aggregate context raised an assertion. (Bug #32231557)
  • A CREATE TABLE statement with an unsupported KEY_BLOCK_SIZE value raised an assertion. (Bug #32227101)
  • Upgrading a MySQL instance with a very large number of tables consumed an excessive amount of memory. Memory allocated to analyze data dictionary entities for possible upgrade was not released until all entities were processed. (Bug #32226180, Bug #101818)
  • ANALYZE TABLE executed on a table concurrently with a long-running query on the same table caused subsequent queries on the table to wait for the long-running query to finish. This wait induced by ANALYZE TABLE is now eliminated, thus allowing the subsequent queries to execute with no wait. (Bug #32224917)
  • Statements using a LIKE expression with an ESCAPE clause were not always handled correctly. (Bug #32213959)
  • On ARM platforms, an assertion could be raised in utilities used during the build process. (Bug #32209415)
  • InnoDB did not always handle some legal names for table partitions correctly. (Bug #32208630)
  • With the explicit_defaults_for_timestamp variable disabled, Clone plugin installation failed with PFS table creation error. The variable setting caused TIMESTAMP columns in the Clone Performance Schema tables to be created incorrectly as NOT NULL columns. (Bug #32199611)
  • SHOW CREATE VIEW produced invalid syntax for views created with a ROLLUP clause. This issue also affected mysqldump, which uses SHOW CREATE VIEW. (Bug #32197353, Bug #101740)
  • A failed CREATE TABLE or ALTER TABLE with SECONDARY_ENGINE_ATTRIBUTE could leak memory. (Bug #32187507)
  • Connection establishment failure could cause the server to count the number of open connections incorrectly. (Bug #32156518)
  • Refactoring work done in MySQL 8.0.19 did not handle left joins correctly on columns using functions such as IFNULL(). (Bug #32141711)
  • References: This issue is a regression of: Bug #30320525.
  • The optimizer could choose to use a Skip Scan even for backward index scans for which it is inapplicable, resulting in unpredictable server behavior. (Bug #32127290)
  • UDF function arguments containing window functions were evaluated at prepare time despite the fact that window functions are set up quite late in the prepare process. Now evaluation of these is delayed until execution time, similarly to how this is performed with respect to UDF arguments containing subqueries. (Bug #32122078, Bug #32393265)
  • Creating a table containing a column with a nonconstant default expression caused subsequent ALTER TABLE statements to fail. (Bug #32121425, Bug #101486)
  • Updating a BLOB-like column with a value from a larger BLOB-like column could cause the updated column to have the wrong size, even zero. (Bug #32112403)
  • A race condition could occur if a STOP GROUP_REPLICATION statement was used to stop a group member, while the Performance Schema statistics for Group Replication were being queried by another client. Group Replication now prevents STOP GROUP_REPLICATION statements and Performance Schema queries from running concurrently. (Bug #32100147)
  • Improper locking on an internal queue could cause mysqlpump to exit unexpectedly. (Bug #32067013)
  • The server did not always prepare correctly a statement using GROUP_CONCAT() on a SELECT with an ORDER BY clause. (Bug #32053547, Bug #31947466)
  • The sys schema create_synonym_db() procedure fail to create INFORMATION_SCHEMA synonyms. (Bug #32050275, Bug #101258)
  • Errors occurring in window functions were not always correctly propagated, which could lead to assertion failures in debug builds. (Bug #32028154)
  • It is now possible to use START REPLICA SQL_THREAD and STOP REPLICA SQL_THREAD statements for the group_replication_applier channel when Group Replication is stopped. This enables an operator to apply any remaining unapplied transactions on a server that left the group, without having to rejoin the server to the group. (Bug #32027612, Bug #32414767)
  • Calling XA COMMIT on a transaction started by another thread could result in Address Sanitizer warnings. (Bug #32025408)
  • When the mysql client was used in batch mode, its parser could be confused by USE followed by DROP DATABASE when the USE database name was quoted. (Bug #32015466, Bug #101124)
  • A change in MySQL 8.0.17 caused comp_err to become much slower. Normal performance has been restored. (Bug #32014733)
  • References: This issue is a regression of: Bug #29781631, Bug #95377.
  • Using CAST() on a DATE or DATETIME value in an INSERT statement raised a warning for "0000-00-00" and "2000-02-31", but not for "2000-01-00" or "2000-00-01". Now a warning is shown in each of these cases also. (Bug #32013612)
  • The maximum length of the MASTER_COMPRESSION_ALGORITHMS value for the CHANGE MASTER TO statement was checked incorrectly. (Bug #32008597)
  • When casting a dynamic parameter to YEAR (such as in PREPARE s FROM "SELECT CAST(? AS YEAR)"), type propagation was not preformed, causing execution of the prepared statement in which the parameter was used to fail. (Bug #32002844)
  • Definitions of some system tables for a MySQL 5.7 instance upgraded to MySQL 8.0 differed from the definitions of the system tables in a new MySQL 8.0 installation. (Bug #31989290)
  • Some SHOW statements using subqueries could result in unexpected server behavior. (Bug #31853180)
  • A query using GROUP BY column HAVING column_expression IS [NOT] NULL returned correct results, but when WITH ROLLUP was added did not. (Bug #31848191)
  • The SHOW ENGINE PERFORMANCE SCHEMA STATUS statement reported incorrect memory usage for the Performance Schema. (Bug #31795132, Bug #100624)
  • When trying to generate an entity data model using Visual Studio 2019, some tables could not be imported with the entity framework wizard. This was due to a change in MySQL 8.0.21 made to orthogonal data type aggregation, which handles columns from UNION and from functions or operators such as CASE and IF(). This makes it possible to return a value of type ENUM or SET, which did not need to be handled previously in such cases. (Bug #31750645)
  • References: See also: Bug #29698617.
  • While optimizing the ORDER BY clause of a subquery there was a possibility of cleaning up a subquery tree referenced in the outer SELECT, which could lead to a premature exit. (Bug #31721430)
  • A malformed name in the mysql.func system table could cause unexpected server behavior. (Bug #31674599)
  • Sessions could disable their own auditing. (Bug #31630954)
  • Compiler options for using profile guided optimization with GCC were improved to include -fprofile-partial-training and -fprofile-update=prefer-atomic when appropriate. Thanks to Dmitriy Philimonov for the suggestion. (Bug #31450064, Bug #99781)
  • Starting the server with the performance_schema_max_thread_classes and performance_schema_max_thread_instances system variables set to zero caused MySQL Enterprise Firewall to be unable to create new rules. (Bug #31335080, Bug #24947654, Bug #83519)
  • A null pointer was incremented during recovery from the redo log, causing a runtime error in an Undefined Behavior Sanitizer (UBSAN) build. (Bug #31173032, Bug #32428131)
  • With the log_slow_extra system variable enabled to add the Errno field to slow query log output, the error number was 0 even for failed statements. (Bug #30769965, Bug #98220)
  • On debug builds, certain conversion operations using the utf32 character set could cause unexpected server behavior. (Bug #30746908)
  • SELECT ... FOR UPDATE from a nonexistent Performance Schema table produced ER_TABLEACCESS_DENIED_ERROR rather than ER_NO_SUCH_TABLE. (Bug #30701047, Bug #98068)
  • Mishandling of stored program local variables could lead to unexpected server behavior. (Bug #30366310)
  • The Performance Schema metadata_locks table could show incorrect DURATION values, such as when a metadata lock taken for a TRANSACTION duration was later modified to EXPLICIT duration by a RENAME TABLE operation. (Bug #30065213, Bug #96237)
  • The audit_log plugin could fail to store its encryption password if it generated one at startup. (Bug #29559793)
  • Uninstalling a plugin could affect subsequent execution of prepared statements. (Bug #29363867)
  • Conversion of string-valued user-defined variables or function results to double (for example, using CAST()) did not emit a warning when truncation occurred. (Bug #27969934, Bug #21943299)
  • When a view definition used LIKE with an ESCAPE clause, the contents of the ESCAPE clause were ignored, leading to wrong results. (Bug #26086751)
  • It was possible to insert illegal ASCII values (outside 7-bit range) into character columns that used the ascii character set. This is now prohibited. (Bug #24847620)
  • To enable use of spaces and other special characters within configuration values, mysql_config_editor now surrounds values it writes to the configuration file with double quote characters, and also escapes double quote characters used within values. (Bug #19953349, Bug #74691)
  • When the aggregate iterator finds no rows, it calls on each item in its SELECT list to inform them of this (for example, so that COUNT(*) can set itself to zero, or SUM(foo) can set itself to NULL). After internal work done in MySQL 8.0.22, it could also inadvertently call hidden items. In some queries with doubly nested subqueries, one such hidden item could become its own parent subquery (and scalar subqueries in MySQL have special legacy handling of this call, for queries which are not ONLY_FULL_GROUP_BY), causing the entire subquery to return NULL when it should not have done so.
  • This is fixed by making the call only on visible items, as in MySQL 8.0.21 and earlier. (Bug #102101, Bug #32335256)
  • When interpreting the old-style plan to access paths, cache invalidators for LATERAL were delayed until all outer joins were completed, since outer joins could produce null-complemented rows that should also invalidate caches. Problems arose when an outer join contained a LATERAL, and that LATERAL referred only to tables from within the same outer join; in such cases the invalidator should be applied immediately and not delayed, lest we miss emitted rows, and the cache be incorrectly kept. In particular, this could happen when certain Information Schema tables were on the right side of an outer join, as these are now views defined using LATERAL.
  • We fix this by delaying emission of the invalidator until we are inside the same (outer) join nest as the materialization to be invalidated, but no further. This also deals correctly with the case where rows from a table should invalidate two or more separate materializations, where some are within the join and some are higher up. (Bug #101460, Bug #32113029, Bug #32311147)
  • References: This issue is a regression of: Bug #98238, Bug #30766181.
  • An optimizer trace printed floating-point numbers with a maximum six characters, which meant that the precision could be very low for many values, given that sign, decimal point, and exponent could use many of these characters. This was especially problematic for large numbers, whose precision could thus be as small as 1, and which could be rounded to values whose absolute value exceeded DBL_MAX and so could be rejected by JSON parsers.
  • Now such numbers are always printed in an optimizer trace with a precision of 6. (Bug #101457, Bug #32113020)
  • References: See also: Bug #94672, Bug #29493604.
  • Filesort was used for a query having an ORDER BY ... DESC clause, even when an index on the descending column was available and used. This happened because an ORDER BY sub-clause was not removed due to matching a field in an equality predicate, even though it should have, so that the optimizer did not match the query with the descending index, leading to suboptimal performance. (Bug #101220, Bug #32038406)
  • The debug server hit an assert when optimizer_search_depth was less than the number of JOIN_TAB structures used for a join. (Bug #100288, Bug #31655483)
  • Following the ALTER TABLE operations EXCHANGE PARTITION, IMPORT TABLESPACE, and IMPORT PARTITION TABLESPACE, serialized digital information reflecting the previous role of the tablespace was left behind. Now in such cases, the old SDI is explicitly removed from both tablespaces involved in the exchange or import of a tablespace. (Bug #98501, Bug #30878065)
  • Type resolution performed by the integer division operator (DIV) yielded a precision of one less than expected in the result.
  • Our thanks to Kaiwang Chen for the contribution. (Bug #96459, Bug #30156563)

New in MySQL 5.7.31 (Dec 1, 2020)

  • Configuration Notes:
  • tcmalloc is no longer a permitted value for the mysqld_safe --malloc-lib option. (Bug #31372027)
  • Packaging Notes:
  • The libevent library bundled with MySQL was upgraded to version 2.1.11. In addition, for the WITH_LIBEVENT CMake option, the following two changes were made:
  • yes is no longer permitted as a synonym for system. Use system instead.
  • If system is specified but no system libevent is found, the bundled version is no longer used in place of the missing system library, and an error occurs instead.
  • Security Notes:
  • Incompatible Change: Access to the INFORMATION_SCHEMA.FILES table now requires the PROCESS privilege.
  • This change affects users of the mysqldump command, which accesses tablespace information in the FILES table, and thus now requires the PROCESS privilege as well. Users who do not need to dump tablespace information can work around this requirement by invoking mysqldump with the --no-tablespaces option. (Bug #30350829)
  • The linked OpenSSL library for MySQL Server has been updated to version 1.1.1g. Issues fixed in the new OpenSSL version are described at https://www.openssl.org/news/cl111.txt and https://www.openssl.org/news/vulnerabilities.html. (Bug #31296697)
  • Bugs Fixed:
  • InnoDB: The INNODB_METRICS table AVG_COUNT_RESET value for a counter defined as a module owner reported NULL. The METRIC_AVG_VALUE_RESET field was incorrectly marked as NULL. Thanks to Fungo Wang for the contribution. (Bug #31084706, Bug #98990)
  • InnoDB: Purge thread activity was excessive when the history list length approached zero, wasting CPU resource and causing mutex contention. (Bug #30875956)
  • InnoDB: The server failed intermittently with an “ibuf cursor restoration fails” error. (Bug #30770380, Bug #91033)
  • InnoDB: A fatal “page still fixed or dirty” error occurred during shutdown. (Bug #29759555, Bug #95285)
  • References: This issue is a regression of: Bug #29207450.
  • Partitioning: A query against a partitioned table, which used an ORDER BY, returned unordered results under the following conditions:
  • The table had a composite index with a prefix on one of the columns.
  • The query's WHERE clause contained an equality condition on the prefixed column.
  • The column with the prefix was the leftmost column in the index.
  • The column used in the ORDER BY was the rightmost column in the index.
  • The index was used for handling the ORDER BY.
  • Our thanks to Quanan Han for the suggestion. (Bug #84070, Bug #25207522)
  • Replication: When a replication source server shuts down and restarts, its MEMORY tables become empty. To replicate this effect to replicas, the first time that the source uses a given MEMORY table after startup, it notifies replicas that the table must be emptied by writing a DELETE statement for that table to the binary log. Previously, the generated DELETE statement was written to the binary log statement cache for the current session, which could result in it being logged together with other statements under the same GTID, or logged without BEGIN and COMMIT statements. Also, in some situations, the generated DELETE statement could consume the GTID intended for the transaction that triggered it. The generated DELETE statement is now logged with accompanying BEGIN and COMMIT statements, and the resulting transaction is flushed to the binary log immediately after it is written to the statement cache, so that it always receives its own GTID and is kept separate from other transactions. (Bug #30527929, Bug #25681518, Bug #77729)
  • Replication: Internal queries from Group Replication to the Performance Schema for statistics on local group members failed if they occurred simultaneously with changes to the group's membership. Locking for the internal queries has been improved to fix the issue. (Bug #30049349, Bug #30791583, Bug #30963553)
  • Replication: A fix made in MySQL 8.0.14 and MySQL 5.7.25 for a deadlock scenario involving the system variables binlog_transaction_dependency_tracking and binlog_transaction_dependency_history_size had the side effect of leaving the writeset history used for transaction dependency tracking unprotected from concurrent update. The writeset history and tracking mode are now locked correctly whenever they are accessed. (Bug #29719364, Bug #95181)
  • References: See also: Bug #28511326, Bug #91941.
  • Configuring with -DWITH_EDITLINE=system resulted in compilation failures for older library versions. (Bug #31366715)
  • The upgrade of the bundled libedit library in the previous MySQL distribution caused a problem for builds using that library such that CTRL+C (SIGINT) in the mysql client required a following Enter to take effect in some circumstances. (Bug #31360025)
  • Assigning CONCAT('') or CONCAT_WS('') to a variable set the variable to NULL, not the empty string. (Bug #31320716, Bug #99485, Bug #31413167, Bug #99722)
  • The gen_range() user-defined function could mishandle its arguments, causing a server exit. (Bug #30763294)
  • During UPDATE processing, conversion of an internal in-memory table to InnoDB could result in a key-length error. (Bug #30674616)
  • It is possible to define a column named * (single asterisk character), but SELECT `*` was treated identically to SELECT *, making it impossible to select only this column in a query; in other words, the asterisk character was expanded to a list of all table columns even when it was surrounded by backticks. (Bug #30528450)
  • An internal packet-length function returned values of the wrong integer type. (Bug #30139031)
  • Calculations by mysqldump for the length of INSERT statements did not take into account the _binary character set introducer used for VARBINARY strings. (Bug #29998457, Bug #96053)
  • The internal method Field_tiny::pack() did not always perform bounds checking as expected. (Bug #29948029)
  • References: See also: Bug #31591391.
  • mysql_store_result() could fail to detect invalid data packets. (Bug #29921423)
  • In a multiple-table UPDATE that updated the key of the first table, if a temporary table strategy was used, duplicate entries could be written to the temporary table, followed by occurrence of a Can't find record error. (Bug #28716103)
  • The optimizer could attempt to access a pseudo table as a table, resulting in unexpected server behavior. (Bug #28651673)
  • The server sometimes mistakenly removed a subquery with a GROUP BY when optimizing a query, even in some cases when this subquery was used by an outer select. This could occur when the subquery also used an aggregate function. (Bug #28240054)
  • Coercibility of the NAME_CONST() function was assessed incorrectly. (Bug #26319675)
  • Incorrect results could occur when the optimizer chose an index on a generated column to fetch values. (Bug #24345509, Bug #29451999)

New in MySQL 5.7.30 (Jun 1, 2020)

  • JSON Notes:
  • The rapidjson library included with MySQL has been upgraded to the GitHub snapshot of 16 January 2020. A fix for a compiler error encountered when building from the snapshot on Mac OS X has been added. (Bug #30898701)
  • Packaging Notes:
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.69.0. (Bug #30866333)
  • The bundled libedit library was upgraded to version 3.1.
  • Bugs Fixed:
  • InnoDB: The row_upd_clust_rec_by_insert function, which marks a clustered index record as deleted and inserts an updated version of the record into the clustered index, passed an incorrect n_ext value (the total number of external fields) to lower level functions, causing an assertion failure. (Bug #30437378)
  • InnoDB: An operation performed with the innodb_buffer_pool_evict debug variable set to uncompressed caused an assertion failure. (Bug #30405531)
  • InnoDB: An add column operation caused an assertion failure. The failure was due to a dangling pointer. (Bug #29866408)
  • References: This issue is a regression of: Bug #28491099.
  • InnoDB: Updating certain InnoDB system variables that take string values raised invalid read errors during Valgrind testing. (Bug #29717909, Bug #95215)
  • InnoDB: An insert statement on a table with a spatial index raised a record type mismatch assertion due to a tuple corruption. (Bug #29465567)
  • InnoDB: A function that calculates undo log record size could calculate an incorrect length value in the case of a corrupted undo log record, resulting in a malloc failure. Assertion code was added to detect incorrect calculations. (Bug #29448406, Bug #82734)
  • Replication: While an SQL statement was in the process of being rewritten for the binary log so that sensitive information did not appear in plain text, if a SHOW PROCESSLIST statement was used to inspect the query, the query could become corrupted when it was written to the binary log, causing replication to stop. The process of rewriting the query is now kept private, and the query thread is updated only when rewriting is complete. (Bug #30569003, Bug #97531, Bug #30654405)
  • Replication: When a GRANT or REVOKE statement is only partially executed, an incident event is logged in the binary log, which makes the replication slave's applier thread stop so that the slave can be reconciled manually with the master. Previously, if a failed GRANT or REVOKE statement was the first statement executed in the session, no GTID was applied to the incident event (because the cache manager did not yet exist for the session), causing an error on the replication slave. Also, no incident event was logged in the situation where a GRANT statement created a user but then failed because the privileges had been specified incorrectly, again causing an error on the replication slave. Both these issues have now been fixed. (Bug #30566518, Bug #30324661)
  • Replication: When a replication slave has a generated column that the master does not have in that table, with a secondary index on the generated column, the generated expression should be evaluated and the value stored by the storage engine in the secondary index. When row-based binary logging is in use, the replication slave assigns default values to any fields that are not in the master's definition of the table. In the case of a generated column, which does not have a default value, the slave was previously assigning a null or a zero value to the column. This value was then stored by the storage engine in the secondary index, causing both the table and the index to become corrupted. To fix this issue, generated columns in a table on a replication slave are now re-evaluated before the values are sent to the storage engine. (Bug #30034874)
  • Replication: In the event of an unplanned disconnection of a replication slave from the master, the reference to the master's dump thread might not be removed from the list of registered slaves, in which case statements that accessed the list of slaves would fail. The issue has now been fixed. (Bug #29915479)
  • Replication: With the settings binlog_format=MIXED, tx_isolation=READ-COMMITTED, and binlog_row_image=FULL, an INSERT ... SELECT query involving a transactional storage engine omitted any columns with a null value from the row image written to the binary log. This happened because when processing INSERT ... SELECT statements, the columns were marked for inserts before the binary logging format was selected. The issue has now been fixed. (Bug #29110804, Bug #93423)
  • The -libs-compat RPM package is now built with system zlib to avoid problems with unrestricted export of symbols in libmysqlclient.so.18. (Bug #30722389, Bug #98130)
  • The Event Scheduler had a memory leak. (Bug #30628268)
  • Under certain circumstances, a memcached command could result in reading an uninitialized memory buffer, causing a failure. (Bug #30592346)
  • Using ALTER USER to reset an account MAX_USER_CONNECTIONS value did not take effect until all current account connections terminated, if there were any. (Bug #30578217, Bug #97735)
  • A materialized subquery including a condition in which a column value was used as input to a nondeterministic function produced incorrect results. (Bug #30368937)
  • CONCAT() and CONCAT_WS() could produce incorrect results in rare cases due to incorrect substring handling. (Bug #30350206, Bug #96950)
  • Scheduling of events could be disturbed by removing events. (Bug #30301356, Bug #96849)
  • Client programs could load authentication plugins from outside the plugin library. (Bug #30191834, Bug #30644258)
  • The server did not handle correctly a UNION in which one of the queries A query with a WHERE clause whose predicate contained a numeric value in scientific notation was not handled correctly.
  • In addition, attempting to insert a particular integer specified as a string caused a server exit when the string-to-integer conversion was not successful. (Bug #29723340, Bug #30441969)
  • Previously, mysqlpump read the [mysql_dump] and [client] groups from option files. mysqlpump now additionally reads the [mysqlpump] group. The [mysql_dump] group is still accepted but is deprecated. (Bug #24733245, Bug #83144)
  • A multi-table UPDATE statement which updated a table joined to a derived table that joined two other tables was not optimized properly as it had been in MySQL 5.6, instead being treated as if STRAIGHT_JOIN had been used with the subquery creating the derived table. (Bug #97418, Bug #30488700)

New in MySQL 8.0.20 (Apr 27, 2020)

  • Account Management Notes:
  • Previously, for a user to access definitions of routines the user did not define, the user was required to have the global SELECT privilege, which is very broad. The new SHOW_ROUTINE privilege may be granted instead as a privilege with a more restricted scope that permits access to routine definitions. (That is, an administrator can rescind global SELECT from users that do not otherwise require it and grant SHOW_ROUTINE instead.) This enables an account to back up stored routines without requiring a broad privilege.
  • Compilation Notes:
  • Solaris: Clang and GCC now can be used for compiling MySQL on Solaris, although both are experimental and cannot currently be used for production code. (Bug #30562248)
  • On EL7 and EL8, CMake configuration was adjusted to look for GCC 9 before GCC 8. Because libmysqlclient ships with MySQL distributions, client applications built against libmysqlclient on those platforms are affected and may need to be recompiled. (Bug #30722756)
  • On Windows, the CMake compiler-version check for Visual Studio was updated to indicate that Visual Studio 2019 is the currently supported version. (The version check can be bypassed by running CMake with -DFORCE_UNSUPPORTED_COMPILER=1.) (Bug #30688403)
  • Deprecation and Removal Notes:
  • JSON: Previously, it was possible to specify ON EMPTY and ON ERROR clauses in either order when invoking the JSON_TABLE() function. This runs counter to the SQL standard, which stipulates that when ON EMPTY is specified, it must always come before any ON ERROR clause. For this reason, specifying ON ERROR before ON EMPTY is now deprecated, and trying to do so causes the server to issue a warning. Support for the nonstandard syntax will be removed in a future version of MySQL.
  • The max_length_for_sort_data system variable is now deprecated due to optimizer changes that make it obsolete and of no effect.
  • The use of VALUES() to access new row values in INSERT ... ON DUPLICATE KEY UPDATE statements is now deprecated, and is subject to removal in a future MySQL release. Instead, you should use aliases for the new row and its columns as implemented in MySQL 8.0.19 and later.
  • For example, the statement shown here uses VALUES() to access new row values:
  • INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6)
  • ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b);
  • Henceforth, you should instead use a statement similar to the following, which uses an alias for the new row:
  • INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS new
  • ON DUPLICATE KEY UPDATE c = new.a+new.b;
  • Alternatively, you can employ aliases for both the new row and each of its columns, as shown here:
  • INSERT INTO t1 (a,b,c) VALUES (1,2,3),(4,5,6) AS new(m,n,p)
  • ON DUPLICATE KEY UPDATE c = m+n;
  • For more information and examples, see INSERT ... ON DUPLICATE KEY UPDATE Statement.
  • JSON Notes:
  • The rapidjson library included with MySQL has been upgraded to the GitHub snapshot of 16 January 2020. A fix for a compiler error encountered when building from the snapshot on Mac OS X has been added. (Bug #30898701)
  • Logging Notes:
  • Sending a SIGHUP signal to the server no longer causes it to write a status report to the error log. Other actions performed by the server in response to SIGHUP continue to be done. See Unix Signal Handling in MySQL. (Bug #30578923)
  • The JSON-format error log writer now includes a ts (timestamp) in log messages. The value is an integer indicating milliseconds since the epoch ('1970-01-01 00:00:00' UTC). See Error Log Message Format.
  • Optimizer Notes:
  • Hash joins are now used any time a nested block loop would be employed. This means that hash joins can be used for the following types of queries:
  • Inner non-equi-joins
  • Semijoins
  • Antijoins
  • Left outer joins
  • Right outer joins
  • This builds on work done for MySQL 8.0.18, and removes a limitation in the implementation such that a hash join could be used only with a query having at least one equi-join condition. In addition, both inner and outer joins (including semijoins and antijoins) can now employ batched key access (BKA), which allocates join buffer memory incrementally so that individual queries need not use up large amounts of resources that they do not actually require for resolution. For more information, see Batched Key Access Joins.
  • This fix completes the task of replacing the executor used in previous versions of MySQL with the iterator executor, including replacement of the old index subquery engines that governed queries of the form WHERE value IN (SELECT column FROM table WHERE condition) for those IN queries which have not been converted into semijoins, as well as queries materialized into the same form, which depended on internals from the old executor.
  • For more information and examples, see Hash Join Optimization. (Bug #30528604, Bug #30473261, Bug #30912972)
  • This release implements several new index-level optimizer hints, which function much like existing index hints that employ SQL keywords such as FORCE INDEX and IGNORE INDEX. These are intended to replace the equivalent index hints, which will be deprecated in a future MySQL release (and eventually removed). The new hints are listed here, along with a brief description of each:
  • JOIN_INDEX: Forces MySQL to use the specified index or indexes for any available access method, such as ref, range, index_merge, and so on. This is equivalent to the FORCE INDEX FOR JOIN index hint.
  • NO_JOIN_INDEX: Causes the server to ignore the specified index or indexes for any access method. The equivalent index hint is IGNORE INDEX FOR JOIN.
  • GROUP_INDEX: Makes the server use the specified index or indexes for index scans for GROUP BY operations. Equivalent to FORCE INDEX FOR GROUP BY.
  • NO_GROUP_INDEX: Forces MySQL to ignore the specified index or indexes for index scans for GROUP BY operations. The equivalent index hint is IGNORE INDEX FOR GROUP BY.
  • ORDER_INDEX: Causes MySQL to use the specified index or indexes for sorting rows. It is equivalent to FORCE INDEX FOR ORDER BY.
  • NO_ORDER_INDEX: Keeps the server from using the specified index or indexes for performing row sorts. Equivalent to IGNORE INDEX FOR ORDER BY.
  • INDEX: Acts as the combination of JOIN_INDEX, GROUP_INDEX, and ORDER_INDEX, forcing the server to use the specified index or indexes for any and all scopes. Equivalent to FORCE INDEX.
  • NO_INDEX: Acts as the combination of NO_JOIN_INDEX, NO_GROUP_INDEX, and NO_ORDER_INDEX; that is, it forces MySQL to ignore the specified index or indexes for any and all scopes. It is equivalent to the index hint IGNORE INDEX.
  • Consider the following query using index hints on a table having the indicated columns and index:
  • SELECT a,b FROM t1 USE INDEX FOR ORDER BY (i_ab) ORDER BY a;
  • Using the index-level optimizer hints introduced in this release, this query can be rewritten as shown here:
  • SELECT /*+ ORDER_INDEX(t1 i_ab) */ a,b FROM t1 ORDER BY a;
  • The new index-level optimizer hints can be used with SELECT, UPDATE, and DELETE statements. (This is unlike index hints using FORCE INDEX or IGNORE INDEX, which can be used only with SELECT and UPDATE.) Thus, statements like the following are possible:
  • UPDATE /*+ INDEX(t1 i_ab) */ t1 SET d = 1
  • WHERE a = 1 AND b = 2 AND c = 3;
  • DELETE /*+ INDEX(t1 i_a,i_c) */ FROM t1
  • WHERE a = 1 AND b = 2 AND c = 3;
  • Multiple hints can be specified within the same comment, like this:
  • DELETE /*+ INDEX(t1 i_a) JOIN_INDEX(t1 i_c) */
  • FROM t1 WHERE a = 1 AND b = 2 AND c = 3;
  • Index-level optimizer hints can be used concurrently with other optimizer hints. When you do so, the index-level hints apply first; the effects of any other optimizer hints are limited to the set of indexes permitted by the index-level hints.
  • Index-level hints can also be used when creating views, as shown here:
  • CREATE VIEW v1 AS
  • SELECT /*+ NO_INDEX(t1 i_a,i_b) */ a FROM t1
  • WHERE b IN
  • (SELECT /*+ NO_INDEX(t1 i_ab,i_b) */ a FROM t1 WHERE a > 3)
  • ORDER BY a;
  • If these index-level optimizer hints are used in the same statement as index hints, the index hints are ignored.
  • The new index-level optimizer hints are equivalent to FORCE INDEX rather than USE INDEX; in other words, using one or more of the index-level optimizer hints means that a table scan is used only if there is no way to use one of the named indexes to find rows in the table. To cause MySQL to use the same index or set of indexes as with a given instance of USE INDEX, you can use NO_INDEX, NO_JOIN_INDEX, NO_GROUP_INDEX, NO_ORDER_INDEX, or some combination of these.
  • Packaging Notes:
  • Binary packages that include curl rather than linking to the system curl library have been upgraded to use curl 7.69.0. (Bug #30866333)
  • For RPM packages, the comp_err utility has been moved to the -test subpackage and marked as a test component. (Bug #30716034)
  • The bundled LZ4 library was upgraded to version 1.9.2. This fixes certain issues such as Bug #30369643 producing a mysqlpump runtime error.
  • References: See also: Bug #30369643.
  • The bundled libedit library was upgraded to version 3.1.
  • Performance Schema Notes:
  • The Performance Schema collected session-related statistics for errors that can occur only globally and not per session. This is no longer done, reducing memory overhead for error instrumentation. Additionally, rows for global errors are no longer included in error summaries reported per thread, account, user, or host. (Bug #30311574)
  • Pluggable Authentication:
  • An LDAP server can be configured to delegate LDAP searches to another LDAP server, a functionality known as LDAP referral. However, enabling LDAP referral can cause searches to fail with LDAP operation errors under certain conditions. To enable the MySQL Enterprise Edition LDAP authentication plugins to avoid referral errors, the new authentication_ldap_simple_referral and authentication_ldap_sasl_referral system variables are available. These variables enable each plugin to control whether the LDAP server should use referral during MySQL authentication. See LDAP Search Referral.
  • The MySQL Enterprise Edition SASL LDAP authentication plugin now supports GSSAPI/Kerberos as an authentication method for MySQL clients and servers on Linux. This is useful in Linux environments where applications access LDAP using Microsoft Active Directory, which has Kerberos enabled by default. See LDAP Authentication Methods.
  • This feature is available for all RPM and DEB packages for Linux, but not for the TAR archive packages.
  • SQL Syntax Notes:
  • Previously, the INTO clause for SELECT statements could appear at either of two positions:
  • Placing INTO at the end is the preferred position. The position before a locking clause is now deprecated and support for it will be removed in a future MySQL version. In other words, INTO after FROM but not at the end of the SELECT produces a warning.
  • Additionally, some changes have been made for UNION with respect to INTO. These UNION variants containing INTO are syntactically correct and produce the same result:
  • ... UNION SELECT * FROM table_name INTO OUTFILE 'file_name';
  • ... UNION (SELECT * FROM table_name) INTO OUTFILE 'file_name';
  • ... UNION SELECT * INTO OUTFILE 'file_name' FROM table_name;
  • ... UNION (SELECT * INTO OUTFILE 'file_name' FROM table_name);
  • However, the last two variants are confusing, as if they collect information from the named table rather than the entire query expression (the UNION). Those two UNION variants containing INTO now are deprecated and support for them will be removed in a future MySQL version. Thus:
  • In the trailing query block of a query expression, use of INTO before FROM produces a warning.
  • In a parenthesized trailing block of a query expression, use of INTO (regardless of its position relative to FROM) produces a warning.
  • The deprecations apply to all INTO forms: INTO OUTFILE, INTO DUMPFILE, and INTO var_list.
  • Test Suite Notes:
  • The perfschema.idx_compare_replication_applier_status test case was updated to store the old value of number of transaction retries and compare it with the new value of number of transaction retries. Thanks to Facebook for the contribution. (Bug #30810627, Bug #98389)
  • X Plugin Notes:
  • If the MySQL Server instance's client connections limit, as specified by the max_connections server system variable, was reached while X Plugin was starting up, X Plugin was unable to create a session to get the server configuration, so failed to start. X Plugin now creates an administrative session (using the mysql_admin_session service) during startup, which is not subject to the client connections limit. (Bug #30894981)
  • When an X Protocol session could not be initialized because there were too many X Protocol connections already, the error code 5011 Could not open session was returned. The more relevant error code 1040 Too many connections is now returned in this situation. (Bug #30753637)
  • An issue with validating JSON references caused an error when creating a collection with a validation schema. (Bug #30733330)
  • During shutdown of a MySQL Server instance with X Protocol connections to clients, a race condition in X Plugin could cause invalid client connections to be accepted for processing. Because invalid clients were ignored for client timeout verification during shutdown, these clients blocked shutdown until the timeout set by the mysqlx_wait_timeout system variable was reached, which defaults to 8 hours. To prevent this issue, client timeout verification now includes clients that are in an invalid state. (Bug #30702685)
  • When connecting to a MySQL 8.0 server, X Plugin set a different collation for the session to that used by the mysql client, which could cause issues with queries that depended on the collation. X Plugin now uses the utf8mb4_0900_ai_ci collation, which is the default for the utf8mb4 characterset. (Bug #30516849)
  • The worker threads for X Protocol connections were identified as system threads on creation, and assigned to the SYS_default resource group. This identification meant they could not be assigned to user resource groups for resource management purposes. They are now identified as user threads and assigned to the USR_default resource group. Note that X Protocol does not currently support CREATE, ALTER, DROP, and SET RESOURCE GROUP statements, but these statements can operate on X Protocol connection threads using classic MySQL protocol connections. (Bug #30059288)
  • X Plugin can now access the MySQL system variables as soon as initialization starts, so the plugin install thread can set up the required connectivity itself rather than starting a separate thread. (Bug #29127302)
  • Functionality Added or Changed:
  • Important Change: Previously, including any column of a blob type larger than TINYBLOB or BLOB as the payload in an ordering operation caused the server to revert to sorting row IDs only, rather than complete rows; this resulted in a second pass to fetch the rows themselves from disk after the sort was completed. Since JSON and GEOMETRY columns are implemented internally as LONGBLOB, this caused the same behavior with these types of columns even though they are almost always much shorter than the 4GB maximum for LONGBLOB (or even the 16 MB maximum for MEDIUMBLOB). The server now converts columns of these types into packed addons in such cases, just as it does TINYBLOB and BLOB columns, which in testing showed a significant performance increase. The handling of MEDIUMBLOB and LONGBLOB columns in this regard remains unchanged.
  • One effect of this enhancement is that it is now possible for Out of memory errors to occur when trying to sort rows containing very large (multi-megabtye) JSON or GEOMETRY column values if the sort buffers are of insufficient size; this can be compensated for in the usual fashion by increasing the value of the sort_buffer_size system variable. (Bug #30400985, Bug #30804356)
  • InnoDB: The Contention-Aware Transaction Scheduling (CATS) algorithm, which prioritizes transactions that are waiting for locks, was improved. Transaction scheduling weight computation is now performed a separate thread entirely, which improves computation performance and accuracy.
  • The First In First Out (FIFO) algorithm, which had also been used for transaction scheduling, was removed. The FIFO algorithm was rendered redundant by CATS algorithm enhancements. Transaction scheduling previously performed by the FIFO algorithm is now performed by the CATS algorithm.
  • A TRX_SCHEDULE_WEIGHT column was added to the INFORMATION_SCHEMA.INNODB_TRX table, which permits querying transaction scheduling weights assigned by the CATS algorithm.
  • The following INNODB_METRICS counters were added for monitoring code-level transaction scheduling events:
  • lock_rec_release_attempts
  • The number of attempts to release record locks.
  • lock_rec_grant_attempts
  • The number of attempts to grant record locks.
  • lock_schedule_refreshes
  • The number of times the wait-for graph was analyzed to update transaction schedule weights.
  • InnoDB: The storage area for the doublewrite buffer was moved from the system tablespace to doublewrite files. Moving the doublewrite buffer storage area out of the system tablespace reduces write latency, increases throughput, and provides flexibility with respect to placement of doublewrite buffer pages. The following system variables were introduced for advanced doublewrite buffer configuration:
  • innodb_doublewrite_dir
  • Defines the doublewrite buffer file directory.
  • innodb_doublewrite_files
  • Defines the number of doublewrite files.
  • innodb_doublewrite_pages
  • Defines the maximum number of doublewrite pages per thread for a batch write.
  • innodb_doublewrite_batch_size
  • Defines the number of doublewrite pages to write in a batch.
  • For more information, see Doublewrite Buffer.
  • EXPLAIN ANALYZE can now be stopped during execution using KILL QUERY or CTRL-C. (Bug #30787515)
  • EXPLAIN FORMAT=TREE now displays inversion information for windowing functions. (Bug #30770631)
  • EXPLAIN FORMAT=TREE output has been improved to provide more information about evaluated window functions, and to match that supplied for regular aggregates. (Bug #30573446, Bug #30582782)
  • EXPLAIN ANALYZE now supports the FORMAT option. Currently, TREE is the only supported format. (Bug #30315224)
  • Configuring with the -DWITH_LTO=1 CMake option now works on macOS. (Bug #30125902)
  • From MySQL 8.0.20, you can enable binary log transaction compression on a MySQL server instance. When binary log transaction compression is enabled, transaction payloads are compressed using the zstd algorithm, and then written to the server's binary log file as a single event (a Transaction_payload_event). Compressed transaction payloads remain in a compressed state while they are sent in the replication stream to replication slaves, other Group Replication group members, or clients such as mysqlbinlog. They are not decompressed by receiver threads, and are written to the relay log still in their compressed state. Binary log transaction compression therefore saves storage space both on the originator of the transaction and on the recipient (and for their backups), and saves network bandwidth when the transactions are sent between server instances.
  • You can enable binary log transaction compression on a MySQL server instance using the binlog_transaction_compression system variable, which defaults to OFF. You can also use the binlog_transaction_compression_level_zstd system variable to set the level for the zstd algorithm that is used for compression. This value determines the compression effort, from 1 (the lowest effort) to 22 (the highest effort).
  • A new option for the CHANGE MASTER TO statement, REQUIRE_TABLE_PRIMARY_KEY_CHECK, enables a replication slave to select its own policy for primary key checks. When the option is set to ON for a replication channel, the slave always uses the value ON for the sql_require_primary_key system variable in replication operations, requiring a primary key. When the option is set to OFF, the slave always uses the value OFF for the sql_require_primary_key system variable in replication operations, so that a primary key is never required, even if the master required one. When the REQUIRE_TABLE_PRIMARY_KEY_CHECK option is set to STREAM, which is the default, the slave uses whatever value is replicated from the master for each transaction.
  • For multisource replication, setting REQUIRE_TABLE_PRIMARY_KEY_CHECK to ON or OFF enables a slave to normalize behavior across the replication channels for different masters, and keep a consistent setting for the sql_require_primary_key system variable. Using ON safeguards against the accidental loss of primary keys when multiple masters update the same set of tables. Using OFF allows masters that can manipulate primary keys to work alongside masters that cannot.
  • When PRIVILEGE_CHECKS_USER is set to apply replication privilege checks to the channel, setting REQUIRE_TABLE_PRIMARY_KEY_CHECK to ON or OFF means that the user account does not need session administration level privileges to set restricted session variables, which are required to change the value of sql_require_primary_key to match the master's setting for each transaction.
  • Since MySQL 8.0.19, compression has been supported for messages sent over X Protocol connections. Connections can be compressed if the server and the client agree on a compression algorithm to use. By default, the server permits the Deflate, LZ4, and zstd compression algorithms, or you can set the mysqlx_compression_algorithms system variable to include only the ones you permit. In MySQL 8.0.19, X Protocol uses the library default compression level for each algorithm, and the client cannot negotiate this.
  • From MySQL 8.0.20, the client can request a specific compression level during capability negotiations for an X Protocol connection. X Protocol sets a maximum compression level for each algorithm, which prevents the server from agreeing to high compression levels that are requested by clients if that would consume too much resource on the server. The maximum compression levels are initially set to 5 for Deflate, 8 for LZ4, and 11 for zstd. You can adjust these settings using the new mysqlx_deflate_max_client_compression_level, mysqlx_lz4_max_client_compression_level, and mysqlx_zstd_max_client_compression_level system variables.
  • New default compression levels for X Protocol have also been selected through performance testing as being a good trade-off between compression time and network transit time. These defaults are not necessarily the same as the library default for each algorithm. They are applied if the client does not request a compression level for the algorithm. The default compression levels are initially set to 3 for Deflate, 2 for LZ4, and 3 for zstd. You can adjust these settings using the new mysqlx_deflate_default_compression_level, mysqlx_lz4_default_compression_level, and mysqlx_zstd_default_compression_level system variables.
  • Bugs Fixed:
  • Performance: Certain queries against tables with spatial indexes were not performed as efficiently following an upgrade from MySQL 5.7 to MySQL 8.0. (Bug #94655, Bug #29488350)
  • References: See also: Bug #89551, Bug #27499984.
  • NDB Cluster: NDB defines one SPJ worker per node owning a primary partition of the root table. If this table used read from any replica, DBTC put all SPJ workers in the same DBSPJ instance, which effectively removed the use of some SPJ workers. (Bug #30639165)
  • NDB Cluster: Executing the SHOW command using an ndb_mgm client binary from NDB 8.0.16 or earlier to access a management node running NDB 8.0.17 or later produced the error message Unknown field: is_single_user. (Bug #30599413)
  • InnoDB: A CREATE UNDO TABLESPACE operation that specified an undo data file name without specifying a path removed an existing undo data file of the same name from the directory specified by innodb_undo_directory variable. The file name conflict check was performed on the data directory instead of the directory specified by the innodb_undo_directory variable. (Bug #30908328, Bug #98628)
  • InnoDB: In debug builds, a regression introduced in MySQL 8.0.19 slowed down mutex and rw-lock deadlock debug checks. (Bug #30886393)
  • References: This issue is a regression of: Bug #30628872.
  • InnoDB: Valgrind testing raised an error indicating that a conditional jump or move depends on an uninitialized value. The error was a false-positive due to invalid validation logic. (Bug #30837136)
  • InnoDB: Missing barriers in rw_lock_debug_mutex_enter() (in source file sync0debug.cc) could cause a thread to wait without ever being woken up. (Bug #30819167)
  • InnoDB: To improve server initialization speed, fallocate() is now used to allocate space for redo log files. (Bug #30804431)
  • InnoDB: A data dictionary table open function was implemented with incorrect lock ordering. (Bug #30782103, Bug #97825)
  • InnoDB: Changes to parallel read threads functionality introduced in MySQL 8.0.17 caused a degradation in SELECT COUNT(*) performance. Pages were read from disk unnecessarily. (Bug #30766089)
  • InnoDB: DDL logging was not performed for SQL operations executed by the bootstrap thread using the init_file startup variable, causing files to be left behind that should have been removed during a post-DDL stage. (Bug #30721214)
  • InnoDB: Adding an index on a column cast as a JSON array on a table with a specific number of records failed with an “Incorrect key file for table” error. (Bug #30709525, Bug #98098)
  • InnoDB: A Valgrind error reported that an uninitialized lock->writer_thread value was used in a conditional jump. (Bug #30694177)
  • InnoDB: An internal buffer pool statistics counter (n_page_gets) was partitioned by page number to avoid contention when accessed by multiple threads. (Bug #30604841, Bug #97822)
  • InnoDB: A tablespace import operation failed with a schema mismatch error due to the .cfg file and the data dictionary both containing default values for a column that was added using ALGORITHM=INSTANT. An error should only occur if default values differ. (Bug #30561144)
  • InnoDB: A slow shutdown failed to flush some GTIDs, requiring recovery of unflushed GTIDs from the undo log. (Bug #30548229)
  • InnoDB: A broken alignment requirement in the code that allocates a prefix in memory for Performance Schema memory allocations caused a failure on MySQL builds optimized for macOS and FreeBSD. (Bug #30530857)
  • InnoDB: Adding a virtual column raised an assertion failure due to data that was missing from the new data dictionary object created for the table. (Bug #30524263)
  • InnoDB: A required latch was not taken when checking the mode of an undo tablespace. A required latch was also not taken when checking whether an undo tablespace is empty. (Bug #30509134)
  • InnoDB: Allocating an update undo log segment to an XA transaction for persisting a GTID value before the transaction performed any data modifications caused a failure. (Bug #30456328)
  • InnoDB: A query executed on a partitioned table with a discarded tablespace raised an assertion failure. (Bug #30437407, Bug #97271)
  • InnoDB: The row_upd_clust_rec_by_insert function, which marks a clustered index record as deleted and inserts an updated version of the record into the clustered index, passed an incorrect n_ext value (the total number of external fields) to lower level functions, causing an assertion failure. (Bug #30437378)
  • InnoDB: During a cloning operation, writes to the data dictionary buffer table at shutdown were too late, causing a failure. Newly generated dirty pages were not being flushed. (Bug #30427369, Bug #30405535, Bug #30405535)
  • InnoDB: An operation performed with the innodb_buffer_pool_evict debug variable set to uncompressed caused an assertion failure. (Bug #30405531)
  • InnoDB: Read-write lock code (rw_lock_t) that controls ordering of access to the boolean recursive flag and the writer thread ID using GCC builtins or os_mutex when the builtins are not available, was revised to use C++ std::atomic in some instances.
  • Thanks to Yibo Cai from ARM for the contribution. (Bug #30401416, Bug #97150)
  • InnoDB: A failure occurred while upgrading from MySQL 5.7 to MySQL 8.0. A server data dictionary object was missing information about the FTS_DOC_ID column and FTS_DOC_ID_INDEX that remain after dropping a FULLTEXT index. (Bug #30357954)
  • InnoDB: Unnecessary messages about parallel scans were printed to the error log. (Bug #30330448)
  • InnoDB: During upgrade from MySQL 5.7 to MySQL 8.0, clustered indexes named GEN_CLUST_INDEX are renamed to PRIMARY, which resulted in duplicate entries for the clustered indexes being added to the mysql.innodb_index_stats table. (Bug #30330448)
  • InnoDB: Various internal functions computed write event slots in an inconsistent manner. (Bug #30228108, Bug #96519)
  • InnoDB: Under specific circumstances, it was possible that tablespace encryption key information would not be applied during the redo log apply phase of crash recovery. (Bug #30209760)
  • InnoDB: A file operation failure caused the page tracking archiver to fail, which in turn caused the main thread to hang, resulting in an assertion failure. Also, incorrectly, the page tracking archiver remained enabled in innodb_read_only mode. (Bug #30202643)
  • InnoDB: An index corruption error was reported when attempting to import a tablespace containing a table column that was added using ALGORITHM=INSTANT. The error was due to missing metadata associated with the instantly added column. (Bug #30191523, Bug #96477)
  • InnoDB: A transaction attempting to fetch an LOB record encountered a null LOB reference, causing an assertion failure. However, the null LOB reference was valid in this particular scenario because the LOB value was not yet fully written. (Bug #30144303)
  • InnoDB: During a parallel read operation, the rollback of a table load operation while autocommit was disabled resulted in a server to exit due to assertion code that did not account for the possibility of tree structure changes during a parallel read. (Bug #30060690)
  • InnoDB: The current size value maintained in a rollback segment memory object was found to be invalid, causing an assertion failure in function trx_purge_free_segment(). A validation routine (trx_rseg_t::validateCurrSize()) was added to verify the current size value. (Bug #29947027)
  • InnoDB: A prepared statement executed with invalid parameter values raised an assertion failure. (Bug #29880907)
  • InnoDB: An add column operation caused an assertion failure. The failure was due to a dangling pointer. (Bug #29866408)
  • References: This issue is a regression of: Bug #28491099.
  • InnoDB: Updating certain InnoDB system variables that take string values raised invalid rad errors during Valgrind testing. (Bug #29717909, Bug #95215)
  • InnoDB: Redo log records for modifications to undo tablespaces increased in size in MySQL 8.0 due to a change in undo tablespace ID values, which required additional bytes. The change in redo log record size caused a performance regression in workloads with heavy write I/O. To address this issue, the redo log format was modified to reduce redo log record size for modifications to undo tablespaces. (Bug #29536710)
  • InnoDB: Additional information about InnoDB file writes, including progress data, is now printed to the error log. (Bug #29472295, Bug #94634)
  • InnoDB: An insert statement on a table with a spatial index raised a record type mismatch assertion due to a tuple corruption. (Bug #29465567)
  • InnoDB: A function that calculates undo log record size could calculate an incorrect length value in the case of a corrupted undo log record, resulting in a malloc failure. Assertion code was added to detect incorrect calculations. (Bug #29448406, Bug #82734)
  • Replication: The thread used by Group Replication's message service was not correctly registered by the Performance Schema instrumentation, so the thread actions were not visible in Performance Schema tables. (Bug #30824676)
  • Replication: Group Replication initiates and manages cloning operations for distributed recovery, but group members that have been set up to support cloning may also participate in cloning operations that a user initiates manually. In releases before MySQL 8.0.20, you could not initiate a cloning operation manually if the operation involved a group member on which Group Replication was running. From MySQL 8.0.20, you can do this, provided that the cloning operation does not remove and replace the data on the recipient. The statement to initiate the cloning operation must therefore include the DATA DIRECTORY clause if Group Replication is running. (Bug #30798640)
  • Replication: For Group Replication channels, issuing the CHANGE MASTER TO statement with the PRIVILEGE_CHECKS_USER option while Group Replication was running caused the channel's relay log files to be deleted. Transactions that had been received and queued in the relay log, but not yet applied, could be lost in this situation. The CHANGE MASTER TO statement can now only be issued when Group Replication is not running. (Bug #30655369)
  • Replication: Group Replication's failure detection mechanism raises a suspicion if a server stops sending messages, and the member is eventually expelled provided that a majority of the group members are still communicating. However, the failure detection mechanism did not take into account the situation where one or more of the group members in the majority had actually already been marked for expulsion, but had not yet been removed from the group. Where the network was unstable and members frequently lost and regained connection to each other in different combinations, it was possible for a group to end up marking all its members for expulsion, after which the group would cease to exist and have to be set up again.
  • Group Replication's Group Communication System (GCS) now tracks the group members that have been marked for expulsion, and treats them as if they were in the group of suspect members when deciding if there is a majority. This ensures at least one member remains in the group and the group can continue to exist. When an expelled member has actually been removed from the group, GCS removes its record of having marked the member for expulsion, so that the member can rejoin the group if it is able to. (Bug #30640544)
  • Replication: While an SQL statement was in the process of being rewritten for the binary log so that sensitive information did not appear in plain text, if a SHOW PROCESSLIST statement was used to inspect the query, the query could become corrupted when it was written to the binary log, causing replication to stop. The process of rewriting the query is now kept private, and the query thread is updated only when rewriting is complete. (Bug #30569003, Bug #97531, Bug #30654405)
  • Replication: When a GRANT or REVOKE statement is only partially executed, an incident event is logged in the binary log, which makes the replication slave's applier thread stop so that the slave can be reconciled manually with the master. Previously, if a failed GRANT or REVOKE statement was the first statement executed in the session, no GTID was applied to the incident event (because the cache manager did not yet exist for the session), causing an error on the replication slave. Also, no incident event was logged in the situation where a GRANT statement created a user but then failed because the privileges had been specified incorrectly, again causing an error on the replication slave. Both these issues have now been fixed. (Bug #30566518, Bug #30324661)
  • Replication: Compression is now triggered for the mysql.gtid_executed table when the thread/sql/compress_gtid_table thread is launched after the server start, and the effects are visible when the compression process is complete. (Bug #30541799)
  • Replication: Performance Schema tables could not be accessed on a MySQL server with Group Replication that was running under high load conditions. (Bug #30112711, Bug #30675790)
  • Replication: Internal queries from Group Replication to the Performance Schema for statistics on local group members failed if they occurred simultaneously with changes to the group's membership. Locking for the internal queries has been improved to fix the issue. (Bug #30049349, Bug #30791583, Bug #30963553)
  • Replication: In the event of an unplanned disconnection of a replication slave from the master, the reference to the master's dump thread might not be removed from the list of registered slaves, in which case statements that accessed the list of slaves would fail. The issue has now been fixed. (Bug #29915479)
  • Replication: When a partitioned table was involved, the server did not correctly handle the situation where a row event could not be written to the binary log due to a lack of cache space. An appropriate error is now returned in this situation. (Bug #29848931)
  • Replication: During Group Replication's distributed recovery process, if a joining member is unable to complete a remote cloning operation with any donor from the group, it uses state transfer from a donor's binary log to retrieve all of the required data. However, if the last attempted remote cloning operation was interrupted and left the joining member with incomplete or no data, an attempt at state transfer immediately afterwards could also fail. Before attempting state transfer following a failed remote cloning operation, Group Replication now checks that the remote cloning operation did not reach the stage of removing local data from the joining member. If data was removed, the joining member leaves the group and takes the action specified by the group_replication_exit_state_action system variable. (Bug #29669099, Bug #29944828)
  • Replication: With the settings binlog_format=MIXED, tx_isolation=READ-COMMITTED, and binlog_row_image=FULL, an INSERT ... SELECT query involving a transactional storage engine omitted any columns with a null value from the row image written to the binary log. This happened because when processing INSERT ... SELECT statements, the columns were marked for inserts before the binary logging format was selected. The issue has now been fixed. (Bug #29110804, Bug #93423)
  • Replication: Before taking certain actions, Group Replication checks what transactions are running on the server. Previously, the service used for this check did not count transactions that were in the commit phase, which could result in the action timing out. Now, transactions that are in the commit phase are included in the set of currently ongoing transactions. (Bug #28327838)
  • JSON: When JSON_TABLE() was used as part of an INSERT statement in strict mode, conversion errors handled by any ON ERROR clause could cause the INSERT to be rejected. Since errors are handled by an ON ERROR clause, the statement should not be rejected unless ERROR ON ERROR is actually specified.
  • This issue is fixed by ignoring warnings when converting values to the target type if NULL ON ERROR or DEFAULT ... ON ERROR has been specified or is implied. (Bug #30628330)
  • JSON: The output from JSON_TABLE() was not always correct when used in views. This fix corrects the following issues:
  • Column names were not quoted, causing syntax errors when quoting was needed for these.
  • Some column types were misreported.
  • Some column type attributes such as UNSIGNED were lost.
  • Column character set and collation were lost.
  • JSON: The functions JSON_SCHEMA_VALID() and JSON_SCHEMA_VALIDATION_REPORT() formerly checked to ensure that their arguments were convertible to JSON each time a prepared statement including these was executed, which was neither efficient nor necessary. Now in such cases, the check is performed only once, when the statement is prepared. (Bug #97878, Bug #30622327)
  • Privilege requirements were checked incorrectly for stored objects with a DEFINER that has the SYSTEM_USER privilege. (Bug #31077699)
  • A number of errors reported by Clang in the documentation generated from the MySQL sources have been corrected. (Bug #30956093)
  • On FreeBSD, the krb5 package is a now a dependency. (Bug #30887620)
  • If a query contained multiple references to the same common table expression (CTE) and a pseudo-comment crossed borders of the CTE definition, the parser failed with confusing syntax error messages. (Bug #30871301)
  • For installation using Debian packages, the /var/run/mysqld directory was not created. (Bug #30855015, Bug #98484)
  • mysqlslap did not shut down its threads properly when SQL statements returned an error. This could result in attempts to free already freed memory. (Bug #30850310)
  • When X Plugin was attempting to add a document to a collection as either an insertion or an update in the case of a duplicate key, in the case where the document failed a unique key constraint in a field other than the primary key, the error returned by X Plugin did not state that this was the cause of the issue. The appropriate error is now returned. (Bug #30843865)
  • An integer value generated by transformations in the resolver was supplied to a test which expected a boolean. (Bug #30837240)
  • A query using an IN expression that accessed one or more columns holding large string values could lead to a memory leak. (Bug #30814171)
  • Statements did not work properly when the target of a DELETE was a common table expression. (Bug #30796015, Bug #98330)
  • Starting the server with create_admin_listener_thread enabled and without admin_address enabled caused an abnormal exit during the server shutdown process. (Bug #30785609)
  • When a table had both a primary key and a secondary key on the same column, but for different lengths, the range optimizer chose the wrong key part in the secondary index for comparing range values. (Bug #30783011)
  • In some cases, errors caused when DISTINCT was used with an aggregate function whose argument was of an incorrect type were not propagated correctly. (Bug #30782687)
  • For replication using compression, the slave could raise an assertion if the master was restarted. (Bug #30774692)
  • For debug builds, the server could exit trying to print an optimizer trace. (Bug #30773218, Bug #98258)
  • The mysql_real_connect_nonblocking() C API function exhibited blocking behavior. (Bug #30771233)
  • With LOCK TABLES active, while processing INFORMATION_SCHEMA queries, the server could attempt to lock internal temporary tables (which need no locks), ausing an assertion to be raised. (Bug #30764651, Bug #98221)
  • The mysqldump internal network timeout was increased from 700 to 86400 seconds to accommodate connecting to busy or unresponsive servers. (Bug #30755992, Bug #98203)
  • Configuring with -DWITH_SASL=path/to/custom/installation inadvertently caused libsasl to be linked into the daemon_memcached plugin. (Bug #30755301)
  • After deleting the temporary table associated with a window function's frame buffer, the temporary table parameter for the frame buffer was not cleaned up, causing string buffers associated with copy fields not to be freed properly. (Bug #30752366)
  • The -libs-compat RPM package is now built with system zlib to avoid problems with unrestricted export of symbols in libmysqlclient.so.18. (Bug #30722389, Bug #98130)
  • The server exited histogram sampling prematurely, causing an assertion failure. An unnecessary boolean variable that marked the completion of a sampling operation was removed. (Bug #30717778)
  • When removing a WHERE condition because one of the participating conditions was always false, a materialized derived table was not cleaned up properly, resulting in a memory leak. (Bug #30712243)
  • Multiple comparisons with the same GEOMETRY value were not always handled correctly. (Bug #30697042)
  • References: See also: Bug #30306306.
  • MIN() and MAX() could return an incorrect value for some queries if a WHERE clause containing an IN () subquery was added. (Bug #30691682, Bug #98047)
  • Server startup failed if MySQL Enterprise Firewall was enabled at startup but the whitelist and user tables were missing. (Bug #30690181)
  • For prepared statements, re-execution could cause a server exit if a cleaned-up materialized temporary table was still being referred to. (Bug #30674598)
  • The ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS and ER_WARN_DEPRECATED_FOUND_ROWS error messages were incorrectly categorized in the range of messages meant to be written to the error log. They are now correctly categorized as messages meant to be sent to clients. The old errors are now designated as OBSOLETE_ER_WARN_DEPRECATED_SQL_CALC_FOUND_ROWS and OBSOLETE_ER_WARN_DEPRECATED_FOUND_ROWS in the range of error-log messages. (Bug #30673043)
  • Some joins within subqueries where an outer query used EXISTS or NOT EXISTS were not always handled correctly. (Bug #30671329)
  • Queries using ORDER BY constant are permitted but an ORDER BY clause of this sort should not have any effect on the result; such queries were not always handled correctly. (Bug #30669493)
  • A missing out-of-bounds check in wild_case_match() caused a pointer to read out of bounds. (Bug #30668886)
  • The strconvert() function was not safe for conversions between filename and utf8_general_ci strings. (Bug #30668847)
  • Some filesorts using keys of fixed length were not always handled correctly. (Bug #30665034)
  • When performing a hash join on two string columns that were potentially very large (in particular, BLOB columns with PAD SPACE collations), MySQL stored the entire sort key in the row, which impacted performance by requiring large amounts of memory. Now only a collation-aware hash is stored, with an added equality comparison prevent a wrong answer, even in the event of a 64-bit hash collision. (Bug #30664831)
  • When at least two tables were joined to at least two other tables using a semijoin, and the join optimizer chose to use a loose scan, it was possible to place both of the left tables below the deduplicating nested loop iterator, leading to excessive deduplication. We fix this by treating a loose scan across multiple tables as a separate internal structure. (Bug #30659810)
  • In unions of a const table and zero or more known-zero expressions, derived tables of exactly one row could be read incorrectly as having zero rows. (Bug #30655712, Bug #97967)
  • A MySQL 8.0.19 patch set an invalid INFORMATION_SCHEMA and data dictionary version number. Assertion code was added to prevent future version information errors. (Bug #30645158, Bug #97948)
  • References: This issue is a regression of: Bug #29871530.
  • When setting up the iterator tree, the optimizer now filters away and subsequently ignores conditions which are known to be trivially true. (Bug #30644591)
  • Under some conditions, SHOW COLUMNS on a temporary MERGE table could raise an assertion or cause a server exit. (Bug #30640463)
  • References: This issue is a regression of: Bug #28811287, Bug #92834.
  • The Event Scheduler had a memory leak. (Bug #30628268)
  • Using the asynchronous C API functions could result in freeing already freed memory. (Bug #30596999, Bug #97805)
  • (Bug #30594613)
  • On tables containing a CHECK constraint, certain simple queries were inefficient due to excessive memory allocation and Performance Schema calls. (Bug #30594613)
  • Under certain circumstances, a memcached command could result in reading an uninitialized memory buffer, causing a failure. (Bug #30592346)
  • A race condition could occur between InnoDB issuing requests for schema and table metadata while filling INFORMATION_SCHEMA.INNODB_TABLES, and the schema being dropped, leading to user queries on INNODB_TABLES reporting an error. (Bug #30591967)
  • Using ALTER USER to reset an account MAX_USER_CONNECTIONS value did not take effect until all current account connections terminated, if there were any. (Bug #30578217, Bug #97735)
  • When the optimizer sets up a weedout, it notifies all tables that are part of the weedout that they should provide row IDs. For confluent weedouts (weedouts returning at most one row), the optimizer expects that the executor handles the weedout without row IDs. In the iterator executor, confluent weedouts are implemented using LIMIT 1; the normal weedout iterator does not handle confluent weedouts, and thus always expects row IDs. In the case of a confluent weedout on the right side of an outer join, the confluent weedout was processed as a normal weedout, causing the iterator executor to ask for row IDs where the tables did not supply them. Now in such cases, the LIMIT 1 optimization is also applied. (Bug #30566549, Bug #30282693)
  • SET PERSIST could fail due to attempting to persist variables to the wrong directory. (Bug #30561982)
  • Within a stored program with an error handler defined for the error condition of accessing a nonexistent table, the handler was not invoked if the table was nonexistent because it was named in a nonexistent database. (Bug #30561920, Bug #97682)
  • The duplicate weedout optimization strategy employed by MySQL (see Optimizing IN and EXISTS Subquery Predicates with Semijoin Transformations) uses an internal table of row IDs which it has already seen, with a unique index on the column containing these IDs. When the key for the unique index became too large, which could happen with very large row IDs, the server reverted to deduplication by hash key instead, with a separate index (not unique) over the hash field only, as with other temporary tables. Because the latter index was not properly initialized, affected queries were not executed properly and could lead to a premature exit. (Bug #30556257)
  • For debug builds, under LOCK TABLES, the server could mishandle materialized temporary tables and raise an assertion. (Bug #30476213, Bug #97404)
  • The internal array of materialized query blocks SELECT_LEX_UNIT::m_query_blocks_to_materialize was not reset between executions, which meant that it pointed to objects which were no longer valid when a prepared statement was executed a second time, causing the second execution to fail. (Bug #30438038)
  • Altering column collations did not affect unique indexes until a server restart. (Bug #30386119, Bug #97103)
  • When using roles, the EXECUTE privilege for stored functions was treated as a privilege for stored procedures. As a result, it was not possible to use EXECUTE as a role privilege for functions. (Bug #30376231)
  • A materialized subquery including a condition in which a column value was used as input to a nondeterministic function produced incorrect results. (Bug #30368937)
  • Several fixes were applied to the InnoDB memcached plugin. The fixes addressed potential deadlock issues, issues related to connection list latches, and removal of an obsolete flush mutex. (Bug #30354225)
  • Strings that used the utf8mb4_0900_bin collation could not be compared with utf8mb4 strings that used a different collation. Now the comparison is done by using utf8mb4_0900_bin for both strings. (Bug #30350111)
  • During optimization, MySQL removes conditions in which all arguments are considered equal; for example, 1 <> 1 is removed and replaced with false. In doing so, conditions containing non-deterministic arguments were also removed, which caused a condition such as RAND() < RAND() to be considered an impossible condition. Now, the optimizer no longer removes conditions containing nondeterministic arguments. (Bug #30311271)
  • Scheduling of events could be disturbed by removing events. (Bug #30301356, Bug #96849)
  • The Event Scheduler reported warnings for Valgrind builds. (Bug #30301340)
  • Shutting down the server while using the clone plugin raised a Valgrind error. (Bug #30248419)
  • If the mysqld-auto.cnf file was malformed, the server did not start (expected), but did not report any error (unexpected). (Bug #30169731, Bug #96501)
  • UPDATE statements could give an inconsistent number of rows matched (found rows) in cases where not all matched rows were updated, depending on the reason for rows not being updated. For example, rows not updated due to being updated through a view with a WITH CHECK OPTION clause were not counted as matching rows, whereas rows not updated due to a failing CHECK CONSTRAINT were counted. For consistency, rows that fail a WITH CHECK OPTION clause now are counted as matching rows. (Bug #30158954)
  • When restarting the MySQL server on a cloned directory, InnoDB reported an error indicating that it could not find a tablespace file for a statistics table that was dropped by the server previously. (Bug #30093799)
  • The server did not handle correctly a UNION in which one of the queries contained a subquery that used ORDER BY. (Bug #29952565)
  • For INFORMATION_SCHEMA queries, a race condition could result in multiple attempts to insert a key when updating the dynamic statistics tables, producing a duplicate-key error. (Bug #29948755, Bug #95929)
  • SHOW CREATE VIEW could fail with an illegal mix of collations for views defined on a function that returns a string. (Bug #29904087)
  • A query with a WHERE clause whose predicate contained a numeric value in scientific notation was not handled correctly.
  • In addition, attempting to insert a particular integer specified as a string caused a server exit when the string-to-integer conversion was not successful. (Bug #29723340, Bug #30441969)
  • An internal interface was added for retrieving and parsing errors that occur on the donor MySQL server instance (ER_CLONE_DONOR errors) and for checking if data on the recipient has been dropped. (Bug #29682642)
  • It was not possible to drop any columns from a table when the DEFAULT value. (Bug #29661106)
  • For the CONNECTION_CONTROL plugin, the Performance Schema instrumentation used keys that were not discoverable to the Performance Schema unless the associated code actually executed. (Bug #29539976)
  • For a nullable column c, the optimizer now recognizes when the conditions c < c, c > c, and c <> c are always false and need not be evaluated for every row. Thanks to Daniel Black for the contribution. (For nonnullable columns, the optimizer already recognized always-false conditions.) (Bug #29115386, Bug #93642)
  • Reinitialization of character sets from Index.xml could cause a use-after-free error. (Bug #28956360, Bug #93276)
  • An earlier change to reduce Performance Schema memory instrumentation overhead had the unintended effect of causing Group Replication performance degradation. (Bug #28719976)
  • References: This issue is a regression of: Bug #27500610.
  • The sys schema ps_setup_reset_to_default() procedure used MySQL 5.7 defaults, not MySQL 8.0 defaults. (Bug #27636611)
  • Some connection encryption ciphers did not work. (Bug #27045306)
  • Previously, mysqlpump read the [mysql_dump] and [client] groups from option files. mysqlpump now additionally reads the [mysqlpump] group. The [mysql_dump] group is still accepted but is deprecated. (Bug #24733245, Bug #83144)
  • For a query of the form SELECT DISTINCT ... ORDER BY ..., when the ORDER BY was pushed down onto the first table in the join, the result was not always sorted in the correct order. (Bug #98217, Bug #30760534)
  • The NULL indicator was not properly written for items used as variable-length keys, such that all such items were assumed to be not NULL, which was considered equal to the empty string when using certain collations. One visible effect of this issue was that ordering by an expression using a nullable string was sometimes not performed correctly. An example of such a query, where column c1 contains both NULL and empty string values, is shown here:
  • SELECT c1, SUBSTR(c1, 1) AS c2 FROM t ORDER BY c2;
  • (Bug #98035, Bug #30687020)
  • A query returned inaccurate results when an expression in a GROUP BY clause used a column name differing in case from that used for the name of the column when the table containing this column was created. An example of this would be when the query used GROUP BY id although the column name as shown in the original CREATE TABLE statement was ID.
  • This occurred because, the server performed case-sensitive comparisons of column names in expressions with names of columns in tables. This issue is fixed by ensuring that such comparisons are performed in a case-insensitive fashion as expected. (Bug #97628, Bug #98222, Bug #30541701, Bug #30761372)
  • A multi-table UPDATE statement which updated a table joined to a derived table that joined two other tables was not optimized properly as it had been in MySQL 5.6, instead being treated as if STRAIGHT_JOIN had been used with the subquery creating the derived table. (Bug #97418, Bug #30488700)
  • EXPLAIN now uses hash join instead of block nested loop, since the latter no longer exists and is replaced by a hash join in nearly all cases. (Bug #97299, Bug #30444550)
  • The execution plan for a query that filtered on the first column of a composite hash index wrongly used this index, producing erroneous results. (Bug #94737, Bug #29527115)
  • References to columns from tables of outer query blocks in an ON condition of a JOIN did not work, and could be used only in a WHERE. The fix for this problem means that a query such as this one now works correctly:
  • SELECT o.order_date FROM orders o
  • WHERE o.order_date IN ( SELECT c.contact_name FROM customers c
  • INNER JOIN order_details od
  • ON o.order_id = od.discount );
  • Previously this had to be rewritten as as shown here:
  • SELECT o.order_date FROM orders o
  • WHERE o.order_date IN ( SELECT c.contact_name FROM customers c
  • INNER JOIN order_details od
  • ON 1
  • WHERE o.order_id = od.discount );
  • References to other tables of the same FROM clause as the JOIN, as in the query SELECT * FROM t1 CROSS JOIN (t2 LEFT JOIN t3 ON t1.c=3), are not outer references and remain forbidden. In this case, a lateral join is required, like this: SELECT * FROM t1 JOIN LATERAL (SELECT * FROM t2 LEFT JOIN t3 ON t1.c=3). (Bug #35242, Bug #96946, Bug #11748138, Bug #30350696)
  • There could be a mismatch between the version of OpenSSL used to build the server and the version used for other parts of MySQL such as libraries or plugins. This could cause certain features not to work, such as the LDAP authentication plugins. Now the same version of OpenSSL is used for building everything.
  • Previous work in MySQL 8.0 to optimize impossible expressions such as a=b AND FALSE as FALSE could make for less efficient execution when such expressions appeared as outer join conditions, due to the fact that the join was interpreted as a Cartesian product followed by a filter. (Bug #8202, Bug #89739, Bug #97552, Bug #11745046, Bug #2758127

New in MySQL 8.0.15 (Apr 25, 2019)

  • Bugs Fixed:
  • Group Replication was unable to function in the 8.0.14 release of MySQL Server if IPv6 support was disabled at the operating system level, even if the replication group did not use any IPv6 addresses. The issue is fixed by this release of MySQL Server, 8.0.15. (Bug #29249542, Bug #94004)

New in MySQL 5.7.25 (Apr 25, 2019)

  • Deprecation and Removal Notes:
  • The resolveip and resolve_stack_dump utilities are now deprecated and will be removed in MySQL 8.0. nslookup, host, or dig can be used instead of resolveip. Stack traces from official MySQL builds are always symbolized, so there is no need to use resolve_stack_dump.
  • Pluggable Authentication:
  • If the LDAP port number is configured as 636 or 3269, the plugin now uses LDAPS (LDAP over SSL) instead of LDAP. The port number is settable using the authentication_ldap_sasl_server_port or authentication_ldap_simple_server_port system variable. (LDAPS differs from startTLS.) (Bug #28743563)
  • Previously, for LDAP authentication with proxying, LDAP authentication plugins used the first group name returned by the LDAP server as the MySQL proxy user account name. The authentication string for a MySQL account now can specify a list of groups to match, in preference order, and can optionally map the matching group name to a specified MySQL proxy user name. See LDAP Pluggable Authentication.
  • Security Notes:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.2q. Issues fixed in the new OpenSSL version are described at http://www.openssl.org/news/vulnerabilities.html.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #28988091)
  • Functionality Added or Changed:
  • Microsoft Windows: The access control granted to clients on the named pipe created by the MySQL server now is set to the minimum necessary for successful communication on Windows. Newer MySQL client software can open named pipe connections without any additional configuration. If older client software cannot be upgraded immediately, the new named_pipe_full_access_group server system variable can be used to give a Windows group the necessary permissions to open a named pipe connection. Membership in the full-access group should be restricted and temporary.
  • Bugs Fixed:
  • InnoDB: A dangling pointer caused a memory leak. (Bug #28693568)
  • InnoDB: An ON DELETE CASCADE operation on table with a foreign key constraint and an indexed virtual column caused the server to exit. (Bug #28470805)
  • InnoDB: An incorrectly written DML log involving a virtual column value raised an assertion. (Bug #28448853)
  • InnoDB: Using the O_DIRECT_NO_FSYNC innodb_flush_method setting could cause the system to hang due to file system metadata becoming unsynchronized. To prevent this issue from occurring in O_DIRECT_NO_FSYNC mode, InnoDB now calls fsync() after creating a new file, after increasing file size, and after closing a file. The fsync() system call is still skipped after each write operation. (Bug #27309336)
  • InnoDB: An assertion was raised when attempting to write to a tablespace file greater than 4GB in size on a 64-bit Windows system. The failure was due to a narrowing cast. (Bug #26636815, Bug #87423)
  • Partitioning: Repeated ALTER TABLE statements on partitioned tables containing BLOB or TEXT columns were not always handled correctly. (Bug #28491099)
  • Partitioning: ALTER TABLE ... EXCHANGE PARTITION did not work when the partitioned table had one or more partition definitions using the DATA DIRECTORY option. This fix supports partitioned tables using the InnoDB storage engine only. (Bug #19730200)
  • Replication: A patch to correct the handling of quotes for identifiers in ROLLBACK TO SAVEPOINT statements in the binary log was not correctly applied to subsequent MySQL versions. (Bug #28569645)
  • Replication: Following a patch in MySQL 5.7.23, LOAD DATA statements stopped statement-based replication from a MySQL 5.7.22 master to a replication slave at a later release. The problem has now been fixed. (Bug #28541204, Bug #92132)
  • Replication: In some circumstances, the CHANGE MASTER TO statement could not be used on a replication slave if the master info log had been changed from a table (master_info_repository=TABLE) into a file (master_info_repository=FILE). (Bug #28529558)
  • Replication: When the system variables binlog_transaction_dependency_tracking and binlog_transaction_dependency_history_size were set or read, the types of lock that were required could result in a deadlock scenario, because the same locks were also required for working with the active binary logs. A new lock type is now used instead for access to the transaction dependency tracking system variables, so that this deadlock cannot occur. (Bug #28511326, Bug #91941, Bug #28537209, Bug #92108)
  • Replication: The PURGE BINARY LOGS TO 'log_name' statement failed for binary log files that had been moved to another location using mysqlbinlogmove. Such files are still listed in the binary log index file, but they are listed using an absolute path, rather than a path relative to the directory where the binary log files are normally stored. MySQL Server can now locate and purge moved binary log files successfully. (Bug #28284624)
  • Replication: If autocommit was set to 0 for a replication slave or Group Replication group member where GTIDs were in use and super_read_only=ON was set, server shutdown was prevented by a transaction that did not complete. The transaction was attempting to save GTIDs to the mysql.gtid_executed table, but the update failed because super_read_only=ON was set. (With autocommit set to 1, the transaction would complete in this situation, and the mysql.gtid_executed table would instead be updated at server startup.) Now, the check for the super_read_only setting is skipped for this task, so the transaction is able to save the GTIDs to the mysql.gtid_executed table and complete regardless of the combination of super_read_only and autocommit settings. (Bug #28183718)
  • Replication: An assertion was raised in debug builds if an XA ROLLBACK statement was issued for an unknown transaction identifier when the gtid_next value had been set manually. The server now does not attempt to update the GTID state if an XA ROLLBACK statement fails with an error. (Bug #27928837, Bug #90640)
  • Replication: The value returned by a SHOW SLAVE STATUS statement for the total combined size of all existing relay log files (Relay_Log_Space) could become much larger than the actual disk space used by the relay log files. The I/O thread did not lock the variable while it updated the value, so the SQL thread could automatically delete a relay log file and write a reduced value before the I/O thread finished updating the value. The I/O thread then wrote its original size calculation, ignoring the SQL thread's update and so adding back the space for the deleted file. The Relay_Log_Space value is now locked during updates to prevent concurrent updates and ensure an accurate calculation. (Bug #26997096, Bug #87832)
  • Replication: If the relay log index file was temporarily locked for viewing by a backup process for a replication slave, and MySQL Server also attempted to access the file at that time for rename or delete operations, the backup completed with warnings, but MySQL Server experienced an unexpected halt. MySQL Server now retries the file access operation a number of times in case this or a similar scenario is the explanation and the file becomes available again before long. (Bug #25839610)
  • Replication: With sync_binlog=1 set, if the binary log was rotated during a commit before the binary log end position was updated, replication stopped on the slave because the server attempted to use the old binary log end position with the new binary log file. The server now compares the binary log file name with the active binary log file when updating the binary log end position, so that the issue does not occur. (Bug #22252394, Bug #25524203, Bug #84752)
  • Replication: When adding a new member to a group, if the certification information was too big to transmit, an event was generated that caused failures in all group members. To avoid this situation, now if the certification information is too large an error is generated which makes the joining member leave the group. (Bug #93130, Bug #91870, Bug #28900691, Bug #28443958)
  • Replication: When stopping replication, any channels that had pending transactions could cause a deadlock in Group Replication. (Bug #92376, Bug #28636768, Bug #28365855)
  • The keyring_aws plugin was missing from Commercial packages for macOS.
  • The supported macOS versions for this plugin now are macOS 10.13 and 10.14. (Bug #29051838)
  • MySQL Enterprise Firewall did not work well if the audit_log plugin was installed. (Bug #28930885, Bug #93184)
  • The server permitted creation of databases with the same name as redo log files, which could result in unexpected server behavior. Such names are no longer permitted as database names. (Bug #28867993)
  • Removal of Sun RPC and XDR from glibc into a separate libtirpc library caused problems with libasan on some platforms. (Bug #28785835, Bug #92762, Bug #28897799, Bug #93116)
  • In LDAP group search filter values, special characters were not escaped.
  • A memory leak was caused by GET_LOCK() calls with a zero timeout that failed due to concurrent connections holding the same user-level lock. (Bug #28714367)
  • Mysqlpump did not free all allocated resources when it encountered an error, resulting in memory leaks. (Bug #28538971, Bug #92131)
  • For debug builds, the server could exit when attempting to roll back CREATE USER statements. (Bug #28536312)
  • Mishandling of deprecated system variables could cause output from queries on the Performance Schema variables_by_thread table to be incorrect. (Bug #28515475, Bug #92049)
  • When a subquery contained a UNION, the count of the number of subquery columns was calculated incorrectly. (Bug #28499924)
  • On a GTID-enabled server, concurrent statements on the INFORMATION_SCHEMA.COLUMNS table could deadlock. (Bug #28293047, Bug #91548)
  • Comparing log file names as strings using the memcmp() function resulted in uninitialized memory read errors. The comparison now uses the strncmp() function. Thanks to Zsolt Parragi and Laurynas Biveinis for their contributions. (Bug #28178776, Bug #90238)
  • The optimizer skipped the second column in a composite index when executing an inner join with a LIKE clause against the second column. (Bug #28086754)
  • CREATE TABLE ... SELECT could create date columns with “zero” date default values when it should have created them without a default value. (Bug #28022129)
  • The transformation of IN subquery predicates into semijoins was not handled correctly for a very large number of tables. (Bug #28004674)
  • Server mishandling of SIGHUP signals could result in a server exit. (Bug #27966483, Bug #90742)
  • When the character set of one string comparison operand was a superset of the character set of the other operand, some comparisons were disallowed that should be permitted by converting the operand with the “smaller” character set to the “larger” character set. utf8mb4 and utf32 are considered to be a superset of any other encoding. (Bug #27897053, Bug #25642319, Bug #85224)
  • Improper memory handling by account management statements could result in server misbehavior. (Bug #27820277)
  • Executing a prepared statement to do a multiple-row insert with large number of placeholders consumed excessive memory and could execute slowly. (Bug #27703912)
  • The parser accepted invalid SET statement syntax in trigger definitions that could result in a server exit. (Bug #27595603)
  • The server failed to start if the keyring_encrypted_file plugin keyring file was invalid. (Bug #27588064)
  • Keyring migration failed with source and destination keyring plugins of keyring_okv and keyring_encrypted_file, respectively. (Bug #27493970)
  • When executing a prepared statement with a procedure call with the CURSOR_TYPE_READ_ONLY flag set, the client library hung if the procedure performed a SELECT that returned an empty result set. (Bug #27443252, Bug #89214)
  • The parser performed some out-of-memory checks incorrectly. (Bug #25633994)
  • When binlog_format is ROW or MIXED, operations on temporary tables are not logged. Previously, the exception to this rule was that when the connection was terminated at the end of the session, the statement DROP TEMPORARY TABLE IF EXISTS was logged for any temporary tables that had been opened in the session. For row-based replication, this behavior caused an unnecessary write to the binary log, and added a transaction sequence number for the GTID where these were enabled.
  • Now, when a temporary table is created in a session, the binary logging format is tracked. The DROP TEMPORARY TABLE IF EXISTS statement is only logged at the end of the session if statement-based format was in effect when the temporary table was created, so the CREATE TEMPORARY TABLE statement was logged. If row-based or mixed-format binary logging was in use when the table was created, the DROP TEMPORARY TABLE IF EXISTS statement is not logged.
  • Thanks to Laurynas Biveinis for the patch. (Bug #24670909, Bug #83003, Bug #28606948)
  • DML statements using IGNORE were not always handled correctly on tables having generated columns. (Bug #22990029)
  • A query employing a dynamic range and an index merge could use more memory than expected. (Bug #89953, Bug #27659490)

New in MySQL 5.7.24 (Dec 11, 2018)

  • Deprecation and Removal Notes:
  • InnoDB; Partitioning: Support for placing table partitions in shared tablespaces is deprecated and will be removed in a future version of MySQL. Shared tablespaces include the system tablespace and general tablespaces. For information about identifying partitions in shared tablespaces and moving them to file-per-table tablespaces, see Preparing Your Installation for Upgrade.
  • InnoDB: Support for TABLESPACE = innodb_file_per_table and TABLESPACE = innodb_temporary clauses with CREATE TEMPORARY TABLE is deprecated and will be removed in a future MySQL version.
  • Packaging Notes:
  • Binary packages that include curl rather than linking to the system curl library now use curl 7.60.0 rather than 7.45.0. (Bug #28043702)
  • Security Notes:
  • Microsoft Windows: On Windows, MySQL Enterprise Edition distributions now bundle the Cyrus SASL library files libsasl.dll and saslSCRAM.dll so that the LDAP authentication plugins can use the SCRAM-SHA-1 authentication method.
  • MySQL Enterprise Edition now provides data masking and de-identification capabilities, implemented as a plugin library containing a plugin and a set of user-defined functions. Data masking hides sensitive information by replacing real values with substitutes. MySQL Enterprise Data Masking and De-Identification functions enable masking existing data using several methods such as obfuscation (removing identifying characteristics), generation of formatted random data, and data replacement or substitution.
  • Functionality Added or Changed:
  • Replication: Use the group_replication_exit_state_action option to configure how Group Replication behaves when a member leaves the group involuntarily, for example when it is expelled from the group due to an unstable network connection. When group_replication_exit_state_action is set to ABORT_SERVER, upon exiting the group unintentionally, the instance shuts MySQL down, and when group_replication_exit_state_action is set to READ_ONLY the instance sets MySQL to super read only mode instead and its state is set to ERROR.
  • Previously, file I/O performed in the I/O cache in the mysys library was not instrumented, affecting in particular file I/O statistics reported by the Performance Schema about the binary log index file. Now, this I/O is instrumented and Performance Schema statistics are accurate. Thanks to Yura Sorokin for the contribution. (Bug #27788907, Bug #90264)
  • The zlib library version bundled with MySQL was raised from version 1.2.3 to version 1.2.11. MySQL implements compression with the help of the zlib library.
  • The zlib compressBound() function in zlib 1.2.11 returns a slightly higher estimate of the buffer size required to compress a given length of bytes than it did in zlib version 1.2.3. The compressBound() function is called by InnoDB functions that determine the maximum row size permitted when creating compressed InnoDB tables or inserting rows into compressed InnoDB tables. As a result, CREATE TABLE ... ROW_FORMAT=COMPRESSED or INSERT operations with row sizes very close to the maximum row size that were successful in earlier releases could now fail.
  • Bugs Fixed:
  • InnoDB: An ALTER TABLE operation that added a primary key produced a segmentation fault. (Bug #28395278)
  • References: This issue is a regression of: Bug #27753193.
  • InnoDB: A query that scanned the primary key of a table did not return the expected result. (Bug #28104394, Bug #91032)
  • InnoDB: A query interruption during a lock wait caused an error. (Bug #28068293)
  • InnoDB: An index record was not found when updating a secondary index defined on a generated column. (Bug #27968952)
  • InnoDB: The update log applied as part of an online ALTER TABLE operation did not take into account the computed value of the generated column in the old row while updating the secondary index. (Bug #27921932)
  • InnoDB: An unsupported DDL operation involving a foreign key constraint raised an assertion. (Bug #27912873)
  • InnoDB: An attempted foreign key check on a discarded table caused a segmentation fault. (Bug #27804668)
  • InnoDB: An assertion was raised during an OPTIMIZE TABLE operation. (Bug #27753193)
  • InnoDB: A foreign key constraint name was duplicated during a rename table operation, causing a failure during later query execution. (Bug #27545888)
  • InnoDB: In a function called before the execution of a statement in a stored procedure, a read and write operation on trx->lock.start_stmt was not protected by a mutex. (Bug #27325898)
  • InnoDB: An error occurred during a DDL operation due to a mismatch in a REDUNDANT row format calculation that determines the length of the online log. (Bug #26375771)
  • InnoDB: The location of the Innodb Merge Temp File that reported by the wait/io/file/innodb/innodb_temp_file Performance Schema instrument was incorrect. (Bug #21339079, Bug #77519)
  • Partitioning: When a CREATE TABLE ... PARTITION BY ... statement failed due to an invalid partition definition, the server did not remove any partition files which might have been created prior to encountering the invalid PARTITION clause. (Bug #27798708)
  • References: See also: Bug #88043, Bug #26945644.
  • Partitioning: It was possible to perform FLUSH TABLES FOR EXPORT on a partitioned table created with innodb_file_per_table=1 after discarding its tablespace. Attempting to do so now raises ER_TABLESPACE_DISCARDED. (Bug #90545, Bug #27903881)
  • References: See also: Bug #80669, Bug #22899690.
  • Replication: When the binlog_group_commit_sync_delay system variable is set to a wait time to delay synchronization of transactions to disk, and the binlog_group_commit_sync_no_delay_count system variable is also set to a number of transactions, the MySQL server exits the wait procedure if the specified number of transactions is reached before the specified wait time is reached. The server manages this process by checking on the transaction count after a delta of one tenth of the time specified by binlog_group_commit_sync_delay has elapsed, then subtracting that interval from the remaining wait time.
  • If rounding during calculation of the delta meant that the wait time was not a multiple of the delta, the final subtraction of the delta from the remaining wait time would cause the value to be negative, and therefore to wrap to the maximum wait time, making the commit hang. The data type for the remaining wait time has now been changed so that the value does not wrap in this situation, and the commit can proceed when the original wait time has elapsed. Thanks to Yan Huang for the contribution. (Bug #28091735, Bug #91055)
  • Replication: An assertion was raised in debug builds because the MySQL server recorded a GTID consistency violation, but did not remove the record after the relevant statement failed to execute successfully. The handling of this situation has now been improved to ensure that the server checks at the end of a transaction whether a GTID consistency violation was produced by a failed statement, and if this is the case, restores the previous GTID consistency state. (Bug #27903831, Bug #90551)
  • Replication: With GTIDs in use for replication, transactions including statements that caused a parsing error (ER_PARSE_ERROR) could not be skipped manually by the recommended method of injecting an empty or replacement transaction with the same GTID. This action should result in the slave identifying the GTID as already used, and therefore skipping the unwanted transaction that shared its GTID. However, in the case of a parsing error, because the statement was parsed before the GTID was checked to see if it needed to be skipped, the replication applier thread stopped due to the parsing error, even though the intention was for the transaction to be skipped anyway.
  • With this fix, the replication applier thread now ignores parsing errors if the transaction concerned needs to be skipped because the GTID was already used. Note that this behavior change does not apply in the case of workloads consisting of binary log output produced by mysqlbinlog. In that situation, there would be a risk that a transaction with a parsing error that immediately follows a skipped transaction would also be silently skipped, when it ought to raise an error. (Bug #27638268)
  • Replication: When a RESET SLAVE statement was issued on a replication slave with GTIDs in use, the existing relay log files were purged, but the replacement new relay log file was generated before the set of received GTIDs for the channel had been cleared. The former GTID set was therefore written to the new relay log file as the PREVIOUS_GTIDS event, causing a fatal error in replication stating that the slave had more GTIDs than the master, even though the gtid_executed set for both servers was empty. Now, when RESET SLAVE is issued, the set of received GTIDs is cleared before the new relay log file is generated, so that this situation does not occur. (Bug #27636289)
  • Replication: The master's receiver thread for semisynchronous replication held a mutex while reading acknowledgements from slaves, but the same mutex was required to add or remove a semisynchronous slave, causing those operations to be delayed by the acknowledgement activity. The issue has now been fixed by not acquiring the mutex to read the acknowledgements from slaves. (Bug #27610678, Bug #89370)
  • Replication: Entries in the relay log info log (the slave_relay_log_info table) for the Group Replication-specific channels group_replication_applier and group_replication_recovery were not being cleared by a RESET SLAVE or RESET SLAVE ALL command. (Bug #27411175)
  • Replication: Automatic retrying of transactions on a replication slave, as specified by the slave_transaction_retries system variable, was taking place even if the transaction had a non-temporary error that would repeat on retrying or that indicated wider issues. Now, transactions are only automatically retried if there is either no error, or an error that is only temporary. (Bug #27373559, Bug #89143)
  • Replication: Attempting to uninstall the plugin while START GROUP_REPLICATION executed could result in unexpected behavior. (Bug #25423650, Bug #91042, Bug #28088177)
  • Replication: When FLUSH statements for specific log types (such as FLUSH SLOW LOGS) resulted in an error, the statements were still written to the binary log. This stopped replication because the error had occurred on the master, but did not occur on the slave. MySQL Server now checks on the outcome of these FLUSH statements, and if an error occurred, the statement is not written to the binary log. (Bug #24786290, Bug #83232)
  • Replication: The PASSWORD() function, which produces a hash of the password, was deprecated in MySQL 5.7 and removed in MySQL 8.0. When a SET PASSWORD statement that used this function was replicated from a MySQL 5.6 master to a MySQL 5.7 slave, or from a MySQL 5.7 master with the log_builtin_as_identified_by_password system variable set to ON to a MySQL 5.7 slave, the password hash was itself also hashed before being stored on the slave. The issue has now been fixed and the replicated password hash is stored as originally passed to the slave. (Bug #24687073)
  • Replication: If an ORDER BY clause was used in retrieving records from certain Performance Schema tables relating to replication, an empty set was returned. The issue has now been fixed. (Bug #22958077, Bug #80777)
  • Replication: When replication channels are used on a slave for multi-source replication, a START SLAVE statement that does not specify an individual channel (so without the FOR CHANNEL clause) should start the I/O thread and the SQL thread for all of the channels on the replication slave. However, if a RESET SLAVE statement was used on such a slave, a subsequent START SLAVE statement did not start the non-default channels. Now, replication channels that are deinitialized as a result of a RESET SLAVE statement, rather than as a result of an error in the initialization process, are identified and are restarted by a START SLAVE statement that applies to all channels. (Bug #22809607)
  • Replication: Issuing RESET SLAVE on a replication slave does not change any replication connection parameters such as master host, master port, master user, or master password, which are retained in memory. However, these connection parameters are reset if you issue RESET SLAVE ALL. Previously, if the slave mysqld was restarted immediately after issuing RESET SLAVE (including a server crash as well as a deliberate restart), the connection parameters were reset as if RESET SLAVE ALL had been used.
  • Now, when master_info_repository=TABLE is set on the server (which is the default from MySQL 8.0), replication connection parameters are preserved in the crash-safe InnoDB table mysql.slave_master_info as part of the RESET SLAVE operation. They are also retained in memory. In the event of a server crash or deliberate restart after issuing RESET SLAVE but before issuing START SLAVE, the replication connection parameters are retrieved from the table and reused for the new connection.
  • If master_info_repository=FILE is set on the server (which is the default in MySQL 5.7), replication connection parameters are only retained in memory, so the behavior remains the same as previously. If the slave mysqld is restarted due to a server crash or a deliberate restart immediately after issuing RESET SLAVE, the connection parameters are lost. In that case, you must issue a CHANGE MASTER TO statement after the server start to respecify the connection parameters before issuing START SLAVE.
  • If you want to reset the connection parameters intentionally, you need to use RESET SLAVE ALL, which clears the connection parameters. In that case, you must issue a CHANGE MASTER TO statement after the server start to specify the new connection parameters. (Bug #20280946)
  • Replication: Compilation warnings related to unused functions in xdr_utils have been reduced. Thanks to Zsolt Parragi for the patch. (Bug #91071, Bug #28099963)
  • Replication: If the group_replication_recovery_retry_count variable was modified while the member was already making a reconnection attempt, the connection attempt could enter an infinite loop. (Bug #91057, Bug #28092714)
  • Replication: When group_replication_group_seeds contained a DNS based entry which resolved to its own local address, Group Replication could not start. (Bug #90483, Bug #27882096, Bug #28074929)
  • Microsoft Windows: On Windows, uninstallation of the MySQL Server MSI package through MySQL Installer produced a spurious popup window. (Bug #27463864)
  • On the Fedora 29 platform, OpenSSL 1.0.x is used to build packages because 1.1.1 support is not ready. If you build MySQL from source, it is recommended that you build using the compat-openssl10-devel package. (Bug #28737143)
  • On the Fedora 29 platform, upgrading from MariaDB to MySQL 8.0.13 failed due to missing obsoletes. (Bug #28727698)
  • Address Sanitizer revealed SSL/Zlib link problems related to the audit_log plugin; these were corrected. (Bug #28525431, Bug #92082)
  • Compilation failed for GCC 8 with MySQL configured to use some system libraries. (Bug #28471072, Bug #91914)
  • Concurrent INSERT and SELECT statements on a MERGE table could result in a server exit. (Bug #28379285)
  • For UPDATE and DELETE statements that produce an error due to sql_safe_updates being enabled, the error message was insufficiently informative. The message now includes the first diagnostic that was produced, to provide information about the reason for failure. For example, the message may indicate that the range_optimizer_max_mem_size value was exceeded or type conversion occurred, either of which can preclude use of an index.
  • Additionally: (1) Using EXPLAIN for such statements does not produce an error, enabling users to see from EXPLAIN plus SHOW WARNINGS output why an index is not used. (2) For multiple-table deletes and updates, an error is produced with safe updates enabled only if any target table uses a table scan. (Bug #28145710, Bug #91080)
  • MySQL Server and test RPM packages were missing perl-Data-Dumper as a dependency. (Bug #28144933, Bug #72926)
  • For the mysql client, the -b short option was associated with two long options, --no-beep and --binary-as-hex. The -b option now is associated only with --no-beep. (Bug #28093271)
  • The WITH_GMOCK CMake option did not handle Windows path names properly. (Bug #28061409, Bug #90964)
  • Group lookups for LDAP authentication plugins could fail if the user had insufficient privileges. Now, group search operations bind again using root credentials if those are available. (Bug #28016008)
  • Generated columns having indexes and that used a string function were not always populated correctly. (Bug #27973409)
  • Stored program definitions in mysqldump dump files sometimes included the NO_AUTO_CREATE_USER SQL mode. Because that mode has been removed in MySQL 8.0, loading such a dump file into a MySQL 8.0 server failed. mysqldump now removes NO_AUTO_CREATE_USER from the definition of dumped stored programs. (Bug #27931181, Bug #90624)
  • Very long table keys were handled incorrectly on replication slaves. (Bug #27930505)
  • During server startup/shutdown, PID files could be mishandled. (Bug #27919254)
  • If flushing the error log failed due to a file permission error, the flush operation did not complete. (Bug #27891472, Bug #90505)
  • References: This issue is a regression of: Bug #26447825.
  • For MEMORY tables, memory overflow errors could occur. (Bug #27799513)
  • When converting from a BLOB (or TEXT) type to a smaller BLOB (or TEXT) type, no warning or error was reported informing about the truncation or data loss. Now an appropriate error is issued in strict SQL mode and a warning in nonstrict SQL mode. (Bug #27788685, Bug #90266)
  • The severity of messages produced by the server about being unable to read key files has been escalated from INFORMATION to WARNING. (Bug #27737195)
  • Failure to create a temporary table during a MyISAM query could cause a server exit. Thanks to Facebook for the patch. (Bug #27724519, Bug #90145)
  • parser_max_mem_size was ineffective when parsing stored program definitions. (Bug #27714748)
  • Some typos in server error messages were fixed. Thanks to Thomas Tsiakalakis for the contribution. (Bug #27688294, Bug #90048)
  • Host name resolution errors could cause the audit_log plugin to fail. (Bug #27567003)
  • Unsuccessful connection attempts were not being written to the error log when log_error_verbosity=3. (Bug #27539838)
  • An earlier code cleanup caused FEDERATED storage engine failures. (Bug #27493633, Bug #89537)
  • References: This issue is a regression of: Bug #25943754.
  • An attempted read of an uncommitted transaction raised an assertion. (Bug #26876608)
  • ALTER TABLE ... REORGANIZE PARTITION ... could result in incorrect behavior if any partition other than the last was missing the VALUES LESS THAN part of the syntax. (Bug #26791931)
  • The audit_log plugin could deadlock the server. (Bug #24353553)
  • Debug symbol packages are now included for all apt platforms (previously, they were only available on Debian 9). (Bug #24008883, Bug #27990381)
  • For InnoDB tables, the storage engine API could return incorrect values for the maximum supported key-part length. (Bug #20629014, Bug #76096)
  • Specifying the maximum possible value for a YEAR column failed when expressed as a real constant such as 2155.0E00 or 2.15E3. (Bug #91226, Bug #28172538)
  • It was possible for a subquery that used a unique key on a column allowing NULL to return multiple rows. (Bug #88670, Bug #27182010)

New in MySQL 8.0.11 (Apr 19, 2018)

  • Functionality Added or Changed:
  • NDB Cluster: INFORMATION_SCHEMA tables now are populated with tablespace statistics for MySQL Cluster tables. (Bug #27167728)
  • InnoDB: The ibd2sdi Serialized Dictionary Information (SDI) extraction utility for InnoDB tablespaces now supports a --pretty option that controls JSON pretty print formatting of SDI data. Pretty print formatting is enabled by default. Disabling pretty print formatting using --skip-pretty reduces the size of extracted SDI data. (Bug #27546514)
  • InnoDB: To improve startup performance on systems with large buffer pools, buffer pool initialization is now multi-threaded. (Bug #22963374, Bug #80784)
  • InnoDB: The following redo logging optimizations were implemented:
  • User threads can now write concurrently to the log buffer without synchronizing writes.
  • User threads can now add dirty pages to the flush list in a relaxed order.
  • A dedicated log thread is now responsible for writing the log buffer to the system buffers, flushing system buffers to disk, notifying user threads about written and flushed redo, maintaining the lag required for the relaxed flush list order, and write checkpoints.
  • System variables were added for configuring the use of spin delay by user threads waiting for flushed redo:
  • innodb_log_wait_for_flush_spin_hwm: Defines the maximum average log flush time beyond which user threads no longer spin while waiting for flushed redo.
  • innodb_log_spin_cpu_abs_lwm: Defines the minimum amount of CPU usage below which user threads no longer spin while waiting for flushed redo.
  • innodb_log_spin_cpu_pct_hwm: Defines the maximum amount of CPU usage above which user threads no longer spin while waiting for flushed redo.
  • The innodb_log_buffer_size configuration option is now dynamic, which permits resizing of the log buffer while the server is running.
  • For more information, see Optimizing InnoDB Redo Logging.
  • Solaris: On Solaris, MySQL can now be built with Developer Studio 12.6. (Bug #27055190, Bug #88316)
  • Logging during data directory initialization (for example, using mysqld --initialize) has changed:
  • The startup message indicates that the server is running in initialization mode.
  • A message is written indicating when initialization has completed.
  • The message about the CA certificate being self-signed is suppressed.
  • Bug #27557952, Bug #89693)
  • The -log suffix is no longer appended to the server version string if logging is enabled. This affects, for example, the value of the version system variable. (Bug #27532097, Bug #89626)
  • Server shutdown lines written to the error log now include the server version. (Bug #27522788, Bug #87910)
  • SHOW CREATE TABLE normally does not show the ROW_FORMAT table option if the row format is the default format. This can cause problems during table import and export operations for transportable tablespaces. MySQL now supports a show_create_table_verbosity system variable that, when enabled, causes SHOW CREATE TABLE to display ROW_FORMAT regardless of whether it is the default format. (Bug #27516741)
  • Performance Schema memory instrumentation overhead was reduced. (Bug #27500610)
  • During data directory initialization, the server created objects using sql_mode=''. Now the server uses the default sql_mode value (which, among other settings, includes strict mode). (Bug #27476029, Bug #89495)
  • The collations defined in mysql-test/std_data/Index.xml are for test purposes only and should not be used otherwise. Comments were added to the file to make this clear because some users were using them in non-test environments. (Bug #27421838)
  • RESET PERSIST no longer performs an implicit commit. (Bug #27374791)
  • For a persisted variable, the SET_TIME column of the Performance Schema variables_info table now reflects the time at which the variable was persisted, not server startup time. (Bug #25677422)
  • Previously, SHOW CREATE TABLE did not show the collation for a column if the collation was the same as the table default, even if the collation was explicitly specified at table-creation time. Now, SHOW CREATE TABLE always shows the column collation if the collation was explicitly specified, even if the collation is the same as the table default. (Bug #11754608, Bug #46239)
  • Bugs Fixed:
  • Important Change: When NO_ZERO_DATE SQL mode is enabled, ALTER TABLE rejects attempts to add DATE or DATETIME columns that are declared NOT NULL to a nonempty table if no DEFAULT is specified for that column. Since a generated column has no default value, this restriction also prevented addition of a generated DATE NOT NULL or DATETIME NOT NULL column to a nonempty table. Since the expression used to generate the column can be used in place of the missing default for determining the column value, this restriction is now lifted for generated columns. (Bug #27252354)
  • Important Change: For ANALYZE TABLE ... UPDATE HISTOGRAM statements, the WITH N BUCKETS clause is now optional. If not specified, the default value for BUCKETS is 100. (Bug #89909, Bug #27637968)
  • InnoDB: The server was stopped before a fatal error message was written to the error log. (Bug #27626478)
  • InnoDB: When determining if a wait lock could be granted, locks held by victim transactions that were being rolled back were ignored. (Bug #27607235)
  • InnoDB: An error occurred in Sdi_Decompressor::decompress() when compiling a debug build using GCC 7.2.0. (Bug #27565889)
  • InnoDB: An assertion was raised when registering buffer pool chunks during parallel creation of multiple buffer pools. A mutex is now used to protect registration of buffer pool chunks in the buffer pool chunk map. (Bug #27565865)
  • InnoDB: Enabling the standard monitor caused an error. (Bug #27534041)
  • InnoDB: An internal field used to mark a column as hidden was changed from a boolean field to an enum field to support additional levels of column visibility. (Bug #27499518, Bug #89553)
  • InnoDB: An invalid zlib-related Valgrind failure reported that a conditional jump or move depends on uninitialized value. (Bug #27482740, Bug #89509)
  • InnoDB: An incorrect GROUP BY result was returned when using the TempTable storage engine and a NO PAD collation. (Bug #27454796)
  • InnoDB: An incorrect compression length value in a page compression function caused hole punching to be skipped the first time pages are compressed. (Bug #27399897)
  • InnoDB: Starting the server with an incorrect --log-bin option value raised an assertion, and subsequent attempts to start the server with a correct --log-bin value or without the --log-bin option continued to produce assertion failures. (Bug #27393317)
  • InnoDB: A large object (LOB) reference was not updated when a LOB was inserted during an UPDATE operation. (Bug #27368662)
  • InnoDB: After restarting the server, a TRUNCATE TABLE operation raised an assertion due to table flags that were inconsistent with remote data directory information stored in memory. (Bug #27367639)
  • InnoDB: Attempting to create a temporary table in a file-per-table tablespace using CREATE TEMPORARY TABLE ... TABLESPACE syntax failed to report an error. Temporary tablespaces are only permitted in the temporary tablespace. (Bug #27361662)
  • InnoDB: A latch taken on the first page of a large object (LOB) was not released before another thread attempted to allocate the page, causing a deadlock. (Bug #27360492)
  • InnoDB: Converting an implicit lock to an explicit lock was optimized by the introduction of a member variable that tracks the smallest active transaction ID.
  • Thanks to Zhai Weixiang for the patch. (Bug #27353468, Bug #89127)
  • InnoDB: The mysql.innodb_ddl_log and mysql.innodb_dynamic_metadata tables, which are used internally by the InnoDB storage engine, are now protected. DDL and DML operations on these tables are no longer permitted, and the tables no longer appear in INFORMATION_SCHEMA query results. (Bug #27353455, Bug #89129)
  • InnoDB: Upgrading a MySQL 5.7 instance with an innodb_page_size setting of 4K caused mysql_upgrade to fail with a “Specified key was too long; max key length is 768 bytes” error when creating or modifying system tables. The error was suppressed to permit the mysql_upgrade client to run on an instance with an innodb_page_size setting of 4K. (Bug #27338431)
  • InnoDB: The recovery process could not properly determine space_id values, causing the server to exit. (Bug #27331936)
  • InnoDB: An ALTER TABLE operation that modified the nullability of an indexed column raised an assertion. InnoDB incorrectly assumed that a new primary key must be added instead of created from an existing unique key. (Bug #27330454, Bug #89087)
  • References: This issue is a regression of: Bug #24397406.
  • InnoDB: After an ALTER TABLE ... IMPORT TABLESPACE operation, metadata could not be retrieved correctly from the INFORMATION_SCHEMA.INNODB_COLUMNS table. (Bug #27322099)
  • InnoDB: An INSERT operation involving a large object (LOB) value raised an assertion. After splitting a LOB fragment, there was insufficient space for a directory entry. (Bug #27320977)
  • InnoDB: On a server using the utf8mb4 character set, an INSERT or UPDATE during an ALTER TABLE operation that changed the row format of a table that included a virtual column caused an index corruption. (Bug #27319084)
  • InnoDB: The data retrieved from INFORMATION_SCHEMA.INNODB_COLUMNS was incorrect for tables containing a virtual column. (Bug #27316037)
  • InnoDB: The server failed to start after recovery due to an invalid keyring file. The keyring file created from backup was empty. (Bug #27307740)
  • InnoDB: A deadlock between background threads, one attempting to evict a full-text search table from the cache, and the other attempting to synchronize a table, caused InnoDB Cluster nodes to fail. (Bug #27304661)
  • InnoDB: A typo was corrected in an InnoDB recovery message. Thanks to Daniël van Eeden for the patch. (Bug #27287979, Bug #27010613, Bug #88185)
  • InnoDB: A message stating that encryption algorithm support is missing was reported during InnoDB recovery. (Bug #27286020)
  • InnoDB: A missing or mismatched keyring file caused an assertion failure at startup. (Bug #27278324)
  • InnoDB: An error was returned indicating that encryption support was missing when checking the space ID of an encrypted tablespace file. (Bug #27278100)
  • InnoDB: A debug message that prints a “too many open files” warning is now only printed if the number of open files reaches a limit of 300. (Bug #27277844)
  • InnoDB: Failure to skip predicate locks when releasing gaps locks raised debug assertions, as did failure to remove the supremum record bit prior releasing gaps locks on the supremum. (Bug #27272806, Bug #27294066)
  • InnoDB: A tablespace ID discovery failure occurred when starting the server on a cloned data directory. (Bug #27265874)
  • InnoDB: An unprotected global variable (fil_n_file_opened) caused an assertion when shutting down the server. (Bug #27265473)
  • InnoDB: An assertion that is no longer valid was raised when checking for pending I/O on the file in use. (Bug #27263206)
  • InnoDB: An empty general tablespace caused a failure when upgrading to MySQL 8.0. The empty data file was expected to have a specific number of pages. (Bug #27261822)
  • InnoDB: A startup failure occurred because a directory specified by the --innodb-directories option contained a keyring data file. The --innodb-directories option should only recognize InnoDB tablespace files. (Bug #27253116)
  • InnoDB: A function that calculates the increase in minimum bounding rectangle (MBR) size incorrectly returned 0, resulting in R-tree corruption. (Bug #27237472)
  • InnoDB: A REPLACE operation on a temporary table raised an assertion. (Bug #27225649)
  • InnoDB: An online ALTER TABLE operation on a table accompanied by concurrent DML on the same table raised an assertion. An end-of-log check was not performed prior to accessing the DML log to determine the length of a virtual column. (Bug #27158030)
  • InnoDB: When the addition of a virtual index failed, the virtual index that was freed was not removed from the lists of virtual column indexes. (Bug #27141613)
  • InnoDB: Adding a virtual column and index in the same statement caused an error. (Bug #27122803)
  • InnoDB: An undo tablespace truncate operation raised an assertion. The check that determines if undo tablespace segments are inactive was invalid. (Bug #27114068)
  • InnoDB: When the TempTable storage engine was unable to allocate memory using temporary files and mmap, an invalid error was reported indicating that the defined on-disk storage engine would be used instead. (Bug #26990375)
  • InnoDB: A tablespace import operation on a server with a default row format of REDUNDANT raised an assertion failure. (Bug #26960215)
  • InnoDB: A stored field based on a generated column permitted the base column to have a NULL value. (Bug #26958695)
  • InnoDB: Evaluation of a subquery in a resolving function raised an assertion. (Bug #26909960)
  • InnoDB: Locks related to data dictionary operations caused degradation in CREATE TABLE performance. (Bug #26848711, Bug #87827)
  • InnoDB: A LOCK INSTANCE FOR BACKUP operation was able to acquire a backup lock without waiting for a concurrent DDL operation to finish. (Bug #26831155, Bug #87812)
  • InnoDB: An incorrectly specified innodb_data_file_path or innodb_temp_data_file_path value returned a syntax error that did not specify the name of the system variable that caused the initialization failure. (Bug #26805833)
  • InnoDB: An handler that was opened for a TRUNCATE TABLE operation caused the operation to assert. The server now closes open handlers before dropping the table.
  • The patch for this bug also improves TRUNCATE TABLE error messages related to foreign key constraints, and makes it possible to truncate a corrupted table. (Bug #26710839)
  • InnoDB: An online DDL operation that rebuilds the table raised an assertion when the last insert log record to be applied was split across two pages. (Bug #26696448, Bug #87532)
  • InnoDB: An assertion was raised when attempting to generate a virtual column value dependent on an off-page large object value that was not yet stored. (Bug #26625652)
  • InnoDB: An R-tree search counted delete-marked records, causing it to find more records than present in the clustered index. As result, the valid R-tree index was marked as corrupted. (Bug #26381207)
  • InnoDB: A RENAME TABLE operation that renamed the schema failed to rename full-text search common auxiliary tables that were left behind when the full-text search index was removed previously, resulting in a assertion failure when attempting to drop the old schema. (Bug #26334149)
  • InnoDB: An assertion was raised when a thread attempted to read a record containing BLOB data while another thread was writing the same data to external pages. (Bug #26300119)
  • References: This issue is a regression of: Bug #23481444.
  • InnoDB: Column prefixes for externally stored columns exceeded the amount of available memory in the online log. (Bug #25928471)
  • InnoDB: A problematic lock that was introduced to protect writing of dynamic metadata changes to the redo log during a checkpoint was removed. A mutex is now used instead. The checkpoint LSN was also adjusted to protect dynamic metadata changes. (Bug #25834374)
  • InnoDB: InnoDB failed to account for a virtual column when using the column offset to search an index for an auto-increment column. (Bug #25076416)
  • InnoDB: An invalid debug condition caused a buffer pool chunk allocation failure, which resulted in an assertion failure when a purge thread attempted to access an unallocated chunk. (Bug #23593654)
  • References: This issue is a regression of: Bug #21348684.
  • InnoDB: Threads were prevented from entering the InnoDB storage engine due to ticket acquisition deadlocks. (Bug #23476050)
  • Partitioning: An error returned by the storage engine while executing ALTER TABLE EXCHANGE PARTITION was not handled correctly by the server. (Bug #27320682)
  • Replication: When MySQL was started with --plugin-load='group_replication.so' but Group Replication was not started, starting an asynchronous slave channel resulted in an unresponsive server. (Bug #27584141)
  • Replication: Empty XA transactions that have been rolled back should not be recorded in the binary log or added to the set of transactions in the gtid_executed system variable. However, if rolled-back empty XA transactions were executed after an empty XA transaction ending with an XA COMMIT ... ONE PHASE statement, they were being incorrectly added to the binary log as an XA ROLLBACK statement, and also to the gtid_executed system variable. The issue is now fixed. (Bug #27435974)
  • Replication: The Group Replication files have been moved from the rapid directory to the plugin directory. (Bug #27413789)
  • Replication: When the system variable gtid_next was set to AUTOMATIC, empty XA transactions that were rolled back and not recorded in the binary log, were being incorrectly added to the set of transactions in the gtid_executed system variable, causing an inconsistency. The rolled-back empty XA transactions are no longer recorded in gtid_executed. (Bug #27407670)
  • Replication: Group Replication conflict detection uses schema and table names as part of the Primary Key Equivalent (PKE) in order to detect and disallow conflicting transactions. The value of the lower_case_table_names system variable changes how schema and table names are stored and externalized, which depending on the configured value could persist a table named T1 as t1. Such a difference in a group could cause inconsistencies. Now, members must all have the same value for lower_case_table_names. (Bug #27401817)
  • Replication: Using an IP address or hostname in any Group Replication related configuration on macOS was failing. (Bug #27376511)
  • Replication: Changing the Group Replication required settings incorrectly on online secondary members could result in an unexpected halt. (Bug #27317478, Bug #27157202)
  • Replication: The value of LAST_CONFLICT_FREE_TRANSACTION in the replication_group_member_stats Performance Schema table was not correctly synchronized across group members. (Bug #27317431)
  • Replication: After issuing START GROUP_REPLICATION the gtid_mode system variable is locked to prevent any modification to its value until the group is online. Any attempt to modify gtid_mode during this time is blocked. As part of the process of starting Group Replication the server needs to set super_read_only=off, which has dependencies on locks acquired by SET GTID_MODE. This could result in Group Replication hanging and there was no possibility to connect to the server to resolve the situation. To prevent this situation, when it is not possible to acquire the locks needed by SET GTID_MODE the operation aborts. (Bug #27312241)
  • Replication: When a member is joining a group there is a chance of the request to join being rejected. If the rejection resulted in a retry, for example because the seed member being contacted was not in the group, then there was a possibility of the retry cycle continuing infinitely. (Bug #27294009)
  • Replication: In the unlikely event of the group failing to start, for example because no seed member could be contacted, there is a one minute period where the group retries the start process. Attempting to modify a Group Replication plugin option during this period could result in an unexpected halt. Now, attempting to modify a Group Replication plugin option during plugin start or stop results in error. (Bug #27275312)
  • Replication: The default binary log expiration period of 30 days is now set as the default for the binlog_expire_logs_seconds system variable, instead of the deprecated expire_logs_days system variable. binlog_expire_logs_seconds now defaults to a value of 2592000 (30*24*60*60 seconds), and expire_logs_days now defaults to zero.
  • In MySQL 8.0.3 and 8.0.4, the effects of binlog_expire_logs_seconds and expire_logs_days were cumulative. From MySQL 8.0.11, this is no longer the case, and the new behavior is as follows:
  • If you specify a non-zero value for both variables, only the value of binlog_expire_logs_seconds is used to determine the binary log expiration period, and the value of expire_logs_days is ignored.
  • If you specify a non-zero value for only one variable, that value is used to determine the binary log expiration period, and the default for the other is not applied.
  • If you specify a value for neither of the variables, the default of 30 days from binlog_expire_logs_seconds is used as the binary log expiration period.
  • An error message is issued if you attempt to set one of the variables dynamically when the other is already set, and a warning message is issued if you specify a non-zero value for both variables at startup. A deprecation warning is also issued if you set a value for expire_logs_days.
  • To disable automatic purging of the binary log, specify a value of 0 explicitly for binlog_expire_logs_seconds, and do not specify a value for expire_logs_days. For compatibility with earlier releases, automatic purging is also disabled if you specify a value of 0 explicitly for expire_logs_days and do not specify a value for binlog_expire_logs_seconds. In that case, the default for binlog_expire_logs_seconds is not applied. You no longer need to set both variables to zero to disable automatic purging. (Bug #27252658)
  • Replication: Attempting to uninstall the Group Replication plugin on a server configured to start the plugin automatically at boot could result in a deadlock. Now, the uninstall process checks to ensure that the plugin is not in the process of starting and fails gracefully if it is. (Bug #27179336)
  • Replication: The DDL statements CREATE DATABASE, ALTER DATABASE, and DROP DATABASE are no longer allowed to execute in parallel with other statements on a multi-threaded slave. These statements require an exclusive metadata lock on the schema, causing a theoretical possibility of a deadlock when slave_preserve_commit_order=1 is set on the replication slave. (Bug #27165446)
  • Replication: On a replication slave with binary logging disabled, an empty DDL statement (for example, due to a replication filter) raised an assertion. With binary logging enabled, BEGIN and COMMIT statements would be written to the binary log to produce a transaction, but these statements were not available with binary logging disabled, causing the assertion. MySQL Server now checks for the situation where the DDL transaction is empty and is not marked as started, and handles it without raising the assertion. (Bug #27164661)
  • Replication: A new system variable rpl_read_size is available to set the minimum amount of data in bytes that is read from the binary log files and relay log files. The default read size is 8KB. If heavy disk I/O activity for these files is impeding performance for the database, increasing the read size might reduce file reads and I/O stalls if the files are not being cached by the operating system.
  • Note that a buffer the size of this value is allocated for each thread that reads from the binary log and relay log files, including dump threads on masters and coordinator threads on slaves. Setting a large value might therefore have an impact on memory consumption for servers.
  • Thanks to the Facebook team for the patch. (Bug #27147095)
  • Replication: On a server with GTIDs enabled, if RESET MASTER was used when a transaction had been flushed but not yet committed, the server GTIDs were left in an incorrect state. At this point, the GTID for the transaction had been added to the set of owned GTIDs, but not yet to the set of executed GTIDs. The GTID was removed from the binary log when the content of the uncommitted transaction was cleared by the RESET MASTER statement, but the GTID could not be reused because it was already owned, so the sequence of GTIDs had a gap.
  • With this fix, RESET MASTER acquires a global read lock to ensure that no transactions are in commit stage during its operation, and no new transactions enter into commit stage during its operation. If there are any ongoing commits, RESET MASTER waits until they are complete. The global read lock is released when the reset is finished, and then storage engines are notified of the successful reset. If FLUSH TABLES WITH READ LOCK has already been executed for the thread, RESET MASTER does not retry the lock. (Bug #27041759)
  • Replication: Attempts to set a GTID for an unsafe or empty XA transaction using a SET @@SESSION.GTID_NEXT statement were not being handled correctly. On a server with gtid_mode set to OFF or OFF_PERMISSIVE, and enforce_gtid_consistency set to OFF, setting a GTID for an unsafe XA transaction (creating or dropping a temporary table) caused an inconsistency in the server's GTID violation counter and raised an assertion. Testing also showed that setting a GTID for an empty XA transaction caused an incorrect sequence of events to be written to the binary log. Both these situations are now handled correctly. (Bug #27041402, Bug #88272)
  • Replication: The error message issued for a server stop while rotating the binary log did not state the correct cause for the issue. The error message has been enhanced to include the actual error causing the server stop as part of the message. A new error ER_OOM_SAVE_GTIDS has also been added for the situation where an out-of-memory error occurred while saving the set of GTIDs from the last binary log into the mysql.gtid_executed table. (Bug #27040070, Bug #88262)
  • Replication: Group Replication uses transaction write set extraction for conflict detection on group members. A performance regression was found in this process during detailed performance analysis, which is handled by this bug fix. Memory allocation has been optimized for write set extraction and memory copy operations have been reduced. Also, foreign key write sets are now only collected when the current table has foreign keys. (Bug #27016053)
  • Replication: When using group_replication_ip_whitelist, it was possible to configure a group so that it functioned even though all members could not establish the internal group communication connection to each other, resulting in inconsistent behavior. Now, incoming connections are accepted if the IP is in the white list or if the IP belongs to a current member of the XCom configuration. This ensures members are always able to create the internal network required for group communication. (Bug #26846549, Bug #27406775)
  • Replication: The statements CREATE USER IF EXISTS (or IF NOT EXISTS) and ALTER USER IF EXISTS (or IF NOT EXISTS) were written to the binary log even when the query resulted in an error. MySQL Server now checks for errors that cause these queries to fail (for example, an invalid plugin was specified), and does not log the statement in that situation. Note that if these statements succeed but have no effect on the master because the condition is not met, the statements are written to the binary log, as the condition might be met on a replication slave (see Bug #25813089, Bug #85733). (Bug #26680035)
  • References: See also: Bug #25813089, Bug #85733.
  • Replication: In a multi-primary group, when a member was also configured with a asynchronous replication channel, there was a possibility that the asynchronous channel could start before Group Replication started. This could result in the asynchronous channel processing transactions before the member became an online member of the group, causing issues when members tried to join the group. The fix ensures that asynchronous channels on group members do not start until the member has become online. (Bug #26648393)
  • Replication: Following the introduction of support for atomic DDL in MySQL 8.0, a replication slave that supports atomic DDL can diverge from a replication master at an earlier MySQL version that does not support atomic DDL. If the DDL statement can only be partly applied, the slave using MySQL 8.0 rolls back the whole DDL statement, but the master using an earlier version might commit the valid parts of the DDL statement. An error message is now logged in the event of an unsuccessful commit for an atomic DDL statement on the master and the slave, and you should check that the states of the master and the slave have not diverged before proceeding. (Bug #26133488)
  • Replication: When GTIDs are enabled on a replication master and slave, and the slave connects to the master with the MASTER_AUTO_POSITION=1 option set, the master must send the slave all the transactions that the slave has not already received, committed, or both. If any of the transactions that should be sent by the master have been already purged from the master's binary log, the master sends the error ER_MASTER_HAS_PURGED_REQUIRED_GTIDS (1789) to the slave, and replication does not start.
  • The message provided for the error ER_MASTER_HAS_PURGED_REQUIRED_GTIDS has been changed to provide advice on the correct action in this situation, which is for the slave to replicate the missing transactions from another source, or for the slave to be replaced by a new slave created from a more recent backup. The message advises that the master's binary log expiration period can be revised to avoid the situation in future. In addition, the master now identifies the GTIDs of the purged transactions and supplies them in its error log in the warning message ER_FOUND_MISSING_GTIDS (11809), so that you do not need to calculate the missing GTIDs manually. (Bug #26004541)
  • Replication: For updates to virtual generated columns containing the BLOB data type, both the old and the new BLOB values are required by some storage engines for replication. This fix extends the same behavior to JSON and GEOMETRY data types, which are based on the BLOB data type and so produce the same issue when the old value is not stored. (Bug #25873029)
  • Replication: A behavior change in MySQL 8.0.0 moved the identification of generated columns from before to after the calculation of the write set for binary logging. This caused an issue with NDB cluster replication, because that storage engine omits the generated columns from the log event if they are unnecessary, leading to NULL values being set for them by the applier thread on the replication slave. The identification of generated columns has now been moved back to before the write set calculation, so that the issue does not occur. (Bug #25827408)
  • Replication: On a multi-threaded replication slave (with slave_parallel_workers greater than 0), the slave's lag behind the master was not being reported by the Seconds_Behind_Master field for SHOW SLAVE STATUS. The value is now reported correctly. Thanks to Robert Golebiowski for the patch. (Bug #25407335, Bug #84415)
  • Replication: A plus sign (+) can be used with a GTID set in the statement SET @@GLOBAL.GTID_PURGED to indicate that the specified GTID set does not intersect with gtid_executed. The plus sign was also being permitted for GTID sets specified for the functions GTID_SUBSET() and GTID_SUBTRACT(), where it was not meaningful. The plus sign can no longer be specified with these functions. Also, error messages relating to the SET @@GLOBAL.GTID_PURGED operation have been improved. (Bug #24675979)
  • Replication: When invoked with the options --read-from-remote-server and --hexdump, mysqlbinlog was not able to produce a hex dump of the binary log contents following an SQL statement that generated an autoincrement value, referenced a user-defined variable, or invoked RAND(). The event types for these events are followed by an informational row query log event, and mysqlbinlog caches the original event for printing when the subsequent row query log event is received. The pointer to the memory containing the original event was invalidated when the subsequent event was received, so the original data could not be accessed to produce the hex dump. The issue has now been fixed. (Bug #24674276)
  • Replication: A number of changes were made to the binary log decoding procedure to improve handling of invalid or corrupted binary log entries. (Bug #24365972)
  • Replication: Following the introduction of binary logging for XA transactions WL#6860, an assertion could be raised in debug builds during replication from a master with the feature to a slave without the feature, if MASTER_AUTO_POSITION=1 was set on the slave. The assertion has been removed, so that debug builds now have the same behavior as non-debug builds, and can attempt replication of unsupported event types whether or not MASTER_AUTO_POSITION=1 is set. (Bug #20677683)
  • Linux: Builds on Alpine Linux now take advantage of AIO support. (Bug #27327874)
  • macOS: On macOS, mysql_config --libs did not list any SSL libraries. (Bug #27232576)
  • Microsoft Windows: On Windows, the RESTART statement is implemented by having mysqld fork, with one process acting as a monitor to the other, which acts as the server. This makes determining the server process to attach to for debugging more difficult. To alleviate this, starting the server with --gdb now suppresses forking. A side effect is that for a server started with this option, RESTART simply exits and does not restart. (Bug #27273229)
  • JSON: The JSON_QUOTE() function could in some situations write the quoted string to the same buffer that holds the input string, which could lead to wrong results. Now a check is made to be sure that it does not attempt write into the same buffer that it is reading from. (Bug #27312444)
  • JSON: JSON_SEARCH() no longer performs any modification of cached Json_path objects, now making any needed updates to a String object that represents the path instead. This saves on the number of round trips required between the path's Json_path and String representations, which speeds up execution. In addition, the one_or_all and escape_char arguments to JSON_SEARCH() were unnecessarily cached; these arguments are no longer cached, which should also improve this function's execution time. (Bug #87383, Bug #26614455)
  • References: See also: Bug #21450084, Bug #77785, Bug #21472872.
  • A check was implemented based on data dictionary version information to prevent starting the MySQL 8.0 server with a data directory created by a later MySQL release. The check was necessary to prevent an in-place downgrade, which is currently not supported. (Bug #27708249)
  • Protected data dictionary tables are no longer accessible by statements placed in a server initialization file. (Bug #27674311, Bug #90010)
  • Data dictionary and INFORMATION_SCHEMA version numbers were synchronized with the new MySQL server version number. (Bug #27674285)
  • The server did not handle correctly certain LIKE queries using a BLOB column with a prefix index. (Bug #27660560)
  • For builds configured using -DWITH_PROTOBUF=SYSTEM, building failed on systems with ProtoBuf 3.5 installed. (Bug #27638713, Bug #89915)
  • The microseconds part of timestamps stored with persisted variables in mysqld-auto.cnf was always 000000. (Bug #27629719)
  • Debian packages now handle dependencies for MeCab plugin dictionary files. Fedora packages now handle dependencies for both MeCab packages, not just the utf-8 package. (Bug #27612730, Bug #27613539)
  • The change in MySQL 8.0.11 for platforms that use systemd to run mysqld as a normal process (Type=notify) and communicate using a socket file did not work on SLES before SLES 12.2. (Bug #27604999)
  • The NON_UNIQUE column in the INFORMATION_SCHEMA.STATISTICS table had type BIGINT prior to MySQL 8.0, but became VARCHAR in MySQL 8.0 with the introduction of the data dictionary. The NON_UNIQUE column now has an integer type again (INT because the column need not be as large as BIGINT). (Bug #27593348, Bug #89793)
  • With some inputs, ST_Crosses() could cause a server exit. (Bug #27576700)
  • Some error messages were being written to the error log with an error ID of 0 rather than a legitimate error ID. (Bug #27575608)
  • mysql_upgrade did not set MYSQL_SERVER_PUBLIC_KEY correctly, leading to failure to read the key file. (Bug #27568278)
  • If autocommit was disabled, mysql_upgrade produced an error when upgrading from MySQL 5.7 to 8.0. (Bug #27549249)
  • For debug builds, displaying very long stage names from the PROCESSLIST_STATE column of the Performance Schema threads table could raise an assertion. (Bug #27545688)
  • Group Replication failed to start if certain required variables had been set as persisted variables, or if persisted variables were not set in proper timestamp order. (Bug #27545544, Bug #27522405)
  • gtid_purged handling had a memory leak. (Bug #27537968, Bug #89645)
  • Using SET PERSIST to persist optimizer_trace_offset resulted in an incorrect variable value after server restart. (Bug #27536421)
  • The validate_password component could leak memory. (Bug #27521770, Bug #89597)
  • A typo in sql/handler.h was corrected. Thanks to Su Tristan for the patch. (Bug #27516280, Bug #89594)
  • The Performance Schema variables_info table displayed incorrect VARIABLE_SOURCE and VARIABLE_PATH values for variables set within option files specified by !include or !includedir directives. (Bug #27514223)
  • References: This issue is a regression of: Bug #25563891.
  • After upgrading from MySQL 5.7 to MySQL 8.0, the first attempt to start the server on a MySQL 5.7 data directory with --default-time-zone set to a specific time value such as "+00:00" caused the server to exit. (Bug #27512609, Bug #89584)
  • Lookups of character set internal numbers was not thread safe and could cause memory leaks. (Bug #27507950)
  • Using the -DWITH_LIBEVENT=system and -DWITH_ICU=system CMake options together caused configuration to fail. (Bug #27505535, Bug #89398)
  • Some messages were being written to the server error log using client error IDs. (Bug #27503787, Bug #89562)
  • When run in key migration mode, the server could report an error for successful operations. (Bug #27493997)
  • Upgrades from MariaDB to MySQL Community Edition failed on Fedora 27. (Bug #27484835)
  • ALTER TABLE could hang in a Waiting for tablespace metadata lock state. (Bug #27472087, Bug #89487)
  • Selecting from the Performance Schema status_by_thread or variables_by_thread table was not thread safe and could yield incorrect results. (Bug #27471510)
  • INSERT ... ON DUPLICATE KEY UPDATE could be handled improperly if a source table produced no rows. (Bug #27460607)
  • SET PERSIST_ONLY ignored --skip-grant-tables and continued to perform checking against the dynamic privileges needed to set system variables. (Bug #27455943)
  • For RPM packages and Docker RPM packages, the included my.cnf file now includes information indicating how to revert to the previous default authentication plugin (changing caching_sha2_password to mysql_native_plugin), for compatibility with older clients. (Bug #27454015, Bug #27675380)
  • In string comparisons using >, only one operand was handled as utf32. (Bug #27452148)
  • A server exit during InnoDB initialization caused AddressSanitizer (ASan) to report a memory leak. The patch also implements proper handling of the data dictionary properties table in cases where the table contains data that cannot be parsed. (Bug #27447981, Bug #89433)
  • With -DWITH_SSL=system, if CMake could not find the system OpenSSL libraries and header files, it produced confusing messages. Now it exits immediately with an error. (Bug #27447874)
  • Configuring with -DWITH_INNODB_EXTRA_DEBUG=ON resulted in a linker error. (Bug #27444255, Bug #89412)
  • Configuring with -DWITH_ZLIB=system resulted in a linker error. (Bug #27435371, Bug #89373)
  • Metadata from result sets for UNION ALL queries could say NEWDATE rather than DATE. (Bug #27422376)
  • In builds with Undefined Behavior Sanitizer enabled, negation of -922337203685477580 could cause a server exit. (Bug #27419181)
  • With protocol compression enabled, a spurious assertion could be raised. (Bug #27418207, Bug #89324)
  • References: This issue is a regression of: Bug #17922198.
  • Performance related to fetching tablespace objects from the data dictionary to populate the data dictionary cache was improved. (Bug #27402243)
  • If the server was started with --skip-grant-tables, clients that authenticate using the caching_sha2_password plugin were unable to connect. (Bug #27400095, Bug #89267)
  • Linux RPM and Debian packages now include dependency information for the Perl JSON module required to run the MySQL test suite. Linux RPM packages now include dependency information for the Perl Digest module required to run the MySQL test suite. (Bug #27392800, Bug #89250, Bug #27392808, Bug #89244)
  • A new system variable, default_collation_for_utf8mb4, enables setting the default collation for the utf8mb4 character set. This variable is primarily intended to support replication from a MySQL 5.7 or older master server to a MySQL 8.0 slave server, or group replication with a MySQL 5.7 primary node and one or more MySQL 8.0 secondaries. The value of the variable is replicated to the slave so that the slave can correctly process data originating from a master with a different default collation for utf8mb4. It may be helpful because the default collation for utf8mb4 in MySQL 5.7 is utf8mb4_general_ci but utf8mb4_0900_ai_ci in MySQL 8.0.
  • The variable value determines the default utf8mb4 collation for the following statements:
  • SHOW COLLATION and SHOW CHARACTER SET.
  • CREATE TABLE and ALTER TABLE having a CHARACTER SET utf8mb4 clause without a COLLATION clause, either for the table character set or for a column character set.
  • CREATE DATABASE and ALTER DATABASE having a CHARACTER SET utf8mb4 clause without a COLLATION clause.
  • Any statement containing a string literal of the form _utf8mb4'some text' without a COLLATE clause.
  • Bug #27389878, Bug #27081073)
  • DESCRIBE with a column name option ignored the column name. (Bug #27387773, Bug #89224)
  • When run in key migration mode, the server ignored invalid options. (Bug #27387331)
  • Path name normalization could fail for very long path names. (Bug #27368298)
  • During configuration, CMake assumed that rpcgen was available rather than checking for it. (Bug #27368078)
  • The client authentication process could use memory after it had been freed. (Bug #27366143)
  • DWITH_ZLIB=system could cause other CMake feature tests to fail. (Bug #27356658, Bug #89135)
  • On some systems, using mysqld --initialize to initialize the data directory was very slow. (Bug #27349579, Bug #89122)
  • Builds using RPM source packages now use a secure connection if Boost must be downloaded. (Bug #27343289, Bug #89104)
  • An internal check_datetime_range function that converted an ULONGLONG time value raised an assertion on Windows. (Bug #27340709)
  • Too much locking was being done for the caching_sha2_password authentication plugin (one lock/unlock per connection). This is now improved to one lock/unlock per plugin install/uninstall. (Bug #27335346)
  • A CREATE TABLE ... LIKE operation that implicitly assigned 'innodb_system' as the tablespace name for table partitions raised an assertion. (Bug #27331588)
  • SET PERSIST_ONLY could store large-valued variables incorrectly. (Bug #27322254)
  • The audit_log plugin could write statements to the binary log even with binary logging disabled. (Bug #27315321)
  • Certain queries using GREATEST() or LEAST() produced heap-use-after-free errors. (Bug #27312703)
  • An external_language column was added to the mysql.routines data dictionary table to support stored routines in different languages. The data stored in this column can be accessed through the EXTERNAL_LANGUAGES column of the INFORMATION_SCHEMA.ROUTINES table. (Bug #27309116, Bug #89038)
  • It is now prohibited to start the server with a lower_case_table_names setting that is different from the setting used when the server was initialized. The restriction is necessary because collations used by data dictionary table fields are based on the setting defined when the server is initialized, and restarting the server with a different setting would introduce inconsistencies with respect to how identifiers are ordered and compared. (Bug #27309094, Bug #89035)
  • For accounts that authenticated using the auth_sock authentication plugin, the server was unable to accept connections from clients from older MySQL versions. (Bug #27306178)
  • An audit_log plugin memory leak was corrected. (Bug #27302151)
  • The INFORMATION_SCHEMA.FILES table now obtains from storage engines the information needed for the following columns: LOGFILE_GROUP_NAME, LOGFILE_GROUP_NUMBER, ROW_FORMAT, VERSION. (Bug #27292586)
  • Dropping a user-defined function did not always remove its entry from the Performance Schema user_defined_functions table. (Bug #27270498)
  • To reduce its size and storage footprint, Serialized Dictionary Information (SDI) is now generated in a compact JSON format. (Bug #27265584)
  • Concurrent execution of RESET PERSIST and SET PERSIST from multiple sessions could cause a server exit. (Bug #27264789)
  • Tablespace statistics could be cached even if the statistics-collection process encountered an error. (Bug #27259963)
  • SET PERSIST could fail to find the proper directory into which to write the mysqld-auto.cnf file. (Bug #27253828)
  • ALTER TABLE could not create generated NOT NULL geometry columns if the table contained data. (Bug #27252609)
  • The Performance Schema variables_info table displayed incorrect VARIABLE_SOURCE values for variables that were set in my.cnf and also persisted to mysqld-auto.cnf. (Bug #27252077)
  • Improper handling of plugin loading and unloading could cause a server exit. (Bug #27247280, Bug #27297704)
  • The RESTART statement did not work for Ubuntu packages. (Bug #27245918)
  • LDAP authentication plugins were not built on FreeBSD. (Bug #27238252)
  • The server did not handle queries correctly when a cached value was evaluated as NULL by a windowing function, or when its argument was part of a GROUP BY with a ROLLUP operation which could be evaluated as NULL. (Bug #27233287)
  • Windowing functions such as LAST_VALUE() did not work correctly with tables containing NOT NULL columns in all cases. (Bug #27230463)
  • Role cache invalidation could be performed incorrectly. (Bug #27225806)
  • Incorrect handling of persisted variables at server startup could result in a server exit. (Bug #27224682)
  • For upgrades from MySQL 5.7 to 8.0, the sql_mode value for object definitions could contain NOT_USED. (Bug #27219709)
  • JSON_TABLE() failed if no default database was selected. (Bug #27217897)
  • Adding a unique index to an InnoDB table on which multiple locks were held could raise an assertion. (Bug #27216817)
  • CREATE VIEW statements that used JSON_TABLE() in the view definition failed if no database was selected. (Bug #27189940)
  • Queries on Performance Schema replication tables could return incorrect results, particularly when the execution plan used an index. (Bug #27184567)
  • For some statements, the FILE privilege was not properly checked. (Bug #27160888)
  • To better enable setting persisted variables at startup in the same order they were persisted with SET PERSIST, settings in mysqld-auto.cnf are first sorted based on timestamp (which is now stored in the file). (Bug #27157520)
  • Setting the dragnet.log_error_filter_rules system variable to a very long value could cause a server exit. (Bug #27120953)
  • For platforms that use systemd (see Managing MySQL Server with systemd), systemd was not always able to infer the state of a double-forked mysqld process. Consequently, systemd would attempt to restart mysqld even when that process terminated with status 1. systemd is now configured to run mysqld as a normal process (Type=notify rather than Type=forking). If the name of a socket file is specified in the environment variable NOTIFY_SOCKET, mysqld attempts to open a connection for communicating with systemd and writes its state changes there. (Bug #27109556, Bug #88463, Bug #26538598, Bug #87210)
  • ST_IsValid() returned incorrect results for some geographic polygons on non-WGS 84 ellipsoids. (Bug #27074700)
  • A multiple-insert statement on a table containing a FULLTEXT key and a FTS_DOC_ID column caused a server error. (Bug #27041445, Bug #88267)
  • References: This issue is a regression of: Bug #22679185.
  • In strict SQL mode, assignment of invalid values to AUTO_INCREMENT columns could be handled incorrectly, resulting in an assertion being raised. (Bug #27041393, Bug #88273)
  • Thread stack exhaustion could raise an assertion rather than returning an error. (Bug #27041350, Bug #88277)
  • SET PERSIST_ONLY did not properly consider whether the runtime validation function for persisted variables should be invoked. (Bug #27016247)
  • The audit_log plugin could mishandle aborts of event executions, causing a server exit. (Bug #27008133)
  • Some boundary cases for negation of large signed integers were corrected. (Bug #27004880, Bug #27008075)
  • An ALTER TABLE operation attempted to set the AUTO_INCREMENT value for table in a discarded tablespace. (Bug #26935001)
  • MyISAM index corruption could occur for bulk-insert and table-repair operations that involve the repair-by-sorting algorithm and many (more than 450 million) rows. (Bug #26929724)
  • The Performance Schema could produce DIGEST_TEXT values with a trailing space. This no longer occurs. (Bug #26908015)
  • Dropping an index from a system table could cause a server exit. (Bug #26881798)
  • A prepared statement using CREATE TABLE ... SELECT led to unexpected behavior when it referred in a GROUP BY to a view having the same name. (Bug #26881703)
  • With auto-commit disabled and an XA transaction in PREPARED state, attempts to execute XA COMMIT or XA ROLLBACK failed. (Bug #26848877, Bug #87836)
  • Some diagnostic messages produced by LDAP authentication plugins misleadingly suggested an error when no error had occurred. (Bug #26844713)
  • Initialization code for mysql_upgrade and mysqlpump was reorganized to avoid assertion failures. (Bug #26802211)
  • Full-text searches could raise an assertion due to improper handling of errors that occurred while attempting to acquire metadata locks. (Bug #26799898)
  • A keyring file created by the keyring_file plugin on a 32-bit server was inaccessible by the keyring_file on a 64-bit server, and vice versa. (Bug #26793060)
  • Metadata locks for column statistics were not displayed properly in the Performance Schema metadata_locks and events_waits_xxx tables. (Bug #26772858, Bug #87708)
  • The my_snprintf plugin service was removed and reimplemented using C++11 snprintf. (Bug #26696147, Bug #87547)
  • After an in-place upgrade from MySQL 5.7 to MySQL 8.0 on a server with a large number of tables, server startup failed to complete due to excessive memory consumption during data dictionary creation. (Bug #26486160)
  • An error occurring in a statement that modifies user privileges could result in deadlock for other transactions attempting to access the user privilege cache. (Bug #26475282)
  • The thread pool plugin logged too much information for failed connections. (Bug #26368725, Bug #86863)
  • Enabling multiple components concurrently could result in a server exit. (Bug #26171471, Bug #86514)
  • A malformed mysqld-auto.cnf file could cause a server exit. (Bug #26085774)
  • Creating a table in a reserved tablespace did not return an error. (Bug #26073851, Bug #86309)
  • For debug builds, using KILL to terminate a stored routine could raise an assertion. Thanks to Laurynas Biveinis for the patch. (Bug #26040870, Bug #86260)
  • If the init_connect system variable was set, its contents could not be executed by clients with expired passwords, who therefore were prevented from connecting. Now, if a client has an expired password, init_connect execution is skipped, which enables the client to connect and change password. (Bug #25968185)
  • Dates using the YYYYMMDD format were not recognized correctly in a query meeting all three of the following conditions:
  • The query performed a left join.
  • A DATE column in the inner table of the join was part of a multi-column primary key.
  • Every column in the inner table's primary key was compared with another value; this could be either a literal or a column value. (Bug #25949639)
  • An in-place ALTER TABLE operation on a table with foreign keys resulted in a table definition mismatch. The new table definition passed to storage engine methods during the ALTER TABLE execution contained invalid foreign key names. (Bug #25915132, Bug #85997)
  • It was possible to assign nonexistent roles to an account as its default roles. (Bug #25755666, Bug #85561)
  • Using the C API, when trying to execute an INSERT prepared statement with CURSOR_TYPE_READ_ONLY set, the client hung. (Bug #25701141, Bug #85105)
  • RENAME USER failed even though the user or role to be renamed was not present in any role graph. (Bug #25658586)
  • MySQL client programs could exit unexpectedly if malformed client/server protocol packets were received. (Bug #25471090)
  • Memory statistics collected by the Performance Schema could be incorrect due to race conditions. (Bug #25212799)
  • Incorrect handling by the CONNECTION_CONTROL plugin of an internal hash led to spurious messages in the error log and eventual server exit. (Bug #25052009)
  • CURRENT_ROLE() and ROLES_GRAPHML() now return a string with the utf8 character set. Previously, they incorrectly returned a binary string. (Bug #24843257)
  • Killing INSTALL COMPONENT or UNINSTALL COMPONENT could result in multiple rows for a single component in the mysql.component system table. (Bug #24660436)
  • Performing SHOW PROCESSLIST while running a high load concurrently using the X Plugin could lead to an unplanned server exit. (Bug #24621170)
  • References: See also: Bug #23057045.
  • The regular expression implementation in MySQL uses a String object—intended to be initialized as empty—to hold the current subject, and used the literal "" for this value. This could interfere with other functions that do likewise. This is fixed by constructing the String with a nullptr instead. (Bug #23276471)
  • mysqlpump could leak memory or exit when errors occurred. (Bug #23102944)
  • LDML 2.8 collation definitions could cause unexpected server behavior. (Bug #22819030)
  • Log-opening operations accessed log-name system variables without holding a lock on them. Multiple threads accessing such a variable could lead to a race condition and unexpected server behavior. (Bug #22591899)
  • When the range optimizer computed the prefix for a string of sufficient length, it was possible for it to truncate the string in the middle of a character, which could lead to assertion and other failures in debug builds. Now steps are taken in such cases to make sure that the string is truncated at a character boundary. (Bug #22475473, Bug #13712655)
  • Queries having subqueries or expressions in the GROUP BY clause could in some situations return random results, due to reading of uninitialized data. (Bug #20035304)
  • References: See also: Bug #21922202.
  • The audit_log plugin did not log placeholder values for prepared statements. (Bug #16617026)
  • Integer columns in UNION statements could be cast to BIGINT even if a smaller integer type was more appropriate. (Bug #11747567, Bug #33004)
  • Added ER_REGEXP_INVALID_CAPTURE_GROUP_NAME (Error 13110). (Bug #89796, Bug #27597980)
  • Window function row-buffer handling has been refactored to reduce the number of handler reads by 25%. (Bug #89512, Bug #27484133)
  • For some frames, the functions VARIANCE(), VAR_POP(), and VAR_SAMP() produced wrong results when evaluated with the windowing_use_high_precision system variable set to false. (Bug #89390, Bug #27438725)
  • Generated columns with a prefix index were not considered when the optimizer attempted to substitute an expression with an equivalent generated column. This prevented use of prefix indexes to speed up queries with predicates employing a generated column expression. (Bug #89291, Bug #27403367)
  • FIRST_VALUE() did not always return NULL for an empty frame. (Bug #89116, Bug #27348276)
  • Regular expression functions accepting optional arguments did not return NULL as expected when one or more of these arguments was passed as an explicit NULL. (Bug #88872, Bug #27252630)
  • Row-based replication used the wrong set of indexes on the slave. (Bug #88847, Bug #27244826)
  • When executed with no default database having been chosen, EXPLAIN EXTENDED raised Error 1046 No database selected instead of the SQL syntax error expected due to the fact that the EXTENDED keyword has been removed. (Bug #88591, Bug #27153116)
  • The CMake option OPTIMIZER_TRACE=0 had no effect on builds and so is no longer used. (Bug #88520, Bug #27130109)
  • A SELECT statement using GROUP BY with no constant or aggregate column failed a check for functional dependencies, correctly, on the first attempt but succeeded, wrongly, on the next. (Bug #88474, Bug #27427677)
  • References: See also: Bug #21807579.
  • A CREATE TABLE ... SELECT statement with a UNION in the SELECT failed in strict mode for a DATE column declared as NOT NULL. (Bug #87711, Bug #27068222)
  • Prepared statements using nested sub-selects were not always handled correctly. (Bug #87484, Bug #26657904)
  • The cost estimates for a query containing window functions did not take into account the cost of PARTITION BY or ORDER BY, nor did they include the cost of using the frame buffer. (Bug #87373, Bug #26612356)
  • References: See also: Bug #26502118.
  • When processing a query with a subquery, the subquery is no longer optimized if outer query is known to produce an empty result; in such cases, EXPLAIN now shows Not optimized, outer query is empty.
  • This change is made because, when the table used by the outer query is found empty at optimization, this sets the join column to NULL even when defined as not nullable, which leads to a conflict when optimizing the subquery.
  • An exception is made if the outer query has aggregates without any GROUP BY; this means that it has a non-empty result, and that any subquery in the SELECT list must be evaluated and optimized, which reopens the nullability issue, which is now handled correctly for such cases. (Bug #83115, Bug #24713879)
  • References: See also: Bug #83216, Bug #24760317.
  • When selecting from all columns making up a unique key containing nullable columns, with all columns in the WHERE condition set to non-null values, MySQL did not take into account their uniqueness, with the result that only_full_group_by missed detecting a functionally dependent column. (Bug #79291, Bug #22279903)
  • When using a partial index, the optimizer performed a more expensive table lookup instead of using the index, even when the partial index covered the entire set of data needed. (Bug #74359, Bug #19806106)

New in MySQL 5.7.21 (Jan 16, 2018)

  • Audit Log Notes:
  • MySQL Enterprise Audit now supports compression and encryption of audit log files. Encryption is based on a user-defined password. To use this feature, the MySQL keyring must be enabled because audit logging uses it for password storage. MySQL Enterprise Audit also now supports logging in JSON format, in addition to the existing XML formats. For JSON format, functions are available that provide runtime log reading capabilities.
  • Configuration Notes:
  • For RHEL, SLES, and Fedora RPMs, the default plugin directory for debug builds has been changed from /usr/lib64/mysql/plugin to /usr/lib64/mysql/plugin/debug. (Bug #27072155, Bug #88363)
  • The installation scripts for MySQL Enterprise Audit and MySQL Enterprise Firewall now create their associated tables in the mysql system database as InnoDB rather than MyISAM tables. (Bug #26323351, Bug #26906601)
  • The hardcoded memory page size of 8KB for the memory-mapped transaction coordinator was too small for platforms such as ARM64 and PowerPC where the page size is much larger. The server now invokes a system call to get the page size of the current platform rather than using a hardcoded value. A consequence for the --log-tc-size option is that the minimum and default values are now 6 times the page size. Also, the value must be a multiple of the page size. Thanks to Alexey Kopytov for the patch. (Bug #23014086, Bug #80818, Bug #26931470, Bug #87995)
  • Performance Schema Notes:
  • The Performance Schema setup_timers table is now deprecated, to be removed in MySQL 8.0, as is the TICK row in the performance_timers table.
  • Pluggable Authentication:
  • For the LDAP authentication plugins, handling of the group search attribute indicated by the authentication_ldap_sasl_group_search_attr and authentication_ldap_simple_group_search_attr system variables is more flexible. If the group search attribute is isMemberOf, LDAP authentication directly retrieves the user attribute isMemberOf value and assign it as group information. If the group search attribute is not isMemberOf, LDAP authentication searches for all groups where the user is a member. (The latter is the default behavior.) This behavior is based on how LDAP group information can be stored two ways: 1) A group entry can have an attribute named memberUid or member with a value that is a user name; 2) A user entry can have an attribute named isMemberOf with values that are group names. (Bug #26317645)
  • The LDAP authentication plugins now permit the authentication string that provides user DN information to begin with a + character. In the absence of this character, the authentication string value is treated as is without modification, as it has been previously. If the authentication string begins with +, the plugin constructs the full user DN value from the account user name as the cn attribute value, together with the authentication string (with the + removed). The authentication string is stored as given in the mysql.user system table, with the full user DN constructed on the fly before authentication.
  • Security Notes:
  • Incompatible Change: Passwords are now restricted to a maximum of 256 characters for the sha256_password authentication plugin, and for the PASSWORD() function when old_passwords=2. Also, the number of password hashing rounds is capped to limit CPU time used. (Bug #27099029, Bug #27194270)
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.2n. Issues fixed in the new OpenSSL version are described at http://www.openssl.org/news/vulnerabilities.html.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #27212666, Bug #27236394)
  • MySQL now supports key migration between underlying keyring keystores. This enables DBAs to switch a MySQL installation from one keyring plugin to another. See Migrating Keys Between Keyring Keystores.
  • MySQL Enterprise Edition now includes a keyring plugin, keyring_encrypted_file, that is similar to the keyring_file plugin in its use of a local data file for key storage, but that also encrypts the file based on a user-defined password.
  • Test Suite Notes:
  • Documentation for the MySQL Test Suite is now maintained in the MySQL source tree using Doxygen (see http://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN.html). The related Unix man pages that previously were produced from the old test suite manual are no longer updated and have gone out of date. Consequently, they are no longer included in MySQL distributions. (Bug #27021754)
  • The MySQL test suite now includes CRC32() tests. Thanks to Daniel Black for the patch. (Bug #26495791, Bug #87136)
  • Functionality Added or Changed:
  • InnoDB: The innodb_undo_tablespaces configuration option is deprecated and will be removed in a future release.
  • Replication: Host names can now be specified as part of a whitelist for group replication connections, using the group_replication_ip_whitelist system variable. Host names support CIDR notation. Host names that resolve to IPv6 addresses are not supported.
  • For host names, name resolution takes place only when a connection request is made by another server. A host name that cannot be resolved is not considered for whitelist validation, and a warning message is written to the error log. Forward-confirmed reverse DNS (FCrDNS) verification is carried out for resolved host names.
  • Replication: The group_replication_allow_local_disjoint_gtids_join system variable has been deprecated and is scheduled for removal in a future version.
  • The -DWITH_ASAN_SCOPE CMake option enables the AddressSanitizer -fsanitize-address-use-after-scope Clang flag for use-after-scope detection. The default is off. To use this option, -DWITH_ASAN must also be enabled. (Bug #27095089)
  • Bugs Fixed:
  • Important Change; Partitioning: Checking for tables that used the generic partitioning handler could cause delays of several minutes when starting the MySQL Server. To keep this from happening, the --disable-partition-engine-check option is now enabled by default. (Bug #85830, Bug #25846957)
  • Performance; JSON: Creating a representation of a JSON string now optimizes for the most common case—that the string to be processed contains no special characters that need to be escaped—scanning for the first special character in the string, and copying each sequence of characters which do not require escaping in a single memcpy() call, rather than checking each character in turn to determine whether it needed to be escaped, escaping it if so, and then copying it, one by one, as was done previously.
  • This fix also corrects a failure to escape the control character u001f, or unit separator character. (Bug #86898, Bug #26388690, Bug #87722, Bug #26780307)
  • References: See also: Bug #25977595.
  • InnoDB: Multiple updates from different clients on a partitioned table caused an unexpected lock wait timeout due to an incorrectly set lock type. (Bug #26731025, Bug #87619)
  • InnoDB: An ALTER TABLE operation caused the server to halt. (Bug #26492721)
  • InnoDB: The innodb_table_stats data dictionary table was not updated with new partition names when renaming a partitioned table. (Bug #26390658, Bug #86927)
  • InnoDB: A FLUSH TABLES operation failed to drop an aborted index. While removing the table from the cache, the clustered index was dropped prior to checking for the aborted index. (Bug #26256456, Bug #86607)
  • InnoDB: An iterative approach to processing foreign cascade operations resulted in excessive memory use. (Bug #26191879, Bug #86573)
  • References: This issue is a regression of: Bug #16244691.
  • InnoDB: An INSERT operation on table with spatial index raised an assertion due to a failure that occurred during a lock conflict check. (Bug #25729649)
  • InnoDB: Warnings that should only appear in a debug version of MySQL were printed to the error log when the length of the history list exceeded 2000000. (Bug #24296076, Bug #82213)
  • InnoDB: Attempting to reduce the buffer pool size to less than the buffer pool chunk size did not report a warning. (Bug #23590280)
  • InnoDB: A “wrong key column” error was added to address an unsupported index creation scenario. (Bug #22486025)
  • InnoDB: Full-text search on indexed columns that use a binary collation did not return case sensitive matches. (Bug #21625016, Bug #78048)
  • Packaging: When trying to install MySQL Server on Fedora 27 using the MySQL Yum repository, installation failed due to a conflict with the native mariadb-connector-c-devel package. With this fix, the appropriate “obsoletes” have been added for that and other native packages. (Bug #26963839)
  • Replication: All servers that belong to a group must have unique UUIDs set by server_uuid, but this was not being enforced by Group Replication and it was possible to add members with duplicated UUIDs. (Bug #27105803)
  • Replication: During distributed recovery as part of joining the group, when the applier was signaling that it had applied all transactions, it was also blindly searching for partial transactions. This was to avoid future applier errors, which would happen if the applier stopped at this point. However, this search and remove only made sense for applier stop cases. Upon execution completeness it should not be done, otherwise it can corrupt or purge the applier relay log, which can led to data loss. To solve this issue, when the applier is waiting for execution completeness, it no longer searches for and removes partial transactions. (Bug #27049034)
  • Replication: Group Replication executes internal operations on the server during start and stop of the plugin, such as enabling or disabling read only mode, using an internal session. When this internal session was opened, if the total number of sessions exceeded the number of permitted open sessions set by max_connections, the operation was failing as expected but a thread was left behind, which later would cause issues. (Bug #27008102, Bug #27016552)
  • Replication: The fix for Bug #26117735 (MySQL Bug 86288) could cause a debug assertion when running mysqlbinlog with the --read-from-remote-server option and the --rewrite-db option, depending on the database names specified in the rewrite rule. The issue has now been corrected. (Bug #26878022)
  • Replication: With MySQL compiled using yaSSL, and semisynchronous replication in use, a deadlock could be caused by incorrect handling of acknowledgement packets. Multiple acknowledgement packets can be read together by yaSSL, but the receiver thread for semisynchronous replication only handled the first acknowledgement packet seen after polling. Now, the receiver thread handles all acknowledgement packets that are present in the buffer. (Bug #26865538)
  • Replication: If Group Replication was configured to start on server boot when the server was being initialized using --initialize or --initialize-insecure, because the replication applier infrastructure was not initialized this resulted in an assertion. Now, Group Replication is not started when the server is being initialized. (Bug #26802395)
  • Replication: In a group with heavy load, joining members could need to retrieve a large amount of data to gain synchrony with the group. If the amount of data retrieved exceeded the View_change packet size of 4Mb the members would fail to join the group and enter Error state. Now, the packet size is taken from slave_max_allowed_packet, which defaults to 1GB. Depending on the load your group processes, you might want to increase the packet size further by configuring slave_max_allowed_packet. (Bug #26770576)
  • Replication: With semisynchronous replication in use, if RESET MASTER was issued while an active transaction was waiting for an acknowledgement from the slave, the count of waiting sessions in the Rpl_semi_sync_master_wait_sessions server status variable was incorrect after the wait was completed. (Bug #26748533)
  • Replication: In a group where a joining member consistently received transactions, the joining member could sometimes not enter the online state. This was due to the way the incoming queue of messages was tested. (Bug #26731317)
  • Replication: XA ROLLBACK statements that failed because an incorrect transaction ID was given, could be recorded in the binary log with the correct transaction ID, and could therefore be actioned by replication slaves. A check is now made for the error situation before binary logging takes place, and failed XA ROLLBACK statements are not logged. (Bug #26618925, Bug #87393)
  • Replication: The receiver thread for semisynchronous replication was not able to receive acknowledgements from slaves that used compression of the master/slave protocol (slave_compressed_protocol = ON). The receiver thread now handles compressed acknowledgements correctly. (Bug #26027024, Bug #86230)
  • Replication: On replication slaves, in the XA_STATE field in the Performance Schema table events_transactions_current, the state of XA transactions was incorrectly reported as COMMITTED instead of PREPARED after the XA PREPARE statement was applied on the slave. (Bug #25940184)
  • Replication: In a multi-source replication topology, a memory leak could occur on the slave when binlog_rows_query_log_events was enabled on the master, and a statement already applied from another channel was skipped on the slave. In this situation, the instance of the Rows_query log event stored on the slave was not being deleted. The log event instance is now cleaned up and the memory is freed. Thanks to Vlad Lesin for his contribution to the patch. (Bug #25695434, Bug #85371, Bug #85034)
  • Replication: A memory leak was fixed in GTID-based replication. Memory was not being freed after the repository tables were updated for skipped or ignored events. (Bug #25656123, Bug #85251)
  • Replication: When a worker thread on a multi-threaded slave failed to apply a transaction on which a later transaction depended, the coordinator thread could begin scheduling the dependent transaction before being notified of the issue. If a STOP SLAVE request was made during this situation, it caused an assertion to be raised in debug builds. (Bug #25585436)
  • Replication: When group_replication_enforce_update_everywhere_checks=ON the Group Replication plugin checks if there are foreign key cascades and disallows updates to such tables. However SET NULL operations were not being checked, which could cause data inconsistency. Now, when group_replication_enforce_update_everywhere_checks=ON, operations on child tables are blocked if the table has a SET NULL option configured. (Bug #25404162)
  • Replication: On Windows, any errors generated by Group Replication now contain the detailed error message rather than just the error number. (Bug #24918678)
  • Replication: With statement-based replication in use, if an UPDATE or DELETE statement was used inside an XA transaction ending with XA COMMIT ONE PHASE, and the statement did not affect any rows, a replication error occurred. An XA END statement was not written to the binary log, so slave servers identified the XA transaction as still being active at the time of the commit request. The required XA END statement is now written even if no rows were affected by the transaction. (Bug #24812958, Bug #83295)
  • Replication: Regardless of the number of virtual IPs configured on a machine, Group Replication could access only the first 12 addresses. (Bug #86772, Bug #26324852)
  • Microsoft Windows: On Windows, with the myisam_use_mmap and flush system variables enabled, MyISAM did not always flush table files properly. (Bug #26880757)
  • Microsoft Windows: On Windows, resolution was improved of a timer used for query performance assessment. (Bug #22305994, Bug #26734457)
  • JSON: When inserting JSON values created from the result of a GROUP BY query, the inserted values could sometimes include the concatenation of all the values previously inserted into that column. (Bug #87854, Bug #26867509)
  • In event items in filter rules, the audit_log plugin did not properly process values specified as a JSON array. (Bug #27010045)
  • VALUES() was not handled correctly in some cases. (Bug #26881946)
  • References: See also: Bug #19601973, Bug #17458914.
  • In some cases, virtual generated column expressions containing comparison operators could cause problems with subsequent statements accessing the same table. (Bug #26881855)
  • For debug builds, validation checks on relevant generated columns could be missed for UPDATE statements, leading to a server exit. (Bug #26838771)
  • The default value of the authentication_ldap_sasl_auth_method_name system variable was incorrectly set to SIMPLE rather than SCRAM-SHA-1, and the variable could be set to impermissible values. (Bug #26838525, Bug #26093370)
  • Following an INSERT statement with BLOB values in the ON DUPLICATE KEY UPDATE clause that failed with a constraint violation, a similar statement with no reason to return an error could cause a server exit. (Bug #26734162)
  • The Performance Schema now stores rewritten rather than raw SQL statement text when available. (Bug #26732229)
  • Incorrect results or a server exit could result when SHA2() was passed a user-defined variable in some character sets. (Bug #26704451)
  • mysqlpump no longer includes the SQL_NO_CACHE modifier in statements because that modifier is now deprecated and results in deprecation warnings. (Bug #26694675)
  • Building with the -DWITHOUT_SERVER=ON CMake option failed due to attempting to link the authentication_ldap_sasl_client client-side plugin against the embedded server library. (Bug #26665217)
  • Setting authentication_ldap_simple_max_pool_size=0 and authentication_ldap_simple_init_pool_size=0 at runtime did not disable the LDAP connection pool for the authentication_ldap_simple authentication plugin. (Bug #26646063)
  • Accounts that use an LDAP authentication plugin and were created without any authentication string could be authenticated by the LDAP server regardless of password specified at connect time. (Bug #26634245)
  • Incorrect results could be returned for queries that used an outer join and a derived table referenced a const value from an inner table of the outer join. (Bug #26627181)
  • AFTER UPDATE triggers were not invoked for INSERT ... ON DUPLICATE KEY UPDATE when the value to be updated and the new value were the same. (Bug #26626277, Bug #87371)
  • Changing the UMASK and UMASK_DIR environment variables from their default values had no effect on database directory and table file access. (Bug #26529942)
  • Creating a table with excessive index information could cause a server exit. (Bug #26529369)
  • MSI packages for Windows failed to detect when Microsoft Visual C++ 2010 Redistributable Package was installed. (Bug #26501092, Bug #87139)
  • audit_log plugin THD objects could be created with incorrect thread ID information, leading to assertion failure. (Bug #26362452)
  • When HASH_SCAN was specified as one of the values for the slave_rows_search_algorithms system variable, which is the default from MySQL 8.0.2, and row-based replication was in effect, updates to a table containing virtual generated fields could raise an assertion. The issue was caused by an error when generating string representations of the virtual generated fields in order to create hashes for use in searches. To remove the issue, MySQL no longer creates hashes for virtual generated fields. (Bug #26280724)
  • Attempting a partial backup with mysqlpump on a GTID-enabled server failed and produced an error message suggesting incorrectly that this was not possible. (It is possible using the --set-gtid-purged option.) (Bug #26199978)
  • The Performance Schema could leak memory due to nondeletion of file instances created for ALTER TABLE operations that used the table-copy algorithm. (Bug #26152751, Bug #86482)
  • mysqlpump did not properly parse TABLESPACE clauses in the result from SHOW CREATE TABLE statements it executed to determine table structure. (Bug #26116415)
  • Some statements could cause a buffer overflow in the digest code. Thanks to Laurynas Biveinis and Roel van de Paar for the patch. (Bug #26021187)
  • Previously, when the Performance Schema failed to initialize, it wrote a nonspecific init failed warning to the error log. Now it prints more specific messages about which memory allocation failed. (Bug #25996291)
  • Incorrect results could occur on a table with a unique index when the optimizer chose a loose index scan even though the unique index had no index extensions. (Bug #25989915, Bug #86165, Bug #26532061, Bug #87207)
  • References: This issue is a regression of: Bug #21749123, Bug #78244.
  • Restarting the LDAP server could cause LDAP authentication plugins that used a connection pool to fail to authenticate properly. (Bug #25989788)
  • CREATE USER IF NOT EXISTS was not written to the binary log if the user existed. This could result in inconsistent replication behavior if the user did not exist on slave servers. A similar issue occurred for ALTER USER IF EXISTS. To avoid inconsistencies, these statements now are written to the binary log. (Bug #25813089, Bug #85733)
  • Incorrect handling of internal memory buffers could cause a server exit. (Bug #25737271)
  • MySQL did not compile with GCC 7. (Bug #25643811, Bug #26825211)
  • Executing a stored procedure containing a statement that created a table from the contents of certain SELECT statements could result in a memory leak. (Bug #25586773)
  • When an UPDATE required a temporary table having a primary key larger than 1024 bytes and that table was created using InnoDB, the server could exit. (Bug #25153670)
  • For geometry calculations, invalid input parameters could lead to an incorrect result buffer and cause an assertion to be raised or a server exit. (Bug #25062396)
  • Under some conditions, the audit_log plugin could recursively lock a mutex, resulting in an unresponsive server. (Bug #24437533)
  • In some cases, the optimizer chose a loose index scan (QUICK_GROUP_MIN_MAX_SELECT) for a GROUP BY query even when there was a predicate with a disjunction. This is fixed by not performing a range scan when the condition in the WHERE clause results in more than one disjoint range tree. (Bug #24423143)
  • Setting the MYSQL_GROUP_SUFFIX environment variable had no effect. (Bug #23072792)
  • Queries with many left joins were slow if join buffering was used (for example, using the block nested loop algorithm). (Bug #18898433, Bug #72854)
  • A prepared statement containing an ORDER BY list that referred to a parameter was not always handled correctly. (Bug #87863, Bug #26867652)
  • The server handled triggers and generated columns incorrectly. (Bug #86637, Bug #26251621)

New in MySQL 5.7.20 (Oct 20, 2017)

  • Audit Log Notes:
  • Event-matching filter rules for the audit_log plugin now support an abort element, which can be used to prevent qualifying events from executing. For more information, see Audit Log Filtering. This capability can be used, for example, to augment the capabilities of MySQL Enterprise Firewall, which blocks SQL statements on a per-user basis, by writing audit filtering rules that match statements and block them based on characteristics of the statements themselves.
  • Deprecation and Removal Notes:
  • Previously, the --transaction-isolation and --transaction-read-only server startup options corresponded to the tx_isolation and tx_read_only system variables. For better name correspondence between startup option and system variable names, transaction_isolation and transaction_read_only have been created as aliases for tx_isolation and tx_read_only. The tx_isolation and tx_read_only variables are now deprecated and will be removed in MySQL 8.0. Applications should be adjusted to use transaction_isolation and transaction_read_only instead.
  • The query cache is now deprecated and is removed in MySQL 8.0. Deprecation includes these items:
  • The FLUSH QUERY CACHE and RESET QUERY CACHE statements.
  • The SQL_CACHE and SQL_NO_CACHE SELECT modifiers.
  • These system variables: have_query_cache, ndb_cache_check_time, query_cache_limit, query_cache_min_res_unit, query_cache_size, query_cache_type, query_cache_wlock_invalidate.
  • These status variables: Qcache_free_blocks, Qcache_free_memory, Qcache_hits, Qcache_inserts, Qcache_lowmem_prunes, Qcache_not_cached, Qcache_queries_in_cache, Qcache_total_blocks.
  • The mysql client by default strips comments in statements sent to the server, and this behavior is controlled using --skip-comments (strip comments), and --comments (preserve comments).Comment stripping is now deprecated. This feature and the options to control it will be removed in a future MySQL release.
  • These syntax constructs for table and column references are now deprecated and will be removed in a future version of MySQL. Instances of these constructs should be changed to remove the leading period.
  • .col_name
  • .tbl_name
  • .tbl_name.col_name
  • Installation Notes:
  • For platforms that use systemd (see Managing MySQL Server with systemd), the data directory is initialized if empty at server startup. This might be a problem if the data directory is a remote mount that has temporarily disappeared: The mount point would appear to be an empty data directory, which then would be initialized as a new data directory. It is now possible to suppress this automatic initialization behavior. specify the following line in the /etc/sysconfig/mysql file (create the file if it does not exist):
  • NO_INIT=true
  • Packaging Notes:
  • mysqlcheck was missing in the MySQL Server Docker image, which prevented mysql_upgrade from running. (Bug #26400146, Bug #86968)
  • Security Notes:
  • Certificates automatically generated by mysqld and mysql_ssl_rsa_setup now use X509 v3 rather than v1. (Bug #26521654)
  • The keyring_okv plugin now supports password-protecting the key file used for secure connections. See Using the keyring_okv KMIP Plugin.
  • X Plugin Notes:
  • A Mysqlx.Connection.CapabilitiesGet request using MySQL X Protocol did not return the complete list of available authentication mechanisms. (Bug #26044113)
  • For mixed case or uppercase schema names, the statement list_objects could incorrectly report a collection as a table. (Bug #25769683)
  • The X Plugin was omitted from the list of plugins to include for testing data directory permissions. (Bug #24823999)
  • Functionality Added or Changed:
  • Replication: In previous versions issuing STOP GROUP_REPLICATION stopped the plugin but the server still accepted transactions. This meant the transactions were not transmitted to the group. To make STOP GROUP_REPLICATION safer, now super_read_only is set to ON immediately upon issuing STOP GROUP_REPLICATION, which ensures no transactions are accepted. (Bug #25495067, Bug #84795)
  • Replication: The group_replication_member_weight variable has been added which enables you to control the election of new primaries in single-primary mode. In previous versions primary election was based on the member's UUID, with the lowest UUID elected as the new primary in the event of fail over. Use this variable to assign numeric weights to members to ensure that specific members are elected, for example during scheduled maintenance of the primary or to ensure certain hardware is prioritised.
  • Bugs Fixed:
  • InnoDB: Invalid error handling code was removed from a function related to tablespace import. (Bug #26595476)
  • InnoDB: A check for discarded partitions during a DML operation only checked the first partition. Failure to check for other discarded partitions caused an assertion failure. (Bug #25942592)
  • InnoDB: Replication lag occurred on slave instances during large update operations on tables with many partitions. (Bug #25687813, Bug #85352)
  • InnoDB: A failure occurred during an end range comparison. (Bug #25669686)
  • InnoDB: Enabling the innodb_buffer_pool_load_now setting failed in readonly mode. The event that signals the buffer pool load thread was not initialized. (Bug #25586766)
  • InnoDB: Test-related code intended to simulate a random read on a non-existent page raised an invalid assertion. (Bug #25479538)
  • References: This issue is a regression of: Bug #25053705.
  • InnoDB: A long wait for a dictionary operation lock held by a full-text search synchronization operation caused a server exit. (Bug #24938374)
  • Partitioning: In certain cases when fetching heap records a partition ID could be set to zero. (Bug #86255, Bug #26034430)
  • Partitioning: Queries involving NULL were not always handled correctly on tables that were partitioned by LIST. (Bug #76418, Bug #20748521)
  • References: See also: Bug #86255, Bug #26034430.
  • Replication: MySQL internal administration commands that update replication-specific repository tables, for example during a replication synchronization check using the mysqlrplsync utility, can now bypass read locks. This enables such commands to execute regardless of the settings for the read_only and super_read_only system variables and the autocommit mode. (Bug #26414532, Bug #86224)
  • Replication: When the Group Replication plugin Delayed_initialization_thread failed to start due to unavailable resources, a locked mutex was being kept behind which would cause issues on Delayed_initialization_thread destructor. The fix ensures that the mutex is unlocked when the thread fails to start. (Bug #26394678)
  • Replication: If hostname resolution was not working for a member in Group Replication, the error returned when attempting to connect was referring to credentials. The error message has been improved to describe the problem with hostname resolution. (Bug #26368004)
  • Replication: If the options file contained Group Replication related settings the server could stop unexpectedly on start up. (Bug #26314472)
  • Replication: FLUSH LOGS attempted to send an OK message after having already sent an error response during the commit phase. (Bug #26272158)
  • Replication: With some workloads that contained large inserts, the XCOM transaction cache could consume a large amount of memory. The fix limits the size of the cache to reduce the impact to memory usage. (Bug #26241291)
  • Replication: Group Replication partition threads were not visible in the Performance Schema tables. (Bug #26241008)
  • Replication: COUNT_TRANSACTIONS_REMOTE_IN_APPLIER_QUEUE was set to an incorrect value when group_replication_recovery_complete_at="transactions_certified" on a recovering member. (Bug #26180350)
  • Replication: The values of the group_replication_recovery_use_ssl and group_replication_recovery_ssl_verify_server_cert variables were not being updated when configured for the Group Replication recovery channel. (Bug #26142801)
  • Replication: When replicating a partitioned table with an index, on a replication slave where HASH_SCAN was specified as part of the slave_rows_search_algorithms setting, the slave I/O thread sometimes stopped with an error HA_ERR_KEY_NOT_FOUND. (Bug #26137159)
  • Replication: group_replication_force_members could be used in situations where the group was working properly, in other words a majority was reachable. This incorrect use could cause instability in the group. Therefore, its use has been restricted to the scenario for which it was created, for forming a new membership from a subset of a previous group's membership when a majority of the members are unreachable. (Bug #26093967)
  • Replication: The delayed initialization mechanism used for server starts has been improved. Now, it only blocks connections until the server is in read mode. (Bug #26037344)
  • References: See also: Bug #84731, Bug #25475132.
  • Replication: It was possible to set server_uuid to the same value as group_replication_group_name. Doing so could result in unexpected behavior because GTIDs are identified by a UUID. Now it is not possible to set server_uuid to the same value as group_replication_group_name. (Bug #26035931)
  • Replication: The system variable pseudo_slave_mode, which is for internal server use, sometimes raised an assertion when it was changed inside a transaction. The server no longer changes this variable inside a transaction. (Bug #26034192, Bug #86250)
  • Replication: When a primary member, for example the primary in single-primary group or in a multi-primary group, which also had asynchronous replication channels feeding data into it was stopped, the asynchronous channels would continue applying changes. Although super_read_only was being set when STOP GROUP_REPLICATION was issued, this did not stop any running asynchronous replication channels which were already running. This meant that changes could be made locally on the member, and that the asynchronous replication channels had to be stopped manually. Now when Group Replication stops, either due to an error or when STOP GROUP_REPLICATION is issued, all asynchronous replication channels are stopped. (Bug #26024253)
  • Replication: A misleading warning was issued when the command FLUSH LOGS or PURGE LOGS BEFORE was used on a binary log file with an expiry time set, and the binary log file was in use. The warning related to the file being in use, and implied that a purge attempt had taken place, even if the expiry time had not yet been reached. Now, MySQL checks the expiry time of the binary log file first, and only then checks whether the file is in use. So the warning is only issued for an in-use binary log file that is old enough to be purged. (Bug #25973525)
  • Replication: Group Replication stopped unexpectedly when more than 1024 file descriptors were in use. (Bug #25892493)
  • Replication: Now that XA transactions are prepared and committed in two parts, an issue with statement-based replication has been identified. If two XA transactions committed on the master are being prepared on the slave in the inverse order, locking dependencies can occur that cannot be safely resolved. The issue is not present with row-based replication.
  • XA transactions are therefore now considered unsafe for statement-based replication.
  • When binlog_format = STATEMENT, a warning is issued for DML statements inside XA transactions, and replication might fail with deadlock on slaves.
  • When binlog_format = MIXED, DML statements inside XA transactions are logged using row-based replication.
  • When binlog_format = ROW, DML statements inside XA transactions are logged as before.
  • Replication: If the Group Replication plugin was uninstalled while a group was running, the plugin was marked for uninstall. This could cause the server shutdown to not complete successfully. The fix ensures that the Group Replication plugin cannot be uninstalled if the majority of the group cannot be reached. In such a case it is necessary to issue STOP GROUP_REPLICATION before uninstalling the plugin. (Bug #25673788)
  • Replication: Replication clients no longer enable LOCAL capability for LOAD DATA statements, because they do not use LOAD DATA LOCAL statements. (Bug #24763131)
  • Replication: In case of a failure while creating multiple slave applier worker threads, some threads would be left orphaned and their resources would not be collected. Thanks to Laurynas Biveinis for his contribution to fixing this bug. (Bug #24679056, Bug #82980)
  • Replication: The binlog_checksum option cannot be changed within a transaction. MySQL cannot log this statement, as would be required inside a transaction, while the requested function is being performed on the binary log. (Bug #22914463)
  • Replication: The logging of Group Replication has been improved. Now logging includes information when a member joins or leaves, when the view changes, and so on. (Bug #84798, Bug #25495393)
  • Compiling with -DWITHOUT_SERVER=1 resulted in my_symlink.c compilation failure due to missing #include for my_dir.h. Thanks to Christian Hesse for the patch. (Bug #26495816, Bug #87137)
  • yaSSL could incorrectly perform TLS cipher negotiation. (Bug #26482173)
  • The Linux RPM spec file for RHEL6 and higher is updated with comments that recommend installing the redhat-rpm-config package to add convenience macros that make rebuilding the RPM package easier. Thanks to Simon Mudd for the patch. (Bug #26474153, Bug #87098)
  • If the error log was misconfigured and the server could not start, no output indicating the problem was produced. (Bug #26447825, Bug #87087)
  • mysqld_multi was modified to use mysqld --initialize rather than the deprecated mysql_install_db. Thanks to Zhan Shi for the patch. (Bug #26446321, Bug #87080)
  • Adding an ORDER BY to a query that included an outer join and a subquery caused a constant value defined for a column in the subquery to be incorrectly promoted to a constant value in the case when the subquery returns 0 rows. (Bug #26432173)
  • The server failed to check the maximum path length for partition names. (Bug #26390632)
  • Identifiers containing a mixture of backslashes and backticks could be parsed incorrectly. (Bug #26372491)
  • Source packages for Debian platforms contained prebuilt debug binaries, causing build failures on any architectures other than the one on which those binaries were built. (Bug #26186911)
  • The mysqld_pre_systemd script in RPM packages found the error log setting in option files if specified as log-error but not as log_error, though both are permitted. (Bug #26148391, Bug #86466)
  • When running mysqlbinlog with the --read-from-remote-server option, rewrite rules specified using the --rewrite-db option were ignored, so data was not written to the target database. (Bug #26117735, Bug #86288)
  • Uninstalling the daemon_memcached plugin caused a serious error. (Bug #25909540)
  • The rpl_diff.inc test case file did not find the data difference between servers. Thanks to Yura Sorokin for the patch. (Bug #25860138, Bug #85838)
  • An ngram fulltext parser search query returned incorrect results and raised an assertion. (Bug #25851975)
  • Selecting from a view could yield different results with materialization enabled versus materialization disabled. (Bug #25782811, Bug #85622)
  • The Performance Schema failed to check the maximum host length for client connections. (Bug #25510805)
  • mysqlpump displayed incorrect progress information about the number of tables dumped. (Bug #25432850)
  • Some mysqldump warnings went to the standard output rather than the standard error output and consequently were written to the dump file. (Bug #25380000, Bug #82992)
  • LOAD DATA failed to accept multibyte characters that followed an escape sequence. (Bug #25147988, Bug #83950, Bug #25865525)
  • A server error occurred when a full text search result exceeded the innodb_ft_result_cache_limit setting. The patch for this bug also backports a related patch (Bug #21140111). (Bug #25033538)
  • If a stored function was considered a constant by the optimizer, calling it from a subquery in a NOT IN condition in the WHERE clause could cause a server exit. (Bug #23577867)
  • A mysqldump memory leak was fixed. Thanks to Yura Sorokin for the patch. (Bug #23531150, Bug #81714)
  • Incorrect results or a server exit could result when a query used Batched Key Access optimization and a virtual generated column was part of the join buffer. (Bug #23169112)
  • If a session rolled back to a savepoint and then was killed, the statements up to the point of the savepoint could be committed. (Bug #22350047, Bug #79596)
  • For clients that used Connector/Python and authenticated using the sha256_password plugin, the server could handle connections incorrectly. (Bug #21421642)

New in MySQL 5.7.19 (Jul 18, 2017)

  • Account Management Notes:
  • During data directory initialization or upgrade, MySQL now creates a 'mysql.session'@'localhost' reserved account. This account is used internally by plugins to access the server. It is locked so that it cannot be used for client conections. (Bug #25642343)
  • Compilation Notes:
  • Solaris: On Solaris, MySQL binary distributions are now linked against libatomic.so, so they are no longer dependent on libstatomic.so. (Bug #25909965)
  • Packaging Notes:
  • mysqladmin was added to Docker/Minimal packages because it is needed by InnoDB Cluster. (Bug #25998285)
  • Debian/Ubuntu packages now support multiple MySQL instances with systemd. See Managing MySQL Server with systemd. (Bug #24559588, Bug #82785)
  • Security Notes:
  • Security Fix: The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.2l.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #26160962)
  • MySQL Enterprise Edition now supports LDAP pluggable authentication of MySQL users. This enables MySQL Server to use LDAP (Lightweight Directory Access Protocol) to authenticate MySQL users by accessing directory services such as X.500. For more information, see Pluggable Authentication.
  • MySQL Enterprise Edition now includes a keyring_aws plugin that communicates with the Amazon Web Services Key Management Service as a back end for key generation and uses a local file for key storage. For more information, see The MySQL Keyring.
  • Spatial Data Support:
  • These functions previously accepted either WKB strings or geometry arguments. Use of geometry arguments is now deprecated and generates a warning. Geometry arguments will not be accepted in MySQL 8.0.
  • ST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB()
  • ST_GeomFromWKB(), ST_GeometryFromWKB()
  • ST_LineFromWKB(), ST_LinestringFromWKB()
  • ST_MLineFromWKB(), ST_MultiLinestringFromWKB()
  • ST_MPointFromWKB(), ST_MultiPointFromWKB()
  • ST_MPolyFromWKB(), ST_MultiPolygonFromWKB()
  • ST_PointFromWKB()
  • ST_PolyFromWKB(), ST_PolygonFromWKB()
  • Test Suite Notes:
  • mysql-test-run.pl now has a --test-progress option to cause display of the percentage of tests remaining. (Bug #25601131, Bug #20755059, Bug #76455)
  • These changes were made to the --xml-report option for mysql-test-run.pl:
  • A <failure> tag identifies any test failing on a retry attempt.
  • Separate statistics and fields are included for skipped and disabled tests.
  • The XML report is created in the build directory if no absolute path is given for out-of-source builds.
  • For combination runs, a field named variation is included in the <testcase> tag.
  • Results for all tests belonging to a suite are aggregated within a single <testsuite> tag.
  • Information regarding failures is reported with a brief reason in an attribute named message, along with other details within the tag.
  • mysql-test-run.pl now supports a --report-unstable-tests option that has these effects:
  • Reports any test that has passed using at least one retry attempt in a separate category called “Unstable tests” in the summary.
  • If all failures are due to unstable tests, mysql-test-run.pl produces a warning but exits successfully.
  • Adds a new XML tag to report unstable tests, if the --xml-report option is also specified.
  • mysqltest now supports a replace_numeric_round command that takes an argument value from 0 to 16 indicating the number of decimals to round numeric values to. This can be used to help prevent result content mismatch errors for tests in which slightly different results are obtained across platforms due to precision differences. Thanks to Daniel Black for the patch. (Bug #23280117, Bug #81399)
  • X Plugin Notes:
  • The output of clauses such as GROUP BY and HAVING has been improved by moving the grouping_criteria expression to the derived query. (Bug #25549637, Bug #24497007)
  • Functionality Added or Changed:
  • InnoDB: The innodb_undo_logs configuration option is deprecated and will be removed in a future release. The innodb_rollback_segments configuration option performs the same function and should be used instead.
  • The Innodb_available_undo_logs status variable is deprecated and will be removed in a future release.
  • Replication: The group_replication_transaction_size_limit variable was added to enable you to protect a group against large transactions causing a failure. (Bug #84785, Bug #25510757)
  • Replication: Group Replication now supports SQL transaction SAVEPOINT.
  • RPM .spec files now include support for running unit tests. (Bug #25814143, Bug #85743)
  • For Windows, MSI installer packages now include a check for the required Visual Studio redistributable package, and produce a message asking the user to install it if it is missing. (Bug #25658832)
  • The mysql client now supports a --binary-as-hex option that causes display of binary data using hexadecimal notation (0xvalue). Thanks to Daniël van Eeden for the patch. (Bug #25340722, Bug #84391)
  • The audit_log filter parser now produces errors for unexpected JSON elements in filter definitions. (Bug #24360663)
  • The libmysqld embedded server library is deprecated and will be removed in MySQL 8.0. These are also deprecated and will be removed:
  • The mysql_config --libmysqld-libs, --embedded-libs, and --embedded options
  • The CMake WITH_EMBEDDED_SERVER, WITH_EMBEDDED_SHARED_LIBRARY, and INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR options
  • The (undocumented) mysql --server-arg option
  • The mysqltest --embedded-server, --server-arg, and --server-file options
  • The mysqltest_embedded and mysql_client_test_embedded test programs
  • Bugs Fixed:
  • Incompatible Change: Plugins such as Group Replication and X Plugin now use the mysql.session account added in this version. If you are upgrading from a previous version which did not include the mysql.session account you must run mysql_upgrade to ensure the account is created. If mysql_upgrade is not run, plugins fail to start with the error message There was an error when trying to access the server with user: mysql.session@localhost. Make sure the user is present in the server and that mysql_upgrade was ran after a server update. (Bug #26042764)
  • References: See also: Bug #24311527, Bug #25642343
  • InnoDB: An ALTER TABLE operation that rebuilt an encrypted table did not set the encryption attribute properly. (Bug #26243264)
  • InnoDB: The length of a virtual column field in a virtual index record was less than the expected template column length. (Bug #25793677)
  • InnoDB: The server allocated memory unnecessarily for an operation that rebuilt the table. (Bug #25573565, Bug #85043)
  • InnoDB: With foreign_key_checks disabled, InnoDB incorrectly printed messages to the error log when operations were performed on a table that referenced a non-existent foreign key. (Bug #25365223)
  • InnoDB: During a TRUNCATE TABLE operation on a file-per-table tablespace, a dictionary operation lock was released before eviction of dirty pages from the buffer pool, causing a latch order violation. (Bug #25357789)
  • InnoDB: When using an index merge optimizer switch, a SELECT COUNT(*) operation sometimes returned 0. Partitioning code incorrectly performed a memcpy instead of a column copy of columns read by the index, causing the wrong records to be copied. (Bug #25332330, Bug #81031)
  • InnoDB: After a RENAME TABLE operation that moved a table to a different schema, InnoDB returned an error on restart indicating that it could not locate the tablespace data file. InnoDB failed to update INNODB_SYS_DATAFILES data dictionary table during the RENAME TABLE operation. (Bug #25189192, Bug #84038)
  • InnoDB: Loading InnoDB tables required more memory in MySQL 5.7 due primarily to the addition of in-memory structure members introduced with temporary table optimizations. The in-memory structure members, only used for temporary tables, are now only allocated as needed. (Bug #25080442)
  • InnoDB: During an ALTER TABLE operation that rebuilt a table containing a virtual column, InnoDB failed to apply a concurrent insert log record. (Bug #24961167)
  • InnoDB: InnoDB failed to apply the concurrent delete log for an in-place ALTER TABLE operation due to a virtual column validation issue. (Bug #24960450)
  • InnoDB: Changes to the InnoDB recovery process in MySQL 5.7 could require up to three scans of the redo log during recovery. To reduce the number of scans, the first and second scans were merged. With this change, there is only one scan unless the redo log record hash table that is populated by the scan reaches its memory threshold. In this case, a second scan is initiated that performs a simultaneous scan and apply. (Bug #22963951, Bug #80788)
  • Partitioning: When a query performed a reverse-ordered range scan (to satisfy ORDER BY ... DESC) using index condition pushdown on a partitioned InnoDB table, it could take an unreasonably long time to finish. This was due to the fact that the condition pushdown check failed to get the bounds of the range, so that the scan continued to read index tuples until it reached the first value in the index. (Bug #83470, Bug #24929748)
  • References: See also: Bug #84107
  • Replication: In the case of delayed initialization of the Group Replication plugin, deployed in single-primary mode, secondaries were able to get writes through an asynchronous replication channel, which is not allowed in normal initialization of the Group Replication plugin. (Bug #26314756)
  • Replication: With GTIDs generated for incident log events, MySQL error code 1590 (ER_SLAVE_INCIDENT) could not be skipped using the --slave-skip-errors=1590 startup option on a replication slave. (Bug #26266758)
  • Replication: A USE statement that followed a SET GTID_NEXT statement sometimes had no effect. (Bug #26128931)
  • Replication: When binlog_checksum=NONE was set on a MySQL server after startup, and then Group Replication was started, if an error occurred, the server remained in RECOVERING state and could not be shut down. (Bug #25793366, Bug #85667)
  • Replication: In a Group Replication setup where circular asynchronous replication was implemented between members of different replication groups, view change log events were repeatedly replicated between the groups with new generated GTIDs each time. The fix ensures that view change log events are ignored outside the named replication group where they occur, and never generate new GTIDs. (Bug #25674926)
  • References: See also: Bug #26049695, Bug #25928854, Bug #25721175
  • Replication: When first starting the MySQL server following an installation from RPM, passwword validation plugin is activated by default (true only for RPM installations). If binary logging was already enabled at this time, the activation was logged, even though plugin activations should not be recorded in the binary log. (Bug #25672750)
  • Replication: In a setup where single-primary Group Replication was combined with asynchronous replication, for example with S1 and S2 forming a group and with S2 and S3 functioning as master and slave, secondaries such as S2 were accepting transactions and these could then enter the group. The fix prevents secondaries creating an asynchronous replication channel when belonging to a single-primary group, and Group Replication cannot be started when asynchronous replication is running. (Bug #25574200, Bug #85047)
  • References: See also: Bug #86325, Bug #26078602
  • Replication: In the event that a member failed to join a group the member was not stopping and continued to accept transactions. To avoid this set your members to have super_read_only=1 in the my.cfg file. Group Replication now checks for this setting upon successful start up and sets super_read_only=0. This ensures that members which do not successfully join a group cannot accept transactions. (Bug #25474736, Bug #84728)
  • Replication: If the binary log on a master server was rotated and a full disk condition occurred on the partition where the binary log file was being stored, the server could stop unexpectedly. The fix adds a check for the existence of the binary log when the dump thread switches to next binary log file. If the binary log is disabled, all binary logs up to the current active log are transmitted to slave and an error is returned to the receiver thread. (Bug #25076007)
  • Replication: Interleaved XA transactions could sometimes deadlock the slave applier when the transaction isolation level was set to REPEATABLE-READ. (Bug #25040331)
  • Replication: If a relay log index file named relay log files that did not exist, RESET SLAVE ALL sometimes did not fully clean up properly. (Bug #24901077)
  • Replication: The slave_skip_errors system variable did not permit error numbers larger than 3000. Thanks to Tsubasa Tanaka for the patch. (Bug #24748639, Bug #83184)
  • Replication: mysqlbinlog, if invoked with the --raw option, does not flush the output file until the process terminates. But if also invoked with the --stop-never option, the process never terminates, thus nothing is ever written to the output file. Now the output is flushed after each event. (Bug #24609402)
  • Replication: A memory leak in mysqlbinlog was fixed. The leak happened when processing fake rotate events, or when using --raw and the destination log file could not be created. The leak only occurred when processing events from a remote server. Thanks to Laurynas Biveinis for his contribution to fixing this bug. (Bug #24323288, Bug #82283)
  • Replication: A slave server could lose events not yet applied when MASTER_AUTO_POSITION=0, both replication threads were stopped, and the applier delay was changed using CHANGE MASTER TO MASTER_DELAY=N. (Bug #23203678, Bug #81232)
  • Replication: Transmission of large GCS messages could take so long the sender appeared to have died. (Bug #22671846)
  • Replication: Multi-threaded slaves could not be configured with small queue sizes using slave_pending_jobs_size_max if they ever needed to process transactions larger than that size. Any packet larger than slave_pending_jobs_size_max was rejected with the error ER_MTS_EVENT_BIGGER_PENDING_JOBS_SIZE_MAX, even if the packet was smaller than the limit set by slave_max_allowed_packet
  • With this fix, slave_pending_jobs_size_max becomes a soft limit rather than a hard limit. If the size of a packet exceeds slave_pending_jobs_size_max but is less than slave_max_allowed_packet, the transaction is held until all the slave workers have empty queues, and then processed. All subsequent transactions are held until the large transaction has been completed. The queue size for slave workers can therefore be limited while still allowing occasional larger transactions. (Bug #21280753, Bug #77406)
  • Replication: An incident event that broke replication was not written to the binary log with a GTID, so that it was not possible to skip the event using SET gtid_next=value. Instead, it was necessary to set the relay log file and relay log positions directly; this meant that, when autopositioning was enabled, it was necessary first to disable it, then to set the relay log file and position, and finally to re-enable autopositioning
  • Now in such cases MySQL writes the incident event into the statement cache, so that a GTID is generated and written for it prior to flushing, and that the slave applier works with the change. Then users can skip the event using the SQL statement SET gtid_next=value, followed by BEGIN and COMMIT. (Bug #19594845)
  • Replication: In certain cases, the master could write to the binary log a last_committed value which was smaller than it should have been. This could cause the slave to execute in parallel transactions which should not have been, leading to inconsistencies or other errors. (Bug #84471, Bug #25379659)
  • Replication: When using group_replication_ip_whitelist=AUTOMATIC, IPs in the private network are permitted automatically, but some class C IP addresses were not being permitted correctly. (Bug #84329, Bug #25503458)
  • Replication: When an existing GTID_NEXT transaction was assigned a conflicting GTID by the server, Group Replication generated an assert upon detecting two transactions with same GTID. This was because Group Replication generates the GTID after conflict detection, which is later than with master/slave replication. The fix relaxes some conditions to only be called when commit is done and a message has been added to alert you when a GTID has already been used. (Bug #84153, Bug #25232042)
  • Replication: The replication applier thread returns Error 3002 ER_INCONSISTENT_ERROR when there is a difference between an expected error number and the actual error number. It is now possible to ignore this error by using 3002 with slave_skip_errors. (Bug #83186, Bug #24753281)
  • Replication: MySQL lost its GTID position following a restart when a dump from mysqldump had been used to load data
  • To keep this problem from occurring, the mysql.gtid_executed table is now excluded automatically from dumps made by mysqldump. (Bug #82848, Bug #24590891)
  • Replication: Corruption of relay logs for one channel in multi-source replication caused good channels not to be initalized during a server restart. In addition, when run with --skip-slave-start=false, the server also failed to start slave threads for those channels which were in good condition, despite the fact that it should have started the slave threads for all good channels
  • Now, regardless of any errors on other channels, the server attempts to create and initialize channels that are in good condition, and starts slave threads for the good channels if --skip-slave-start is disabled. As part of this fix, START SLAVE and STOP SLAVE, which are intended to operate on all channels, are also modified such that they continue executing on all good channels even if they find bad channels among them. (Bug #82209, Bug #24285104)
  • Replication: The SQL thread was unable to GTID skip a partial transaction. (Bug #81119, Bug #25800025)
  • Debian client packages were missing information about conflicts with akonadi-backend-mysql packages. (Bug #26002288)
  • mysqldump could write database names in USE statements incorrectly. (Bug #25998635)
  • If the mysql_stmt_close() C API function was called, it freed memory that later could be accessed if mysql_stmt_error(), mysql_stmt_errno(), or mysql_stmt_sqlstate() was called. To obtain error information after a call to mysql_stmt_close(), call mysql_error(), mysql_errno(), or mysql_sqlstate() instead. (Bug #25988681)
  • Queries could be cached incorrectly, leading to incorrect query results, under these circumstances: InnoDB table; rows are being inserted but have not yet been committed; a query uses the table as a base table in a derived table; the optimizer chooses to materialize the derived table. (Bug #25943038, Bug #86047)
  • Man pages for a few utilities were missing from Debian/Ubuntu packages. (Bug #25811814)
  • The field-t unit test failed to run with AddressSanitizer enabled. Thanks to Laurynas Biveinis for the patch. (Bug #25803823, Bug #85678)
  • Debian client packages were missing information about conflicts with native packages. (Bug #25799475)
  • The Perl path in #! lines at the beginning of Perl scripts has been adjusted to /usr/local/bin/perl for FreeBSD 11. (Bug #25719975)
  • For debug builds, the assertion added for Bug#59686 was too strict and could be raised when it should not have been. (Bug #25685958)
  • References: See also: Bug #59686
  • A server exit occurred for downgrades to MySQL 5.7 from a MySQL 8.0 installation for which the optimizer cost tables contained generated columns. (Bug #25650399)
  • The server exited abnormally attempting to access invalid memory. (Bug #25501659)
  • With mysqld secured by TCP wrappers and the hosts.allow and hosts.deny files configured to restrict access from an IP address, connection attempts from that address resulted in too many messages to the error log. (Bug #25476479, Bug #84708)
  • mysqlpump no longer includes the slave_master_info and slave_relay_log_info tables in dumps of the mysql system database. Restoring a dump file containing these tables caused problems by changing the replication state improperly. (Bug #25469190)
  • Changes made by calling mysql_options() to set MYSQL_OPT_SSL_MODE could be affected by later mysql_options() calls. Now setting MYSQL_OPT_SSL_MODE is unaffected by later mysql_options() calls. (Bug #25452210)
  • A race condition could occur for CREATE TABLE statements with DATA DIRECTORY or INDEX DIRECTORY clauses. (Bug #25451091)
  • MySQL compilation in different directories produced different builds to leakage of absolute paths into debug information and __FILE__. (Bug #25436469, Bug #84608)
  • On SELinux in Enforcing mode, the keyring_okv plugin failed to connect to the Oracle Key Vault server. (Bug #25420001)
  • ALTER TABLE ... MODIFY on a DATETIME NOT NULL column using an AFTER clause resulted in an ER_INVALID_USE_OF_NULL error. (Bug #25385334)
  • The range optimizer could create an incorrect query tree, resulting in a server exit. (Bug #25369742, Bug #25586531)
  • mysqld_failed to start the server if the --datadir option was specified with a relative path name. (Bug #25364806)
  • XA PREPARE, XA ROLLBACK, and XA COMMIT for a transaction from a disconnected session did not take a global commit lock and modified the binary log and InnoDB redo log even when FLUSH TABLES WITH READ LOCK was in effect. This could lead to inconsistent backups when backup tools assumed that the server was in a read-only state. (Bug #25364178, Bug #84442)
  • GROUP_CONCAT(DISTINCT) returned nonunique values if the data size was greater than the value of the tmp_table_size system variable. (Bug #25331425, Bug #84320)
  • The fix for Bug #78777 had different effects depending on whether the Performance Schema is enabled. (Bug #25309017, Bug #84305)
  • References: This issue is a regression of: Bug #78777
  • An aggregate function in some nested queries could cause a server exit. (Bug #25303711)
  • Virtual generated column expressions that used the CONV() or HEX() functions could cause problems if the connection character set was changed. In this context, the table character set is now used for these functions regardless of connection character set. (Bug #25287633)
  • The Rewriter plugin did not perform locking properly if the read_only system variable was enabled. (Bug #25264253)
  • With read_only enabled, creation of non-TEMPORARY tables by non-SUPER users was permitted under certain conditions. (Bug #25250768)
  • For a table having a TIMESTAMP or DATETIME column having a default of CURRENT_TIMESTAMP, the column could be initialized to 0000-00-00 00:00:00' if the table had a BEFORE INSERT trigger. (Bug #25209512, Bug #84077)
  • Certain stored functions, if used in a query WHERE clause, could be handled using Index Condition Pushdown (which should not happen), resulting in a server exit. (Bug #25196653, Bug #25174454)
  • Certain queries against InnoDB tables that used a primary key and a subquery could return incorrect results if the index_merge_intersection flag of the optimizer_switch system variable was enabled. (Bug #24829050, Bug #79675)
  • Initialization of the keyring_okv plugin failed if the STANDBY_SERVER setting was missing from the okvclient.ora configuration file, effectively making this a mandatory setting. STANDBY_SERVER is now optional. (Bug #24816271)
  • On x86 machines, the uint3korr() macro read 4 bytes of data instead of the intended 3 bytes. (Bug #24807826, Bug #83264)
  • An assertion was raised during a fetch operation by the memcached plugin. (Bug #24605783)
  • Queries that contained UNION in a subquery and GROUP BY could return incorrect results. (Bug #24595639)
  • The server could dereference a null pointer when a deterministic function returning LONGTEXT was used in a subquery. (Bug #24595581)
  • Incorrect behavior could occur for INSERT statements executed in stored-program or prepared-statement context, if the VALUES part of an ON DUPLICATE KEY UPDATE clause referred to a BLOB value in the INSERT column list. (Bug #24538207, Bug #25361251, Bug #25530880, Bug #25684790)
  • systemd support scripts in Debian packages contained hardcoded references to the data directory, making it difficult to change the data directory using --datadir. (Bug #24398446, Bug #82417)
  • MySQL failed to compile under macOS 10.10.5 using Clang. (Bug #24352163, Bug #82340)
  • If a REPLACE statement tried to update a row in a table containing a virtual generated column of type BLOB, subsequent DML statements could behave incorrectly. (Bug #23573575)
  • Compiler flags were adjusted to eliminate numerous warnings that occurred when compiling the keyring_file plugin using Clang. (Bug #22834591, Bug #80524)
  • If enabling the Event Scheduler caused an event defined as ON COMPLETION NOT PRESERVE to be dropped because its execution time had passed, the drop event was not written to the binary log, causing slaves not to replicate it and replication failure if an event of the same name was created later. (Bug #22150112)
  • LOAD XML INFILE performance became noticeably slower when the XML file being read contained a great many spaces, such as those introduced by indenting or pretty-printing. Now all leading whitespace is trimmed from each such value before reading it into memory. (Bug #16212207)

New in MySQL 5.7.18 (Apr 10, 2017)

  • Compilation Notes:
  • Windows builds now use the default runtime libraries (builds use the /MD flag). (Bug #25611609)
  • CMake support was added for compiling with Developer Studio 12.6. (Bug #25384295)
  • Configuration Notes:
  • MySQL failed to compile if -DENABLE_DEBUG_SYNC=OFF AND -DWITH_DEBUG=ON were both given. The ENABLE_DEBUG_SYNC option has been removed and enabling WITH_DEBUG enables Debug Sync. (Bug #18374703)
  • The --temp-pool server option is deprecated and will be removed in MySQL 8.0.
  • DTrace Support:
  • Support for DTrace is deprecated and is removed in MySQL 8.0.
  • Packaging Notes:
  • Changes in RPM package structure require a larger set of packages to be removed to install MySQL Server cleanly. (Bug #25603087)
  • To avoid potential race conditions, Debian packages now use the GNU install utility rather than a combination of mkdir, touch, and chown. (Bug #25258829)
  • The my-default.cnf.sh file (used to produce a default my-default.cnf or my-default.ini file) is no longer included in source distributions and my-default.cnf and my-default.ini are no longer included in or installed by distribution packages. (Bug #22525354)
  • Reminder: MySQL 5.7 requires the Microsoft Visual C++ 2013 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before starting the server. The package is available at the Microsoft Download Center.
  • Parser Notes:
  • PROCEDURE ANALYSE() syntax is now deprecated and is removed in MySQL 8.0.
  • The use of N as a synonym for NULL in SQL statements is deprecated and is removed in MySQL 8.0. Use NULL instead.
  • This change does not affect text file import or export operations performed with LOAD DATA INFILE or SELECT ... INTO OUTFILE, for which NULL continues to be represented by N. See LOAD DATA INFILE Syntax.
  • Security Notes:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.2k.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #25768671)
  • The keyring_okv plugin no longer supports RSA or DSA key types. (Bug #25540639)
  • The keyring_okv keyring plugin now can use the SafeNet KeySecure Appliance as the KMIP back end for keyring storage. For instructions, see Using the keyring_okv Oracle Key Vault Plugin.
  • Thread Pool Notes:
  • To improve thread_pool plugin performance, connection authentication and initialization have been moved from the acceptor thread to the thread pool worker threads that handle client connections. This enables the acceptor thread to handle new connections at a higher rate with reduced latency. The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE table now contains a CONNECT_THREAD_COUNT column that indicates the number of threads that are processing or waiting to process connection initialization and authentication. There can be a maximum of four connection threads per thread group; these threads expire after a period of inactivity. (Bug #17159742)
  • X Plugin Notes:
  • The MYSQLX_TCP_PORT CMake option was ignored. (Bug #25493867, Bug #84804)
  • The protobuf compiler emitted “unused import” warnings for mysqlx.proto. (Bug #25444009, Bug #84641)
  • Connections were released which were not initialized when validation occurred. (Bug #25392280)
  • The Mysqlx_notice_warning_sent and Mysqlx_notice_other_sent status variable values did not increment as expected. (Bug #25289949, Bug #84258, Bug #25290001, Bug #84260)
  • The manual definition of the MYSQL_DYNAMIC_PLUGIN macro was redundant. (Bug #25162590, Bug #83988)
  • IPv6 connectivity support defined a new system variable Mysqlx-bind-address with the default value of '0.0.0.0', but the default value should have been '*' so that connections to X Plugin may be made using an IPv6 address, an IPv4 address, or a hostname. (Bug #25047909, Bug #83688)
  • Sending Expect.Open to a connected socket before authentication led to the following error messages:
  • ... Plugin mysqlx reported: '10: Invalid message 24 received during client initialization'
  • ... Plugin mysqlx reported: '10: ERROR reading from socket Bad file descriptor (9) 2'
  • If multiple user accounts exist that match the authenticating user, the X Plugin would attempt to authenticate all matching accounts instead of the best matching account. (Bug #24847537)
  • Functionality Added or Changed:
  • Replication: View change events from a Group Replication group can now be replicated to an external multithreaded slave (MTS) of type DATABASE. (Bug #25170698)
  • Replication: When a negative or fractional timeout parameter was supplied to WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS(), the server behaved in unexpected ways. With this fix
  • A fractional timeout value is read as-is, with no round-off
  • A negative timeout value is rejected with an error if the server is on a strict SQL mode; if the server is not on a strict SQL mode, the value makes the function return NULL immediately without any waiting and then issue a warning
  • Bug #24976304, Bug #83537)
  • If MySQL was configured to build with the -Wno-error option, mysql_config produced incorrect output for its --cflags option
  • The set of compiler options that mysql_config and pkg-config produce now is determined by whitelisting rather than blacklisting. (Bug #25040566, Bug #22898475, Bug #80662)
  • The performance of UTF-8 binary collations was improved. (Bug #24788778, Bug #83247, Bug #25076862)
  • Consistency and maintainability of Debian/Ubuntu packaging maintainer scripts was improved. (Bug #23588977)
  • mysql_secure_installation is more strict about what it considers valid yes and no responses. (Bug #13344753, Bug #62925)
  • The replace utility is deprecated and will be removed in MySQL 8.0. If you wish to continue using this utility, be sure to retain a copy from an installed version of MySQL
  • Bugs Fixed:
  • InnoDB: The restriction that required the first undo tablespace to use space ID 1 was removed. The first undo tablespace may now be assigned a space ID other than 1. Space ID values for undo tablespaces are still assigned in a consecutive sequence. (Bug #25551311)
  • InnoDB: A DROP TABLE operation raised an assertion on a server with an innodb_force_recovery setting of 5 or 6. DROP TABLE is no longer permitted with these innodb_force_recovery settings. (Bug #25385590)
  • References: This issue is a regression of: Bug #19779113.
  • InnoDB: Compiling the server without the Performance Schema caused a build failure. (Bug #25348787)
  • InnoDB: During read-ahead, the wrong page size was used to calculate the tablespace size. (Bug #25330449)
  • InnoDB: Compiling on Fedora 25 using DWITH_LZ4=system resulted in a build failure due to a deprecated LZ4_COMPRESS_LIMITEDOUTPUT function. (Bug #25297593)
  • InnoDB: Disabling macros such as UNIV_PFS_MUTEX, UNIV_PFS_RWLOCK, and UNIV_PFS_THREAD caused compilation errors. (Bug #25251082)
  • InnoDB: A NULL virtual column field name in a virtual index caused a server exit during a field name comparison that occurs while populating virtual columns affected by a foreign key constraint. (Bug #25222337)
  • InnoDB: The file handle type name for InnoDB file I/O Performance Schema instrumentation was changed from os_pfs_file_t to pfs_os_file_t. (Bug #25220118)
  • InnoDB: During a range comparison, a secondary index field number was passed instead of clustered index field number, eventually causing the retrieval of an incorrect field. (Bug #25175249)
  • InnoDB: A server exit on restart was caused by missing my_thread_init() and my_thread_exit() functions for background threads that initialize the st_my_thread_var structure. (Bug #25167032)
  • InnoDB: A memcached read operation with a non-default read batch size configuration resulted in a server exit. (Bug #25147515)
  • InnoDB: A gap lock was taken unnecessarily during foreign key validation while using the READ COMMITTED isolation level. (Bug #25082593)
  • InnoDB: After a TRUNCATE TABLE operation on a table with a FULLTEXT index, space size was incorrectly calculated resulting in an invalid read. (Bug #25053705)
  • InnoDB: During a checkpoint, all MLOG_FILE_NAME redo log records were written in a single mini-transaction (mtr), causing a log parsing buffer overflow. (Bug #24793413, Bug #83245)
  • InnoDB: A mechanism was added to debug builds to ensure that keys for InnoDB Performance Schema instrumentation are registered with Performance Schema. The mechanism causes startup to fail on debug builds if the number of Performance Schema keys does not match the number of registered Performance Schema keys. (Bug #24686908)
  • InnoDB: A race condition while updating table statistics could result in an estimated row count of 1 and an incorrect query execution plan. (Bug #24666839, Bug #82968)
  • InnoDB: An error in code related to table statistics raised an assertion in the dict0stats.cc source file. (Bug #24585978)
  • InnoDB: A concurrent DML operation during an in in-place ALTER TABLE operation that rebuilt the table did not update a virtual index, resulting in a mismatch between the virtual index and clustered index. (Bug #23219499)
  • InnoDB: A TRUNCATE TABLE operation held the dict_sys mutex while scanning for and removing pages from the buffer pool, causing concurrent DDL operations to stall. The mutex is now released during the scan and acquired again when the scan is completed. (Bug #23070734, Bug #80060)
  • InnoDB: SELECT COUNT(*) performance regressed in some cases due to a modification introduced in MySQL 5.7.2 that caused InnoDB to count rows by traversing the clustered index instead of a smaller secondary index. The modification was reverted. (Bug #23046302, Bug #80580)
  • InnoDB: Inserting GIS data into an r-tree raised an assertion due to a missing page number field that was encountered when storing the b-tree cursor. (Bug #23044098)
  • InnoDB: Performance Schema instrumentation for InnoDB file I/O was disabled on Windows. (Bug #14025581)
  • InnoDB: The row_search_mvcc() function unnecessarily traversed the entire table for a range query, which occurred when the record was not in the transaction read view. (Bug #84202, Bug #23481444, Bug #25251375)
  • Partitioning: Updating a row of a table that had partitioning on a generated column could raise an assertion failure for debug builds, and return incorrect results in nondebug builds. (Bug #22574695, Bug #80080)
  • Replication: MEMBER_STATE of a group replication member did not go from ERROR to OFFLINE when the STOP GROUP_REPLICATION command was executed if the error state was due to ER3092. (Bug #25674926)
  • Replication: With flow control enabled, reaching a minimum flow control quota of 1 will made Group Replication not stop throttling when the cause of throttling was no longer in effect. (Bug #25461354)
  • Replication: Using an unresolvable host name in group_replication_group_seeds caused START GROUP_REPLICATION to fail. The fix ensures that host names in group_replication_group_seeds are validated when starting Group Replication and the list must contain at least one valid address. Invalid addresses are ignored. (Bug #25460324, Bug #84674)
  • Replication: The _gr_user account created by Group Replication plugin installation was not reliably removed when the plugin was uninstalled. (Bug #25298987)
  • Replication: When starting Group Replication on an offline node, the node could be configured for replication, but fail for recovery. (Bug #25256910)
  • Replication: When using a multi-threaded slave, applier errors displayed worker ID data that was inconsistent with data externalized in Performance Schema replication tables. (Bug #25231367)
  • Replication: Not all Group Replication GCS debug and trace messages were enabled in debug mode. (Bug #25209109)
  • Replication: Compiling MySQL 5.7.17 failed with a variable length array error. (Bug #25163241)
  • Replication: In row-based replication, a message that incorrectly displayed field lengths was returned when replicating from a table with a utf8mb3 column to a table of the same definition where the column was defined with a utf8mb4 character set. (Bug #25135304, Bug #83918)
  • Replication: Group Replication GCS was not discarding messages when a member within the group was inactive. (Bug #25134074)
  • Replication: Some unnecessary warnings were given when the Group Replication plugin was compiled on Windows platforms. (Bug #25119288)
  • Replication: As assertion could be raised if the Group Replication plugin attempted to contact the server when that was no longer possible. (Bug #25071492)
  • Replication: The GTID transaction skipping mechanism that silently skips a GTID transaction that was previously executed did not work properly for XA transactions. (Bug #25041920)
  • Replication: After executing restarts on the group replication applier SQL thread, the plugin could no longer detect failure of the thread. (Bug #24969065)
  • Replication: When the MTS slave applier stopped because of an (injected) error, it reported no useful information for troubleshooting. (Bug #24822686)
  • Replication: FLUSH BINARY LOG could become slow with data replicated from many servers. (Bug #24806259, Bug #83270)
  • Replication: A partially failed CREATE USER, RENAME USER, or ALTER USER statement was not correctly consuming an auto-generated or specified GTID when binary logging was disabled. (Bug #24693798)
  • Replication: Binlog_sender, which writes events from the binary log to a packet buffer and then sends the packet to the slave, did not reduce the size of the send buffer as expected. (Bug #24643036)
  • Replication: When using a multi-threaded slave (slave_parallel_workers greater than 0) the value of Seconds_Behind_Master was incorrect when rotating a relay log. (Bug #23532304)
  • Replication: The server prevented several replication-related administrative statements from working if the read_only system variable was enabled. (Bug #22857926)
  • Replication: CHANGE MASTER TO for a channel that did not exist could raise an assertion. (Bug #22255698)
  • Replication: The delay specified by the binlog_group_commit_sync_delay system variable was applied to too many binary log commit groups. (Bug #21420180)
  • JSON: MySQL JSON source code built using with clang 3.9 raised undesired warnings. (Bug #25039600)
  • mysqldump failed to properly quote certain identifiers in SQL statements written to the dump output. (Bug #25717383)
  • Client preauthorization by the server was missing a length check for a length-encoded string. (Bug #25714674)
  • The (undocumented) WINDOWS_RUNTIME_MD CMake option has been removed. (Bug #25611359)
  • mysqld_safe failed to restart the server if a PID_FILE.shutdown file was present. (Bug #25572504)
  • For Debian/Ubuntu packages, user-defined collation files could be overwritten during MySQL upgrades. Charset files are now marked as conffiles so that user customizations generate a prompt during upgrades whether to overwrite them. (Bug #25525628, Bug #84761)
  • For CREATE TABLE statements that specified the table name with a database qualifier and included a DATA DIRECTORY or INDEX DIRECTORY option, an error occurred if there was no default database. (Bug #25514146, Bug #84861)
  • Starting the server with performance_schema_digests_size=1 caused an abnormal exit. (Bug #25492129, Bug #84786)
  • MySQL failed to compile on some platforms with -DWITH_LIBWRAP=ON. CMake support now checks whether tcpd.h has proper function prototypes. (Bug #25395543, Bug #84495)
  • mysqld_safe did not check whether the directory named by the --basedir option existed. (Bug #25365194)
  • Configuring CMake with -G ninja resulted in build output that was inappropriate for build platforms other than Xcode or Visual Studio. (Bug #25358460)
  • mysqld_safe failed if the error log file named by the --log-error option was a FIFO. (Bug #25356221, Bug #84427)
  • For prepared statements, an alias within a subquery or derived table might cause incorrect behavior during statement execution if another alias depended on it. (Bug #25343335, Bug #84398, Bug #25171608)
  • mysqld_safe could fail if the --datadir option value ended with a / character. (Bug #25319457)
  • A recent change to mysqld_safe caused the mysql.server script to be unable to start it if the base directory was specified as an absolute path that differed from the compiled-in default absolute path. (Bug #25319392, Bug #84263)
  • The connection_control plugin failed to compile if the Performance Schema was disabled. (Bug #25308357, Bug #84304)
  • Passwords did not expire correctly for accounts created using MySQL Workbench. (Bug #25299309)
  • For System V init scripts for RPMs, the [mysqld] option-file section was being ignored for some options, such as pid-file. (Bug #25287707, Bug #84172)
  • Init scripts failed to launch mysqld_safe if a non-default base directory was used. (Bug #25261472, Bug #84219)
  • CMake now detects whether a GCC 5.3.0 loop optimization bug occurs and attempts a workaround if so. (Bug #25253540)
  • mysqld_safe --no-defaults did not work (inadvertent consequence of an earlier bug fix). (Bug #25244898, Bug #84173)
  • Semicolon (;) characters within or between statements could cause distinct digests to be generated from identical statements. (Bug #25244533, Bug #83253)
  • For a client linked against libmysqlclient, invalid memory access could occur during use of prepared statements. (Bug #25164932)
  • The fix for Bug #25088048 caused the command used by mysqld_safe to start the MySQL server to no longer include the mysqld path. (Bug #25144379)
  • Executing a stored procedure containing a query that accessed a view could allocate memory that was not freed until the session ended. (Bug #25053286)
  • Compilation on FreeBSD 11 failed attempting to check MAP_NORESERVE, which is no longer defined. (Bug #25048128, Bug #83689)
  • CMake support was added for compiling using the -std=c++03 option under Developer Studio 12.5. This is now used rather than stlport by default. (Bug #24947136, Bug #83512, Bug #25229424)
  • Privilege checking could be incorrect for a derived table used within a multiple-table UPDATE invoked within a stored procedure or view object, for the second or subsequent execution of the object, if the derived table was merged into the outer query. (Bug #24810564)
  • Connections from a client to a server with SSL enabled succeeded even if --ssl-mode had a value of VERIFY_CA or VERIFY_IDENTITY and the client did not provide a CA certificate. (Bug #24732452, Bug #23189252)
  • If InnoDB statistics were incorrect, FOUND_ROWS() could return 1 even when the previous SELECT returned no rows. (Bug #24714857, Bug #83110)
  • CMake now sets -DWITH_NUMA=ON for Debian platforms where possible. (Bug #24689101)
  • A query could produce incorrect results if the WHERE clause contained a dependent subquery, the table had a secondary index on the columns in the select list followed by the columns in the subquery, and GROUP BY or DISTINCT permitted the query to use a Loose Index Scan. (Bug #24671968, Bug #83005)
  • The DebugPrintTest and DebugPrintDeathTest unit tests did not handle divide-by-zero testing properly on the Aarch64 platform.
  • Some account-management statements could incorrectly set the account password_lifetime value to NULL. (Bug #24619222)
  • Changes made to mysqld_safe in recent MySQL releases require the --ledir, --mysqld, --mysqld-version options to be specified on the command line; they can no longer be specified in option files. This could cause failure of init scripts that invoke mysqld_safe. Such scripts now pass the value of the MYSQLD_OPTS environment variable as the first command-line argument to mysqld_safe, with the value set to such command line-only mysqld_safe option values as may be required. On platforms that use /etc/sysconfig/mysqld, the MYSQLD_OPTS value can be set in that file with a line such as this:
  • MYSQLD_OPTS=" --ledir=/mysqld_ledir --mysqld=my_wrapper "
  • The value of MYSQLD_OPTS can also include mysqld options for mysqld_safe to pass to mysqld. (Bug #24619033, Bug #82920)
  • References: This issue is a regression of: Bug #24464380, Bug #24483092, Bug #25088048, Bug #25378439, Bug #25378565.
  • For LOAD DATA used to insert data into an updateable view, the check to verify whether a column is actually updatable was missing. (Bug #24595937)
  • Queries of the form SELECT NULL IN (subquery) could raise an assertion due to a missing null-pointer check. (Bug #24595612)
  • When populating the variables_by_thread table, the Performance Schema could attempt to access session variables of other threads that were being deinitialized. (Bug #24555658)
  • For the null_audit plugin, setting the null_audit_event_record system variable improperly could cause a server exit. This variable should be set only from within the null_audit plugin, so it is now read only. (Bug #24493829, Bug #82670)
  • A regular expression pattern match into a large string could result in a server exit due to memory allocation failure or integer overflow. (Bug #24449076, Bug #24449090)
  • An incorrect error was reported for CREATE TABLE statements with a large value for the CONNECTION table option. The value is now limited to 1024 bytes. (Bug #24437124)
  • For debug builds, if the binary log was enabled, executing the audit_log plugin audit_log_filter_set_filter function could cause a server exit. (Bug #24437009)
  • MySQL Enterprise Firewall did not record events if the audit_log plugin was installed. (Bug #24413450, Bug #82473)
  • EXPLAIN SELECT COUNT(*) FROM tbl_name could incorrectly report an Extra value of Select tables optimized away due to a modification introduced in MySQL 5.7.2 that caused InnoDB to count rows by traversing the clustered index instead of a smaller secondary index. The Extra value now displays Count Rows. (Bug #24337385, Bug #82313)
  • mysqldumpslow failed to parse timestamps in the slow query log; it had not been updated to track a change in log timestamp format. (Bug #24007040)
  • Complete logical backups made with mysqlpump could not be restored if GTIDs were enabled. (Bug #23748432)
  • Messages written by the audit_log plugin to the error log regarding MYSQL_AUDIT_CONNECT event failures now print the underlying error cause as well to aid debugging. (Bug #23710632)
  • FORCE INDEX was ineffective for SELECT COUNT(*) queries. (Bug #23596760, Bug #81854)
  • The audit_log plugin audit_log_filter_remove_filter() function caused a server exit if given a NULL argument. (Bug #23522793)
  • Grant tables with incorrect structure may cause problems in user management operations. As a consequence of the fix for this, for any operation that modifies a grant table, the server now checks whether the table has the expected structure and produces an error if not. mysql_upgrade must be run to update the tables to the expected structure. (Bug #23295423, Bug #25095876, Bug #25448037)
  • Improper handling of a lock used by the version_tokens plugin and user-defined functions could result in a server exit if a UDF was called while version_tokens was being uninstalled. (Bug #23210850)
  • The QUOTE() function could allocate excessive memory. A limit of max_allowed_packet bytes is now imposed and returns NULL with a warning for attempts to allocate more. (Bug #23195404)
  • When attempting to locate the data directory, mysqld_safe incorrectly considered $MY_BASEDIR_VERSION/var as one of the possible locations. (Bug #23013510, Bug #80866)
  • The main.log_tables-big test case could be unstable on highly loaded hosts.
  • The rpl.rpl_key_rotation test case did not synchronize properly with the master server. Thanks to Laurynas Biveinis for the patch. (Bug #22838596, Bug #80531)
  • Queries that used an aggregate function with DISTINCT could produce incorrect results. (Bug #22686994, Bug #80310)
  • For RPM packages, the default error-log location in the deployed /etc/my.cnf file differed from the location in the installed logrotate script, causing logrotate to fail. (Bug #22322685)
  • After performing inserts in a table containing an AUTO_INCREMENT column and then performing a SELECT operation, the LAST_INSERT_ID() returns the correct value, but the value of the mysql_insert_id() C API function was being reset to 0. (Bug #22028117, Bug #78778)
  • With the use_index_extensions flag of the optimizer_switch system variable disabled, some SELECT DISTINCT queries could return incorrect results. (Bug #21749123, Bug #78244)
  • Debian packages were missing an AppArmor-related include file and incorrectly were marked dependent on AppArmor (making it impossible to disable AppArmor by uninstalling it). (Bug #20768958)
  • In a replication environment, SET PASSWORD or ALTER USER could fail to execute on the slave due to failure to parse the hash string correctly. (Bug #20228478)
  • On non-Linux Unix systems, the mysql.server startup script used the Linux command pidof rather than pgrep. (Bug #13788154, Bug #64342)
  • Starting multiple instances of mysqld_safe after an abnormal server exit could result in one mysqld_safe instance killing another. As a consequence of the bug fix, the mysqld_safe.pid file is no longer used. (Bug #11751149, Bug #41908)
  • The --help message for mysqld_safe was corrected to mention that the --no-defaults, --defaults-file, and --defaults-extra-file options, if given, must be the first argument. (Bug #11745176, Bug #11192)
  • The bounds check for the XML parser position stack for each level (which has a fixed depth) used the size of the array as the upper limit, and so was off by one. This is fixed by decreasing the allowable depth by one, which actually matches the maximum number of elements in the position stack. (Bug #83871, Bug #25111907)
  • Timestamps for server-side prepared statements could be written to the binary log up to a second behind timestamps for the corresponding nonprepared statements, leading to time value differences between master and slave servers. (Bug #74550, Bug #19894382, Bug #25187670)
  • Bugs Fixed:
  • InnoDB: The restriction that required the first undo tablespace to use space ID 1 was removed. The first undo tablespace may now be assigned a space ID other than 1. Space ID values for undo tablespaces are still assigned in a consecutive sequence. (Bug #25551311)
  • InnoDB: A DROP TABLE operation raised an assertion on a server with an innodb_force_recovery setting of 5 or 6. DROP TABLE is no longer permitted with these innodb_force_recovery settings. (Bug #25385590)
  • References: This issue is a regression of: Bug #19779113.
  • InnoDB: Compiling the server without the Performance Schema caused a build failure. (Bug #25348787)
  • InnoDB: During read-ahead, the wrong page size was used to calculate the tablespace size. (Bug #25330449)
  • InnoDB: Compiling on Fedora 25 using DWITH_LZ4=system resulted in a build failure due to a deprecated LZ4_COMPRESS_LIMITEDOUTPUT function. (Bug #25297593)
  • InnoDB: Disabling macros such as UNIV_PFS_MUTEX, UNIV_PFS_RWLOCK, and UNIV_PFS_THREAD caused compilation errors. (Bug #25251082)
  • InnoDB: A NULL virtual column field name in a virtual index caused a server exit during a field name comparison that occurs while populating virtual columns affected by a foreign key constraint. (Bug #25222337)
  • InnoDB: The file handle type name for InnoDB file I/O Performance Schema instrumentation was changed from os_pfs_file_t to pfs_os_file_t. (Bug #25220118)
  • InnoDB: During a range comparison, a secondary index field number was passed instead of clustered index field number, eventually causing the retrieval of an incorrect field. (Bug #25175249)
  • InnoDB: A server exit on restart was caused by missing my_thread_init() and my_thread_exit() functions for background threads that initialize the st_my_thread_var structure. (Bug #25167032)
  • InnoDB: A memcached read operation with a non-default read batch size configuration resulted in a server exit. (Bug #25147515)
  • InnoDB: A gap lock was taken unnecessarily during foreign key validation while using the READ COMMITTED isolation level. (Bug #25082593)
  • InnoDB: After a TRUNCATE TABLE operation on a table with a FULLTEXT index, space size was incorrectly calculated resulting in an invalid read. (Bug #25053705)
  • InnoDB: During a checkpoint, all MLOG_FILE_NAME redo log records were written in a single mini-transaction (mtr), causing a log parsing buffer overflow. (Bug #24793413, Bug #83245)
  • InnoDB: A mechanism was added to debug builds to ensure that keys for InnoDB Performance Schema instrumentation are registered with Performance Schema. The mechanism causes startup to fail on debug builds if the number of Performance Schema keys does not match the number of registered Performance Schema keys. (Bug #24686908)
  • InnoDB: A race condition while updating table statistics could result in an estimated row count of 1 and an incorrect query execution plan. (Bug #24666839, Bug #82968)
  • InnoDB: An error in code related to table statistics raised an assertion in the dict0stats.cc source file. (Bug #24585978)
  • InnoDB: A concurrent DML operation during an in in-place ALTER TABLE operation that rebuilt the table did not update a virtual index, resulting in a mismatch between the virtual index and clustered index. (Bug #23219499)
  • InnoDB: A TRUNCATE TABLE operation held the dict_sys mutex while scanning for and removing pages from the buffer pool, causing concurrent DDL operations to stall. The mutex is now released during the scan and acquired again when the scan is completed. (Bug #23070734, Bug #80060)
  • InnoDB: SELECT COUNT(*) performance regressed in some cases due to a modification introduced in MySQL 5.7.2 that caused InnoDB to count rows by traversing the clustered index instead of a smaller secondary index. The modification was reverted. (Bug #23046302, Bug #80580)
  • InnoDB: Inserting GIS data into an r-tree raised an assertion due to a missing page number field that was encountered when storing the b-tree cursor. (Bug #23044098)
  • InnoDB: Performance Schema instrumentation for InnoDB file I/O was disabled on Windows. (Bug #14025581)
  • InnoDB: The row_search_mvcc() function unnecessarily traversed the entire table for a range query, which occurred when the record was not in the transaction read view. (Bug #84202, Bug #23481444, Bug #25251375)
  • Partitioning: Updating a row of a table that had partitioning on a generated column could raise an assertion failure for debug builds, and return incorrect results in nondebug builds. (Bug #22574695, Bug #80080)
  • Replication: MEMBER_STATE of a group replication member did not go from ERROR to OFFLINE when the STOP GROUP_REPLICATION command was executed if the error state was due to ER3092. (Bug #25674926)
  • Replication: With flow control enabled, reaching a minimum flow control quota of 1 will made Group Replication not stop throttling when the cause of throttling was no longer in effect. (Bug #25461354)
  • Replication: Using an unresolvable host name in group_replication_group_seeds caused START GROUP_REPLICATION to fail. The fix ensures that host names in group_replication_group_seeds are validated when starting Group Replication and the list must contain at least one valid address. Invalid addresses are ignored. (Bug #25460324, Bug #84674)
  • Replication: The _gr_user account created by Group Replication plugin installation was not reliably removed when the plugin was uninstalled. (Bug #25298987)
  • Replication: When starting Group Replication on an offline node, the node could be configured for replication, but fail for recovery. (Bug #25256910)
  • Replication: When using a multi-threaded slave, applier errors displayed worker ID data that was inconsistent with data externalized in Performance Schema replication tables. (Bug #25231367)
  • Replication: Not all Group Replication GCS debug and trace messages were enabled in debug mode. (Bug #25209109)
  • Replication: Compiling MySQL 5.7.17 failed with a variable length array error. (Bug #25163241)
  • Replication: In row-based replication, a message that incorrectly displayed field lengths was returned when replicating from a table with a utf8mb3 column to a table of the same definition where the column was defined with a utf8mb4 character set. (Bug #25135304, Bug #83918)
  • Replication: Group Replication GCS was not discarding messages when a member within the group was inactive. (Bug #25134074)
  • Replication: Some unnecessary warnings were given when the Group Replication plugin was compiled on Windows platforms. (Bug #25119288)
  • Replication: As assertion could be raised if the Group Replication plugin attempted to contact the server when that was no longer possible. (Bug #25071492)
  • Replication: The GTID transaction skipping mechanism that silently skips a GTID transaction that was previously executed did not work properly for XA transactions. (Bug #25041920)
  • Replication: After executing restarts on the group replication applier SQL thread, the plugin could no longer detect failure of the thread. (Bug #24969065)
  • Replication: When the MTS slave applier stopped because of an (injected) error, it reported no useful information for troubleshooting. (Bug #24822686)
  • Replication: FLUSH BINARY LOG could become slow with data replicated from many servers. (Bug #24806259, Bug #83270)
  • Replication: A partially failed CREATE USER, RENAME USER, or ALTER USER statement was not correctly consuming an auto-generated or specified GTID when binary logging was disabled. (Bug #24693798)
  • Replication: Binlog_sender, which writes events from the binary log to a packet buffer and then sends the packet to the slave, did not reduce the size of the send buffer as expected. (Bug #24643036)
  • Replication: When using a multi-threaded slave (slave_parallel_workers greater than 0) the value of Seconds_Behind_Master was incorrect when rotating a relay log. (Bug #23532304)
  • Replication: The server prevented several replication-related administrative statements from working if the read_only system variable was enabled. (Bug #22857926)
  • Replication: CHANGE MASTER TO for a channel that did not exist could raise an assertion. (Bug #22255698)
  • Replication: The delay specified by the binlog_group_commit_sync_delay system variable was applied to too many binary log commit groups. (Bug #21420180)
  • JSON: MySQL JSON source code built using with clang 3.9 raised undesired warnings. (Bug #25039600)
  • mysqldump failed to properly quote certain identifiers in SQL statements written to the dump output. (Bug #25717383)
  • Client preauthorization by the server was missing a length check for a length-encoded string. (Bug #25714674)
  • The (undocumented) WINDOWS_RUNTIME_MD CMake option has been removed. (Bug #25611359)
  • mysqld_safe failed to restart the server if a PID_FILE.shutdown file was present. (Bug #25572504)
  • References: This issue is a regression of: Bug #11751149.
  • For Debian/Ubuntu packages, user-defined collation files could be overwritten during MySQL upgrades. Charset files are now marked as conffiles so that user customizations generate a prompt during upgrades whether to overwrite them. (Bug #25525628, Bug #84761)
  • For CREATE TABLE statements that specified the table name with a database qualifier and included a DATA DIRECTORY or INDEX DIRECTORY option, an error occurred if there was no default database. (Bug #25514146, Bug #84861)
  • Starting the server with performance_schema_digests_size=1 caused an abnormal exit. (Bug #25492129, Bug #84786)
  • MySQL failed to compile on some platforms with -DWITH_LIBWRAP=ON. CMake support now checks whether tcpd.h has proper function prototypes. (Bug #25395543, Bug #84495)
  • mysqld_safe did not check whether the directory named by the --basedir option existed. (Bug #25365194)
  • Configuring CMake with -G ninja resulted in build output that was inappropriate for build platforms other than Xcode or Visual Studio. (Bug #25358460)
  • mysqld_safe failed if the error log file named by the --log-error option was a FIFO. (Bug #25356221, Bug #84427)
  • For prepared statements, an alias within a subquery or derived table might cause incorrect behavior during statement execution if another alias depended on it. (Bug #25343335, Bug #84398, Bug #25171608)
  • mysqld_safe could fail if the --datadir option value ended with a / character. (Bug #25319457)
  • A recent change to mysqld_safe caused the mysql.server script to be unable to start it if the base directory was specified as an absolute path that differed from the compiled-in default absolute path. (Bug #25319392, Bug #84263)
  • The connection_control plugin failed to compile if the Performance Schema was disabled. (Bug #25308357, Bug #84304)
  • Passwords did not expire correctly for accounts created using MySQL Workbench. (Bug #25299309)
  • For System V init scripts for RPMs, the [mysqld] option-file section was being ignored for some options, such as pid-file. (Bug #25287707, Bug #84172)
  • Init scripts failed to launch mysqld_safe if a non-default base directory was used. (Bug #25261472, Bug #84219)
  • CMake now detects whether a GCC 5.3.0 loop optimization bug occurs and attempts a workaround if so. (Bug #25253540)
  • mysqld_safe --no-defaults did not work (inadvertent consequence of an earlier bug fix). (Bug #25244898, Bug #84173)
  • Semicolon (;) characters within or between statements could cause distinct digests to be generated from identical statements. (Bug #25244533, Bug #83253)
  • For a client linked against libmysqlclient, invalid memory access could occur during use of prepared statements. (Bug #25164932)
  • The fix for Bug #25088048 caused the command used by mysqld_safe to start the MySQL server to no longer include the mysqld path. (Bug #25144379)
  • References: This issue is a regression of: Bug #25088048.
  • Executing a stored procedure containing a query that accessed a view could allocate memory that was not freed until the session ended. (Bug #25053286)
  • Compilation on FreeBSD 11 failed attempting to check MAP_NORESERVE, which is no longer defined. (Bug #25048128, Bug #83689)
  • CMake support was added for compiling using the -std=c++03 option under Developer Studio 12.5. This is now used rather than stlport by default. (Bug #24947136, Bug #83512, Bug #25229424)
  • Privilege checking could be incorrect for a derived table used within a multiple-table UPDATE invoked within a stored procedure or view object, for the second or subsequent execution of the object, if the derived table was merged into the outer query. (Bug #24810564)
  • Connections from a client to a server with SSL enabled succeeded even if --ssl-mode had a value of VERIFY_CA or VERIFY_IDENTITY and the client did not provide a CA certificate. (Bug #24732452, Bug #23189252)
  • If InnoDB statistics were incorrect, FOUND_ROWS() could return 1 even when the previous SELECT returned no rows. (Bug #24714857, Bug #83110)
  • CMake now sets -DWITH_NUMA=ON for Debian platforms where possible. (Bug #24689101)
  • A query could produce incorrect results if the WHERE clause contained a dependent subquery, the table had a secondary index on the columns in the select list followed by the columns in the subquery, and GROUP BY or DISTINCT permitted the query to use a Loose Index Scan. (Bug #24671968, Bug #83005)
  • The DebugPrintTest and DebugPrintDeathTest unit tests did not handle divide-by-zero testing properly on the Aarch64 platform. Thanks to Alexey Kopytov for the patch. (Bug #24624555, Bug #82889)
  • Some account-management statements could incorrectly set the account password_lifetime value to NULL. (Bug #24619222)
  • Changes made to mysqld_safe in recent MySQL releases require the --ledir, --mysqld, --mysqld-version options to be specified on the command line; they can no longer be specified in option files. This could cause failure of init scripts that invoke mysqld_safe. Such scripts now pass the value of the MYSQLD_OPTS environment variable as the first command-line argument to mysqld_safe, with the value set to such command line-only mysqld_safe option values as may be required. On platforms that use /etc/sysconfig/mysqld, the MYSQLD_OPTS value can be set in that file with a line such as this:
  • MYSQLD_OPTS=" --ledir=/mysqld_ledir --mysqld=my_wrapper "
  • The value of MYSQLD_OPTS can also include mysqld options for mysqld_safe to pass to mysqld. (Bug #24619033, Bug #82920)
  • References: This issue is a regression of: Bug #24464380, Bug #24483092, Bug #25088048, Bug #25378439, Bug #25378565.
  • For LOAD DATA used to insert data into an updateable view, the check to verify whether a column is actually updatable was missing. (Bug #24595937)
  • Queries of the form SELECT NULL IN (subquery) could raise an assertion due to a missing null-pointer check. (Bug #24595612)
  • References: This issue is a regression of: Bug #22090717.
  • When populating the variables_by_thread table, the Performance Schema could attempt to access session variables of other threads that were being deinitialized. (Bug #24555658)
  • On Debian/Ubuntu platforms, the systemd startup script for MySQL ignored datadir settings in /etc/mysql/my.cnf. (Bug #24517024, Bug #82709)
  • For the null_audit plugin, setting the null_audit_event_record system variable improperly could cause a server exit. This variable should be set only from within the null_audit plugin, so it is now read only. (Bug #24493829, Bug #82670)
  • A regular expression pattern match into a large string could result in a server exit due to memory allocation failure or integer overflow. (Bug #24449076, Bug #24449090)
  • An incorrect error was reported for CREATE TABLE statements with a large value for the CONNECTION table option. The value is now limited to 1024 bytes. (Bug #24437124)
  • For debug builds, if the binary log was enabled, executing the audit_log plugin audit_log_filter_set_filter function could cause a server exit. (Bug #24437009)
  • MySQL Enterprise Firewall did not record events if the audit_log plugin was installed. (Bug #24413450, Bug #82473)
  • EXPLAIN SELECT COUNT(*) FROM tbl_name could incorrectly report an Extra value of Select tables optimized away due to a modification introduced in MySQL 5.7.2 that caused InnoDB to count rows by traversing the clustered index instead of a smaller secondary index. The Extra value now displays Count Rows. (Bug #24337385, Bug #82313)
  • mysqldumpslow failed to parse timestamps in the slow query log; it had not been updated to track a change in log timestamp format. (Bug #24007040)
  • Complete logical backups made with mysqlpump could not be restored if GTIDs were enabled. (Bug #23748432)
  • Messages written by the audit_log plugin to the error log regarding MYSQL_AUDIT_CONNECT event failures now print the underlying error cause as well to aid debugging. (Bug #23710632)
  • FORCE INDEX was ineffective for SELECT COUNT(*) queries. (Bug #23596760, Bug #81854)
  • The audit_log plugin audit_log_filter_remove_filter() function caused a server exit if given a NULL argument. (Bug #23522793)
  • Grant tables with incorrect structure may cause problems in user management operations. As a consequence of the fix for this, for any operation that modifies a grant table, the server now checks whether the table has the expected structure and produces an error if not. mysql_upgrade must be run to update the tables to the expected structure. (Bug #23295423, Bug #25095876, Bug #25448037)
  • Improper handling of a lock used by the version_tokens plugin and user-defined functions could result in a server exit if a UDF was called while version_tokens was being uninstalled. (Bug #23210850)
  • The QUOTE() function could allocate excessive memory. A limit of max_allowed_packet bytes is now imposed and returns NULL with a warning for attempts to allocate more. (Bug #23195404)
  • When attempting to locate the data directory, mysqld_safe incorrectly considered $MY_BASEDIR_VERSION/var as one of the possible locations. (Bug #23013510, Bug #80866)
  • The main.log_tables-big test case could be unstable on highly loaded hosts. Thanks to Laurynas Biveinis for the patch. (Bug #22874167, Bug #80607)
  • The rpl.rpl_key_rotation test case did not synchronize properly with the master server. Thanks to Laurynas Biveinis for the patch. (Bug #22838596, Bug #80531)
  • Queries that used an aggregate function with DISTINCT could produce incorrect results. (Bug #22686994, Bug #80310)
  • For RPM packages, the default error-log location in the deployed /etc/my.cnf file differed from the location in the installed logrotate script, causing logrotate to fail. (Bug #22322685)
  • After performing inserts in a table containing an AUTO_INCREMENT column and then performing a SELECT operation, the LAST_INSERT_ID() returns the correct value, but the value of the mysql_insert_id() C API function was being reset to 0. (Bug #22028117, Bug #78778)
  • With the use_index_extensions flag of the optimizer_switch system variable disabled, some SELECT DISTINCT queries could return incorrect results. (Bug #21749123, Bug #78244)
  • Debian packages were missing an AppArmor-related include file and incorrectly were marked dependent on AppArmor (making it impossible to disable AppArmor by uninstalling it). (Bug #20768958)
  • In a replication environment, SET PASSWORD or ALTER USER could fail to execute on the slave due to failure to parse the hash string correctly. (Bug #20228478)
  • On non-Linux Unix systems, the mysql.server startup script used the Linux command pidof rather than pgrep. (Bug #13788154, Bug #64342)
  • Starting multiple instances of mysqld_safe after an abnormal server exit could result in one mysqld_safe instance killing another. As a consequence of the bug fix, the mysqld_safe.pid file is no longer used. (Bug #11751149, Bug #41908)
  • The --help message for mysqld_safe was corrected to mention that the --no-defaults, --defaults-file, and --defaults-extra-file options, if given, must be the first argument. (Bug #11745176, Bug #11192)
  • The bounds check for the XML parser position stack for each level (which has a fixed depth) used the size of the array as the upper limit, and so was off by one. This is fixed by decreasing the allowable depth by one, which actually matches the maximum number of elements in the position stack. (Bug #83871, Bug #25111907)
  • References: See also: Bug #14040071, Bug #15948580.
  • Timestamps for server-side prepared statements could be written to the binary log up to a second behind timestamps for the corresponding nonprepared statements, leading to time value differences between master and slave servers. (Bug #74550, Bug #19894382, Bug #25187670)

New in MySQL 5.7.16 (Oct 13, 2016)

  • Security Notes:
  • Incompatible Change: For STANDALONE and WIN builds, the default secure_file_priv value has changed from the empty string to NULL. This is a secure-by-default setting because it disables import and export operations. To permit those operations, set secure_file_priv to the path name of the directory to use for those operations. (Bug #24679907, Bug #24695274, Bug #24707666)
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.1u. For a description of issues fixed in this version, see http://www.openssl.org/news/vulnerabilities.html. This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #24753389)
  • Functionality Added or Changed:
  • yaSSL was upgraded to version 2.4.2. This upgrade corrects issues with: Potential AES side channel leaks; DSA padding for unusual sizes; the SSL_CTX_load_verify_locations() OpenSSL compatibility function failing to handle long path directory names. (Bug #24512715, Bug #24740291)

New in MySQL 5.7.15 (Oct 13, 2016)

  • Security Notes:
  • The validate_password plugin now supports the capability of rejecting passwords that match the current session user name, either forward or in reverse. To enable control over this capability, the plugin exposes a validate_password_check_user_name system variable. By default, this variable is disabled; the default will change to enabled in MySQL 8.0. For more information, see Password Validation Plugin Options and Variables.
  • Test Suite Notes:
  • In mysql-test-run.pl, a limit of 50 was imposed on the number of workers for parallel testing, which on systems with more than 50 CPUs resulted in exhaustion of unique thread IDs. The ID-exhaustion problem has been corrected, and the limit of 50 on number of workers has been lifted. Thanks to Daniel Black for the patch on which this change was based.
  • Functionality Added or Changed:
  • InnoDB: A new dynamic configuration option, innodb_deadlock_detect, can be used to disable deadlock detection. On high concurrency systems, deadlock detection can cause a slowdown when numerous threads wait for the same lock. At times, it may be more efficient to disable deadlock detection and rely on the innodb_lock_wait_timeout setting for transaction rollback when a deadlock occurs. (Bug #23477773)
  • The systemd support script for the unit file (mysqld_pre_systemd) now assists in creating the error log file only if its location matches the pattern /var/log/mysql*.log. In other cases, the error log directory must be writable or the error log must be present and writable for the user running the mysqld process. Also, mysqld_pre_systemd now avoids creating insecure temporary files. (Bug #24516262)
  • The CMake WITH_LZ4 option has been added to control which LZ4 library is used during compilation. By default WITH_LZ4 is set to bundled, so the library provided with MySQL is used. Setting WITH_LZ4 to system uses the LZ4 library from the operating system. (Bug #23607230)
  • Bugs Fixed:
  • InnoDB: An ALTER TABLE ... ENCRYPTION='Y', ALGORITHM=COPY operation on a table residing in the system tablespace raised an assertion. (Bug #24381804)
  • InnoDB: Creating an encrypted table on a Fusion-io disk with an innodb_flush_method setting of O_DIRECT caused a fatal error. (Bug #24329079, Bug #82073)
  • InnoDB: An operation that dropped and created a full-text search table raised an assertion. (Bug #24315031)
  • InnoDB: Accessing full-text search auxiliary tables while dropping the indexed table raised an assertion. (Bug #24009272)
  • InnoDB: An online DDL operation on a table with indexed BLOB columns raised an assertion during logging of table modifications. (Bug #23760086)
  • InnoDB: In some cases, code that locates a buffer pool chunk corresponding to given pointer returned the wrong chunk.
  • Thanks to Alexey Kopytov for the patch. (Bug #23631471, Bug #79378)
  • Replication: The addition of the transaction-write-set-extraction=XXH64 option uses xxHash symbols from liblz4. Although the xxHash symbols are exported by liblz4, the header file is not part of the API, so compilation failed when building with WITH_LZ4=system. The fix ensures that xxHash is built separately from liblz4 so that it is available both when using the system and bundled LZ4 libraries. (Bug #82426, Bug #24399819)
  • References: See also: Bug #23607230.
  • Replication: mysqlbinlog --read-from-remote-server log1 log2 was opening a new connection for log2 without freeing the connection used for log1. Thanks to Laurynas Biveinis for the contribution. (Bug #81675, Bug #23540182)
  • Replication: The MTR binary log test suite failed to clean up copied files. Thanks to Daniel Black for the contribution. (Bug #80881, Bug #23016254)
  • Replication: With binlog_row_image=FULL, when updating single tables temporary tables were unnecessarily being used. The fix ensures single table update follows the same pattern as multi-table update. (Bug #79867, Bug #22510353)
  • mysqld_safe attempted to read my.cnf in the data directory, although that is no longer a standard option file location. (Bug #24482156)
  • For mysqld_safe, the argument to --malloc-lib now must be one of the directories /usr/lib, /usr/lib64, /usr/lib/i386-linux-gnu, or /usr/lib/x86_64-linux-gnu. In addition, the --mysqld and --mysqld-version options can be used only on the command line and not in an option file. (Bug #24464380)
  • It was possible to write log files ending with .ini or .cnf that later could be parsed as option files. The general query log and slow query log can no longer be written to a file ending with .ini or .cnf. (Bug #24388753)
  • Privilege escalation was possible by exploiting the way REPAIR TABLE used temporary files. (Bug #24388746)
  • The client library failed to build on Solaris using the Cstd library. (Bug #24353920)
  • If the basedir system variable was set at server startup from the command line or option file, the value was not normalized (on Windows, / was not replaced with /). (Bug #23747899, Bug #82125)
  • For accounts for which multiple GRANT statements applied, mysqlpump could fail to dump them all. (Bug #23721446)
  • The MYSQL_ADD_PLUGIN macro had a spelling error that caused MYSQL_SERVER not to be defined. (Bug #23508762, Bug #81666)
  • In-place ALTER TABLE operations which when executed separately caused no table rebuild could when combined into a single statement result in a table rebuild. (Bug #23475211, Bug #81587)
  • For keyring plugins, the data access layer is now created only as necessary, not once per operation, which improves keyring performance. (Bug #23337926)
  • A blank server name in CREATE SERVER statements produced a server exit rather than an error. (Bug #23295288)
  • The optimizer failed to check a function return value for an area calculation, leading to a server exit. (Bug #23280059)
  • The server could fail to free memory allocated for execution of queries that used generated columns. (Bug #23205454)
  • References: This issue is a regression of: Bug #22392268.
  • mysqlpump output for triggers that contained multiple statements in the trigger body failed to load correctly. (Bug #23072245)
  • Queries that satisfied the following conditions could return different results than in MySQL 5.6: 1) A subquery appeared in the select list; 2) The subquery contained a WHERE condition that referenced a value in the outer query; 3) The outer query contained a GROUP BY that required creation of a temporary table. (Bug #23049975)
  • Passwords that were rejected by the validate_password plugin were written by the server to the error log as cleartext. (Bug #22922023)
  • A prepared statement that used a parameter in the select list of a derived table that was part of a join could cause a server exit. (Bug #22392374, Bug #24380263)
  • MEDIUMINT columns used in operations with long integer values could result in buffer overflow. (Bug #19984392)
  • A spurious ER_NO_SUCH_TABLE error could occur when attempting to execute a prepared CREATE TABLE ... SELECT statement that used a temporary table in the FROM clause and called a stored function. The same error could occur for a nonprepared version of the statement if used in a stored procedure when the procedure was re-executed. (Bug #16672723, Bug #68972)
  • EINTR handling in the client library has been fixed so that interrupted read and write calls are retried. Previously, EINTR was ignored. (Bug #82019, Bug #23703570)

New in MySQL 5.7.14 (Oct 13, 2016)

  • SYS SCHEMA NOTES:
  • The sys schema now has a quote_identifier() function that, given a string argument, produces a quoted identifier suitable for inclusion in SQL statements. (Bug #22011361, Bug #78823)
  • Output from the sys schema diagnostics() procedure now includes the Tls_version column from the mysql.slave_master_info system table.
  • FUNCTIONALITY ADDED OR CHANGED:
  • The %global compatver value for RPM packages for RHEL/OEL and Fedora releases was updated from 5.6.25 to 5.6.31. (Bug #23038018)
  • Specifying an empty value for the --port option (for example, --port=, --port="") is now deprecated and results in a warning. An empty value will be an error in MySQL 8.0. (Bug #23023457, Bug #80903)
  • CMake support for compiling with Solaris Studio 12.5 was added. (Bug #82249, Bug #24303829, Bug #81274, Bug #23212938)
  • The INFORMATION_SCHEMA INNODB_LOCKS and INNODB_LOCK_WAITS tables are now deprecated and will be removed in a future MySQL release.
  • BUGS FIXED:
  • Performance: A flaw in the allocation of memory for appending string values caused some operations to be performed slowly, including creation of tables having generated columns and inserts of large values into JSON columns. (Bug #80556, Bug #22843444)
  • InnoDB: Full-text search auxiliary tables could be dropped by one session while being access by another. (Bug #23742339)
  • InnoDB: Selecting full-text index information schema tables for a deleted table caused a segmentation fault. (Bug #23479595)
  • InnoDB: A tablespace operation did not properly update the SYS_VIRTUAL system table. (Bug #23325659)
  • InnoDB: Rollback of a full-text index synchronization operation raised an assertion. The rollback operation attempted to acquire a mutex still held by the background synchronization thread. (Bug #23320569)
  • InnoDB: After compressing a table, an incorrect data length was passed to an internal tablespace encryption function, causing an assertion. (Bug #23279788)
  • InnoDB: An r-tree page lock placed during a search operation prevented an undo operation within the same transaction from merging pages. (Bug #23241575)
  • InnoDB: A bulk load insert of a record with a compressed size greater than half of the compressed page size resulted in infinite B-tree page splitting when compressing the uncompressed page. (Bug #23120933)
  • InnoDB: A lock order violation related to InnoDB full-text search caused errors and raised an assertion. (Bug #23120005)
  • InnoDB: In read-only mode, InnoDB attempted to set a corrupt bit in the SYS_INDEXES system table. In read-only mode, the corruption should only be marked in memory. (Bug #23077748)
  • InnoDB: InnoDB attempted to materialize non-key generated virtual columns that were not required for partitioning. (Bug #23037025)
  • InnoDB: An insert operation on a table containing virtual and spatial indexes raised an assertion due to an invalid parent path encountered during page splitting. (Bug #23008863)
  • InnoDB: An ALTER TABLE operation on a table with an indexed virtual column raised an assertion. (Bug #22965271)
  • InnoDB: Adding or dropping a generated virtual column could raise an assertion due to a table handle held by an active memcached connection. (Bug #22922527)
  • InnoDB: A full-text query that involved a large number of records exceeded the result cache limit and caused a server exit. (Bug #22709692, Bug #80296)
  • InnoDB: InnoDB did not block the creation of a foreign key constraint with referential actions on the base column of a generated stored column. (Bug #22687023, Bug #80304)
  • InnoDB: The optimizer failed to mark the columns required for MATCH function evaluation when the secondary index used for the full-text query was not chosen by the optimizer. (Bug #22679209, Bug #80298)
  • InnoDB: In READ COMMITTED isolation level, InnoDB unnecessarily acquired the lock_sys mutex at COMMIT for a transaction block consisting of read-only SELECT statements.
  • InnoDB: Setting innodb_monitor_enable to all did not enable all counters. (Bug #22576241, Bug #80083)
  • InnoDB: InnoDB now permits defining a foreign key constraint with a cascading referential action on the base column of an indexed virtual column, and defining cascading referential actions on non-virtual foreign key columns that are explicitly included in a virtual index. (Bug #22469130, Bug #79772)
  • InnoDB: An assertion was raised during rollback of an ALTER TABLE operation that dropped and added a secondary index. (Bug #22005726)
  • Partitioning: In some cases, an issue with partition pruning being attempted a second time during optimization after all partitions had already been pruned at parsing time led to an assert. (Bug #23194259)
  • Replication: Replication slaves could exit trying to apply an UPDATE row event containing virtual generated columns received from a master that was set to binlog_row_image=minimal. (Bug #23604483)
  • Replication: When using row-based replication and InnoDB, replication slaves reverted to using an older locking scheme when a transaction had already acquired an AUTOINC lock related to a LOAD FILE or INSERT ... SELECT type of statement, reducing replication slave performance. The fix ensures that sql_command is set correctly for any of the DML events such as WRITE_ROWS_EVENT, UPDATE_EVENT, and DELETE_EVENT. (Bug #79324, Bug #22247668)
  • Replication: When using statement-based or mixed binary logging format with --read-only=ON, it was not possible to modify temporary tables. (Bug #62008, Bug #12818255)
  • References: See also: Bug #14294223, Bug #16561483.
  • MySQL Server upgrades performed using RPM packages failed when upgrading from MySQL 5.6 Community to MySQL 5.7 Community or MySQL 5.6 Commercial to MySQL 5.7 Commercial. (Bug #23736787)
  • On CentOS, mysqld installed from a MySQL Community distribution failed to start if a my.cnf file with no datadir value specified was used. (Bug #23721277, Bug #82049)
  • The -DWITH_EDITLINE=system CMake option failed with recent versions of the editline library. (Bug #23708332)
  • Executing prepared statements with the audit_log plugin installed could cause a server exit. (Bug #23699991)
  • The sys schema ps_trace_statement_digest() procedure failed for statements not supported by EXPLAIN, for statements for which EXPLAIN could not find tables, and for statements with no digest found during the monitored period. (Bug #23621189)
  • A SELECT Performance Schema tables when an internal buffer was full could cause a server exit. (Bug #23550835, Bug #23298025, Bug #81464)
  • The code for reading character set information from Performance Schema statement events tables (for example, events_statements_current) did not prevent simultaneous writing to that information. As a result, the SQL query text character set could be invalid, which could result in a server exit. Now an invalid character set causes SQL_TEXT column truncation. (Bug #23540008)
  • An error message spelling error was corrected. Thanks to Derek Jones for the patch. (Bug #23525874, Bug #81713)
  • In the Performance Schema, allocating a record when a buffer was full could lead to a server exit. (Bug #23515302)
  • A buffer overflow in the regex library was fixed. (Bug #23498283)
  • Upgrading from native MySQL 5.6 Debian/Ubuntu packages to Oracle-supplied MySQL 5.7 packages caused server restart failures. (Bug #23498230)
  • The CMake configuration was too aggressive in making symbols invisible, resulting in link problems with GCC 5.3 on Solaris. (Bug #23344916, Bug #81593)
  • Audit log filtering against the user was performing comparisons against USER(), not CURRENT_USER(). (Bug #23344762)
  • After upgrading only the server using RPM packages, the server could fail to start, complaining about a bad errmsg.sys file. (Bug #23338603)
  • Upgrading from native Ubuntu 5.7.12 packages to MySQL 5.7.13 packages failed with conflict messages. (Bug #23327563)
  • For debug builds, the server exited abnormally if a shutdown command was issued while the audit_log plugin was loaded and an active connection existed. (Bug #23310864)
  • The server could fail to interpret expired passwords as expired. (Bug #23291841)
  • Certain arguments to NAME_CONST() could cause a server exit. (Bug #23279858)
  • For unit-testing with the MySQL test suite, the make unit-test command is no longer available. The ctest program should be used instead. See Unit Tests Added to Main Test Runs. (Bug #23273434)
  • Audit log plugins (including query rewrite plugins, which use the audit API) were being acquired and released per statement, negatively affecting scalability. To improve performance, these plugins now are acquired once and released only when the connection ends. (Bug #23236404, Bug #81298)
  • mysql-test-run.pl now has a --manual-boot-gdb option that is similar to --boot-gdb but attaches the debugger to the server during the bootstrapping process, permitting the use of a remote debugger. (Bug #23090633)
  • The -fexpensive-optimizations option to GCC caused ARM64 and PowerPC builds to compute floating-point operations slightly differently from other platforms. CMake now checks for this problem and disables the option as necessary. (Bug #23046775)
  • The test_service_sql_api.test_session_general_log test case now cleans up the general_log table by truncating it at the end of the test. Thanks to Daniel Black for the patch. (Bug #23021111, Bug #80895)
  • Lines written to the error log had no space separating the timestamp and thread ID columns if the thread ID took five or more characters. (Bug #23005009, Bug #80854)
  • For the innodb_buffer_stats_by_schema and innodb_buffer_stats_by_table sys schema views, the pages_hashed and pages_old columns were incorrect. Thanks to Tsubasa Tanaka for the patch. (Bug #22988461, Bug #80833)
  • An incorrect result could be returned for a query using a merged derived table or a view when compared to a similar query using a base table directly, if the query included a WHERE condition in a scalar subquery inside a HAVING condition of the main query block. (Bug #22967439)
  • ST_GeomFromGeoJSON() treated JSON NULL as invalid input. Now it treats JSON NULL as SQL NULL and thus returns SQL NULL for JSON NULL input. (Bug #22930020, Bug #80712)
  • For the host_summary_by_statement_latency and x$host_summary_by_statement_latency sys schema views, the max_latency column was incorrect. (Bug #22848110, Bug #80569)
  • ST_Distance() could raise an assertion for NULL return values. (Bug #22760390)
  • In the absence of SQL_CALC_FOUND_ROWS, FOUND_ROWS() for a UNION statement always returned the actual number of rows found even when LIMIT was present. (Bug #22602381, Bug #80148)
  • A statement containing a format specifier resulted in a server exit when the query rewrite plugin tried to log the statement. (Bug #22601485)
  • With the query cache enabled, executing a prepared statement with CURSOR_TYPE_READ_ONLY and then again with CURSOR_TYPE_NO_CURSOR caused the server to return an error. (Bug #22559575, Bug #80026)
  • mysql_real_connect() was not thread-safe when invoked with the MYSQL_READ_DEFAULT_FILE or MYSQL_READ_DEFAULT_GROUP option enabled. (Bug #22322504, Bug #79510)
  • With GTIDs enabled, XA COMMIT on a disconnected XA transaction within a multiple-statement transaction raised an assertion. (Bug #22173903)
  • The sys schema create_synonym_db() function failed if the synonym name was a reserved word or contained backtick (`) characters. (Bug #22011361, Bug #78823)
  • The sys schema host_summary view could fail with a division-by-zero error. (Bug #21970078)
  • The GCC workaround for compiling on ARM64 added by Bug #21552524 is needed only for GCC before 5.2.1. (Bug #21845828)
  • The sys schema format_path() function replaced substrings of the path name argument without verifying that the substrings were delimited by path name separators. Replacement now works correctly, including on Windows. A consequence is that backslashes in Windows path names are no longer converted to forward slashes in the result. (Bug #21512106)
  • MySQL now supports compiling using the GCC __atomic builtins introduced in GCC 4.7 that permit a more efficient implementation of the MySQL atomics API. These __atomic builtins are only used for platforms where the old GCC __sync builtins are not available, such as PowerPC where the server otherwise would not build. (Bug #21221500)
  • If a stored function updated a view for which the view table had a trigger defined that updated another table, it could fail and report an error that an existing table did not exist. (Bug #21142859, Bug #76808)
  • mysql_upgrade failed to upgrade the sys schema if a sys database directory existed but was empty. (Bug #81352, Bug #23249846, Bug #22875519)
  • The bundled Protobuf sources (under the extra directory) were upgraded from version 2.6.0 to 2.6.1. (Bug #81280, Bug #23213376)
  • Protobuf is currently used only by the X plugin, but MySQL builds built the protobuf libraries and executables even if X plugin building was disabled with -DWITH_RAPID=0. (Bug #81066, Bug #23097750)
  • On Solaris, a misaligned memory buffer could cause a server exit when selecting from the global_status Performance Schema table. (Bug #81065, Bug #23097305)
  • A compilation error was corrected for a make_link() call when compiling in C++11 mode. Thanks for Daniel Black for the contribution. (Bug #80996, Bug #23080289)
  • Two mysql-test-run.pl tests (ctype_gb18030_binlog and ctype_ldml) failed to produce repeatable output due to improper cleanup. Thanks to Daniel Black for the patch. (Bug #80896, Bug #23021095)
  • MySQL failed to build with GCC 6 using the default mode for C++ of -std=gnu++14. The CMake configuration has been adjusted to explicitly set the mode to -std=gnu++03 for GCC 6. (Bug #80371, Bug #22732697)
  • Ubuntu packages create the root user account using the auth_socket authentication plugin to achieve secure-by-default installation if installation was done with a blank root password. However, auth_socket was being used even if the password was not blank. (Bug #80137, Bug #22594846, Bug #23321113, Bug #81518)
  • Compiling the InnoDB memcached plugin did not work on some platforms where MySQL was configured using -DWITH_LIBEVENT=system. (Bug #80073, Bug #22573379, Bug #23567441)
  • The client-side plugin deinitialization function signature was changed from int (*deinit)() to int (*deinit)(void) to avoid warnings when compiling with -Wstrict-prototypes. (Bug #78177, Bug #21680094, Bug #81419, Bug #23282498)
  • Several issues were addressed in the sys schema stored procedures that show enabled or disabled Performance
  • Schema setup:
  • Enabled and disabled accounts were shown as host@user, not user@host.
  • Disabled users in ps_setup_show_disabled were called enabled_users.
  • ps_setup_show_enabled() showed disabled objects.
  • setup_actors content was not filtered (all rows were returned whether the actor was enabled or disabled).
  • Output order is more deterministic.

New in MySQL 5.7.13 (Oct 13, 2016)

  • ACCOUNT MANAGEMENT NOTES:
  • In MySQL 5.7.8, the maximum length of MySQL user names was increased from 16 to 32 characters, but some applicable contexts for this increase were overlooked. Additional changes in maximum user name length now have been applied.
  • 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 mysql system database. A server from MySQL 5.7.13 or higher for which mysql_upgrade has not been run continues to permit a maximum of 77 characters in the system tables mentioned previously, and an ER_USER_COLUMN_OLD_LENGTH error will occur in those system table contexts where a user_name@host_name value from 78 to 93 characters long is given.
  • AUDIT LOG NOTES:
  • The audit_log plugin that forms the basis for MySQL Enterprise Audit now supports fine-grained filtering of events. This enables a reduction in the number of log entries written to the audit log file, which increases overall performance due to fewer write operations during log recording. It also simplifies subsequent audit log processing in terms of readability and processing time.
  • Fine-grained audit log filtering is rule based, implemented using tables that store filter definitions and a set of user-defined functions (UDFs) that enable filter manipulation. To simplify installing the tables and UDFs along with the audit_log plugin, an installation script is now provided. For more information, see Installing or Uninstalling MySQL Enterprise Audit, and Audit Log Filtering.
  • By default, audit log filtering now logs no auditable events for any users. This differs from the pre-MySQL 5.7.13 legacy audit log, which logs all auditable events for all users. To produce log-everything behavior, see the installation instructions.
  • CONFIGURATION NOTES:
  • On platforms for which systemd support is installed, systemd has the capability of managing multiple MySQL instances. For details, see Configuring Multiple MySQL Instances Using systemd. Consequently, mysqld_multi and mysqld_multi.server are not installed because they are unnecessary. (Bug #81093, Bug #23134620)
  • SECURITY NOTES:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.1t. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #23229564)
  • MySQL Server now includes an SQL interface for keyring key management, implemented as a set of user-defined functions (UDFs) that access the functions provided by the internal keyring service. For more information, see Keyring Key Management Functions. For information about the keyring service functions invoked by the UDFs, see The Keyring Service. For general keyring information, see The MySQL Keyring.
  • FUNCTIONALITY ADDED OR CHANGED:
  • For better separation of output from multiple statements, mysqltest now flushes output sent to stdout when the output destination is not a file. Previously, flushing occurred only for file output. (Bug #21435906)
  • support-files/MacOSX/ReadMe.txt is no longer included in MySQL distributions. (Bug #81038, Bug #23088916)
  • The version of the tcmalloc library included in MySQL distributions was very old. It has been removed and is no longer included with MySQL. (Bug #80994, Bug #23068660)
  • The my_make_scrambled_password() function in the C client library was restricted earlier in MySQL 5.7 (not exported to client programs). The function has once again been made visible to client programs. (Bug #80974, Bug #23061746)
  • It is possible to use ALTER TABLE to change the default value of a column col_name, which may change the value of a generated column expression that refers to the column using DEFAULT(col_name). For this reason, ALTER TABLE operations that change the definition of a column now cause a table rebuild if any generated column expression uses DEFAULT(). (Bug #80299, Bug #22680839)
  • This release adds an unquoting extraction operator ->>, sometimes also referred to as an inline path operator, for use with JSON documents stored in MySQL. The new operator is similar to the -> operator, but performs JSON unquoting of the value as well.
  • The ->> operator can be used in SQL statements wherever JSON_UNQUOTE(JSON_EXTRACT()) would be allowed. This includes (but is not limited to) SELECT lists, WHERE and HAVING clauses, and ORDER BY and GROUP BY clauses.
  • For more information, see Functions That Search JSON Values, and JSON Path Syntax. (Bug #78736, Bug #21980346)
  • BUGS FIXED:
  • InnoDB: A rollback operation run concurrently with an operation involving a generated virtual column caused a server exit. (Bug #23313102)
  • References: This issue is a regression of: Bug #21869656.
  • InnoDB: Potential buffer overflow issues were corrected for the InnoDB memcached plugin. (Bug #23187607)
  • InnoDB: An ALTER TABLE operation that added an AUTO_INCREMENT column on a table with virtual columns raised an assertion. (Bug #23052231)
  • InnoDB: Statements executed in a transaction that was rolled back asynchronously by a higher priority transaction caused a deadlock error and subsequent replication failure. (Bug #23021168, Bug #80898)
  • InnoDB: An ALTER TABLE operation that attempted to add a generated virtual column and a full-text index raised an assertion. (Bug #23014521)
  • InnoDB: The full-text index cache was freed during a background index cache synchronization. (Bug #22996488)
  • InnoDB: A full-text index operation raised an assertion. (Bug #22963169)
  • InnoDB: Memory was allocated to I/O slots unnecessarily, causing an apparent memory leak. (Bug #22956469, Bug #80772)
  • InnoDB: An ALTER TABLE operation raised an assertion when attempting to create a key containing a generated column. (Bug #22951879)
  • InnoDB: A startup failure due to an invalid option resulted in a server exit after a subsequent restart. An error returned by the innobase_start_or_create_for_mysql function was not checked. (Bug #22939581, Bug #80761)
  • InnoDB: An ALTER TABLE ... IMPORT TABLESPACE operation on file-per-table tablespace containing an encrypted table failed when run in a different session than the preceding ALTER TABLE ... DISCARD TABLESPACE operation. (Bug #22918999, Bug #80708)
  • InnoDB: A FLUSH TABLES operation on a table with a discarded tablespace raised an assertion. (Bug #22899690, Bug #80669)
  • InnoDB: A DML operation involving a table with a virtual column raised an assertion. (Bug #22899305)
  • InnoDB: An invalid read at innobase_get_computed_value() raised a Valgrind error. (Bug #22898168, Bug #80667)
  • InnoDB: Online DDL operations like ALTER TABLE ... ADD INDEX were not permitted for tables created with the ENCRYPTION attribute. (Bug #22897921)
  • InnoDB: Starting the server in read-only mode failed when encrypted tables were present. The call to fil_encryption_rotate() was not skipped when the server was started in read-only mode. (Bug #22723797)
  • InnoDB: An R-tree purge operation raised an assertion. (Bug #22698076, Bug #80327)
  • InnoDB: An INSERT operation on a table with a FULLTEXT index and FTS_DOC_ID column failed because the inserted FTS_DOC_ID value exceeded the permitted gap between consecutive FTS_DOC_ID values. To avoid this problem, the permitted gap between the largest used FTS_DOC_ID value and new FTS_DOC_ID value was raised from 10000 to 65535. (Bug #22679185)
  • InnoDB: Validation code for transparent page compression incorrectly permitted innodb_strict_mode=OFF, which allowed the COMPRESSION attribute to be applied to a general tablespace. Page compression is only supported with file-per-table tablespaces. (Bug #22615096, Bug #80182)
  • InnoDB: An memory order issue related to atomic operations caused assertion failures on ARM64 and POWER platforms. (Bug #22608616)
  • InnoDB: DROP TABLESPACE returned an error if the remote general tablespace data file was missing. (Bug #22232892, Bug #79330)
  • InnoDB: An ALTER TABLE operation that changed table row format from COMPACT to COMPRESSED raised an assertion. A function involved in the operation passed incorrect page size information. (Bug #22046353)
  • InnoDB: With innodb_autoinc_lock_mode=0, multiple threads waiting for a table-level lock caused an unexpected deadlock. (Bug #21983865, Bug #78761)
  • InnoDB: A race condition in trx_kill_blocking() raised an assertion. (Bug #21508537)
  • InnoDB: An OPTIMIZE TABLE operation on a table with a full-text index raised an assertion. (Bug #21378944)
  • InnoDB: A buffer pool load operation resulted in a “Cannot allocate 0 bytes” error. (Bug #21371070)
  • InnoDB: A FLUSH TABLES ... FOR EXPORT operation appeared to stall. A loop in the ibuf_contract_in_background function failed to exit. (Bug #21133329, Bug #77011)
  • InnoDB: A full-text query raised an assertion. Under certain circumstances, DDL operations such as ALTER TABLE ... RENAME caused full-text auxiliary tables to be removed on server restart. (Bug #13651665)
  • Replication: With gtid_mode=ON, executing an empty query before setting gtid_next made the latter action fail. It was because only statements that do not change the data can be executed before one can successfully change gtid_next, and an empty query was not considered one of those “safe” statements. This fix allows the setting of gtid_next after an empty query. (Bug #22811150)
  • Replication: Slaves running MySQL 5.7 could not connect to a MySQL 5.5 master due to an error retrieving the server_uuid, which is not part of MySQL 5.5. This was caused by changes in the method of retrieving the server_uuid. (Bug #22748612)
  • References: This issue is a regression of: Bug #21455603.
  • Replication: Setting certain semisynchronous-replication configurations on the master server when semisynchronous replication was not enabled on it might cause the server to exit. This fix prevents the unexpected exits to occur in the situation. (Bug #22602324)
  • Replication: The variable explicit_defaults_ts was not initialized during the construction of a Query_event object. That caused Valgrind warnings for dependency on an uninitialized variable. This fix makes sure the variable is initialized. (Bug #22110916, Bug #78999)
  • References: This issue is a regression of: Bug #18885916, Bug #72794.
  • Replication: In the next_event() function, which is called by a slave's SQL thread to read the next even from the relay log, the SQL thread did not release the relaylog.log_lock it acquired when it ran into an error (for example, due to a closed relay log), causing all other threads waiting to acquire a lock on the relay log to hang. With this fix, the lock is released before the SQL thread leaves the function under the situation. (Bug #21697821)
  • References: See also: Bug #20492319.
  • Replication: A partially failed statement was not correctly consuming an auto-generated or specified GTID when binary logging was disabled. The fix ensures that a partially failed DROP TABLE, a partially failed DROP USER or a partially failed DROP VIEW consume respectively the relevant GTID and save it into @@GLOBAL.GTID_EXECUTED and mysql.gtid_executed table when binary logging is disabled. (Bug #21686749)
  • Replication: An intermittent ASan error was being reported on the rpl.rpl_checksum_cache test. The error reported was related to the binary log sender doing a heap-use-after-free on a given memory address. (Bug #78995, Bug #22109863)
  • Replication: mysqldump has been updated to make it compatible with multi-source replication. Now when replication channels other than the default channel are found, mysqldump --dump-slave outputs a CHANGE MASTER TO statement for each replication channel. (Bug #78467, Bug #21855705)
  • Replication: If a multi-threaded replication slave running with relay_log_recovery=1 stopped unexpectedly, during restart the relay log recovery process could fail. This was due to transaction inconsistencies not being filled, see Handling an Unexpected Halt of a Replication Slave. Prior to this fix, to recover from this situation required manually setting relay_log_recovery=0, starting the slave with START SLAVE UNTIL SQL_AFTER_MTS_GAPS to fix any transaction inconsistencies and then restarting the slave with relay_log_recovery=1. This process has now been automated, enabling relay log recovery of a multi-threaded slave upon restart automatically. (Bug #77496, Bug #21507981)
  • Fedora builds now are configured using -DMYSQL_MAINTAINER_MODE=0 to silence GCC 6 warnings. (Bug #23274249)
  • Allocation of a large number (2^20) of Performance Schema index statistic objects could cause a server exit. (Bug #23188107)
  • If the keyring_okv plugin configuration directory was missing, attempts to rotate the InnoDB master key could cause a server exit. (Bug #23149683)
  • INSERT with ON DUPLICATE KEY UPDATE and REPLACE on a table with a foreign key constraint defined failed with an incorrect “duplicate entry” error rather than a foreign key constraint violation error. (Bug #23135731)
  • References: This issue is a regression of: Bug #78853, Bug #22037930.
  • Contention in Performance Schema mutex instrumentation creation and destruction has been reduced, such that mutexes for which instruments are frequently created and destroyed are maintained in separate pages from those for which instruments are rarely created and destroyed. (Bug #22965826)
  • With certain build options, an uninitialized variable in get_key_scans_params() could produce a compilation error. (Bug #22916059)
  • Adding new tokens to the parser caused query digest values to change. (Bug #22906606)
  • For debug builds, CONCAT_WS() could raise an assertion if there was nothing to append. (Bug #22888420)
  • Fixed Valgrind warnings for failed LEAST() evaluations. (Bug #22883278)
  • INET_NTOA() could cause a server exit when producing an error message. (Bug #22881810)
  • References: This issue is a regression of: Bug #22042027.
  • The my_write() call could cause a server exit if it attempted to check the current connection and the connection had been killed. (Bug #22867809)
  • References: This issue is a regression of: Bug #21688407.
  • Invoking Enterprise Encryption functions in multiple threads simultaneously could cause a server exit. (Bug #22839278)
  • Setting log_syslog_tag to NULL could cause a server exit. (Bug #22834781)
  • References: This issue is a regression of: Bug #22180046.
  • If the expression for an indexed generated column contained an AND or OR operator, the optimizer could choose that index too often and create execution plans that produced incorrect results. (Bug #22810883)
  • CREATE TABLE statements in mysqlpump output could be missing KEY clauses and would not load. (Bug #22726732)
  • Attempting to use Enterprise Encryption functions after creating and dropping them could cause a server exit. (Bug #22669012)
  • Setting sort_buffer_size to a very large value could cause some operations to fail and result in a server exit. (Bug #22594514)
  • For an InnoDB table containing generated columns, using the table in a join could result in a server exit due to improper error checking. (Bug #22561845)
  • REPLACE on a table with an indexed generated column could cause a server exit if the index prefix length was calculated incorrectly. (Bug #22445211)
  • An UPDATE operation affecting a generated virtual BLOB column could cause a server exit. (Bug #22444212)
  • SHOW CREATE TABLE for a table containing a generated column could cause a server exit or produce an Illegal mix of collations error. (Bug #22392268)
  • On a slave server, replication of an UPDATE statement that updated an indexed BLOB virtual generated column of an InnoDB table could cause a server exit. (Bug #22241015)
  • An assertion could be raised when a deadlock occurred due to a SELECT ... GROUP BY ... FOR UPDATE query executed using a Loose Index Scan. (Bug #22187476)
  • mysqlpump could exit due to improper handling of error conditions in a dump thread. (Bug #22017120)
  • Several potential buffer overflow issues were corrected. (Bug #21977380, Bug #23187436, Bug #23202778, Bug #23195370, Bug #23202699)
  • If the CA certificate as given to the --ssl-ca option had an invalid path, yaSSL returned an error message different from OpenSSL. Now both return SSL connection error: SSL_CTX_set_default_verify_paths failed. (Bug #21920657)
  • Installing MySQL from a yum or zypper repository resulted in /var/log/mysqld.log being created with incorrect user and group permissions. (Bug #21879694, Bug #78512)
  • With show_compatibility_56=OFF, SHOW VARIABLES and SHOW STATUS statements having a WHERE clause did not work. (Bug #21783883)
  • The audit_log plugin failed to abort the current operation when told to do so by a plugin handler for a MYSQL_AUDIT_PARSE_PREPARSE event. (Bug #21457956)
  • Memory leaks reported by Valgrind for mysqlpump were fixed. (Bug #21237667)
  • Some string functions returned one or a combination of their parameters as their result. If one of the parameters had a non-ASCII character set, the result string had the same character set, resulting in incorrect behavior when an ASCII string was expected. (Bug #18740222)
  • On Fedora 24, upgrades using a Community MySQL Server RPM failed to replace an installed MariaDB Galera server due to a change in the MariaDB package. (Bug #81390, Bug #23273818)
  • The mysql_read_defaults_options() function was missing a break statement, causing any option value for the --ssl-cipher option also to be applied to the --tls-version option, with unpredictable results. (Bug #81139, Bug #23129821)
  • A DELETE from joined tables using a derived table in the WHERE clause failed if one of the joined tables was used in the derived table. (Bug #81014, Bug #23074801)
  • Compiling of clients that used the MySQL C API could fail if they used an obsolete path to mysql.h or and did not set the include path. This was due to use of #include notation rather than #include "file_name" in internal MySQL header files, which have been adjusted. (Bug #80935, Bug #23047194)
  • MySQL did not compile under Solaris 12 using Sun Studio. To correct this, instances of __attribute__ were changed to MY_ATTRIBUTE. (Bug #80748, Bug #22932576)
  • The service_mysql_keyring.h and services.h header files misspelled mysql_keyring_service_st as mysql_keyring_file_service_st. (Bug #80688, Bug #22908232)
  • The fix for Bug #79194 did not cover the eq_ref access method, with the result that left joins could return incorrect results.
  • Note
  • This bug fix has a very small negative performance effect such that it fails to cache an eq_ref-accessed row that is on the inner side of an outer join. Regular inner joins are not affected.
  • (Bug #80526, Bug #22833364)
  • References: This issue is a regression of: Bug #79194, Bug #22176604.
  • The sanity() macro in strings/decimal.c produced Valgrind warnings due to reading uninitialized buffer contents. (Bug #80461, Bug #22782203, Bug #22839915)
  • Starting the server with --initialize failed if the keyring_file_data system variable was also set at startup. To handle this, with --initialize the server no longer skips registration of plugins loaded with the --early-plugin-load option. (Bug #80451, Bug #22777039)
  • Loading the Rewriter query rewrite plugin when there was no query_rewrite database resulted in Valgrind warnings. (Bug #80333, Bug #22710312)
  • The optimizer transformed EXISTS (SELECT * ...) constructs to EXISTS (SELECT 1 ...) before all columns in the inner subquery had been resolved, which could result in rejection of valid queries that included a HAVING clause without GROUP BY in the subquery. (Bug #80231, Bug #22655856)
  • For a server compiled with -DWITH_PERFSCHEMA_STORAGE_ENGINE=0, a memory leak could occur for buffered log messages used during server startup. (Bug #80089, Bug #22578574)
  • A query could return incorrect results under these conditions: A column with a default value contained NULL; SELECT DISTINCT or a GROUP BY clause was used and the column containing the NULL value was part of the select list; an InnoDB temporary table was used during query processing. (Bug #79591, Bug #22343910)
  • A null pointer dereference of a parser structure could occur during stored procedure name validation. (Bug #79396, Bug #22286421)
  • Database initialization failed during installation using Ubuntu 15.10 packages. (Bug #79377, Bug #22252900)
  • mysql_upgrade failed to widen the User and Proxied_user columns in the mysql.proxies_priv system table from 16 to 32 characters. (Bug #78254, Bug #21762656)
  • Failure of UNINSTALL PLUGIN could lead to inaccurate or confusing errors for subsequent INSTALL PLUGIN operations. (Bug #74977, Bug #20085672)
  • mysqld_multi displayed misleading error messages when it was unable to execute my_print_defaults. (Bug #74636, Bug #19920049)
  • Previously, upgrading the server using an RPM package (including installation using yum) required upgrading the client package to the same MySQL version, which may be undesirable for some installations. This rule has been relaxed so that upgrading to a General Availability (GA) server version requires only that some GA client version be installed, which is less likely to require a client upgrade. (Bug #72230, Bug #18518216)
  • mysqldump failed silently with no error message when it encountered an error while executing FLUSH LOGS. (Bug #71783, Bug #18284273)

New in MySQL 8.0.0.0 DMR (Sep 12, 2016)

  • Account Management Notes:
  • MySQL now supports roles, which are named collections of privileges. Roles can be created and dropped. Roles can have privileges granted to and revoked from them. Roles can be granted to and revoked from user accounts. The active applicable roles for an account can be selected from among those granted to the account, and can be changed during sessions for that account. For more information, see Using Roles
  • The grant tables in the mysql system database are now InnoDB (transactional) tables. Previously, these were MyISAM (nontransactional) tables. This change applies to these tables: user, db, tables_priv, columns_priv, procs_priv, proxies_priv
  • C API Notes:
  • The libmysqlclient shared library major version number is increased from 20 (used in MySQL 5.7) to 21 for MySQL 8.0. (Bug #77600, Bug #21363863)
  • Character Set Support:
  • The utf8mb4 Unicode character set has a new general collation named utf8mb4_0900_ai_ci. utf8mb4 also has several new language-specific collations with characteristics similar to utf8mb4_0900_ai_ci except that language-specific rules take precedence where applicable. The language-specific collations are indicated by ISO 639-1 language codes in the collation name, as shown in the following table. In two cases the language code has an additional item that denotes a variant (German phone book order, Traditional Spanish).
  • utf8mb4_0900_ai_ci also works as an accent insensitive, case insensitive collation for the languages in the following table.
  • utf8mb4_da_0900_ai_ci also works as an accent insensitive, case insensitive collation for the languages in the following table.
  • The nonlanguage-specific utf8mb4_0900_ai_ci and language-specific:utf8mb4_LANG_0900_ai_ci Unicode collations each have these characteristics:
  • The collation is based on Unicode Collation Algorithm (UCA) 9.0.0 (_0900), is accent insensitive (_ai), and case insensitive (_ci).
  • The collation works for all characters in the range [U+0, U+10FFFF].
  • If the collation is not language specific, it sorts all characters, including supplemental characters, in default order (described following). If the collation is language specific, it sorts characters of the language correctly according to language-specific rules, and characters not in the language in default order.
  • By default, the collation sorts characters having a code point listed in the DUCET table (Default Unicode Collation Element Table) according to the weight value assigned in the table. The collation sorts characters not having a code point listed in the DUCET table using their implicit weight value, which is constructed according to the UCA.
  • Compilation Notes:
  • CMake support now permits linking with the GNU gold linker if it is available; specify the -DUSE_LD_GOLD=1 option. (Bug #23759968)
  • For building MySQL on Windows, the toolchain now prefers 64-bit tools when possible (previously 32-bit). This speeds up linking and avoids issues related to limited address space with the 32-bit linker. (Bug #22900585)
  • The WITH_EXTRA_CHARSETS CMake option has been removed. MySQL builds are configured with all character sets by default now. Users who want fewer character sets can edit cmake/character_sets.cmake directly and recompile the server. (Bug #80005, Bug #22552125)
  • MySQL source code now permits and uses C++11 features
  • Characters in contraction sequences are treated as separate characters.
  • Component Notes:
  • MySQL Server now includes a component-based infrastructure for improving server extensibility:
  • A component provides services that are available to the server and other components. (With respect to service use, the server is a component, equal to other components.) Components interact with each other only through the services they provide.
  • The INSTALL COMPONENT and UNINSTALL COMPONENT statements provide an SQL interface for component manipulation at runtime.
  • A loader service registers installed components in the mysql.component system table, and installs registered components during the startup sequence for subsequent server restarts.
  • For general information about the component infrastructure and its SQL-level interface, see Server Components. For information about the internal implementation of components, see http://dev.mysql.com/doc/dev/mysql-server/.
  • Configuration Notes:
  • Incompatible Change; InnoDB: Prior to MySQL 8.0, enabling innodb_read_only did not prevent table creation for storage engines other than InnoDB. As of MySQL 8.0, enabling innodb_read_only prevents table creation for all storage engines. Table creation operations modify data dictionary tables in the mysql system database, but those tables use the InnoDB storage engine and cannot be modified if innodb_read_only is enabled. (Bug #21611899)
  • The hardcoded memory page size of 8KB for the memory-mapped transaction coordinator was too small for platforms such as ARM64 and PowerPC where the page size is much larger. The server now invokes a system call to get the page size of the current platform rather than using a hardcoded value. A consequence for the --log-tc-size option is that the minimum and default values are now 6 times the page size. Also, the value must be a multiple of the page size. Thanks to Alexey Kopytov for the patch. (Bug #23014086, Bug #80818)
  • MySQL now supports a SET PERSIST variant of SET statement syntax for making configuration changes at runtime that also persist across server restarts. Like SET GLOBAL, SET PERSIST is permitted for any global system variable that is dynamic (settable at runtime). The statement changes the runtime variable value, but also writes the variable setting to an option file named mysqld-auto.cnf in the data directory. At startup, the server processes this file after all other option files. For more information, see SET Syntax for Variable Assignment.
  • To make information available showing how each system variable was most recently set, the Performance Schema now includes a variables_info table that lists each system variable, and the source from which it got that value. See Performance Schema variables_info Table.
  • If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change into the Performance Schema.
  • The deprecated mysql_install_db program has been removed from MySQL distributions. Data directory initialization should be performed by invoking mysqld with the --initialize or --initialize-insecure option instead. In addition, the deprecated --bootstrap option for mysqld that was used by mysql_install_db has been removed, and the INSTALL_SCRIPTDIR CMake option that controlled the installation location for mysql_install_db has been removed.
  • Version 1 test suite code previously was located in the mysql-test/lib/v1 directory of MySQL source distributions. This code used mysql_install_db and has been removed. The MYSQL_INSTALL_DB environment variable and a value of 1 for the MTR_VERSION environment variable are no longer supported.
  • Data Dictionary Notes:
  • Incompatible Change: MySQL Server now incorporates a global data dictionary containing information about database objects in transactional tables. In previous MySQL releases, dictionary data was stored in metadata files and nontransactional system tables.
  • InnoDB continues to use its own data dictionary in the MySQL 8.0.0 release.
  • Data Type Notes:
  • Bit functions and operators comprise BIT_COUNT(), BIT_AND(), BIT_OR(), BIT_XOR(), &, |, ^, ~, . Prior to MySQL 8.0, bit functions and operators required BIGINT (64-bit integer) arguments and returned BIGINT values. Non-BIGINT arguments were converted to BIGINT prior to performing the operation and truncation could occur. Now bit functions and operators permit binary string type arguments (BINARY, VARBINARY, and the BLOB types) and return a value of like type, which enables them to take arguments and produce return values larger than 64 bits.
  • Permitting binary arguments to bit functions and operators makes it easier not only to manipulate larger values, but to perform operations on certain types of data, such as UUID and IPv6 values.
  • An implication of this change in behavior is that bit operations on binary arguments might produce a different result in MySQL 8.0 than in 5.7. For more information about the change, including how to prepare in MySQL 5.7 for potential incompatibilities between MySQL 5.7 and 8.0, see Bit Functions and Operators, in MySQL 5.7 Reference Manual.
  • Doxygen Notes:
  • The MySQL source code has been updated to use Doxygen for the internal documentation. The generated content for this milestone is available at http://dev.mysql.com/doc/dev/mysql-server/8.0.0/. This is a work in progress.
  • Optimizer Notes:
  • InnoDB: The storage engine interface now enables the optimizer to provide information about the size of the record buffer to be used for scans that the optimizer estimates will read multiple rows. The buffer size can vary based on the size of the estimate. InnoDB uses this variable-size buffering capability to reduce the overhead of latching and B-tree navigation. Previously, InnoDB used a small, fixed-size buffer.
  • The optimizer now supports table-level hints for specifying whether derived tables or views should be merged into the outer query block rather than materialized using an internal temporary table.
  • MySQL now supports invisible indexes. An invisible index is not used by the optimizer at all, but is otherwise maintained normally. Indexes are visible by default. Invisible indexes make it possible to test the effect of removing an index on query performance, without making a destructive change that must be undone should the index turn out to be required. This feature applies to InnoDB tables, for indexes other than primary keys.
  • To control whether an index is invisible explicitly for a new index, use a VISIBLE or INVISIBLE keyword as part of the index definition for CREATE TABLE, CREATE INDEX, or ALTER TABLE. To alter the invisibility of an existing index, use a VISIBLE or INVISIBLE keyword with the ALTER TABLE ... ALTER INDEX operation. For more information, see Invisible Indexes.
  • The mysql system database now contains a column_stats table designed to store statistics about column values. For more information, see Optimizer Statistics.
  • Packaging Notes:
  • Development milestone releases in previous MySQL series were numbered using a suffix of -mN, to indicate development milestone N. In MySQL 8.0, development releases use the suffix -dmr. For example, this release of MySQL is numbered 8.0.0-dmr. (Bug #80408, Bug #22748154)
  • As a consequence of the use of C++11 features described elsewhere in these release notes, the following packaging changes have been made.
  • Parser Notes:
  • The parser rules for CREATE TABLE were refactored to be context independent and improve maintainability and extendibility.
  • The parser rules for SELECT and UNION were refactored to be more consistent (the same SELECT syntax applies uniformly in each such context) and reduce duplication. Several user-visible effects resulted from this work.
  • Performance Schema Notes:
  • Incompatible Change: The Performance Schema now instruments server errors (and warnings), and exposes statistical information about them through a set of summary tables
  • Previously, the DIGEST and DIGEST_TEXT columns in the Performance Schema events_statements_current table were populated only after statement execution ended. Now, the columns are populated just after parsing and before statement execution begins. This enables monitoring applications to access statement digest information during statement execution. (Bug #23336542)
  • Performance Schema tables now include indexes, which gives the optimizer access to execution plans other than full table scans and makes queries more efficient. Performance Schema table indexes are predefined and cannot be dropped, added, or altered. They are like hash indexes and do not provide row ordering.
  • The size of the ROLE column of the setup_actors Performance Schema table was increased from 16 to 32 characters.
  • Security Notes:
  • The validate_password_check_user_name system variable is now enabled by default rather than disabled. This means that when the validate_password plugin is enabled, by default it now rejects passwords that match the current session user name.
  • The client-side --ssl and --ssl-verify-server-cert options have been removed. Use --ssl-mode=REQUIRED instead of --ssl=1 or --enable-ssl. Use --ssl-mode=DISABLED instead of --ssl=0, --skip-ssl, or --disable-ssl. Use --ssl-mode=VERIFY_IDENTITY instead of --ssl-verify-server-cert options. (The server-side --ssl option remains unchanged.)
  • For the C API, MYSQL_OPT_SSL_ENFORCE and MYSQL_OPT_SSL_VERIFY_SERVER_CERT options for mysql_options() correspond to the client-side --ssl and --ssl-verify-server-cert options and have been removed. Use MYSQL_OPT_SSL_MODE with an option value of SSL_MODE_REQUIRED or SSL_MODE_VERIFY_IDENTITY instead.
  • Spatial Data Support:
  • Spatial functions for import and export of Well-Known Text (WKT) values used MySQL 'GEOMETRYCOLLECTION()' nonstandard syntax rather than OpenGIS 'GEOMETRYCOLLECTION EMPTY' standard syntax. Now both syntaxes are understood for import and the standard syntax is used for export. (Bug #23632147, Bug #81964)
  • The required version of the Boost library for server builds has been raised from 1.59.0 to 1.60.0. (Bug #79380, Bug #22253921)
  • The ST_X() and ST_Y() spatial functions now permit an optional second argument that specifies an X or Y coordinate value, respectively. With two arguments, the function result is the point value from the first argument with the appropriate coordinate modified. In addition, ST_X() and ST_Y() with a single argument now are stricter and produce an ER_UNEXPECTED_GEOMETRY_TYPE error rather than returning NULL if the argument is a valid geometry but not a point. For more information, see Point Property Functions.
  • In MySQL 5.7, several spatial functions available under multiple names were deprecated to move in the direction of making the spatial function namespace more consistent, the goal being that each spatial function name begin with ST_ if it performs an exact operation, or with MBR if it performs an operation based on minimum bounding rectangles. The deprecated functions have now been removed to leave only the corresponding ST_ and MBR functions.
  • Test Suite Notes:
  • mysql-test-run.pl now supports a --do-suite option, which is similar to --do-test but permits specifying entire suites of tests to run. (Bug #24350345)
  • The mysqltest rmdir command fails if the directory to be removed contains any files or directories. To enable recursive removal of a directory as well as its contents, if any, mysqltest now supports a force-rmdir command. (Bug #24316799)
  • Two new test suite options make it easier to debug test cases
  • The ST_SRID() spatial function now permits an optional second argument that specifies a SRID value. With two arguments, the function result is the geometry value from the first argument with its SRID modified according to the second argument. For more information, see General Geometry Property Functions.
  • MySQL now supports spatial reference systems other than SRID 0. (Specifically, georeferenced 2D projections.) Information about supported reference systems is stored in the st_spatial_reference_systems data dictionary table.
  • For test cases in the MySQL test suite, it was previously possible to use symbolic error names for the --error command only for server errors. This is now also possible for client errors.
  • The mysqltest program now has a copy_files_wildcard command that copies all files that match a pattern from a source directory to a destination directory. See mysqltest Commands. (Bug #82111, Bug #23743035)
  • Functionality Added or Changed:
  • Incompatible Change; Partitioning: The generic partitioning handler has been removed from the MySQL server. As part of this change, mysqld no longer supports the --partition and --skip-partition options, and the server can no longer be built using -DWITH_PARTITION_STORAGE_ENGINE. partition is also no longer displayed in the output of SHOW PLUGINS, or shown in the INFORMATION_SCHEMA.PLUGINS table.
  • In order to support partitioning of a given table, the storage engine used for the table must now provide its own (“native”) partitioning handler. InnoDB is the only storage engine supported in MySQL 8.0 which includes a native partitioning handler. An attempt to create partitioned tables in MySQL 8.0 using any other storage engine fails. (The NDB storage engine used by MySQL Cluster also provides its own partitioning handler, but is currently not supported by MySQL 8.0.)
  • Important Change; InnoDB: The following InnoDB file format configuration parameters were deprecated in MySQL 5.7.7 and are now removed:
  • innodb_file_format
  • innodb_file_format_check
  • innodb_file_format_max
  • innodb_large_prefix
  • File format configuration parameters were necessary for creating tables compatible with earlier versions of InnoDB in MySQL 5.1. Now that MySQL 5.1 has reached the end of its product lifecycle, the parameters are no longer required.
  • The FILE_FORMAT column was removed from the INNODB_SYS_TABLES and INNODB_SYS_TABLESPACES Information Schema tables.
  • InnoDB: The innodb_buffer_pool_debug option permits multiple buffer pool instances when the buffer pool is less than 1GB in size, ignoring the 1GB minimum buffer pool size constraint imposed on innodb_buffer_pool_instances. (Bug #24287290)
  • InnoDB: A new dynamic configuration option, innodb_deadlock_detect, can be used to disable deadlock detection. On high concurrency systems, deadlock detection can cause a slowdown when numerous threads wait for the same lock. At times, it may be more efficient to disable deadlock detection and rely on the innodb_lock_wait_timeout setting for transaction rollback when a deadlock occurs. (Bug #23477773)
  • InnoDB: The libinnodb_zipdecompress.a library allows external tools to use the page_zip_decompress_low() function to decompress InnoDB pages. (Bug #21405300, Bug #77664)
  • InnoDB: To address contention that could occur under some workloads, the buffer pool mutex was removed and replaced by several list and hash protecting mutexes. Also, several buffer pool related variables no longer require buffer pool mutex protection.
  • Thanks to Yasufumi Kinoshita and Laurynas Biveinis for the patch. (Bug #20381905, Bug #75534)
  • InnoDB: InnoDB now avoids intermediate commits that would occur every 10000 rows during ALTER TABLE ALGORITHM=COPY operations. The purpose of intermediate commits was to speed up recovery in the case of an aborted ALTER TABLE ALGORITHM=COPY operation. If an ALTER TABLE ALGORITHM=COPY operation is aborted, the new, uncommitted table is now dropped during DDL log recovery before the undo log is rolled back, thereby avoiding time-consuming data rollback for the uncommitted table. Undo logging is now suppressed for ALTER TABLE ALGORITHM=COPY operations unless there is an IGNORE clause or something else that requires rollback capability.
  • If there is full-text index on the table being altered, full-text data is inserted into full-text auxiliary tables as the ALTER TABLE ALGORITHM=COPY operation inserts rows into the new, uncommitted table. Previously, full-text data was only processed on transaction commit. (Bug #17479594)
  • InnoDB: To reduce read-write lock contention that can result from multiple purge threads purging rows from the same table, undo records are now grouped and assigned to different purge threads by table ID.
  • InnoDB: InnoDB code now uses the C++ std::thread library for thread management.
  • InnoDB: BLOB code was refactored to provide an internal C++ interface for operations on compressed and uncompressed BLOB data.
  • InnoDB: The InnoDB memcached plugin now supports multiple get operations (fetching multiple key/value pairs in a single memcached query) and range queries. See InnoDB memcached Multiple get and Range Query Support.
  • InnoDB: The current maximum auto-increment counter value is now written to the redo log each time the value changes, and it is saved to an engine-private system table on each checkpoint. These changes make the current maximum auto-increment counter value persistent across server restarts. Additionally:
  • A server restart no longer cancels the effect of the AUTO_INCREMENT = N table option. If you initialize the auto-increment counter to a specific value, or if you alter the auto-increment counter value to a larger value, the new value is persisted across server restarts.
  • A server restart immediately following a ROLLBACK operation no longer results in the reuse of auto-increment values that were allocated to the rolled-back transaction.
  • If you modify an AUTO_INCREMENT column value to a value larger than the current maximum auto-increment value (in an UPDATE operation, for example), the new value is persisted, and subsequent INSERT operations allocate auto-increment values starting from the new, larger value.
  • InnoDB: The innodb_stats_sample_pages system variable was removed. innodb_stats_sample_pages was deprecated in MySQL 5.6.3 and replaced by innodb_stats_transient_sample_pages.
  • InnoDB: When encountering index tree corruption, InnoDB writes a corruption flag to the redo log, which makes the corruption flag crash-safe. InnoDB also writes in-memory corruption flag data to an engine-private system table on each checkpoint. During recovery, InnoDB reads corruption flags from both locations and merges results before marking in-memory table and index objects as corrupt.
  • InnoDB: The innodb_locks_unsafe_for_binlog system variable was removed. innodb_locks_unsafe_for_binlog was deprecated in MySQL 5.6.3. The READ COMMITTED isolation level provides similar functionality.
  • InnoDB: InnoDB no longer creates .isl files (InnoDB Symbolic Link files) when creating tablespace data files outside of the MySQL data directory. Redo log records are now used to locate remote tablespaces.
  • With this change, moving a remote tablespace while the server is offline by manually modifying an .isl file is no longer supported.
  • InnoDB: InnoDB no longer supports compressed temporary tables. When innodb_strict_mode is enabled (the default), CREATE TEMPORARY TABLE returns an error if ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE is specified. If innodb_strict_mode is disabled, warnings are issued and the temporary table is created using a non-compressed row format.
  • InnoDB: A new INFORMATION_SCHEMA table, INNODB_CACHED_INDEXES, reports the number of index pages cached in the InnoDB buffer pool for each index.
  • InnoDB: The innodb_checksums system variable was removed. innodb_checksums was replaced by innodb_checksum_algorithm in MySQL 5.6.3.
  • InnoDB: InnoDB startup code was refactored.
  • InnoDB: The innodb_flush_method default value is no longer NULL. On Unix-like systems, the default value is fsync. On Windows systems, the default value is unbuffered.
  • On Windows, the innodb_flush_method setting no longer affects the innodb_use_native_aio setting. There are now two possible settings for innodb_flush_method on Windows, unbuffered (unbuffered I/O) and normal (buffered I/O). With this change, you can enable asynchronous I/O with buffered I/O, which is a new combination (innodb_use_native_aio=ON and innodb_flush_method=normal). The async_unbuffered setting was removed.
  • You can now set innodb_flush_method and innodb_change_buffering configuration options using numeric values.
  • InnoDB: The innodb_support_xa system variable, which enables support for two-phase commit in XA transactions, was removed. As of MySQL 5.7.10, InnoDB support for two-phase commit in XA transactions is always enabled.
  • InnoDB: The new INFORMATION_SCHEMA.INNODB_CACHED_INDEXES table reports the number of index pages cached in the InnoDB buffer pool for each index.
  • InnoDB: InnoDB no longer creates an .isl file (InnoDB Symbolic Link files) when creating a file-per-table tablespace data file outside of the MySQL data directory. InnoDB now uses the redo log to locate remote tablespace data files.
  • Offline relocation of a file-per-table tablespace data file created outside of the MySQL data directory by modifying the .isl file is no longer supported.
  • Replication: There are two improvements to how a CHANGE MASTER TO statement is written into the error log
  • Replication: It is now possible to restore a backup of a GTID-based replication server because you can add GTIDs to gtid_purged, regardless of whether gtid_executed is empty or not. This enables you to restore backups from GTID-based replication servers without losing existing GTID information and binary logs. The GTIDs to add are those which existed in gtid_executed at the time of taking the backup. The syntax for SET GTID_PURGED has been extended to enable this ability, for example SET GTID_PURGED ="+gtid_set" adds gtid_set to the existing gtid_purged GTID set.
  • To produce more accurate estimates, the MEMORY storage engine now calculates index statistics (records per key estimates) using floating-point rather than integer arithmetic. (Bug #23024059)
  • A new CMake option, INSTALL_STATIC_LIBRARIES, enables control over whether to install static libraries. The default is ON. If set to OFF, these libraries are not installed: libmysqlclient.a, libmysqld.a, libmysqlservices.a. (Bug #22891432)
  • The internal mysql_prepare_create_table() server function has been refactored for improved code maintainability and clarity. This code revision results in the following minor changes of behavior for CREATE TABLE and ALTER TABLE:
  • Attempts to create a second primary key based on a NULL column now produce an ER_MULTIPLE_PRI_KEY error rather than ER_PRIMARY_CANT_HAVE_NULL.
  • Attempts to create a second primary key based on a generated column now produce an ER_MULTIPLE_PRI_KEY error rather than ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN.
  • Attempts to create a full-text key on a JSON column now produce an ER_JSON_USED_AS_KEY error rather than ER_BAD_FT_COLUMN.
  • Attempts to create a key in a storage engine that does not support keys (for example, EXAMPLE) now produce an ER_TOO_MANY_KEYS error rather than ER_TOO_MANY_KEY_PARTS.
  • Previously, the Performance Schema was not built for libmysqld, the embedded server. This prevented use of the SHOW STATUS and SHOW VARIABLES statements with show_compatibility_56=OFF because, with that setting, those statements take their results from Performance Schema tables. Now for libmysqld, the required Performance Schema tables are built (with no instrumentation collected), so that those SHOW statements can be supported with show_compatibility_56=OFF. (Bug #22809694)
  • Several internal functions used by JSON_CONTAINS(), JSON_SEARCH(), and other MySQL JSON functions created excessive numbers of local copies of keys, values, or both, when performing inspections of JSON objects. Such copying has been eliminated or reduced in many cases. In addition, the lifetimes of temporary objects used by some of these functions have been reduced. These changes should make these and related JSON functions perform more efficiently than previously, and with fewer resources required. (Bug #22602142)
  • If the system lz4 and openssl zlib commands are available, the lz4_decompress and zlib_decompress utilities are unneeded. Two changes enable those utilities not to be built: If the new WITH_LZ4 CMake option is set to system, lz4_decompress is not built or installed. If the WITH_ZLIB CMake option is set to system, zlib_decompress is not built or installed. (Bug #22329851)
  • Source files for the MySQL strings library have been converted from C (.c suffix) to C++ (.cc suffix). This enables stricter compilation checks and use of C++ features in the library code. (Bug #22124719)
  • Source code for the mysys library now uses C++ rather than C to take advantage of stricter compilation checks and permit use of C++ features. (Bug #21881278)
  • A new CMake option, WITH_TSAN, permits enabling ThreadSanitizer for compilers that support it. (Bug #80409, Bug #23171902)
  • This release adds an unquoting extraction operator ->>, sometimes also referred to as an inline path operator, for use with JSON documents stored in MySQL. The new operator is similar to the -> operator, but performs JSON unquoting of the value as well
  • The global list of connections, previously protected by a single mutex, has been partitioned into eight parts, each protected by its own instance of the mutex. The result is a reduction of overhead and improved performance for connection processing. An implication of this change for monitoring purposes is that the Performance Schema now exposes eight different instances each of the LOCK_thd_list mutex, LOCK_thd_remove mutex, and COND_thd_list condition variable.
  • MySQL now provides functions to manipulate UUID values and make them easier to work with:
  • UUID_TO_BIN() and BIN_TO_UUID() convert between UUID values in string and binary formats (represented as hexadecimal characters and VARBINARY(16), respectively). This permits conversion of string UUID values to binary values that take less storage space. UUID values converted to binary can be represented in a way that permits improved indexing efficiency.
  • IS_UUID() returns 1 or 0 to indicate whether its argument is a valid string-format UUID value.
  • The mysql_plugin utility has been removed. Alternatives include loading plugins at server startup using the --plugin-load or --plugin-load-add option, or at runtime using the INSTALL PLUGIN statement.
  • The server now relies on storage engines to clean up temporary tables left from previous server runs. InnoDB does this by discarding the temporary tablespace on restart. MyISAM and other similar storage engines still rely on scanning the temporary directory to detect leftover tables, by looking for files belonging to these engines with a certain name pattern.
  • The deprecated mysql_shutdown() C API function and corresponding COM_SHUTDOWN client/server protocol command have been removed. Instead, use mysql_query() to execute a SHUTDOWN statement.
  • Work was done to clean up the source code base, including: Removal of unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removal of function declarations without definitions.
  • The server no longer performs conversion of pre-MySQL 5.1 database names containing special characters to 5.1 format with the addition of a #mysql50# prefix. Because these conversions are no longer performed, the --fix-db-names and --fix-table-names options for mysqlcheck, the UPGRADE DATA DIRECTORY NAME clause for the ALTER DATABASE statement, and the Com_alter_db_upgrade status variable have been removed.
  • 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.
  • BUGS FIXED:
  • Important Change: The empty string value is now accepted as a key when used with JSON functions such as JSON_EXTRACT(). In such cases, it must be quoted. (Bug #79643, Bug #22366102)
  • MySQL Cluster: Previously, the mysql.ndb_binlog_index table was created even if the server was built without NDB. Now the table is created only if the server is built with NDB. (Bug #22874872)
  • InnoDB: Unnecessary checks were removed from the ut_cpuid() function which is used to fetch information about the CPU. (Bug #24405292)
  • InnoDB: An asynchronous read operation on a deleted tablespace raised an error. (Bug #24388498)
  • InnoDB: dict_col_t accessors were added to the InnoDB code. (Bug #24363566)
  • InnoDB: dict_col functions in the InnoDB code were replaced by accessors. (Bug #24361098)
  • InnoDB: dict_index_t functions in the InnoDB code were replaced by accessors. (Bug #24361023)
  • InnoDB: Unnecessary code that checked for and released reserved adaptive hash index search latches was removed. (Bug #24300175)
  • InnoDB: A system tablespace data file size greater than 4G on a 32-bit operating system could result in an overflow condition. (Bug #23753625)
  • InnoDB: Internal methods for accessing table object data were added to to dict_table_t. (Bug #23748128)
  • InnoDB: An unspecified block size resulted in an empty INFORMATION_SCHEMA.TABLESPACES table on Windows NTFS with a cluster page size greater than or equal to 8K. (Bug #23598872)
  • InnoDB: The restriction that required the first undo tablespace to use space_id 1 was removed to avoid space_id conflicts with existing tablespaces during upgrade. The first undo tablespace can now use a space_id other than 1. space_id values for undo tablespaces are still assigned in a consecutive sequence. (Bug #23517560)
  • InnoDB: Internal accessor functions for iterating the indexes of a table were replaced with accessor methods. Dead code was removed. (Bug #23336108)
  • InnoDB: The mysql.innodb_index_stats and mysql.innodb_table_stats table definitions, which were previously created by an SQL script, are now hard-coded. As a result, the dict_table_schema_check function is longer required and was removed. (Bug #23336079)
  • InnoDB: The ut_snprint function was replaced by the C++11 snprintf function. (Bug #23329353)
  • InnoDB: For consistency, instances of ulint in InnoDB code were replaced with space_id_t and page_no_t data types. (Bug #23297169)
  • InnoDB: Use of boost::atomic in InnoDB code was replaced with std::atomic. (Bug #23280649)
  • InnoDB: MySQL binaries were not built with the NUMA feature. (Bug #23259754)
  • InnoDB: References to UNIV_NONINL and UNIV_MUST_NOT_INLINE were removed. The fut0fut.cc and ut0byte.cc files, which were only necessary when UNIV_NONINL was defined, were also removed. (Bug #23150562)
  • InnoDB: The mutex_own() mapping caused warnings when compiling with Clang or newer GCC compilers. (Bug #23090278)
  • InnoDB: Compilation of InnoDB with Visual Studio 2015 Update 2 returned warnings. (Bug #23056963)
  • InnoDB: Querying Performance Schema for InnoDB memory allocation event data incorrectly reported values of 0. (Bug #23020280)
  • InnoDB: DBUG_OFF compile-time flags were replaced by UNIV_DEBUG flags. To improve error log output, ut_dbg_assertion_failed() now uses sql_print_error() to display the file name, line number, and message in a single line. The thread ID is displayed in a subsequent line. (Bug #22996442, Bug #23028144)
  • InnoDB: SHOW ENGINE INNODB STATUS output displayed negative spin rounds per wait values.
  • Thanks to Laurynas Biveinis for the patch. (Bug #22844987, Bug #79703)
  • InnoDB: The innodb_disable_resize_buffer_pool_debug option was removed. The patch for this change also removed a code variable and simplified the buf_pool_resize() function. (Bug #22755053)
  • InnoDB: After a successful ALTER TABLE ... ALGORITHM=COPY operation, an assertion was raised while building a previous version of a clustered index record. (Bug #22707367)
  • InnoDB: A DML operation that updated a counter in a table with a virtual index raised on assertion in row_parse_int(). (Bug #22650195)
  • InnoDB: The InnoDB memcached plugin would not load when compiled with libevent 2.0. (Bug #22646919)
  • InnoDB: Unused calculations for integer-based rec_per_key values were removed from InnoDB. Integer-based rec_per_key information was replaced by floating point index statistics in an earlier release. (Bug #22625348)
  • InnoDB: On slow shutdown, purge thread shutdown was initiated before the background rollback thread exited, resulting in an assertion failure. (Bug #22561332)
  • InnoDB: Blocks were lost in row_vers_old_has_index_entry() due to unfreed heaps. (Bug #22543834, Bug #79973)
  • InnoDB: A transportable tablespace debug test raised an assertion that was due to a race condition. (Bug #22453668)
  • InnoDB: The server failed to start due to missing undo tablespaces. (Bug #22452992)
  • InnoDB: InnoDB recovery asserted while attempting to close an undo tablespace due to buffered undo tablespace changes introduced by the recovery process. (Bug #22361764)
  • InnoDB: Reallocation of memcached-referenced memory raised an assertion. (Bug #22304250, Bug #79500)
  • InnoDB: Building InnoDB with C++11 returned “register” deprecation warnings. Handling of “register” deprecation warnings remained in the code after the deprecated “register” keyword was removed. Also, an unused declaration of yyset_extra() was removed. (Bug #22292704)
  • InnoDB: SHOW CREATE TABLE output for partitioned tables did not accurately display tablespace assignment information for table partitions. (Bug #22245554)
  • InnoDB: An ALTER TABLE...TRUNCATE PARTITION operation ignored the table's KEY_BLOCK_SIZE attribute and used the default value instead, which is half of the innodb_page_size value. (Bug #22186558, Bug #79223)
  • InnoDB: Memory leaks in innochecksum were corrected. (Bug #22179518)
  • InnoDB: A SPACE_ID column was added to the INNODB_CACHED_INDEXES table. The INDEX_ID value is no longer a global unique identifier. (Bug #22172026)
  • InnoDB: Creating a table with a full-text index and a foreign key constraint failed when foreign_key_checks was disabled. (Bug #22094601, Bug #78955)
  • References: This issue is a regression of: Bug #16845421.
  • InnoDB: The ha_innobase::m_primary_key field was removed. It was redundant. A boolean predicate, TABLE_SHARE::is_missing_primary_key(), was added. (Bug #21928734, Bug #78662)
  • InnoDB: A buffer pool load operation that attempted to load an uninitialized page caused a Valgrind failure. (Bug #21747906)
  • InnoDB: Unused functions introduced by the InnoDB memcached plugin were removed. (Bug #21625760)
  • InnoDB: An internal global variable used by the innodb_buffer_pool_size configuration option was removed. (Bug #21512749)
  • InnoDB: An InnoDB page cleaner thread asserted during a buffer pool resize operation. (Bug #21473497)
  • InnoDB: Log buffer contention was reduced with the addition of a second buffer, allowing for concurrent log buffer writing and flushing. A new mutex was added to protect log buffer flushing.
  • Thanks to Zhai Weixiang for the patch. (Bug #21352937, Bug #77094)
  • InnoDB: Unused InnoDB and libsql functions and variables were removed, and global symbols were converted to static keywords, where possible. (Bug #21153166, Bug #21141390, Bug #77146, Bug #21178589)
  • InnoDB: The SysTablespace::parse_units() function now returns the number of pages in a file instead of the number of megabytes. The SysTablespace::normalize_size() function was removed. Error messages in SysTablespace::parse_params() were revised. (Bug #21040199, Bug #76949)
  • InnoDB: For persistent tables, the internal unique identifier for InnoDB indexes (index_id) now includes a tablespace identifier (space_id,index_id). This change makes index identifiers unique at the tablespace level as well as the InnoDB instance level, and supports future work related to index identifier allocation. (Bug #20737524, Bug #76392)
  • InnoDB: Code related to innochecksum was cleaned up and reorganized. Checksum functionality is now located in buf0checksum.cc. (Bug #20518099)
  • InnoDB: __attribute__((nonnull)) was removed from InnoDB code. The attribute is no longer permitted by InnoDB coding guidelines. (Bug #20468234)
  • InnoDB: A new struct was added to provide a logical interface for handling and manipulating external BLOB field references. (Bug #18195972)
  • InnoDB: TRUNCATE TABLE is now mapped to DROP TABLE and CREATE TABLE.
  • InnoDB: InnoDB wasted most pages in extents used for fragment pages. (Bug #16204823, Bug #67963)
  • Partitioning: In some cases, an issue with partition pruning being attempted a second time during optimization after all partitions had already been pruned at parsing time led to an assert. (Bug #23194259)
  • Replication: In Slave_worker::write_info(), DBUG_ENTER() had “Master_info::write_info” as its argument instead of “Slave_worker::write_info”. This fix corrects the argument. Thanks to Stewart Smith for the patch. (Bug #21658067, Bug #78133)
  • Replication: When using START SLAVE UNTIL position statements with a multi-threaded slave the only UNTIL clause available was SQL_BEFORE_GTIDS. Now multi-threaded slaves are compatible with the START SLAVE UNTIL MASTER_LOG_FILE = 'log_name', MASTER_LOG_POS = log_position and START SLAVE UNTIL RELAY_LOG_FILE = 'log_name', RELAY_LOG_POS = log_position statements. (Bug #75843, Bug #20513547)
  • The client library failed to build on Solaris using the Cstd library. (Bug #24353920)
  • MySQL now uses readdir() rather than readdir_r(). The latter has been deprecated since glibc 2.24 and causes debug builds of MySQL to fail. (Bug #23708395)
  • For segmentation faults on FreeBSD, the server did not generate a stack trace. (Bug #23575445, Bug #81827)
  • CHECKSUM TABLE calculated the checksums for JSON values using the memory addresses of the values rather than the values themselves, which made the checksum vary. Now in such cases the calculation is based on the actual JSON value, and not on that value's address. (Bug #23535703)
  • libevent was built on OS X even when not needed. (Bug #23228287)
  • A function that returns a JSON value could cause a server exit if called as part of a CASE statement in a stored procedure. (Bug #23212765)
  • Passing NULL to a stored procedure expecting a JSON parameter led to an assertion failure in debug builds. (Bug #23209914)
  • Previously, different values were reported by SHOW ENGINE PERFORMANCE_SCHEMA STATUS and SELECT * FROM performance_schema.memory_summary_global_by_event_name for total memory used in the Performance Schema. The memory for scalable buffer pages, instrumented as memory/performance_schema/scalable_buffer, was missing from the SHOW ENGINE STATUS output. That statement now includes the missing memory, displayed as (pfs_buffer_scalable_container).memory. (Bug #23104498)
  • The -fexpensive-optimizations option to GCC caused ARM64 and PowerPC builds to compute floating-point operations slightly differently from other platforms. This option was enabled by -O2 and higher optimization levels. The option now is disabled on platforms negatively affected by it. (Bug #23046775)
  • After a failed administrative operation such as ALTER TABLE ... OPTIMIZE PARTITION, selecting from the Performance Schema in lock-tables mode could hang. (Bug #23044286)
  • In builds with AddressSanitizer enabled, CAST(... AS BINARY) could cause a server exit. (Bug #22900560)
  • Some spatial functions were reported using a different spatial function name in error messages. (Bug #22883056, Bug #80627)
  • Fixed Valgrind warnings with Clang in optimized mode for the my_strtod_int() function. (Bug #22839888)
  • Precision math operations on values with 64 decimals could produce a 0 result. (Bug #22828692)
  • Geometry import functions that took an SRID parameter cast it to an unsigned 32-bit integer without warning or error, so negative values or values larger than unsigned 32-bit integer range were silently converted to a number within the range. Now, all geometry functions that take the SRID as a parameter check that it is within unsigned 32-bit integer range and produce an ER_DATA_OUT_OF_RANGE error if not. This also applies to GeoJSON and GeoHash functions that previously checked that the parameter was within range but returned a different error code. (Bug #22819614)
  • Parsing of JSON path arguments failed to distinguish between a NULL path and one that was syntactically invalid.
  • This has been changed so that parsing of these paths now clearly distinguishes between valid non-NULL paths, NULL paths, and invalid paths. (Bug #22816576)
  • ST_GeomFromGeoJSON() could return an error with valid arguments. (Bug #22804853)
  • For debug builds, an assertion could be raised when the server created a temporary table to hold JSON objects. (Bug #22782948)
  • For debug builds with STRICT_TRANS_TABLES SQL mode enabled, an assertion could be raised by INSERT or REPLACE statements that had made changes that could not be rolled back and that subsequently generated an ER_NO_DEFAULT_FOR_FIELD error. (Bug #22635253)
  • The optimizer contained a memcpy() call that did not check for overlapping source and destination. (Bug #22537196)
  • For debug builds, a missing error check on the result of a subquery that accessed a JSON value could raise an assertion. (Bug #22522073)
  • Preparing a CREATE TABLE ... SELECT statement, then flushing tables (thus closing the table) and executing the prepared statement could cause a server exit. (Bug #22393309)
  • A prepared statement that used a parameter in the select list of a derived table that was part of a join could cause a server exit. (Bug #22392374, Bug #24380263)
  • Re-evaluation of a generated column expression could cause access to previously freed memory and a server exit. (Bug #22346120)
  • HANDLER read statements that searched an index when the target index value was not stored into the row buffer successfully could cause a server exit. (Bug #22321965)
  • Improper handling of numeric-to-ZEROFILL conversion for NULL values could lead to a server exit. (Bug #22281205)
  • Using a subquery containing a row constructor to set a variable in a SET statement could cause a server exit. (Bug #22276843)
  • If the SQL mode did not include ALLOW_INVALID_DATES, a query that contained invalid_date IN (subquery) and was handled by subquery materialization could cause a server exit. (Bug #22262843)
  • For the embedded server, the code following the check for invalid arguments was invoked with missing or incorrect arguments, which could lead to an improper exit. (Bug #22262706)
  • Queries that executed a JSON function that raised an error could cause a server exit. (Bug #22253965)
  • On OS X, vio_io_wait() used select(), limiting the number of file descriptors to 1024. Now kqueue event notification is used instead to avoid this limit. FreeBSD was changed to use kqueue as well. (Bug #22244911)
  • On Windows, setting the global log_syslog system variable in multiple threads could cause a server exit. (Bug #22180046)
  • Memory leaks could result if stored routine loading involved temporarily changing the default database and errors occurred restoring the original default database. (Bug #22179795)
  • CMake configuration was adjusted to check for -Wxxx compiler options instead of -Wno-xxx because the latter produce false positives for GCC. (Bug #21881753)
  • Views could evaluate user-defined or SQL functions before evaluating restrictions from the view definition. (Bug #20933307)
  • The return value from an fread() call was not checked. (Bug #20671150)
  • With -DENABLE_DTRACE=ON, CMake did not check whether a working DTrace installation was present. Now it checks and aborts if DTrace cannot be found. (Bug #20671056)
  • If given a relative path name for the --log-error option, mysqld could sent stdout and stderr to the wrong location. (Bug #20609063)
  • Evaluation of LEAST() and GREATEST() could use too small a sort buffer for datetime and string literals, causing an assertion to be raised. (Bug #20565160)
  • The range of error numbers for errors that are new in MySQL 8.0 has been designated to begin with 3500. (Bug #20538173)
  • Debian packaging was updated not to set the sql_mode system variable in my.cnf. (Bug #20535729)
  • Statements such as INSERT and LOAD DATA that use the REPLACE or IGNORE keyword to handle duplicate records could affect subsequent operations. (Bug #20017428)
  • CREATE TABLE ... SELECT where non-BIT data was selected from the source table into a BIT column in the destination table could cause a server exit. (Bug #19930894)
  • Compilation failed on OS X when MySQL was configured with -DMYSQL_MAINTAINER_MODE=1 and compiled with clang/Xcode 6.0. (Bug #19694515, Bug #74100)
  • For CHANGE MASTER TO statements rewritten to filter the password before being written to the general query log, any MASTER_AUTO_POSITION clause was lost. (Bug #19622609)
  • Use of the VALUES() function in a SELECT clause could result in a server exit. (Bug #19601973)
  • A potential null-pointer dereference and memory leak in table-rename code were corrected. (Bug #18194270)
  • Using MATCH ... AGAINST to compare a character column and an aggregate function could cause a server exit. (Bug #17865492)
  • Slightly different values for the number of connections could be reported in various information sources, such as the Connections status variable, Performance Schema threads and global_status tables, and SHOW PROCESSLIST statement. (Bug #17666696)
  • A query with a subquery containing a set operation with an outer reference might cause a server exit. (Bug #17270896)
  • Using GRANT to change a password for an invalid user produced an error, but also updated the mysql.user system table. (Bug #17180985)
  • The parser for spatial WKT data accepted numbers such as 0.23 but not .23, the equivalent value without the leading zero. Now both formats are accepted. (Bug #17167633)
  • For abnormal server exit on Windows, the server previously created a minidump file named module_name.dmp, where module_name is the name of the server executable file. To prevent earlier minidump files from being overwritten, minidump file names now include the process ID and have the form module_name..piddmp; for example, mysqld.exe.7296.dmp. (Bug #12779463)
  • For queries on INFORMATION_SCHEMA tables, comparisons of schema and table names could be case sensitive or insensitive, depending on the characteristics of the underlying file system and the lower_case_table_names system variable value. Furthermore, it was ineffective to provide a COLLATE clause to change the comparison properties because that clause was ignored. This has been changed so that COLLATE is no longer ignored and can be used to obtain the desired comparison properties. (Bug #11748044, Bug #34921)
  • FLOOR(CEIL()) truncated large BIGINT UNSIGNED arguments. (Bug #80873, Bug #23013359)
  • Manipulation of a value returned by the JSON_MERGE() function using JSON_SET() sometimes produced an invalid result. (Bug #80787, Bug #22961128)
  • ST_AsGeoJSON() failed when geometry arguments were supplied using user-defined variables. (Bug #80697, Bug #22912800)
  • CAST(expr AS BINARY(N) ) unexpectedly returned NULL for some valid values of N. (Bug #80630, Bug #22885819)
  • If rounding occurred while storing a predicate value, the range optimizer might not return correct results for the < and

New in MySQL 5.7.12 (Apr 12, 2016)

  • CONFIGURATION NOTES:
  • Incompatible Change: To load a keyring plugin, the --early-plugin-load option is used. Previously, the default --early-plugin-load option value was the name of the keyring_file plugin library file. Now the default value is empty.
  • Important:
  • InnoDB tablespace encryption requires the keyring_file plugin to be loaded prior to InnoDB initialization, so this change of default --early-plugin-load value introduces an incompatibility for upgrades from 5.7.11 to 5.7.12 or higher. Administrators who have encrypted InnoDB tablespaces must take explicit action to ensure continued loading of the keyring_file plugin: Start the server with an --early-plugin-load option that names the plugin library file. For example, on platforms where the plugin library file suffix is .so, use these lines in the server my.cnf file
  • On other platforms, adjust the file name suffix as necessary. For more information, see The MySQL Keyring.
  • SECURITY NOTES:
  • InnoDB: The InnoDB tablespace encryption feature, which provides at-rest data encryption for InnoDB tables, now supports Oracle Key Vault for encryption key management. Oracle Key Vault support relies on the keyring_okv plugin which is available in MySQL Enterprise Edition. A secure and robust encryption key management solution such as OKV is critical for security and for compliance with various security standards. For more information, see InnoDB Tablespace Encryption.
  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.1s. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #22685885, Bug #22923458)
  • MySQL Enterprise Edition now includes a keyring_okv plugin that uses Oracle Key Vault for keyring backend storage. For more information, see The MySQL Keyring.
  • FUNCTIONALITY ADDED OR CHANGED:
  • For queries with many OR conditions, the optimizer now is more memory-efficient and less likely to exceed the memory limit imposed by the range_optimizer_max_mem_size system variable. In addition, the default value for that variable has been raised from 1536000 to 8388608.
  • BUGS FIXED:
  • InnoDB; Partitioning: INSERT and SELECT statements against a partitioned InnoDB table having generated columns were not always handled correctly. (Bug #22444530)
  • References: See also Bug #21776494, Bug #21824564, Bug #21864838.
  • InnoDB: An error was returned on startup when a replication slave attempted to access an encrypted table. The server UUID used to compose the master key name was not persisted to the tablespace data file, resulting in the use of an incorrect master key. (Bug #22912582)
  • InnoDB: In debug builds, an unnecessary buf_block_align() call could cause a latching order violation. A DML operation resulted in a page mismatch assertion due to the same buf_block_align() call. (Bug #22709463, Bug #21321238)
  • InnoDB: An ALTER TABLE ... ADD COLUMN operation on a table with virtual columns raised an assertion. (Bug #22650296)
  • InnoDB: An unnecessary comparison in tablespace encryption code caused compiler warnings. (Bug #22645816)
  • InnoDB: INNODB_SYS_TABLESPACES could report incorrect ALLOCATED_SIZE and FILE_SIZE values for a general tablespace created outside of the data directory. The i_s_dict_fill_sys_tablespaces() function generated an incorrect remote file path. (Bug #22590095, Bug #80070)
  • InnoDB: In debug builds, an update operation on a table with virtual columns raised an assertion. (Bug #22572997)
  • InnoDB: Modifications were made to InnoDB code to handle warnings when compiling with Microsoft Visual Studio 2015. (Bug #22542547, Bug #79964)
  • InnoDB: Running REPLACE operations on multiple connections resulted in a hang. (Bug #22530768, Bug #79185)
  • InnoDB: Tabespace encryption-related operations resulted in a hang on FreeBSD. (Bug #22520464, Bug #79901)
  • InnoDB: MySQL stalled when syncing the InnoDB full-text index cache. (Bug #22516559, Bug #16510576, Bug #73816)
  • InnoDB: A CREATE TABLE ... DATA DIRECTORY operation failed to create a table while innodb_flush_method was set to O_DIRECT. (Bug #22180006, Bug #79200)
  • References: This bug is a regression of Bug #21113036.
  • InnoDB: In debug builds, a buffer pool resizing operation resulted in a segmentation violation. The buf_pool_resizing variable was not protected. (Bug #22179317)
  • InnoDB: The innodb_open_files setting could exceed the open files limit. (Bug #22111472)
  • InnoDB: InnoDB attempted crc32 checksum validation instead of innodb after a crc32 checksum validation failure, causing repeated crc32 checksum validation attempts. Checksum validation order is now optimized dynamically.
  • Thanks to Daniel Black for the patch. (Bug #79725, Bug #22452597)
  • Replication: The recovery channel must be set using the CHANGE MASTER command, and the plugin will not set default values for the user or password fields in CHANGE MASTER. The server side recovery channel is restricted to MASTER_USER and MASTER_PASSWORD, whereas all other settings for the change master are added on the plugin side, as done previously. Attempting to use other values will emit ER_SLAVE_CHANNEL_OPERATION_NOT_ALLOWED errors. The password value used on CHANGE MASTER commands for the recovery channel is not logged as plain text in any log or history files. Also, at the end of recovery, the plugin no longer resets info objects, but does continue to purge the logs. (Bug #22815932)
  • Replication: When a binlog-less slave connected to a GR master, it failed with "Error running query" in the error log. But, there was no information available in "SHOW SLAVE STATUS" or P_S.replication_applier_status_by_worker. (Bug #22699395)
  • Replication: Setting the relay log recovery to 1 could generate an error during recovery. Once the relay log recovery happened, repositories were not initiated and the server reported an error related to this. Also, attempting to execute "START GROUP_REPLICATION" in this situation could cause a crash. To fix this, the recovery procedure will no longer take the group_replication_channel into consideration. It now skips the relay logs of the GR channel to proceed further. (Bug #22523554)
  • Replication: Issuing STOP SLAVE caused a spurious Error reading packet from server: Lost connection to MySQL server during query message to be written to the error log. With this fix, when connection to the master is lost, the abort_slave flag is checked and the error message is printed only if the flag is not set. (Bug #22305605, Bug #79504)
  • References: See also Bug #12977988, Bug #22290309.
  • Replication: When binlog was disabled, the GTID specified by GTID_NEXT when committing an empty transaction caused by a 'BEGIN' command was being saved into GLOBAL@gtid_executed when it should not have been. However, when binlog was enabled, the same situation did not save it.
  • Now, when "@@SESSION.GTID_NEXT == 'UUID:NUMBER'", the 'BEGIN' command causes an 'ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET' error inside an empty or non-empty transaction regardless of the binlog setting, since it causes an implicit commit like other DDLs. In this case, the GTID specified by GTID_NEXT is not saved into GLOBAL@gtid_executed. (Bug #22130929)
  • Replication: When replication was configured but not started on a slave, the variable currently_executing_gtid was not properly initialized, but it would be used if the performance_schema table replication_applier_status_by_worker was queried, causing assertion failures and pointer issues. With this fix, the variable is now properly initialized at the construction of the Relay_log_info object. (Bug #21953132, Bug #78722)
  • Replication: RESET SLAVE ALL could delete a channel even when master_pos_wait and wait_until_sql_thread_after_gtid were still waiting for binlog to be applied. This could cause a MySQL server exit when the functions tried to access the channel that was deleted. Now, a channel reference counter was added that is increased if the channel should not be deleted when the functions are running. RESET SLAVE ALL will wait for no reference, and then it will delete the channel. (Bug #21842399, Bug #78445)
  • Replication: When relay_log_recovery=1, a slave server, at its initialization, still tried to scan the relay log files in order to update Retrieved_Gtid_Set and the transaction parser state, which was an unnecessary waste of resources because the slave I/O thread would just be initialized to the SQL thread position in the new relay log file. With this fix, the slave server skips scanning the relay log files when relay_log_recovery=1. (Bug #21798355, Bug #78352)
  • Replication: In Slave_worker::write_info(), DBUG_ENTER() had “Master_info::write_info” as its argument instead of “Slave_worker::write_info”. This fix corrects the argument. Thanks to Stewart Smith for the patch. (Bug #21658067, Bug #78133)
  • Replication: XA transactions were not handled correctly when --gtid-mode=ON and the binary log was disabled. It was because on both master and slave servers, the GTID state was sometimes not saved and the GTID ownership was sometimes not cleaned up. This fix makes sure those steps are now properly performed. (Bug #21618727)
  • References: See also Bug #22165138, Bug #77740, Bug #21452916.
  • Replication: When a multi-threaded slave stopped with an error, the same error message was printed three times. Now, the SQL thread's kill acceptance status is saved, and only printed once. (Bug #21198611, Bug #77237)
  • Replication: When using a multi-threaded slave with relay_log_info_repository set to TABLE, the slave applier thread failed to write XA transactions to the worker configuration. (Bug #20988291)
  • Replication: mysqlbinlog --verbose displayed BINARY and VARBINARY data as ordinary strings, causing any single quote (“'”) or backslash (“\”) among the data to be printed as such, which was confusing to the users and, in the case of a backslash, caused the next character to be skipped. This fix makes mysqlbinlog print the characters' hexadecimal values (“\x27” for single quote and “\x5c” for backslash) instead. (Bug #20836250)
  • Replication: The test case main.merge failed when the variables binlog_format was set to “ROW,” as the server tried to get information for table creation for a child table before it was opened. With this fix, the server skips getting information for the table in the situation. (Bug #20574550)
  • Replication: If a query on a master generated an error and partial results were written to the binary log, for example due to a DROP TABLE IF EXISTS statement applying to multiple tables that would break foreign key constraints, when a slave configured with replication filters encountered the query it could be incorrectly binary logged. This caused errors such as:
  • Last_SQL_Error: Query caused different errors on master and slave. Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217 ; Error on slave: actual message='no error', error code=0. Default database: 'db1'. Query: 'DROP TABLE IF EXISTS `table1` /* generated by server */'
  • There were two fixes required for this bug.
  • If a DROP TABLE statement used to drop a single table fails, to avoid partial results causing this bug the query is not written to the binary log. If a DROP TABLE statement used to drop a list of tables fails, any partial results it generates are written to the binary log with an error.
  • When a query that generates an error as expected was received by a slave but it was skipped due to replication filters, the slave was incorrectly checking the error. The fix for Bug #76493 ensures that this comparison of the expected error from the master with the actual error from the slave does not happen.
  • (Bug #77684, Bug #21435502)
  • References: See also Bug #20797764.
  • RTRIM() on large strings could be very slow. (Bug #22884187)
  • References: This bug was introduced by Bug #18315770, Bug #12368495.
  • Integer overflow could occur during client handshake processing, leading to a server exit. (Bug #22722946)
  • Missing initializers in the query plan constructor resulted in Valgrind warnings. (Bug #22573117)
  • The obsolete support-files/MySQL-shared-compat.spec.sh file was removed from distributions. (Bug #22525609)
  • mysqlpump failed (syntax error) when a view name contained a space character. View names are now quoted. (Bug #22505474)
  • UNHEX() with an invalid argument could result in garbage characters in the warning message. (Bug #22358933)
  • Improper host name checking in X509 certificates could permit man-in-the-middle attacks. (Bug #22295186, Bug #22738607)
  • For debug builds, when an indexed nonnullable generated column with an empty string generated expression was updated during an insert for a duplicated key, there was an optimization that resulted in the server failing to find the duplicated index, causing an assertion to be raised. (Bug #22195364)
  • A boolean mode full-text search caused a segmentation fault. (Bug #22176795)
  • Queries on generated columns that used WITH ROLLUP could raise an assertion. (Bug #22131343)
  • For a prepared statement that used a derived table, an assertion could be raised at execute time when checking statement privileges. (Bug #22108567)
  • Concurrent selecting and flushing of a FEDERATED table while killing connections accessing it could result in a server exit. (Bug #21918190)
  • For debug builds, when a query using join buffering and one of the tables inserted into the join buffer was accessed using a dynamic range scan on an index containing a virtual column, a Valgrind error occurred when writing columns to the join buffer. (Bug #21872184)
  • After iterations of uninstalling and installing the audit_log plugin, the server could hang. (Bug #21796658)
  • With a LOCK TABLES statement in effect, access to Performance Schema tables could fail, as could SHOW STATUS with show_compatibility_56=OFF. (Bug #21789221)
  • Executing GRANT PROXY statements after altering the definition of the mysql.user system table could result in a server exit. (Bug #21699037)
  • Certain error messages included part of the SQL statement that produced them, possibly exposing data. (Bug #21682356)
  • The Performance Schema assumed that tables named using a #sql prefix were temporary and could be ignored. But it is possible to create nontemporary tables using that prefix. The Performance Schema now uses table attributes other than the name to identify temporary tables. (Bug #21105475, Bug #22532368, Bug #79934)
  • Account filtering performed by the audit_log plugin incorrectly used the account named by the USER() function rather than the CURRENT_USER() function (the latter being the account used for authentication). (Bug #19509471)
  • NAME_CONST() can return null if incorrect arguments are given. In some cases, this was not handled and could cause a server exit. (Bug #19143243)
  • Character set conversion operations on NULL parameters to prepared statements could cause a server exit. (Bug #18823979)
  • Loose Index Scan was not chosen for queries that had an equality condition. (Bug #18109609)
  • Long or complex SQL statements could cause the parser to run out of memory. The new parser_max_mem_size system variable now enables control over the maximum amount of memory available to the parser. The default value places no limit on memory available, but the value can be reduced to protect against out-of-memory situations. (Bug #14744160)
  • A Valgrind warning for memory_free_noop() was silenced. (Bug #80457, Bug #22782197)
  • The MySQL server failed to start if built with the -m32 option on Solaris/Sparc, due to improper static data alignment in init_delegates(). (Bug #80445, Bug #22763880)
  • The plugin_keyring.h header file misspelled st_mysql_keyring as st_mysql_keyring_file. (Bug #80414, Bug #22748867)
  • For shared-memory connections on Windows, the client library opened a handle on a mutex but did not close it. Subsequent attempts to restart the server on the other end of the connection failed if the client still had the mutex handle open. (Bug #80234, Bug #22646779)
  • mysqld attempted to initialize plugins specified using the --early-plugin-load option when the --help option was specified. (Bug #80077, Bug #22573767)
  • ALTER USER IDENTIFIED WITH ... expired the account password, even if the authentication plugin did not support password expiration. (Bug #79999, Bug #22551523)
  • Some Performance Schema global instruments, if not enabled at server startup, could be in a state where it was not possible to enable them at runtime. This restriction has been lifted. Affected instruments include mutex, rwlock, cond, and socket instances.
  • Thanks to Zhang Yingqiang for the patch. (Bug #79784, Bug #22517278)
  • Setting the super_read_only system variable at server startup had no effect. (Bug #79328, Bug #22233503)
  • These audit_log plugin issues were corrected:
  • Calling my_message() from the MYSQL_AUDIT_GENERAL_CLASS handler resulted in infinite recursion.
  • Diagnostic messages were improved for the case when the MYSQL_AUDIT_GENERAL_CLASS handler returned nonzero.
  • Calling my_message() from the MYSQL_AUDIT_SERVER_STARTUP_CLASS handler did not abort server startup as it should have.
  • SHOW GLOBAL VARIABLES produced different output for the null_audit_abort_value system variable with show_compatibility_56 enabled and disabled.
  • (Bug #79079, Bug #22136709, Bug #79091, Bug #22142166, Bug #79092, Bug #22142209, Bug #21783798)
  • For INSERT and UPDATE operations that caused FOREIGN KEY constraint violations, errors were reported rather than warnings when the IGNORE keyword was used. (Bug #78853, Bug #22037930)
  • Using the server session service, executing an SQL statement from a thread with no VIO context could raise an assertion. (Bug #78734, Bug #21959409)
  • Error messages raised by JSON_KEYS() and JSON_EXTRACT() contained the wrong data. (Bug #78699, Bug #22026278)
  • CREATE VIEW statements that used the TIMESTAMPDIFF() function with MICROSECOND as the unit resulted in incorrect view definitions. (Bug #78506, Bug #21877062)
  • For an existing user, CREATE USER IF NOT EXISTS produced an error rather than a warning. Similarly, for an nonexisting user, ALTER USER IF EXISTS produced an error rather than a warning. (Bug #78374, Bug #21807286)
  • For some queries, an Index Merge access plan was chosen over a range scan when the cost for the range scan was the same or less. (Bug #77209, Bug #2117896)
  • UNHEX() could attempt a left shift of a negative number. (Bug #73964, Bug #19642015)
  • EXPLAIN for SELECT ... FOR UPDATE statements acquired locks. (Bug #72858, Bug #18899860)
  • Processlist state information was not updated correctly for LOAD DATA INFILE and could show a state different from executing. (Bug #69375, Bug #16912362)

New in MySQL 5.7.11 (Feb 6, 2016)

  • Compilation Notes
  • A value of system is now permitted for the WITH_BOOST CMake option. If this option is not set or is set to system, it is assumed that the correct version of Boost is installed on the compilation host in the standard location. In this case, the installed version of Boost is used rather than any version included with a MySQL source distribution. (Bug #22224313)
  • In addition to the mysql-5.7.11.tar.gz source tarball, another tarball named mysql-boost-5.7.11.tar.gz is provided. The new tarball contains everything in the first tarball, but also contains all the required Boost header files in a subdirectory named boost. This is for the benefit of those who do not have the correct Boost version installed and do not wish to or cannot download it. To build from this source distribution, add -DWITH_BOOST=boost to the CMake command line.
  • Data Type Notes:
  • Bit functions and operators comprise BIT_COUNT(), BIT_AND(), BIT_OR(), BIT_XOR(), &, |, ^, ~, . Currently, bit functions and operators require BIGINT (64-bit integer) arguments and return BIGINT values, so they have a maximum range of 64 bits. Arguments of other types are converted to BIGINT and truncation might occur.
  • A planned extension for MySQL 5.8 is to permit bit functions and operators to take binary string type arguments (BINARY, VARBINARY, and the BLOB types), enabling them to take arguments and produce return values larger than 64 bits. Consequently, bit operations on binary arguments in MySQL 5.7 might produce different results in MySQL 5.8. To provide advance notice about this potential change in behavior, the server now produces warnings for bit operations for which binary arguments will not be converted to integer in MySQL 5.8. These warnings afford an opportunity to rewrite affected statements. To explicitly produce MySQL 5.7 behavior in a way that will not change after an upgrade to 5.8, cast bit-operation binary arguments to convert them to integer. For more information and examples, see Bit Functions and Operators.
  • Installation Notes:
  • Previously, mysqld --initialize required the data directory to not exist or, if it existed, to be empty. Now an existing data directory is permitted to be nonempty if every entry either has a name that begins with a period (.) or is named using an --ignore-db-dir option. (Bug #79250, Bug #22213873)
  • Security Notes:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated from version 1.0.1p to version 1.0.1q. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #22348181)
  • The default value of the default_password_lifetime system variable that controls the global password expiration policy has been changed from 360 (360 days) to 0 (no password expiration). The default of 360 sometimes took people by surprise when account passwords expired a year after upgrading to MySQL 5.7. To continue to use a value other than 0 as the password expiration, start the server with an explicit setting for default_password_lifetime.
  • MySQL client programs now support an --ssl-mode option that enables you to specify the security state of the connection to the server. Permitted option values are PREFERRED (establish a secure encrypted connection if the server supports the capability, falling back to an unencrypted connection otherwise), DISABLED (establish an unencrypted connection), REQUIRED (establish a secure connection, or fail), VERFIFY_CA (like REQUIRED, but additionally verify the server certificate), VERIFY_IDENTITY (like VERIFY_CA, but additionally verify that the server certificate matches the host name to which the connection is attempted). For backward compatibility, the default is PREFERRED if --ssl-mode is not specified.
  • These clients support --ssl-mode: mysql, mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlshow, mysqlpump, mysqlslap, mysqltest, mysql_upgrade.
  • The --ssl-mode option comprises the capabilities of the client-side --ssl and --ssl-verify-server-cert options. Consequently, both of those options are now deprecated and will be removed in a future MySQL release. Use --ssl-mode=REQUIRED instead of --ssl=1 or --enable-ssl. Use --ssl-mode=DISABLED instead of --ssl=0, --skip-ssl, or --disable-ssl. Use --ssl-mode=VERIFY_IDENTITY instead of --ssl-verify-server-cert options. (The server-side --ssl option is not deprecated.)
  • For the C API, the new MYSQL_OPT_SSL_MODE option for mysql_options() corresponds to the --ssl-mode option. The MYSQL_OPT_SSL_ENFORCE and MYSQL_OPT_SSL_VERIFY_SERVER_CERT options for mysql_options() correspond to the client-side --ssl and --ssl-verify-server-cert options. They are now deprecated and will be removed in a future MySQL release. Use MYSQL_OPT_SSL_MODE with an option value of SSL_MODE_REQUIRED or SSL_MODE_VERIFY_IDENTITY instead. In consequence of this change, the minor C API version number was incremented.
  • MySQL now supports a keyring service that enables internal MySQL server components and plugins to securely store sensitive information for later retrieval. The implementation includes a keyring_file plugin that stores data in a file local to the server host.
  • Functionality Added or Changed:
  • InnoDB: A new InnoDB configuration option, innodb_tmpdir, allows you to configure a separate temporary file directory for online ALTER TABLE operations. This option was introduced to help avoid tmpdir overflows that could occur as a result of large temporary files created during online ALTER TABLE operations. innodb_tmpdir is a SESSION variable and can be configured dynamically using a SET statement. (Bug #19183565)
  • InnoDB: InnoDB now supports at-rest data encryption for InnoDB tables stored in file-per-table tablespaces. Encryption is enabled by specifying the ENCRYPTION option when creating or altering an InnoDB table. For more information, see InnoDB Tablespace Encryption.
  • Replication: The log_statements_unsafe_for_binlog variable was added to provide control over whether the warnings generated by error 1592 are added to the binary log or not.
  • yaSSL was upgraded to version 2.3.9. This upgrade corrects an issue in which yaSSL handled only cases of zero or one leading zeros for the key agreement instead of potentially any number, which in rare cases could cause connections to fail when using DHE cipher suites. (Bug #22361038)
  • The Valgrind function signature in mysql-test/valgrind.supp was upgraded for Valgrind 3.11. (Bug #22214867)
  • The audit_log plugin now produces events in the MYSQL_AUDIT_TABLE_ACCESS_CLASS class. These events are abortable. (Bug #21458192)
  • The format of log output produced by mysqld_safe now is configurable using the --mysqld-safe-log-timestamps option. This option can be used to produce log timestamps in formats compatible with the server or in formats used by mysqld_safe in older versions of MySQL. For more information, see mysqld_safe — MySQL Server Startup Script. (Bug #78475, Bug #21862951)
  • The mysql_kill(), mysql_list_fields(), mysql_list_processes(), and mysql_refresh() C API functions are deprecated and will be removed in a future version of MySQL. The same is true of the corresponding COM_PROCESS_KILL, COM_FIELD_LIST, COM_PROCESS_INFO, and COM_REFRESH client/server protocol commands. Instead, use mysql_query() to execute a KILL, SHOW COLUMNS, SHOW PROCESSLIST, or FLUSH statement, respectively.
  • The mysql_plugin utility is deprecated and will be removed in a future version of MySQL. Alternatives include loading plugins at server startup using the --plugin-load or --plugin-load-add option, or at runtime using the INSTALL PLUGIN statement.
  • Storage engines now can request notification about acquisition and release of exclusive metadata locks. As result, the LOCK_STATUS column of the metadata_locks Performance Schema table has two new status values. The PRE_ACQUIRE_NOTIFY and POST_RELEASE_NOTIFY status values are brief and signify that the metadata locking subsubsystem is notifying interested storage engines while entering lock acquisition or leaving lock release operations.
  • Bugs Fixed:
  • InnoDB; Partitioning: When OPTIMIZE TABLE rebuilt a partitioned InnoDB table, it placed the resulting partition tablespace files (*.ibd files) in the default data directory instead of the directory specified using the DATA DIRECTORY option. (Bug #75112, Bug #20160327)
  • InnoDB: InnoDB failed to update index statistics when adding or dropping a virtual column. (Bug #22469660, Bug #79775)
  • InnoDB: A small InnoDB buffer pool size with a large innodb_stats_persistent_sample_pages setting resulted in a Difficult to find free blocks in the buffer pool warning. (Bug #22385442)
  • InnoDB: memcached connections are blocked from accessing tables that contain an indexed virtual column. Accessing an indexed virtual column requires a callback to the server, but a memcached connection does not have access to the server code. (Bug #22384503, Bug #79691)
  • InnoDB: InnoDB did not return an informative message when refusing an online ALTER TABLE operation that attempted to add an index and a virtual column. (Bug #22374827)
  • InnoDB: An invalid innodb_saved_page_number_debug setting caused a server exit. (Bug #22311319, Bug #79516)
  • InnoDB: InnoDB failed to free a table object when a compressed table and temporary compressed table were created in the same shared tablespace. (Bug #22306581)
  • InnoDB: In Numa-related code, the size information passed to the mbind() call in the buf_chunk_init() function was incorrect. (Bug #22293530, Bug #79434)
  • InnoDB: Numa support was incomplete for online buffer pool resizing operations. (Bug #22293511, Bug #79354)
  • InnoDB: A SELECT COUNT(*) query that counted the results of a full-text subquery raised an assertion. (Bug #22270139)
  • InnoDB: InnoDB passed a buffer with an incorrect TINYBLOB data length for a virtual column, resulting in a purge thread failure. (Bug #22256752)
  • InnoDB: A purge failure occurred while deleting data from a table that contained a spatial index. (Bug #22230442)
  • InnoDB: An assertion was raised when purge accessed a freed page while attempting to rebuild virtual column data from the clustered index. (Bug #22204260)
  • InnoDB: Only prefix bytes were logged for an indexed virtual column, resulting in an a Clustered record for sec rec not found error. (Bug #22202788)
  • InnoDB: A small buffer pool with an innodb_page_size setting of 64K could cause startup, bootstrap, and recovery failures. (Bug #22179133, Bug #79201)
  • InnoDB: Unreachable code that checks for 32-bit file offsets was removed. (Bug #22163880, Bug #79150)
  • InnoDB: A slow shutdown failure was caused by background threads adding undo records to the purge history list during or after purge thread exit. (Bug #22154730)
  • InnoDB: The InnoDB purge thread died attempting to purge a virtual column index record that was not delete-marked. (Bug #22141031)
  • InnoDB: In debug builds, an ALTER TABLE operation that increased the column length of a virtual column raised an assertion. (Bug #22139917)
  • InnoDB: ut_allocator prepended the allocation payload with a 12-byte header on 32-bit systems, causing unaligned memory access. On 32-bit SPARC systems, the unaligned memory access caused a crash during bootstrap. (Bug #22131684)
  • InnoDB: In debug builds, an ALTER TABLE operation that added a new virtual column before an existing virtual column raised an assertion. (Bug #22123674, Bug #22111464)
  • InnoDB: InnoDB startup messages related to dumping and loading of the buffer pool were improved. (Bug #22096661, Bug #78960)
  • InnoDB: Creating a table with a full-text index and a foreign key constraint failed when foreign_key_checks was disabled. (Bug #22094601, Bug #78955)
  • References: This bug is a regression of Bug #16845421.
  • InnoDB: Support was enabled for ALGORITHM=INPLACE operations that add an index on an existing virtual column while dropping another virtual column. Support was also enabled for ALGORITHM=INPLACE operations that add a virtual column and an index. When adding an index on a newly-added virtual column, purge now skips the uncommitted virtual index. (Bug #22082762)
  • InnoDB: The wrong table object was used to compute virtual column values for a query that accessed multiple instances of the same table. (Bug #22070021)
  • InnoDB: A purge thread failure occurred when inserting and deleting spatial data. The child page number field was not stored during the R-tree search stage. (Bug #22027053)
  • InnoDB: Starting the server with an empty innodb_data_home_dir entry in the configuration file caused InnoDB to look for the buffer pool file in the root directory, resulting in a startup error. (Bug #22016556, Bug #78831)
  • InnoDB: A failure to compute virtual column values caused an excessive number of error messages. (Bug #21968375)
  • InnoDB: An INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX query raised an assertion. A dictionary mutex was taken while InnoDB populated an in-memory heap table. The mutex was not released before InnoDB attempted to convert the in-memory heap table to an optimized internal temporary table. (Bug #21950756, Bug #78714)
  • InnoDB: To avoid a potential hang and redo log overwrite, the innodb_log_file_size minimum value was increased from 1MB to 4MB, and the length calculation in log_margin_checkpoint_age() was revised. (Bug #21924224, Bug #78647)
  • InnoDB: A full-text query run under high concurrency caused a server exit due to an invalid memory access. (Bug #21922532)
  • InnoDB: An ALTER TABLE operation on a table partitioned across multiple tablespaces moved existing partitions to the table's default tablespace, resulting in an assertion on SHOW CREATE TABLE. Likewise, ALTER TABLE tbl_name TABLESPACE tablespace_name moved existing partitions to the named tablespace. Only ALTER TABLE ... REORGANIZE PARTITION should move existing partitions to the table's default tablespace or to a named tablespace. Running ALTER TABLE tbl_name TABLESPACE tablespace_name on a table partitioned across multiple tablespaces should only change the table's default tablespace. (Bug #21914047, Bug #22124042, Bug #79030)
  • InnoDB: With a large innodb_sort_buffer_size setting, adding an index on an empty table performed more slowly than expected. (Bug #21762319, Bug #78262)
  • InnoDB: A race condition occurred between fil_names_write() and file_rename_tablespace_in_mem(). (Bug #21549928)
  • InnoDB: Purge attempted to access undo pages that were freed by a preceding undo log truncate operation, resulting in an assertion. (Bug #21508627)
  • InnoDB: InnoDB did not return an informative message when refusing an online ALTER TABLE operation on a table with a spatial index. (Bug #20111575)
  • InnoDB: A compiler barrier was added to ut_relax_cpu(). The ut_always_false dummy global variable was removed from ut_delay(). (Bug #20045167, Bug #74832)
  • InnoDB: Incorrect index values were returned while dropping a virtual column. The altered table object was used to evaluate virtual column values. (Bug #79773, Bug #22469459)
  • References: This bug is a regression of Bug #22082762.
  • Partitioning: Subquery scans on partitioned tables with virtual columns could leak memory. (Bug #79145, Bug #22162200)
  • Replication: When a slave was configured with log_bin=OFF, the applier (SQL) thread was failing to correctly roll back partial transactions left in the relay log. The fix ensures that on reconnection, the applier thread correctly rolls back a partial transaction and starts applying it again from the next relay log file. (Bug #21691396)
  • Replication: The behavior of SET GTID_PURGED was not consistent between version 5.6 and 5.7. The fix ensures that version 5.7 does not initiate a transaction for SET GTID_PURGED statements. (Bug #21472492)
  • Replication: When DML invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column, that DML has to be marked as an unsafe statement. If the tables are locked in the transaction prior to the DML statement (for example by using LOCK TABLES), then the DML statement was not being marked as an unsafe statement. The fix ensures that such DML statements are marked correctly as unsafe. (Bug #17047208)
  • Replication: If pseudo_slave_mode was set to 1 while an XA transaction was in the prepare stage, an assert was generated. The fix ensures that changes from 0 to 1 can be made during XA transactions. Note that this variable is solely for internal use by the server. (Bug #79416, Bug #22273964, Bug #78695, Bug #21942487)
  • Replication: If the server stopped unexpectedly immediately before committing an XA transaction which had been prepared, and the transaction modified the mysql.gtid_executed table, then the subsequent recovery aborted due to an innodb_lock_wait_timeout error when it was reading the mysql.gtid_executed table. To fix the problem, XA transactions are no longer permitted to modify the mysql.gtid_executed table. (Bug #77740, Bug #21452916)
  • Replication: As part of the fix for Bug #16290902, when writing a DROP TEMPORARY TABLE IF EXISTS query into the binary log, the query is no longer preceded by a USE `db` statement. Instead the query uses a fully qualified table name, for example DROP TEMPORARY TABLE IF EXISTS `db`.`t1`;. This changed the application of replicate-rewrite-db filter rules, as they work only on the default database specified in a USE statement. This caused slaves to fail when the resulting CREATE TEMPORARY TABLE was applied. The fix ensures that at the time of writing a DROP TEMPORARY TABLE IF EXISTS query into the binary log, a check is made for the default database. If it exists then the query is written as USE default_db in the binary log. If a default database is not present then the query is logged with the qualified table name. (Bug #77417, Bug #21317739)
  • Replication: If generating a GTID for a transaction fails, the transaction is not written to the binary log but still gets committed. Although running out of GTIDs is a rare situation, if it did occur an error was written to the binary log as a sync stage error. With binlog_error_action=ABORT_SERVER, the server aborts on such an error, avoiding data inconsistency. When binlog_error_action=IGNORE_ERROR, the server continues binary logging after such an error, potentially leading to data inconsistency between the master and the slave. The fix changes the error to be correctly logged as a flush stage error. (Bug #77393, Bug #21276661)
  • Replication: When using --gtid-mode=on , --enforce-gtid-consistency , and --binlog-format=row, if a user defined function with multiple DROP TEMPORARY TABLE statements was executed on a master, the resulting binary log caused an error on slaves. The fix ensures that stored functions and triggers are also considered multi-statement transactions, and that when --enforce-gtid-consistency is enabled, functions with CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements generate an ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION error. (Bug #77354, Bug #21253415)
  • Replication: Stored procedure local variables that were used in an ALTER EVENT statement were not being replicated correctly. This was related to the fact that CALL statements are not written into the binary log. Instead each statement executed in a stored procedure is binary logged separately, with the exception that the query string is modified so that uses of stored procedure local variables are replaced with NAME_CONST('spvar_name', 'spvar-value') calls. DDL statements (which are always binary logged in statement binary log mode irrespective of the current binary log format) can also use stored procedure local variables and a clash could cause them to not be replicated correctly. The fix ensures that any stored procedure local variables used in a query are replaced with NAME_CONST(...), except for the case when it is a DML query and the binary log format is ROW. (Bug #77288, Bug #21229951)
  • Replication: DROP TABLE statements are regenerated by the server before being written to the binary log. If a table or database name contained a non-regular character, such as non-latin characters, the regenerated statement was using the wrong name, breaking replication. The fix ensures that in such a case the regenerated name is correctly converted back to the original character set. Also during work on this bug, it was discovered that in the rare case that a table or database name contained 64 characters, the server was throwing an assert(M_TBLLEN < 128) assertion. The assertion has been corrected to be less than or equal 128. (Bug #77249, Bug #21205695)
  • References: See also Bug #78036, Bug #22261585, Bug #21619371.
  • Replication: Irrespective of the current binlog_format setting, DDL that changes metadata on a master is always identified and written to the binary log in STATEMENT format. Such DDL could occur from event based SQL statements, such as CREATE EVENT or DROP EVENT, or transactions that had unsafe functions such as sysdate(). When binlog_format=MIXED and attempting to replicate such DDL, it was not being correctly identified and therefore was not being correctly replicated. (Bug #71859, Bug #19286708)
  • The System-V initialization script for RHEL6 or older failed to enable the mysqld service by default. (Bug #22600974)
  • Some activations of triggers that referenced a NEW value inside a query might cause a server exit. (Bug #22377554)
  • Parsing the output of ST_GeometryType() as a DATETIME value with a default character set of utf32 caused a server exit. (Bug #22340858)
  • For a character set loaded from an XML file, the server could fail to properly initialize its state map, leading to a server exit. (Bug #22338946)
  • Inserting a token of 84 4-byte characters into a full-text index raised an assertion. The maximum token length was 84 characters up to a maximum of 252 bytes, which did not account for 4-byte characters. The maximum byte length is now 336 bytes. (Bug #22291765, Bug #79475)
  • For some combination of consumers, the Performance Schema prepared statement instrumentation could cause a server exit. (Bug #22291560)
  • If a client attempted to use an unsupported client character set (ucs2, utf16, utf32), the error message reported to the client differed for SSL and non-SSL connections. (Bug #22216715)
  • Data corruption or a server exit could occur if a stored procedure had a variable declared as TEXT or BLOB and data was copied to that variable using SELECT ... INTO syntax from a TEXT or BLOB column. (Bug #22203532, Bug #22232332, Bug #21941152)
  • For debug builds, with the ONLY_FULL_GROUP_BY SQL mode disabled, the optimizer could attempt to sort on outer references, causing an assertion to be raised. (Bug #22200984)
  • Different handling of YEAR values for INSERT and SELECT could raise an assertion when such values were used in a generated-column expression. (Bug #22195458)
  • For debug builds, for queries involving MIN() or MAX() on an indexed column and a reference to an unindexed datetime column, the optimizer could attempt to access unread values, causing an assertion to be raised. (Bug #22186926)
  • Geohash decoding (for example, for ST_LongFromGeoHash(), ST_LatFromGeoHash(), and ST_PointFromGeoHash()) could yield incorrect results due to the rounding algorithm being too aggressive. (Bug #22165582)
  • In debug builds, with READ UNCOMMITTED transaction isolation level, a SELECT reading a generated column using an index could raise an assertion. (Bug #22133710)
  • For generated columns, the optimizer could fail to establish the proper table reference, resulting in a server exit. (Bug #22132822)
  • For some combination of consumers, the Performance Schema file instrumentation could fail due to an attempt to use a NULL pointer while instrumenting temporary file I/O. (Bug #22130453)
  • The Performance Schema could raise an assertion based on the (incorrect) assumption that instrumenting a temporary file open operation always resulted in an instrumented file. (Bug #22118669)
  • An ALTER TABLE statement that added an index on a virtual generated column using the INPLACE algorithm did not properly report warnings (or errors in strict SQL mode) for problems with virtual column values. Any subsequent ALTER TABLE on the same table using the COPY algorithm produced such warnings (or failures in strict SQL mode) due to evaluating the problematic value, but left the connection in a state that made further INPLACE alterations on the table fail for the same reason. (Bug #22095783)
  • If the left expression of an IN expression was a row subquery that accesses no tables, an assertion could be raised (in debug builds), or incorrect results could be returned (in release builds). (Bug #22089623)
  • Expressions that match an indexed generated column may be replaced with the generated column by the optimizer to enable use of the associated index. However, this optimization was not performed for single-table update and delete statements. The optimizer now extends this replacement optimization to such statements. (Bug #22077611)
  • ANSI SQL mode could cause inconsistencies in processing of generated column expressions. (Bug #22018979)
  • Removal of server session plugins was faulty and could cause a server exit. (Bug #21983102)
  • For some queries, if the optimizer used Disk-Sweep Multi-Range Read optimization on generated columns, the server could exit. (Bug #21980430)
  • mysqlpump tries to do as much work in parallel as possible, but the dump threads lacked a synchronization point before backing up the data, resulting in inconsistent backup. mysqlpump now locks the server and flushes all the tables using FLUSH TABLES WITH READ LOCK to ensure that any further connections view the same state of all the databases.
  • This change lifts the restriction aginst the --single-transaction option being mutually exclusive with parallelism. When using --single-transaction, it is no longer necessary to disable parallelism by setting --default-parallelism to 0 and not using any instances of --parallel-schemas. (Bug #21980284)
  • A fault in pthread_rwlock_unlock() wherein it decremented the lock counter even for already unlocked objects could result in deadlock. (Bug #21966621)
  • The Performance Schema could acquire a double lock on session system variables, causing a server hang or (in debug builds) an assertion to be raised. (Bug #21935106)
  • Certain queries containing WHERE 0 of the following form could cause a server exit due to uninitialized reads: SELECT (SELECT col AND constant FROM t WHERE 0) IN (SELECT constant FROM t1). (Bug #21922202)
  • CREATE TEMPORARY TABLE .. SELECT statements involving BIT columns that resulted in a column type redefinition could cause a server exit or an improperly created table. (Bug #21902059)
  • For UPDATE operations on InnoDB tables, there could be a mismatch between the value of a virtual generated column in the index and the value in the “before” buffer, resulting in a server exit. (Bug #21875520)
  • With character_set_server=utf16le, some values of ft_boolean_syntax could cause a server exit for full-text searches. (Bug #21631855)
  • With gtid_mode=ON, concurrent execution of SHOW TABLE STATUS and REVOKE ALL PRIVILEGES could lead to deadlock in there was a view in the database and REVOKE ALL PRIVILEGES failed for some but not all of the named users. (Bug #21463167)
  • mysqlpump could exit due to incorrect synchronization of view-handling threads during dump processing. (Bug #21399236, Bug #21447753)
  • With LOCK TABLES in force, an attempt to open a temporary MERGE table consisting of a view in its list of tables (not the last table in the list) caused a server exit. (Bug #20691429)
  • For certain prepared statements, the optimizer could transform join conditions such that it used a pointer to a temporary table field that was no longer available after the initial execution. Subsequent executions caused a server exit. (Bug #19941403)
  • Repeated execution of ALTER TABLE v1 CHECK PARTITION as a prepared statement, where v1 is a view, led to a server exit.
  • In addition, output for some administrative operations, when they are attempted on a view, changes from “Corrupt” to “Operation failed”. These include ANALYZE TABLE, OPTIMIZE TABLE, and REPAIR TABLE, and ALTER TABLE statements that perform ANALYZE PARTITION, CHECK PARTITION, OPTIMIZE PARTITION, and REPAIR PARTITION operations. (Bug #19817021)
  • Valgrind detected some possibly unsafe use of string functions in code used for asymmetric encryption. (Bug #19688135)
  • An out-of-memory failure in join buffer allocation could lead to incorrect results for multiple-table queries. (Bug #19031409)
  • SSL connections ignored any change made by passing the MYSQL_OPT_READ_TIMEOUT option to the mysql_options() C API function. (Bug #17618162)
  • For ALTER TABLE statements, the parser did not support the ALGORITHM clause for some operations involving tablespaces or partitions. (Bug #17400320)
  • Debian packages create the root user account using the auth_socket authentication plugin to achieve secure-by-default installation if installation was done with a blank root password. However, auth_socket was being used even if the password was not blank. (Bug #80137, Bug #22594846)
  • Solaris packages failed to note the dependency of the MySQL client library on the libstlport library. (Bug #79778, Bug #22504264)
  • Thread handle resource leakage could occur when creating threads for handling connections on Windows, which could lead to Windows servers eventually running out of handles. (Bug #79714, Bug #22455198)
  • Using systemd to start mysqld failed if configuration files contained multiple datadir lines. Now the last datadir line is used. (Bug #79613, Bug #22361702)
  • A derived table contained in the SET clause of an UPDATE statement should be materialized to avoid an error about updating a table that is also read in the same statement. Materialization did not occur for some statements, leading to that error. (Bug #79590, Bug #22343301)
  • MySQL 5.7.8 prohibited references to select list columns of the outer query from the HAVING clause of a correlated subquery in the inner query because they are not permitted by standard SQL. However, because this is a frequently used extension, it is once again permitted. (Bug #79549, Bug #22328395)
  • References: This bug was introduced by Bug #19823076.
  • Installing just shared libraries, clients, and development support files failed to install everything needed to build client applications because the binary_log_types.h header file was not installed. (Bug #79531, Bug #22321338)
  • SHOW CREATE TRIGGER could fail to display all applicable SQL modes. (Bug #79526, Bug #22313133)
  • On SELinux, mysqld --initialize with an --init-file option could fail to initialize the data directory. (Bug #79442, Bug #22314098, Bug #79458, Bug #22286481)
  • Syntax checks were not always performed when an ALTER TABLE statement changed a column's type from TEXT to JSON. This could lead to JSON columns containing invalid JSON data. This issue was observed when the original TEXT column used the utf8mb4_bin collation. (Bug #79432, Bug #22278524)
  • Hexadecimal and bit literals written to saved view definitions could be truncated. This could also affect extended EXPLAIN output. (Bug #79398, Bug #22268110)
  • ST_Buffer() returned an error for geometries with an SRID different from 0. Nonzero SRID values now are permitted but ignored (calculations are still done using Cartesian coordinates). (Bug #79394, Bug #22306745)
  • A regression caused failure of the workaround at Restrictions on Subqueries for avoiding ER_UPDATE_TABLE_USED errors when referencing the same table in a subquery as was used as target for an UPDATE or DELETE statement. (Bug #79333, Bug #22239474)
  • Statements causing multiple parse errors could cause an assertion to be raised. (Bug #79303, Bug #22222013)
  • Some queries with derived tables perform better with materialization than when merged into the outer query. The optimizer no longer uses merging by default for derived tables containing dependent subqueries in the select list. (Bug #79294, Bug #22223202)
  • ALTER USER and SET PASSWORD did not work at server startup when invoked in the file named using the --init-file option. (Bug #79277, Bug #22205360)
  • When not in strict SQL mode, attempts to implicitly insert NULL into a NOT NULL column resulted in different behavior depending on whether the table had a trigger. (Bug #79266, Bug #22202665)
  • Some replication-only code was not protected with #ifdef and failed to compile with the WITH_UBSAN CMake option enabled. (Bug #79236, Bug #22190632)
  • Configuring MySQL with the -DWITH_UBSAN=ON CMake option resulted in spurious runtime warnings from comp_err. These are now suppressed. Also, a CMake warning was added that undefined behavior address sanitizer support is currently experimental. (Bug #79230, Bug #22190656)
  • INSERT INTO ... SELECT statements could insert values other than DEFAULT into generated columns. (Bug #79204, Bug #22179637)
  • With the derived_merge flag of the optimizer_switch system variable enabled, queries that used a derived table on the inner side of an outer join could return incorrect results. (Bug #79194, Bug #22176604)
  • Memory leaks in libmysqld were corrected. (Bug #79187, Bug #22174219)
  • FOUND_ROWS() could return a negative value if the preceding query was a UNION involving SQL_CALC_FOUND_ROWS and LIMIT ... OFFSET. (Bug #79131, Bug #22155786)
  • IN-to-EXISTS subquery transformation could cause SELECT NULL IN (subquery) to return 0 rather than NULL.
  • IN-to-EXISTS subquery transformation could yield incorrect results for queries for which the table was nonempty, the subquery on the left side of the IN predicate produced an empty result, and semi-join optimization was disabled. (Bug #78946, Bug #22090717, Bug #19822406)
  • The result from WEIGHT_STRING() could be incorrect when used in a view. (Bug #78783, Bug #21974321)
  • If server was started with --thread-handling=no-threads, no foreground thread was created for a client connection. The Performance Schema did not account for the possibility of no foreground threads for queries on the session_connect_attrs table, causing an assertion to be raised. (Bug #78292, Bug #21765843)
  • mysqlpump generated incorrect INSERT statements for tables that had generated columns. (Bug #78082, Bug #21650559)
  • ALTER TABLE ... CONVERT TO CHARACTER SET operations that used the INPLACE algorithm were ineffective if the table contained only numeric data types. Also, such operations failed to clean up their temporary .frm file. (Bug #77554, Bug #21345391)
  • Heavy SHOW PROCESSLIST or SELECT ... FROM INFORMATION_SCHEMA.PROCESSLIST activity could result in the server accepting more than max_connections connections. (Bug #75155, Bug #20201006)
  • When used with the libmysqld embedded server, the mysql_stmt_execute() C API function failed with a malformed communication packet error, even for simple prepared statements. (Bug #70664, Bug #17883203)
  • Queries using SUM(DISTINCT) could produce incorrect results when there were many distinct values. (Bug #56927, Bug #11764126, Bug #79648, Bug #22370382)

New in MySQL 5.7.10 (Dec 8, 2015)

  • SECURITY NOTES:
  • Previously, MySQL supported only the TLSv1 protocol for encrypting secure connections. TLS support is now extended to enable a higher level of encrypted connection security:
  • When compiled using OpenSSL 1.0.1 or higher, MySQL supports the TLSv1, TLSv1.1, and TLSv1.2 protocols.
  • When compiled using the bundled version of yaSSL, MySQL supports the TLSv1 and TLSv1.1 protocols.
  • Because TLSv1.2 requires OpenSSL, support for this protocol is available in binary distributions only for MySQL Commercial Server, and not for MySQL Community Server (which is compiled using yaSSL). To enable TLSv1.2 support if you build from source, you must set the WITH_SSL CMake option to use OpenSSL.
  • The tls_version system variable enables specifying at startup the TLS protocols permitted by the server. On the client side, the --tls-version option enables specifying the TLS protocols permitted per client invocation.
  • The new MLS_TLS_VERSION option for the CHANGE MASTER TO statement specifies the encryption protocols permitted by the master for slave connections.
  • The mysql_options() C API function has a new MYSQL_OPT_TLS_VERSION option that enables specifying from within the client library the TLS protocols permitted by a client program.
  • By default, MySQL attempts to use the highest TLS protocol version available, depending on which SSL library was used to compile the server and client, which key size is used, and whether the server or client are restricted from using some protocols; for example, by means of tls_version/--tls-version.
  • FUNCTIONALITY ADDED OR CHANGED:
  • InnoDB: Enabling the new innodb_background_drop_list_empty debug configuration option helps avoid test case failures by delaying table creation until the background drop list is empty. (Bug #21891560)
  • InnoDB: The innodb_support_xa system variable, which enables support for two-phase commit in XA transactions, is deprecated. InnoDB support for two-phase commit in XA transactions is always enabled as of MySQL 5.7.10. Disabling innodb_support_xa is no longer permitted as it makes replication unsafe and prevents performance gains associated with binary log group commit.
  • MySQL distributions now include lz4_decompress and zlib_decompress utilities that can be used to decompress mysqlpump output that was compressed using the --compress-output=LZ4 and --compress-output=ZLIB options. For more information, see lz4_decompress — Decompress mysqlpump LZ4-Compressed Output, and zlib_decompress — Decompress mysqlpump ZLIB-Compressed Output. (Bug #21644479)
  • mysql_upgrade now attempts to print more informative errors than FATAL ERROR: Upgrade failed. (Bug #21489398)
  • These client programs now support the --enable-cleartext-plugin option: mysqlcheck, mysqldump, mysqlimport, mysqlshow. This option enables the mysql_clear_password cleartext authentication plugin. (See The Cleartext Client-Side Authentication Plugin.) (Bug #21235226)
  • These functions now produce warnings for invalid input: UNHEX(), INET_NTOA(), INET_ATON(), INET6_NTOA(), INET6_ATON(). Also, INET_ATON() now returns NULL and produces a warning for arguments that contain more than four groups of digits. (Bug #78856, Bug #22042027, Bug #78884, Bug #22071558)
  • BUGS FIXED:
  • InnoDB: When attempting to create a cascading foreign key constraint on a primary key column used in a virtual index, the error message that was returned did not include information from dict_foreign_has_col_in_v_index(). (Bug #22050059)
  • InnoDB: An in-place operation that rebuilt a table with multiple indexed virtual columns raised an assertion. (Bug #22018532)
  • InnoDB: A SELECT ... FOR UPDATE operation on a table that only contained virtual columns and a virtual column index raised an invalid assertion. (Bug #21981164, Bug #21880930)
  • InnoDB: The calculation in dict_index_node_ptr_max_size() that determines the maximum index record size treated fixed fields that exceeded the maximum column length as fixed-size fields instead of variable length fields. (Bug #21968191)
  • InnoDB: A server exit during a TRUNCATE TABLE operation on a table with a full-text index caused startup to fail. (Bug #21959479)
  • InnoDB: An ALTER TABLE ... DISCARD TABLESPACE operation raised an invalid assertion. (Bug #21957001, Bug #78728)
  • InnoDB: Compared to previous releases, small tablespaces containing tables with BLOB values had larger data files due to regression introduced in MySQL 5.7.5. (Bug #21950389, Bug #78623). References: This bug is a regression of Bug #18756233.
  • InnoDB: The ord_part flag was not reset after a failed operation to create an index on a virtual column, causing InnoDB to assert on a subsequent insert operation. (Bug #21941320, Bug #21979969)
  • InnoDB: Successive open table operations on tables with virtual columns caused a memory access violation. (Bug #21939731)
  • InnoDB: An invalid search tuple was created for a table with virtual columns. (Bug #21922176)
  • InnoDB: InnoDB attempted to purge a virtual column index record that was not marked for deletion. (Bug #21901389)
  • InnoDB: Update vector generation for a full-text search DOC_ID did not initialize a new ufield, resulting in an assertion. (Bug #21891185)
  • InnoDB: InnoDB failed to prevent foreign key SET NULL or CASCADE constraints on virtual column base columns and virtual index columns. (Bug #21890816)
  • InnoDB: An invalid comparison raised an assertion under a 64k innodb_page_size setting. (Bug #21882024)
  • InnoDB: When estimating the maximum record size of a b-tree index page, InnoDB incorrectly treated long-length fixed fields (greater than 767 bytes) as fixed-size fields instead of variable length fields. (Bug #21880445)
  • InnoDB: In debug builds, dtuple_get_n_fields attempted to read freed memory that was previously allocated for a virtual column tuple, resulting in a server exit. (Bug #21875974)
  • InnoDB: Selecting from INNODB_CMPMEM with option big-tables=1 raised a buffer pool mutex assertion. (Bug #21871451, Bug #78494)
  • InnoDB: InnoDB returned an invalid corruption-related error message during an IMPORT TABLESPACE operation. (Bug #21838158, Bug #77321)
  • InnoDB: After a crash on Windows, copying the data directory to a non-Windows platform to perform the restore caused a crash recovery failure on startup. The code did not convert file path separators from “\” to “/” in the redo log. (Bug #21825127, Bug #78410)
  • InnoDB: A FLUSH TABLE ... FOR EXPORT operation asserted in row_quiesce_table_start() when run on a partitioned table with partitions residing in a system or general tablespace. (Bug #21796845)
  • InnoDB: A DROP TABLE operation resulted in a server exit. The return value of a function call was not checked, which lead to dereferencing of a null pointer. The patch for this bug also addresses a potential race condition. (Bug #21794102, Bug #78336)
  • InnoDB: In debug builds, an ordered scan across multiple partitions did not use a priority queue, resulting in an assertion. (Bug #21753477)
  • InnoDB: After restarting the server, the COMPRESSION column of the INNODB_SYS_TABLESPACES table displayed incorrect data. The COMPRESSION column was removed from INNODB_SYS_TABLESPACES. To view the current setting for page compression, use SHOW CREATE TABLE. (Bug #21687636, Bug #78197)
  • InnoDB: An invalid table flags value raised an assertion. The SYS_TABLES.MIX_LEN(flags2) value was not read for tables that use ROW_FORMAT=REDUNDANT. (Bug #21644827)
  • InnoDB: An online ALTER TABLE operation caused a server exit. (Bug #21640679)
  • InnoDB: An assertion was raised when crash recovery handling of an MLOG_TRUNCATE redo log record treated a shared tablespace as a file-per-table tablespace. Redo was skipped for the shared tablespace. (Bug #21606676)
  • InnoDB: Transaction rollback after recovery failed due to an invalid assertion. (Bug #21575121)
  • InnoDB: Insufficient information in the undo log about spatial columns raised an assertion and could result in a upgrade failure. Consequently, a slow shutdown is required prior to performing an in-place upgrade from MySQL 5.7.8 or 5.7.9 to 5.7.10 or higher. For more information, refer to Changes Affecting Upgrades to MySQL 5.7. (Bug #21508582)
  • InnoDB: A secondary index is not permitted on a virtual column that is based on a foreign key-referenced column that uses ON DELETE CASCADE, ON DELETE SET NULL, ON UPDATE CASCADE, or ON UPDATE SET NULL. The restriction was not enforced. (Bug #21508402)
  • InnoDB: A duplicate key error that occurred during an online DDL operation reported an incorrect key name. (Bug #21364096, Bug #77572)
  • InnoDB: An ALTER TABLE operation caused the server to exit on disk full. (Bug #21326304, Bug #77497)
  • InnoDB: The system tablespace data file did not extend automatically when reaching the file size limit, causing startup to fail with a size mismatch error and preventing the addition of another system tablespace data file. (Bug #21287796, Bug #77128)
  • InnoDB: Altering the letter case of a column introduced an inconsistency between the frm file and data dictionary resulting in a failed CREATE INDEX operation on the altered column. (Bug #20755615)
  • InnoDB: An ALTER TABLE operation that converted a table to an InnoDB file-per-table tablespace did not check for unknown files with the same name as the destination .idb file, permitting an unknown file of the same name to be overwritten. (Bug #19218794, Bug #73225)
  • InnoDB: row_merge_read_clustered_index() did not handle a bulk load error correctly. (Bug #19163625)
  • Partitioning: Partition scans did not evaluate virtual generated columns properly. This could cause issues with partitioned tables having an index on a virtual BLOB column. (Bug #21864838, Bug #21881155)
  • Partitioning: While executing CHECK TABLE, when checking whether rows were in the correct partition, the partition engine missed updates for virtual generated columns. (Bug #21779554)
  • Partitioning: Performing an in-place ALTER TABLE on a partitioned InnoDB table having one or more partitions which used a separate tablespace could cause the server to fail. (Bug #21755994)
  • Partitioning: When all partitions were pruned, they were not initialized for scanning during initialization of indexes. This involved two related issues, one being that the active index was not set back to the maxmimum key value when the index was closed. In addition, when this occurred as part of a multi-range read, there were attempts to access unset variables. (Bug #78260, Bug #21754608, Bug #21620577)
  • Replication: On a multi-threaded slave configured with master_info_repository=TABLE and relay_log_info_repository=TABLE which had previously been run with autocommit=1, if the slave was stopped and autocommit changed to 0, executing START SLAVE caused the session to appear to hang. After the lock wait timeout, when START SLAVE proceeded the server would stop unexpectedely. The fix ensures that when master_info_repository=TABLE, relay_log_info_repository=TABLE, and autocommit=0 a new transaction is generated for start and commit to avoid deadlocks. (Bug #21440793)
  • Replication: Fatal errors encountered during flushing or synchronizing the binary log were being ignored. Such errors are now caught and handled depending on the setting of binlog_error_action. (Bug #76795, Bug #68953, Bug #20938915, Bug #16666407)
  • INSERT ... ON DUPLICATE KEY UPDATE could result in a memory leak when executed as a prepared statement. (Bug #22151233)
  • If the server was started with --performance_schema_accounts_size=0, querying the Performance Schema status variable tables caused a server exit. (Bug #22131713)
  • For debug builds, using ALTER TABLE to add a generated column to a table could cause a deadlock. (Bug #22083048)
  • Some of the source files for spatial functions in the sql directory took excessive compile time and required too much compiler memory allocation. (Bug #22078874)
  • Internal buffer sizes in resolve_stack_dump were increased to accommodate larger symbol space requirements for C++ code. (Bug #22071592)
  • The systemd unit file did not specify any --pid-file option for mysqld, with the result that server startup could fail. The unit file now includes a default --pid-file option in the ExecStart value. This default can be overridden in the override.conf file by changing both PIDFile and ExecStart to specify the PID file path name. (Bug #22066787)
  • A query with nested derived tables and scalar subqueries in the select list of the derived tables might in some cases cause a server exit. (Bug #22062023)
  • When mysqld was run with --initialize, it used chown() to set the data directory owner, even if ownership was already correct. This caused problems for AppArmor and SELinux. The server now checks whether the data directory owner is correct and skips the chown() call if so. (Bug #22041387)
  • Failed evaluation of a generated column expression for CREATE TABLE or ALTER TABLE could cause a server exit. Now if expression evaluation causes truncation or provides incorrect input to a function, the statement terminates with an error and the DDL operation is rejected. (Bug #22018999)
  • Creating a unique index on a virtual POINT column could result in an error or assertion for later table accesses. (Bug #22017616)
  • Problems leading to Valgrind warnings for libmysqld were corrected. (Bug #22007587)
  • Sending a load spike to a newly started server could cause the Performance Schema to allocate a large amount of memory, possibly leading to out-of-memory failure. (Bug #22006088)
  • MySQL development RPM packages could fail to install if MySQL Connector/C development RPM packages were installed. (Bug #22005375)
  • A missing error check could result in a server exit for DELETE statements that referred to user-defined variables. (Bug #21982313)
  • Possible buffer overflow from incorrect use of strcpy() and sprintf() was corrected. (Bug #21973610)
  • MySQL RPM packages for RHEL5 failed to create the mysql system user. (Bug #21950975)
  • MySQL does not support columns of ROW type, but the server did not prevent generated columns from being created that used ROW expressions. These are now prohibited. (Bug #21940542)
  • The version_tokens plugin called the locking service using a timeout value of only one second. The timeout is now taken from the default value of the lock_wait_timeout system variable (that is, one year). (Bug #21928198)
  • Spatial functions could return invalid results if given a polygon or multipolygon argument containing holes such that a hole vertex touched the exterior ring at a point lying in the interior of an exterior ring segment. This could manifest itself as: ST_UNION() producing an invalid polygon; ST_SymDifference() producing an invalid multipolygon; ST_Intersection() producing an invalid self-intersecting polygon; ST_Difference() producing an invalid geometry. (Bug #21927733, Bug #21927639, Bug #21927558, Bug #21977775)
  • With the STRICT_TRANS_TABLES SQL mode enabled, it was not possible to insert data into a VIRTUAL generated column defined with the NOT NULL attribute. (Bug #21927469)
  • Problems leading to Valgrind warnings for OpenSSL random number generation were corrected. (Bug #21927436)
  • Querying views on Windows could lead to memory leaks. (Bug #21908206)
  • References: This bug was introduced by Bug #13901905.
  • Generated column definitions specified with the NULL attribute resulted in a syntax error. (Bug #21900170)
  • A stored procedure that used ST_Area() could return different numbers of rows for the first and second executions. (Bug #21889842)
  • For polygon values with an interior ring that touches an exterior ring, ST_Buffer() could return invalid polygon values. (Bug #21871856)
  • Two rows in the Performance Schema threads table could have the same THREAD_OS_ID value. (Bug #21865330)
  • For debug builds, using ALTER TABLE to change the expression for a generated column could cause a server exit. (Bug #21854004)
  • ALTER USER failed if the server was started with --skip-grant-tables. (Bug #21847825)
  • Performance Schema reads of a session's THD structure while the session was running could create race conditions and result in a server exit. (Bug #21841412)
  • A prepared statement that computes ST_IsSimple() or ST_Buffer_Strategy() on a nullable column in an outer join could return different numbers of rows for the first and second statement executions. (Bug #21841051)
  • Queries on the Performance Schema variables_by_thread table could cause a server exit when examining the system variables of a new connection. (Bug #21840950)
  • Executing HELP statements or statements involving the CONVERT_TZ() function could lead to a memory leak and to MyISAM reference-count errors at server shutdown. (Bug #21840241)
  • Spatial functions could read already freed memory. (Bug #21823135)
  • For Debian package control files, libnuma-dev was added to Build-Depends to enable NUMA support. (Bug #21822631)
  • Selecting DECIMAL values into user-defined variables could cause a server exit. (Bug #21819304)
  • Re-evaluation of a generated column expression could cause access to previously freed memory and a server exit. (Bug #21810529)
  • MySQL did not recognize functional dependencies from base columns in a generated column expression to the generated column. (Bug #21807579)
  • ST_SymDifference() could raise an assertion for polygons with self-intersection points. (Bug #21767301, Bug #79031, Bug #22124757)
  • USER field output from the audit log plugin was malformed. (Bug #21766380)
  • A server exit could occur for queries for which a) a GROUP BY included primary key and secondary key columns; and b) the WHERE clause included an equality predicate on the first primary key column where that column was constant. (Bug #21761044)
  • Building MySQL using parallel compilation sometimes failed with an attempt to compile sql_yacc.yy before lex_token.h had been created. (Bug #21680733)
  • With binary logging enabled, issuing DROP TEMPORARY TABLE when in XA_IDLE state caused an assertion to be raised. Now an ER_XAER_RMFAIL error is returned.
  • In consquence of the fix for this issue, statements that previously succeeded in XA_IDLE state now fail with an ER_XAER_RMFAIL error. When running with --gtid-mode=ON, an explicit DROP continues to fail with ER_GTID_UNSAFE_CREATE_DROP_TEMPORARY_TABLE_IN_TRANSACTION. (Bug #21638823)
  • A query with a subquery in the left-hand part of an IN subquery that was transformed into a semi-join might cause a server exit. (Bug #21606400)
  • Concurrent FLUSH PRIVILEGES and REVOKE or GRANT statements could produce a small time window during which invalid memory access to proxy user information could occur, leading to a server exit. (Bug #21602056)
  • Using WITH ROLLUP within a subquery could cause a server exit. (Bug #21575790)
  • For debug builds, a call to MAKE_SET() with a subquery as argument might be evaluated before tables were locked, causing an assertion to be raised. (Bug #21547779)
  • Starting the server with the query_alloc_block_size system variable set to certain negative values on a machine without enough memory could result in out-of-memory errors. (Bug #21503595)
  • Using UNINSTALL PLUGIN to uninstall the daemon_example plugin could cause a server exit. (Bug #21467458)
  • FLUSH DES_KEY_FILE failed to reload the DES key file. (Bug #21370329)
  • If an error occurred during the setup phase of subquery materialization used to compute an IN predicate, cleanup of the temporary table did not happen, leading to Valgrind errors. (Bug #21346081)
  • On Windows, the sysbench benchmark tool's "run" command would hang when attempting to create multiple tables for the OLTP test when using shared memory connections. (Bug #21319192, Bug #77481)
  • Queries rejected by MySQL Enterprise Firewall were truncated to 512 characters when written to the error log. (Bug #20948270)
  • A server exit could occur for the second execution of a prepared statement for which an ORDER BY clause referred to a column position. (Bug #20755389)
  • Repeated execution of a prepared statement could cause a server exit if the default database was changed. (Bug #20447262)
  • mysql_plugin could exit due to improper checking of string operation operands. (Bug #20376670)
  • After failure to create a temporary table during join processing and releasing the table descriptor, an attempt to access the now-invalid descriptor could cause a server exit. (Bug #19918299)
  • Type conversion failure for DECIMAL values could cause a server exit. (Bug #19912326, Bug #20013538)
  • INSERT DELAYED could cause a server exit for tables partitioned with a character column as the key and for which the expression required a character set conversion. (Bug #19894161)
  • A server exit could occur when updating a view using an ALL comparison operator on a subquery that selects from an indexed column in the main table. (Bug #19434916)
  • With AddressSanitizer (ASAN) enabled, triggers that contained null or invalid characters could cause an ASAN server exit. (Bug #18831513)
  • Incorrect error checking for the NAME_CONST() function could lead to a server exit. (Bug #17733850)
  • Queries that needed to store the result of ST_AsWKB() in a temporary table could fail with an error message. (Bug #79060, Bug #22131961)
  • References: This bug was introduced by Bug #21614368.
  • If mysqld was started with the --help option, it created a binary log index file. If that file was located in the data directory and the command preceded data directory initialization, initialization then failed due to a nonempty data directory. (Bug #78986, Bug #22107047)
  • mysqladmin --help displayed the old-password command, even though the command itself was removed in MySQL 5.7.5. (Bug #78774, Bug #21972941)
  • The filename character set is intended for internal use, but references to it in SQL statements did not produce an error. Now they do. (Bug #78732, Bug #21958734)
  • If a generated column used an expression that is affected by the SQL mode, the expression could produce different results for the same input values, depending on the current SQL mode. (For example, interpretation of the || operator depends on the PIPES_AS_CONCAT SQL mode.) Now expression evaluation uses the SQL mode in effect at the time the column is defined. (Bug #78665, Bug #21929967)
  • Casting large hexadecimal values could produce an incorrect result and no truncation warning. (Bug #78641, Bug #21922414)
  • mysqlpump generated incorrect ALTER TABLE statements for adding foreign keys. (Bug #78593, Bug #21907297)
  • The error message returned when trying to define a BLOB, TEXT, JSON, or GEOMETRY column with a default value (Error 1101, ER_BLOB_CANT_HAVE_DEFAULT) referred to BLOB and TEXT columns only. The same error applies to any of these four types when trying to use the DEFAULT option with it in a column definition; the corresponding error message now makes this clear by referring to JSON and GEOMETRY columns as well. (Bug #78527, Bug #21887035)
  • A query using JSON_EXTRACT() returned the wrong result after a virtual index was added to the table. (Bug #78464, Bug #21854241)
  • It was possible to store non-ASCII data in columns intended to store data of character set ascii. (Bug #78276, Bug #21774967)
  • Adding a SPATIAL index to a MyISAM table could cause the cardinality of other indexes to become incorrect. (Bug #78213, Bug #21789000)
  • MySQL could fail to compile on Solaris 11.3 when /usr/gnu/bin/as was used as the linker. (Bug #77797, Bug #21484716)
  • Some punctuation characters in the armscii8 character set are represented by two encodings, with the result that a character stored using one encoding would not be found using a search with the other encoding. For such characters, MySQL now selects the encoding with the lowest value to consistently map instances onto the same encoding. (Bug #77713, Bug #21441405)
  • Item_copy_decimal::copy() did not take the div_precision_increment system variable value into account, resulting in DECIMAL values being returned with incorrect precision from some queries. (Bug #77634, Bug #21462523)
  • For queries with implicit grouping; an index with a string column as its first part; and a WHERE clause with an equality comparison comparing the column to a string with trailing characters in addition to the column value, an aggregate function that should return NULL returned non-NULL. (Bug #77480, Bug #21318711)
  • LOAD_FILE() could cause a server exit for some pathnames if the character set was cp932. (Bug #76555, Bug #20819220)
  • For constructs such as ORDER BY numeric_expr COLLATE collation_name, the character set of the expression was treated as latin1, which resulted in an error if the collation specified after COLLATE is incompatible with latin1. Now when a numeric expression is implicitly cast to a character expression in the presence of COLLATE, the character set used is the one associated with the named collation. (Bug #73858, Bug #20425399)

New in MySQL 5.7.9 (Oct 21, 2015)

  • Audit Log Plugin Notes
  • C API Notes
  • Compilation Notes
  • Packaging Notes
  • Performance Schema Notes
  • Plugin Notes
  • Security Notes
  • Spatial Data Support
  • sysSchema Notes
  • Functionality Added or Changed
  • Bugs Fixed
  • Audit Log Plugin Notes:
  • Some events cannot be terminated. Previously, if an audit plugin returned nonzero status for a nonterminable event, the server ignored the status and continued processing the event. However, if an audit plugin used the my_message() function to terminate a nonterminable event, a server exit occurred. Now the server correctly handles termination of nonterminable events using my_message(). (Bug #21458066)
  • C API Notes:
  • Incompatible Change: The mysql_options() C API function has two new options, MYSQL_OPT_MAX_ALLOWED_PACKET and MYSQL_OPT_NET_BUFFER_LENGTH, that set the max_allowed_packet and net_buffer_length system variables, respectively. Each option name also now can be passed to the mysql_get_option() C API function to retrieve its value. For more information, see mysql_options(), and mysql_get_option().
  • The (undocumented) mysql_get_parameters() function has been removed. Applications that attempt to use it will get link errors and should be modified to use mysql_options() and mysql_get_option() instead. (Bug #20821550)
  • References: See also Bug #20686665.
  • Previously, it was necessary to call mysql_thread_end() for each mysql_thread_init() call to avoid a memory leak. C API internals have been reimplemented to reduce the amount of information allocated by mysql_thread_init() that must be freed by mysql_thread_end():
  • For release/production builds without debugging support enabled, mysql_thread_end() need not be called.
  • For debug builds, mysql_thread_init() allocates debugging information for the DBUG package (see The DBUG Package). mysql_thread_end() must be called for each mysql_thread_init() call to avoid a memory leak.
  • (Bug #20621281, Bug #21802367)
  • Compilation Notes:
  • MySQL distributions now contain a mysqlclient.pc file that provides information about MySQL configuration for use by the pkg-config command. This enables pkg-config to be used as an alternative to mysql_config for obtaining information such as compiler flags or link libraries required to compile MySQL applications. For more information, see Building C API Client Programs Using pkg-config.
  • A new INSTALL_PKGCONFIGDIR CMake option is available to specify the directory in which to install the mysqlclient.pc file. The default value is INSTALL_LIBDIR/pkgconfig, unless INSTALL_LIBDIR ends with /mysql, in which case that is removed first. (Bug #20637746)
  • Packaging Notes:
  • The shell and Perl versions of mysql_install_db have been removed from MySQL distributions. The executable C++ version of mysql_install_db implemented in MySQL 5.7.5 is still present, but remains deprecated (use mysqld --initialize instead) and will be removed in a future MySQL release. (Bug #21625471)
  • The deprecated _r versions of the libmysqlclient libraries are no longer installed. (Bug #21311067)
  • Performance Schema Notes:
  • Previously, the transaction instrument in the setup_instruments table was disabled by default, and the events_transactions_current and events_transactions_history consumers in the setup_consumers table were enabled by default. This setup is inconsistent, and having the consumers enabled could lead to the impression that transactions were instrumented by default. Now, the consumers are also disabled by default. To monitor transactions, enable the instrument and the applicable consumers. (Bug #21780891)
  • With the show_compatibility_56 system variable disabled, SHOW VARIABLES and SHOW STATUS statements failed if MySQL was compiled without Performance Schema support. Consequently, it is no longer possible to compile without the Performance Schema. If it is desired to compile without particular types of instrumentation, that can be done with the following CMake options:
  • For example, to compile without mutex instrumentation, configure MySQL using the -DDISABLE_PSI_MUTEX=1 option. (Bug #21669500)
  • Two changes were made regarding the effect of show_compatibility_56:
  • Previously, when show_compatibility_56=OFF, selecting from the following INFORMATION_SCHEMA system and status variable tables returned an empty result and a deprecation warning:
  • INFORMATION_SCHEMA.GLOBAL_VARIABLES
  • INFORMATION_SCHEMA.SESSION_VARIABLES
  • INFORMATION_SCHEMA.GLOBAL_STATUS
  • INFORMATION_SCHEMA.SESSION_STATUS
  • This caused confusion for applications that were not aware that such selects could be empty: An empty result and a warning was not sufficient notice to signal the need to migrate to the corresponding Performance Schema system and status variable tables.
  • To address this issue, selecting from the INFORMATION_SCHEMA system and status tables now produces an error, to make it more evident that an application is operating under conditions that require modification, as well as where the problem lies. The error code is ER_FEATURE_DISABLED_SEE_DOC. The error message indicates which table is disabled and that the show_compatibility_56 documentation should be consulted.
  • Previously, when show_compatibility_56=ON, selecting from the following Performance Schema status variable tables returned an empty result:
  • performance_schema.global_status
  • performance_schema.session_status
  • This made it more difficult to migrate applications from the INFORMATION_SCHEMA status variable tables to the corresponding Performance Schema tables: Successfully selecting from the Performance Schema tables required knowing both that the server is from MySQL 5.7 and that show_compatibility_56=OFF.
  • To address this issue, selecting from the Performance Schema status variable tables now produces the same result regardless of the value of show_compatibility_56. Thus, it is necessary to know only that the server is from MySQL 5.7.9 or higher. (If so, select from the Performance Schema tables. Otherwise, select from the INFORMATION_SCHEMA tables.)
  • For additional information about the effects of show_compatibility_56 and migration issues, see Server System Variables, and Migrating to Performance Schema System and Status Variable Tables. (Bug #21606701)
  • These Performance Schema tables now are world readable and accessible without the SELECT privilege: global_variables, session_variables, global_status, and session_status. An implication of this change is that SHOW VARIABLES and SHOW STATUS no longer require privileges on the underlying Performance Schema tables from which their output is produced when show_compatibility_56=OFF. (Bug #21251297)
  • With the show_compatibility_56 system variable enabled, the reported values of the Last_query_cost and Last_query_partial_plans status variables were incorrect.
  • With the show_compatibility_56 system variable disabled, the reported values of the Created_tmp_tables, Handler_external_lock, and Table_open_cache_% status variables were incorrect. (Bug #20483278, Bug #21788549, Bug #21788887)
  • The Performance Schema session_account_connect_attrs had mistakenly been changed to require the SELECT privilege. It requires no special privileges again. (Bug #77702, Bug #21436364)
  • References: This bug was introduced by Bug #14569746.
  • In the setup_timers table, a CYCLE timer for ARM64 platforms is now available. (Bug #77620, Bug #21374923)
  • The Performance Schema now includes these instruments for monitoring I/O on binary log and relay log cache files:
  • wait/io/file/sql/binlog_cache
  • wait/io/file/sql/binlog_index_cache
  • wait/io/file/sql/relaylog_cache
  • wait/io/file/sql/relaylog_index_cache
  • In addition, the default value of performance_schema_max_file_classes has been increased from 50 to 80. (Bug #76225, Bug #20675180)
  • The Performance Schema threads table now contains a THREAD_OS_ID column that indicates the thread or task identifier as defined by the underlying operating system. For example, the column value corresponds to the Process Explorer thread ID on Windows and the gettid() value on Linux. For more information, see The threads Table.
  • If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change into the performance_schema database.
  • Plugin Notes:
  • The audit plugin API has been extensively revised to support a finer breakdown of the general event type (MYSQL_AUDIT_GENERAL_CLASS) into more specific events. This enables audit plugins to more precisely indicate the types of events in which they are interested and reduces overhead for plugins that have use for only a few event types. The API also now permits early termination of event execution. For more information, see Writing Audit Plugins. The general event type is still available but is deprecated and will be removed in a future MySQL release.
  • In addition, a security_context plugin service is now available. Audit plugins can use this service to examine or modify the security context of threads associated with audited events. See MySQL Services for Plugins.
  • Security Notes:
  • For RPM-based packages, the permissions used to create the data directory (/var/lib/mysql) have been changed from 755 to 751. This tightens the data directory permissions while still permitting world access to the mysql.sock file in that directory. (Bug #21066592)
  • Spatial Data Support:
  • The required version of the Boost library for server builds has been raised from 1.58.0 to 1.59.0. (Bug #21567456)
  • Spatial functions such as ST_MPointFromText() and ST_GeomFromText() that accept WKT-format representations of MultiPoint values now permit individual points within values to be surrounded by parentheses. For example, both of the following function calls are valid, whereas previously the second one produced an error:
  • ST_MPointFromText('MULTIPOINT (1 1, 2 2, 3 3)')
  • ST_MPointFromText('MULTIPOINT ((1 1), (2 2), (3 3))')
  • In addition, functions such as ST_AsText() and ST_AsWKT() that produce WKT-format results now display MultiPoint values with parentheses surrounding each point. (Bug #54065, Bug #11761559)
  • Schema Notes:
  • The sys schema included in MySQL distributions was updated to version 1.5.0. This includes new features and fixes for several issues:
  • sys schema objects now have a DEFINER of 'mysql.sys'@'localhost'. (Previously, the DEFINER was 'root'@'localhost'.) Use of the dedicated mysql.sys account avoids problems that occur if a DBA renames or removes the root account.
  • The following sys schema session views now provide progress reporting for long-running transactions.
  • The progress column of these views shows the percentage of work completed for stages that support progress reporting.
  • A new diagnostics() stored procedure enables DBAs and other support personnel to collect diagnostic information for investigating MySQL instances. A new metrics view and statement_performance_analyzer() stored procedure provide supporting infrastructure for the diagnostics() procedure.
  • The sys schema ps_is_instrument_default_enabled() and ps_is_instrument_default_timed() stored functions returned incorrect results in some cases.
  • The ENABLED and HISTORY columns that were added to the Performance Schema setup_actors table in earlier MySQL 5.7 releases caused the sys schema ps_setup_reset_to_default() stored procedure not to work.
  • Handing of event-timing information in the sys schema was updated to handle changes to Performance Schema event-timing columns in MySQL 5.7.8.
  • mysql_upgrade previously checked for an exact object-count value in the sys schema to determine whether an upgrade was needed. If local objects had been added, the resulting reinstallation removed those objects. Now it checks for at least the expected number of objects.
  • If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade to incorporate these changes into the sys schema.
  • Thanks to Daniël van Eeden, Jesper Wisborg Krogh, Shlomi Noach, and Morgan Tocker for their contributions to this update. (Bug #78115, Bug #21647101, Bug #77927, Bug #21550271, Bug #78720, Bug #21966366)
  • Functionality Added or Changed:
  • Incompatible Change; InnoDB: To better manage redo log format changes, the redo log header of the first redo log file (ib_logfile0) now includes a format version identifier and a text string that identifies the MySQL version that created the redo log files.
  • A new boolean configuration option, innodb_log_checksums, replaces the innodb_log_checksum_algorithm option. innodb_log_checksums=ON enables a CRC-32C checksum, making it the only supported checksum for redo log pages.
  • This patch also removes unused fields from the redo log header and checkpoint pages.
  • Due to redo log format changes introduced by this patch, upgrading to or downgrading from MySQL 5.7.9 and higher requires a clean shutdown and, in some cases, removal of existing redo log files. For instructions related to this change, see Changes Affecting Upgrades to MySQL 5.7, and Changes Affecting Downgrades from MySQL 5.7. (Bug #21759424)
  • Important Change; InnoDB: DYNAMIC replaces COMPACT as the implicit default row format for InnoDB tables. A new configuration option, innodb_default_row_format, specifies the default InnoDB row format. Permitted values include DYNAMIC (the default), COMPACT, and REDUNDANT.
  • The COMPACT row format remained the default row format until this release to ensure compatibility with older versions of InnoDB in MySQL 5.1 and earlier. Now that MySQL 5.1 has reached the end of its product lifecycle, the newer DYNAMIC row format becomes the default. For information about advantages of the DYNAMIC row format, see DYNAMIC and COMPRESSED Row Formats.
  • Newly created tables use the row format defined by innodb_default_row_format when a ROW_FORMAT option is not specified explicitly or when ROW_FORMAT=DEFAULT is used.
  • Existing tables retain their current row format if a ROW_FORMAT option was specified explicitly. If a ROW_FORMAT option was not specified explicitly or if ROW_FORMAT=DEFAULT was used, any operation that rebuilds a table also silently changes the row format of the table to the format defined by innodb_default_row_format. For more information, see Specifying the Row Format for a Table.
  • Important Change: Introduced the -> JSON column-path operator. column->path is now supported as a synonym of JSON_EXTRACT(column, path), where column is a JSON column, and path is a valid JSON path.
  • An expression with ->, like its equivalent that uses JSON_EXTRACT() instead, can be used in place of a column identifier wherever the latter can occur within a valid SQL statement. For example, the following CREATE TABLE and SELECT statements are valid.
  • A column-path expression can be used for any column value that is read in a SELECT column list, or in a WHERE, ORDER BY, or GROUP BY clause in any SQL statement; such expressions cannot be used to set values.
  • When an SQL statement contains one or more expressions using -> notation, each of these is translated into an equivalent expression that employs the JSON_EXTRACT() function instead. This can be seen in the output from EXPLAIN when used on such a statement.
  • Like JSON_EXTRACT(), the -> operator returns as NULL if no matching value for an otherwise valid path is found.
  • For more information about -> and JSON_EXTRACT(), see Functions That Search JSON Values. See Searching and Modifying JSON Values, for information about JSON path support. See also Secondary Indexes and Virtual Generated Columns, for additionl information and examples.
  • InnoDB: A new INNODB_METRICS server operations counter (innodb_dict_lru_count) counts the number of tables evicted from the table cache LRU list. Thanks to Daniël van Eeden for the patch. (Bug #21682332, Bug #78190)
  • InnoDB: The new innodb_numa_interleave read-only configuration option allows you to enable the NUMA interleave memory policy for allocation of the InnoDB buffer pool. When innodb_numa_interleave is enabled, the NUMA memory policy is set to MPOL_INTERLEAVE for the mysqld process. After the InnoDB buffer pool is allocated, the NUMA memory policy is set back to MPOL_DEFAULT. This option is only available on NUMA-enabled systems.
  • MySQL distributions now include these header files because my_sys.h depends on them: my_thread_local.h, thr_cond.h, thr_mutex.h, thr_rwlock.h. (Bug #21909332)
  • MySQL Server RPM packages now obsolete MySQL Connector C. Installing MySQL Server causes older libmysqlclient from any MySQL Connector C packages to be removed and replaces them with the current libmysqlclient. (Bug #21900800)
  • yaSS was upgraded to version 2.3.8. (Bug #21888925)
  • Insert overhead for the MEMORY storage table was reduced by caching computed hash values. (Bug #21866029)
  • RPM .spec files were updated so that MySQL Server builds from source RPM packages will include the proper files to take advantage of operating system NUMA capabilities. This introduces a runtime dependency on libnuma.so.1. RPM and yum detect this and refuse to install if that library is not installed. (Bug #21775221)
  • The initial-password message written by mysqld --initialize to the error log has been reduced from a [Warning] to a [Note]. (Bug #21680457)
  • The JSON_APPEND() function was renamed to JSON_ARRAY_APPEND(). (Bug #21560934)
  • Unneeded scripts and test files were removed from the tests directory and that directory was renamed to testclients. (Bug #21490075)
  • The JSON value-updating functions JSON_APPEND(), JSON_SET(), JSON_REPLACE(), and JSON_INSERT() now treat SQL NULL values as JSON null literals, which is consistent with JSON_OBJECT() and JSON_ARRAY(). (Bug #21450922)
  • The server now generates a warning when the default_storage_engine or default_tmp_storage_engine system variable is set to a disabled storage engine named in the disabled_storage_engines system variable. (Bug #21405865)
  • Metadata locking for tablespaces has been extended so that, for DDL statements that refer to multiple tablespaces, a metadata lock is acquired on all used tablespaces. (Bug #21376265)
  • Support for building with Solaris Studio 5.13 was added. (Bug #21185883)
  • mysql_ssl_rsa_setup now is less noisy by default. Output from openssl commands is displayed only if --verbose is given. (Bug #21024979)
  • yaSSL was upgraded to version 2.3.7d. This fixes a connection-failure issue whenused with the thread pool plugin. (Bug #20774956)
  • mysqlpump now supports a --version option. (Bug #77894, Bug #21534277)
  • Performance Schema digests in DIGEST_TEXT columns have ... appended to the end to indicate when statements exceed the maximum statement size and were truncated. This is also now done for statement text values in SQL_TEXT columns. (Bug #75861, Bug #20519832)
  • Output from mysql_upgrade is now less noisy and more informative. (Bug #59077, Bug #11766046)
  • A new SHUTDOWN SQL statement is available. This provides a SQL-level interface to the same functionality previously available using the mysqladmin shutdown command or the mysql_shutdown() C API function. See SHUTDOWN Syntax.
  • Work was done to clean up the source code base, including: Removal of unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removal of function declarations without definitions.
  • Bugs Fixed:
  • Important Change; InnoDB; Partitioning: There was no way to upgrade existing partitioned tables to use the native partitioning implemented for InnoDB tables in MySQL 5.7.6. This fix adds support to both mysql_upgrade and the mysql client for upgrading partitioned InnoDB tables created in previous releases, which used the ha_partition handler, to use InnoDB native partitioning instead.
  • mysql_upgrade now checks for all InnoDB tables that were created using the generic ha_partition handler and attempts to upgrade them to InnoDB native partitioning.
  • In the mysql client, pre-5.7.6 partitioned InnoDB tables can be upgraded one by one to native partitioning using the ALTER TABLE ... UPGRADE PARTITIONING statement that is implemented in this release.
  • (Bug #20727344, Bug #76374)
  • Important Change; Replication: The START SLAVE and STOP SLAVE statements can no longer be used for the group_replication_recovery channel. See Replication Channels, for more information. (Bug #21680074)
  • Important Change; Replication: In MySQL 5.7, the binlog_max_flush_queue_time system variable introduced in MySQL 5.6 no longer has any effect. This variable is now deprecated, and has been marked for eventual removal in a future MySQL release. (Bug #21347087)
  • Important Change; Replication: When using a single-threaded slave, the status of the applier thread is now reported as part of the replication_applier_status_by_worker table, instead of replication_applier_status_by_coordinator. This means that replication_applier_status_by_coordinator is now empty when using a single-threaded slave; it should be noted that such reporting for multi-threaded slaves has not been changed, and continues to be shown in that table. (Bug #74765, Bug #20001173)
  • InnoDB: The undo log contained insufficient information about virtual columns and virtual column indexes, which could cause a server exit when adding or dropping virtual columns. As a result, a slow shutdown (using innodb_fast_shutdown=0) is required prior to performing an in-place upgrade or downgrade from MySQL 5.7.8. For more information, refer to Upgrading or Downgrading MySQL. (Bug #21869656)
  • InnoDB: A table-rebuilding ALTER TABLE operation that created an index on a virtual column raised an assertion. (Bug #21847170)
  • InnoDB: A SELECT ... FOR UPDATE operation on a table with virtual generated columns raised an assertion. InnoDB unnecessarily retrieved a non-indexed virtual column for a covered secondary index scan. (Bug #21827963)
  • InnoDB: Creating a table with large rows failed when using a ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED due to an incorrect undo log record size calculation. The same operation succeeded with ROW_FORMAT=COMPACT or ROW_FORMAT=REDUNDANT.
  • ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED now permit a row length violation at DDL time if innodb_strict_mode is disabled. (Bug #21816041)
  • InnoDB: Adding an index on a generated virtual column with an index prefix length that exceeded the maximum length caused a server exit. (Bug #21812026)
  • InnoDB: A memory leak occurred after crash recovery. Memory allocated in fil_space_read_name_and_filepath() was not freed. (Bug #21811321)
  • InnoDB: Altering the data type or computation method of a virtual generated column caused an error. (Bug #21810004)
  • InnoDB: An assertion was raised when creating a spatial index. InnoDB failed to count irtual columns that preceded the spatial index column. (Bug #21807340)
  • InnoDB: Tablespace discovery modifications in MySQL 5.7.5 included the removal of code related to MLOG_FILE_CREATE2 redo log records. As a result, the redo log did not contain sufficient information about file creation. (Bug #21801423)
  • InnoDB: The redo log provided no indication that redo logging is disabled for index page writes during concurrent DDL operations. As a result, external hot backup tools could produce corrupt backups. (Bug #21796691)
  • InnoDB: In debug builds, recovery asserted during a transparent page compression test. A torn page from the doublewrite buffer caused an LSN debug check failure. (Bug #21796092)
  • InnoDB: Creating a virtual generated column on a partitioned table caused a server exit. (Bug #21790751, Bug #78326)
  • InnoDB: An old version of numactl headers on the build host caused a compilation error when building a MySQL version that includes NUMA memory policy support. (Bug #21785074)
  • InnoDB: A SELECT .. FOR UPDATE operation on an indexed virtual generated column raised an assertion. (Bug #21775459)
  • InnoDB: The mysql_system_tables_fix_for_downgrade.sql script, provided to facilitate system table alterations when downgrading from MySQL 5.7.6 or higher, was removed from the MySQL installation directory. The script was no longer valid for all downgrade paths. For more information, see Changes Affecting Downgrades from MySQL 5.7. (Bug #21753832)
  • InnoDB: The tablespace identifier (space_id) was logged twice for an MLOG_TRUNCATE redo log record. (Bug #21744589)
  • InnoDB: Crash recovery issued an invalid error message indicating that an isl file could not be opened or is not correct. (Bug #21691438)
  • InnoDB: The InnoDB Monitor displayed incorrect mutex creation information for a mutex with a long semaphore wait. (Bug #21682997, Bug #78179)
  • InnoDB: Error message formatting was corrected in the os_file_write_page() function. (Bug #21681433)
  • InnoDB: The i_s_dict_fill_sys_tablespaces() function could free memory associated with a file name before printing an error message. (Bug #21680518, Bug #78180)
  • InnoDB: In debug builds, scanned and applied redo log records are now printed with a string identifier instead of a numerical identifier when --debug=d,ib_log is passed to mysqld. For example, rec MLOG_2BYTES is now printed instead of rec 2. (Bug #21664268)
  • InnoDB: The number of system calls made by the InnoDB page compression feature was reduced. (Bug #21654695)
  • InnoDB: The recv_parse_log_rec function returned the length of the redo log record instead of 0 when encountering an incomplete MLOG_CHECKPOINT record. (Bug #21640085, Bug #78058)
  • References: This bug is a regression of Bug #17798076.
  • InnoDB: In debug builds, a parenthesis mismatch in a MATCH() ... AGAINST clause raised a full-text parser assertion. (Bug #21638907)
  • InnoDB: Debug code was added to avoid a doublewrite buffer assertion that was raised during Valgrind testing. (Bug #21631197)
  • InnoDB: Log messages were improved to help identify out-of-space errors that could occur when adding rollback segments. (Bug #21629618)
  • InnoDB: In debug builds, enabling the innodb_log_checkpoint_now debug option while a table-rebuilding ALTER TABLE operation is running could result in an infinite loop. (Bug #21628087, Bug #78056)
  • InnoDB: UNIV_INLINE was not defined for the dict_table_has_indexed_v_cols function. (Bug #21628058, Bug #78055)
  • InnoDB: Altering a virtual column data type is not supported as an in-place operation. (Bug #21617377)
  • InnoDB: Sorting was skipped by an ALTER TABLE statement that changed the primary key and dropped the last column of the previous primary key. (Bug #21612714, Bug #78020)
  • InnoDB: During recovery, an invalid isl file was treated as a missing isl file, resulting in the tablespace being opened using the file location defined in an MLOG_FILE_* record in the redo log. Recovery no longer opens the tablespace if the isl file is invalid. (Bug #21577278)
  • InnoDB: Code that provided a timeout mechanism intended to reduce adaptive hash index search latch (btr_search_latch) contention was removed. The code became obsolete after the introduction of adaptive hash index search system partitioning in MySQL 5.7.8. (Bug #21569876, Bug #77957)
  • InnoDB: The COMPRESSION option was displayed incorrectly in SHOW CREATE TABLE output. (Bug #21557723, Bug #77940)
  • InnoDB: An innodb_data_file_path mismatch raised an assertion, as did initializing the database with a data file size that was too small for the specified page size. (Bug #21551464)
  • InnoDB: A check was added to prevent accessing full-text index tables that are in an inconsistent state. (Bug #21529012)
  • InnoDB: A schema mismatch error occurred when importing a tablespace that was altered by DROP INDEX operation on the source server. (Bug #21514135, Bug #77659)
  • InnoDB: A virtual generated column on a table that uses index condition pushdown (ICP) caused an assertion. (Bug #21507796, Bug #21478287)
  • InnoDB: Creating an index on a virtual generated column after adding a full-text index on a preceding column raised an assertion. (Bug #21478389)
  • InnoDB: An INSERT operation raised a btr_search_enabled assertion. Assertion code was too restrictive. (Bug #21457373)
  • InnoDB: Reloading a table that was evicted while empty caused an AUTO_INCREMENT value to be reset. (Bug #21454472, Bug #77743)
  • InnoDB: A crash during a TRUNCATE TABLE operation caused the server to exit on startup. (Bug #21451922)
  • InnoDB: The .isl was not removed when dropping a general tablespace that was created outside of the MySQL data directory. (Bug #21446772)
  • InnoDB: An inconsistent read occurred under the REPEATABLE READ transaction isolation level. Transactions that operated on the same row were removed from transaction ID list in the incorrect order. (Bug #21433768)
  • References: This bug is a regression of Bug #17320977.
  • InnoDB: Attempting to create a general tablespace data file on a Windows root drive caused an error. (Bug #21419888)
  • InnoDB: After disabling the adaptive hash index feature, an adaptive hash index latch was unnecessarily obtained and released. (Bug #21407023)
  • InnoDB: An ALTER TABLE operation on a table with an index defined on a virtual column incorrectly modified the data of the virtual column. (Bug #21376546, Bug #77628)
  • InnoDB: Resizing the buffer pool online raised an assertion due to a memory full condition. (Bug #21348684, Bug #77564)
  • InnoDB: An ALTER TABLE ... IMPORT TABLESPACE operation with innodb_page_size=4K and ROW_FORMAT=DYNAMIC raised an assertion. (Bug #21341030)
  • InnoDB: For spatial indexes, InnoDB unnecessarily stored a 3072-byte prefix in undo log records instead of just the maximum bounding rectangle (MBR). For columns with externally stored data, both the prefix and MBR are logged. (Bug #21340268)
  • InnoDB: Invalid init_ftfuncs() assertion code was removed. (Bug #21300774)
  • InnoDB: Memory allocation sanity checks were added to the memcached code. (Bug #21288106)
  • InnoDB: An incorrect reference count caused a hang in the TrxInInnoDB constructor. innobase_close_connection() released the transaction object before destroying the TrxInInnoDB object where the reference count is adjusted. (Bug #21280816)
  • InnoDB: A MySQL 5.7.8 patch that reintroduced SHOW ENGINE INNODB MUTEX functionality caused a performance regression. (Bug #21266784)
  • InnoDB: A memcached flush_all command raised an assertion. A function that starts a transaction was called from within assertion code. (Bug #21239299, Bug #75199)
  • InnoDB: A shutdown hang occurred when a high priority transaction waited for a victim transaction to exit while the victim transaction waited for an asynchronous rollback t
  • InnoDB: A data corruption occurred on ARM64. GCC builtins did not issue the correct fences when setting or unsetting the lock word. (Bug #21102971, Bug #76135)
  • InnoDB: Server shutdown was delayed waiting for the purge thread to exit. To avoid this problem, the number of calls to trx_purge() was reduced, and the trx_purge() batch size was reduced to 20. (Bug #21040050)
  • InnoDB: In READ COMMITTED mode, a REPLACE operation on a unique secondary index resulted in a constraint violation. Thanks to Alexey Kopytov for the patch. (Bug #21025880, Bug #76927)
  • InnoDB: The IBUF_BITMAP_FREE bit indicated that there was more free space in the leaf page than was actually available. (Bug #20796566)
  • InnoDB: Moving the data directory before recovering a crashed database caused tablespace discovery to fail for file-per-table tablespaces created outside of the MySQL data directory. (Bug #20698468)
  • InnoDB: The innodb_buf_flush_list_now debug setting failed to flush all dirty pages to disk. (Bug #20582189)
  • InnoDB: An ALTER TABLE ... ADD FULLTEXT INDEX operation raised an assertion. A thread attempted to use a lower priority transaction that was being rolled back before the rollback operation completed. (Bug #20481175)
  • InnoDB: Running an ALTER TABLE operation on a referencing table with a cascading foreign key constraint during a concurrent DML operation on the referenced table caused a loss of referential integrity. (Bug #20367116)
  • InnoDB: Setting lower_case_table_names=0 on a case-insensitive file system could result in a hang condition when running an INSERT INTO ... SELECT ... FROM tbl_name operation with the wrong tbl_name letter case. An error message is now printed and the server exits when attempting to start the server with --lower_case_table_names=0 on a case-insensitive file system. (Bug #20198490, Bug #75185)
  • InnoDB: The server failed to start with an innodb_force_recovery setting greater than 3. InnoDB was set to read-only mode before redo logs were applied.
  • DROP TABLE is now supported with an innodb_force_recovery setting greater than 3. (Bug #19779113)
  • InnoDB: The trx_sys_read_pertable_file_format_id() function reported the wrong file format. (Bug #19206671)
  • Packaging; OS X: Using user=mysql during installation on OS X did not allow the mysql database to be installed. To fix this problem, OS X packages now use the --no-defaults option when creating this database. This also means that having a my.cnf file on the system no longer affects the installation. (Bug #21364902)
  • Partitioning: Error handling for failed partitioning-related ALTER TABLE operations against non-partitioned tables was not performed correctly (Bug #20284744)
  • Partitioning: ALTER TABLE when executed from a stored procedure did not always work correctly with tables partitioned by RANGE. (Bug #16613004)
  • Replication: The group replication applier channel does not support DATABASE as the slave_parallel_type; when group replication is started, this is checked for explicitly, and handled correctly. However, it remained possible to change this value indirectly at a later point in time by increasing the value of slave_parallel_workers while the slave SQL thread was stopped, which caused the applier to fail with an error. To fix this problem, the slave_parallel_type for the group_replication_applier is now checked to make sure that it is set to LOGICAL_CLOCK whenever the number of slave_parallel_workers is set greater then 0, and not merely when group replication is first started. (Bug #21798804)
  • Replication: As binlog_error_action=ABORT_SERVER is the default in MySQL 5.7.7 and later it is being used for more error situations. The behavior has been adjusted to generate a core dump to improve troubleshooting possibilities. (Bug #21486161, Bug #77738)
  • Replication: At runtime, some Gtid_set objects could be instrumented with a performance schema mutex key equal to 0 (which is invalid), due to its use as the effective default value when the mutex key was not actually supplied. This allowed these objects to be created without a valid key, which led to further issues when using them. (Bug #21485997)
  • Replication: When running the server with gtid_mode=ON, a DELETE from a MEMORY table following a restart was not written to the binary log correctly. (Bug #21045848)
  • Replication: The locking behavior of replication administration statements has changed to make SHOW SLAVE STATUS more concurrent. This makes the NONBLOCKING clause redundant for SHOW SLAVE STATUS and it has been removed. (Bug #20593028)
  • Replication: ER_CANT_USE_AUTO_POSITION_WITH_GTID_MODE_OFF errors were not reported using the correct format. (Bug #20545943)
  • Replication: When the dump thread was killed while dumping an inactive binary log, some events in this log could be skipped and thus not replicated. (Bug #78337, Bug #21816399)
  • References: See also Bug #74607, Bug #19975697.
  • Replication: XA transactions could cause an assert condition on XA COMMIT; this was happening because the internal transaction state was not reset between XA PREPARE and XA COMMIT or XA ROLLBACK, due to the fact that these operations constitute separate transactions under XA. In addition, XA ROLLBACK statements were not handled properly in some cases. (Bug #78264, Bug #21755890)
  • Replication: The interface between the Group Replication plugin and the Performance Schema engine made use of a type of memory allocation which was passed to the server, and was a potential source of problems when passing information between the plugin and performance_schema tables. The implementation for this interface has been reworked so as to avoid performing this type of memory allocation when sharing data. (Bug #78263, Bug #21755699)
  • Replication: The MTS submode set for each channel was ignored by the worker threads, which continued to read and use the global flag set for all slave channels. This could lead to errors when the coordinator was of one type and its workers of another. (Bug #77763, Bug #21464737)
  • Replication: Replication slaves could fail for having insufficient privileges when they had been granted only the REPLICATION SLAVE privilege. (Bug #77732, Bug #21455603)
  • Replication: The status variable Slave_open_temp_tables keeps track of the number of temporary tables that are opened by the replication slave. If multi-source replication is enabled, it is the total number of temporary tables for all channels. This fix addresses the following issues relating to this variable:
  • RESET SLAVE FOR CHANNEL channel forced the value of Slave_open_temp_tables to 0; in the event that some other replication channel had open temporary tables which were later dropped, the value wrapped around to a large negative value (1 - 232). This also caused spurious or missed warnings when issuing a STOP SLAVE or CHANGE MASTER TO statement.
  • The internal function that modifies Slave_open_temp_tables in such cases relied on two incorrect assumptions:
  • That the variable is updated by only one thread when multi-threaded slaves are not enabled, which is not true in the case of multi-source replication.
  • That non-atomic operations are safe with a single writer and multiple readers, which is not necessarily true for some platforms supported by MySQL.
  • Replication: The warning '@@session.gtid_executed' is deprecated and will be removed in a future release. was printed even when the session variable gtid_executed was not included in the result of a query. In addition, the result of SELECT @@session.gtid_executed included a duplicate warning. Both issues occurred because the warning was printed whenever the value of gtid_executed was accessed by a statement, such access occurring as a matter of course, whether or not a given variable is actually included in the result.
  • To fix this issue, we make handling of @@session.gtid_executed consistent with how the also-deprecated variable @@global.sql_log_bin is treated in such cases, by making the following changes:
  • gtid_executed is no longer included in the performnce_schema.session_variables table.
  • gtid_executed is still included in the information_schema.session_variables table, but when show_compatibility_56 = ON, the warning is not issued when querying the session_variables table, or when issuing SHOW VARIABLES or SHOW SESSION VARIABLES, even when using a matching LIKE clause with either of the SHOW statements.
  • The warning is still issued by a statement such as SELECT @@session.gtid_executed which accesses the value of the variable directly. (Bug #77574, Bug #21354712)
  • References: See also Bug #75980, Bug #20575529, Bug #76626, Bug #20854952.
  • Replication: When a transaction consisting of a single statement with a specified GTID failed in autocommit mode, its GTID was not released when rolling it back when binary logging was disabled. (Bug #77521, Bug #21338147)
  • Replication: The slave group event parser did not properly register an XA_ROLLBACK event as a transaction boundary. (Bug #77392, Bug #21273010)
  • Replication: mysqlbinlog printed a ROLLBACK statement at the end of the binary log file, which when played back failed with error 1782 @@SESSION.GTID_NEXT cannot be set to ANONYMOUS when @@GLOBAL.GTID_MODE = ON. This occurred when the binary log file did not include any data related events, or when the relay log file included a Format_description_log_event that had been generated on the master at server startup.
  • The fix for this issue causes a relay log's Format_description_log_event to do nothing if it is applied by a BINLOG statement, and stops a ROLLBACK from setting gtid_next to ANONYMOUS when the state of gtid_next has not yet been determined by a subsequent event. (Bug #76887, Bug #20980932)
  • Replication: SAVEPOINT and ROLLBACK TO SAVEPOINT within a trigger led to an assertion. (Bug #76727, Bug #20901025)
  • Replication: While a SHOW BINLOG EVENTS statement was executing, any parallel transaction was blocked. The fix ensures that the SHOW BINLOG EVENTS process now only acquires a lock for the duration of calculating the file's end position, therefore parallel transactions are not blocked for long durations. (Bug #76618, Bug #20928790)
  • Replication: If a CREATE VIEW statement failed, it was being incorrectly written to the binary log even though it did not result in the creation of a partial view. The fix ensures that such statements are not recorded in the binary log. Additionally it was found that when a statement which had failed on a master was received by a slave with an expected error, if the statement was skipped on the slave, for example due to a replication filter, the expected error was being compared with the actual error that happened on the slave. The fix ensures that if a statement with an expected error is received by a slave, if the statement has not been filtered, only then is it compared with the actual error that happened on the slave. (Bug #76493, Bug #20797764)
  • Replication: The action specified for binlog_error_action was not always honored correctly after a hardware failure occurred during log rotation. (Bug #76379, Bug #20805298)
  • Replication: When using MySQL 5.7.6 and later with binlog_format=row and gtid_mode=off, if CREATE ... SELECT was killed during execution it could lead to an inconsistent state, breaking replication. The cause was that in MySQL 5.7.6 the way CREATE ... SELECT was logged was changed, so that a commit was introduced between the CREATE TABLE and SELECT steps. The fix ensures that CREATE ... SELECT does not commit in the middle of the transaction when binlog_format=row. (Bug #76320, Bug #77098, Bug #20742519, Bug #21114464)
  • Replication: Modifying the master_info_repository or relay_log_info_repository inside a transaction and later rolling back that transaction left the repository in an unusable state. We fix this by preventing any modification of these repositories inside a transaction. (Bug #74950, Bug #20074353)
  • Replication: Transactions added to gtid_executed using SET gtid_purged were not taken into account by WAIT_FOR_EXECUTED_GTID_SET() until a subsequent transaction was committed by a client or slave thread. (Bug #73838, Bug #19579811)
  • Replication: When the running with --relay-log-info-repository=TABLE, the mysql.slave_relay_log_info table is updated when a transaction is committed or when a flush is performed explicitly, such during relay log rotation. If a transaction that uses any nontransactional tables (such as MyISAM tables) is split across multiple relay logs, it is partially committed on relay log flush. When gtid_mode=ON, this caused the same GTID to be used for the remaining portion of the transaction, which raised an ER_GTID_NEXT_TYPE_UNDEFINED_GROUP error.
  • We fix this issue by postponing in such cases the update of the relay log information repository that normally occurs on relay log rotation until the commit for the transaction in question has been executed.
  • This issue did not affect tables using transactional storage engines such as InnoDB. (Bug #68525, Bug #16418100)
  • For an index-only scan over an indexed generated column, the server could do random calculations; the random results were not exposed to the user, but Valgrind warnings could occur, and the server could exit when calculations involved function
  • Although the use of JSON values with GREATEST() or LEAST() is not currently supported, the server did not handle attempts to do so correctly, leading to an assert (Linux) or exit() call (Windows) in debug builds. Now when you try to use JSON values with either of these functions, the server emits a suitable warning (ER_NOT_SUPPORTED_YET). (Bug #21828321)
  • For debug builds, a DROP TRIGGER statement could raise an assertion if the trigger was defined on a table that contained a generated column. (Bug #21824519)
  • A table that included a generated column referencing a JSON column in some cases become corrupted, so that a subsequent access of the table using a different connection caused the server to fail. (Bug #21808680)
  • References: See also Bug #21824519, Bug #78408.
  • For tables with VIRTUAL generated columns, an INSERT with an empty values list could cause a server exit. (Bug #21807818)
  • CMake configuration was adjusted to handle new warnings reported by Clang 3.7. (Bug #21803314)
  • Using a materialized view defined over a table containing generated columns could cause a server exit. (Bug #21797776)
  • For partitioned InnoDB tables containing a virtual generated column, reads from the table could return random data for the column. (Bug #21779011)
  • The CMake checks for NUMA availability could cause compilation problems on platforms without NUMA support. (Bug #21774859)
  • The optimizer did not consider nonfunctional expressions such as (a AND b) = 1 when looking for indexed generated columns to substitute for the (a AND b) expression. Now expressions using the AND and OR logical operators are considered. (Bug #21770798)
  • For debug builds, when the optimizer tried to clone certain types of keys for a range optimization, an assertion was raised. (Bug #21761867)
  • For debug builds, the server could exit when the optimizer attempted to estimate the cost for processing unique values when there were no keys. (Bug #21697002)
  • An INSERT into a view with a subquery could fail if executed as a prepared statement. (Bug #21696206)
  • mysql-test-run.pl now has an --valgrind-clients option that causes all clients started by .test files to be run with valgrind. This option requires valgrind 3.9 or later.
  • In addition, several client memory leak issues were fixed. (Bug #21672747)
  • For queries on InnoDB tables for which the optimizer used SPATIAL indexes for full index scans, the result was empty because such indexes do not support a full scan. The optimizer no longer considers SPATIAL indexes as candidates for full index scans. (Bug #21663612)
  • For some inputs, ST_Intersection() could return an invalid polygon. (Bug #21658453)
  • Added Microsoft Visual Studio 2015 support. Changes include using the native (added in VS 2015) timespec library if it exists, renamed lfind/lsearch and timezone/tzname to avoid redefinition problems, set TMPDIR to "" by default as P_tmpdir no longer exists, deprecated std::hash_map in favor of std::unordered_map, and added Wix Toolset 3.10 support. (Bug #21657078)
  • Spatial functions could simplify geometry values in contexts where the value might be used elsewhere in a query, producing incorrect results. (Bug #21652012)
  • If ST_ConvexHull() or ST_SRID() were used in a view definition, the resulting definition contained ST_Convex_Hull() (misspelled) or SRID() (deprecated). (Bug #21651588)
  • JSON_TYPE() returned OPAQUE for some binary values that it should have identified as BLOB. (Bug #21649073)
  • The mysql client parser incorrectly interpreted optimizer hint comments that contained ;, ", ', or ` characters. (Bug #21646026)
  • These Version Tokens issues were resolved:
  • version_tokens_delete() now strips whitespace surrounding token names in its argument, similar to version_tokens_set() and version_tokens_edit().
  • Passing NULL to version_tokens_delete() caused a server exit.
  • Passing an argument with an empty token name to to version_tokens_set() or version_tokens_edit() caused a server exit.
  • Passing NULL as the timeout value to version_tokens_lock_exclusive() or version_tokens_lock_shared() caused a server exit.
  • (Bug #21645001, Bug #21646106, Bug #21645944, Bug #21646017)
  • For debug builds, enabling the PAD_CHAR_TO_FULL_LENGTH SQL mode could cause SHOW FUNCTION STATUS to raise an assertion. (Bug #21632425)
  • mysqlpump did not exit with a message for some combinations of incompatible options. (Bug #21628662)
  • An assertion could be raised if the optimizer tried to create a temporary table based on a prepared statement parameter. (Bug #21625929)
  • Executing a prepared statement with multiple nested subqueries could raise an assertion. (Bug #21624851)
  • For debug builds, failure of subquery optimization could cause an assertion to be raised due to improper error handling. (Bug #21621313)
  • Some table and index optimizer hints were lost early in statement processing, so query rewrite plugins did not have access to them. This could cause incorrect matching between incoming statements and statement pattern templates. (Bug #21619780)
  • Queries containing nested subqueries combining grouping and outer references might cause a server exit. (Bug #21619634)
  • Passing NULL as the second or third argument to ST_AsGeoJSON() could cause the server to stop responding to the session or (in debug builds) to raise an assertion.
  • Giving input to HANDLER READ that could not be converted to the correct type could cause the server to stop responding to the session or (in debug builds) to raise an assertion. (Bug #21616810, Bug #21650603)
  • For debug builds, ST_IsValid(NULL) could raise an assertion. (Bug #21616647)
  • For debug builds, an assertion could be raised for negative zero values when converting time values to decimal. (Bug #21616585)
  • ST_AsWKB() could cause a server exit if given invalid data. (Bug #21614368)
  • If an aggregate function was used over a generated column that was itself part of a multiple-column index, the server could exit. (Bug #21613615)
  • A missing error check during column reference resolution could result in an incorrect error message or (in debug builds) an assertion being raised. (Bug #21613422)
  • For debug builds, an assertion could be raised in Filesort::make_sortorder() for attempts to sort Item_ref objects. (Bug #21611270)
  • JSON functions could return incorrect values if a path argument was passed as a user-defined variable that changed values between result set rows. (Bug #21602361)
  • Columns selected from the right-hand table of a left join, which was also a derived table, might produce incorrect NULL value information when used in an IN subquery. (Bug #21574933)
  • References: This bug was introduced by Bug #14358878.
  • For debug builds, an assertion was raised for some queries that have a semi-join and use the materialization strategy, if a key length or number of key parts was zero. (Bug #21566735)
  • Compilation using gcc 4.9 or 5.1 failed on ARM64 platforms. (Bug #21552524)
  • If a multiple-column UPDATE statement failed to update a JSON column that was then referenced in a later update, the server could exit. (Bug #21547877)
  • For debug builds, invalid geometry byte strings could cause spatial functions to raise an assertion rather than return an error to the caller. (Bug #21546656)
  • For debug builds, a too-strict assertion could be raised by invalid characters for LOAD DATA. (Bug #21542698)
  • The server could exit when InnoDB tried to update a secondary index on a VIRTUAL generated column of type BLOB. (Bug #21530366)
  • Binary logging of CREATE USER and statements could log the hash of the password hash (rather than the hash itself) when log_backward_compatible_user_definitions was enabled. Binary logging of ALTER USER statements could include attributes not present in the original statements.
  • In consequence of the fix for these issues, log_backward_compatible_user_definitions has been replaced by log_builtin_as_identified_by_password. If this variable is enabled, binary logging for CREATE USER statements involving built-in authentication plugins rewrites the statements to include an IDENTIFIED BY PASSWORD clause, and SET PASSWORD statements are logged as SET PASSWORD statements, rather than being rewritten to ALTER USER statements. (Bug #21516392, Bug #20535561)
  • For debug builds, incorrect caching of JSON values could cause an assertion to be raised. (Bug #21491442)
  • An empty string (which is not a valid JSON value) normally is parsed and returned as a JSON null literal, but in some cases could raise an assertion for debug builds. (Bug #21487833)
  • For temporary tables created to handle UNION statements that selected CHAR or SET columns, the maximum column width could be too long for InnoDB to handle. Now such columns are created as variable-length columns. (Bug #21480999)
  • Certain JSON functions could return incorrect results when used in prepared statements which had path expression constants. (Bug #21472872)
  • Valgrind errors could occur during partition pruning for tables containing generated columns. (Bug #21469535)
  • For builds configured with MAX_INDEXES greater than 64, certain queries for which the server used temporary tables could cause a server exit. (Bug #21466850)
  • Adding or dropping a VIRTUAL generated column could cause a server exit. (Bug #21465626)
  • An attempt to use a previously unused time zone with CONVERT_TZ() could produce warnings or errors or (in debug builds) raise an assertion if GTIDs were enabled but the binary log was not enabled.
  • In debug builds, an attempt to use a previously unused time zone with CONVERT_TZ() or as the value of the time_zone system variable inside a stored program could raise an assertion. (Bug #21459999, Bug #21459795)
  • For plugins that use the audit plugin API, MYSQL_AUDIT_GLOBAL_VARIABLE_SET events passed to the notification function did not include the new variable value. (Bug #21457699)
  • Queries on a table containing an indexed generated column could fail if the table name contained special characters. (Bug #21454155)
  • When a view was the inner table of an outer join, a JSON column could produce a non-NULL value when NULL was expected. (Bug #21448719)
  • If JSON_CONTAINS_PATH() was called with a one_or_all argument of all and a path argument contained a wildcard, the function found all matches per path, even though in this case one match is sufficient. (Bug #21442775)
  • JSON_SET() and JSON_REPLACE() sometimes produced an incorrect result if a path expression identified a nonarray value. (Bug #21442624)
  • Suppression of JSON conversion errors using non-strict SQL mode or INSERT IGNORE could then cause an assertion to be raised if an empty value inserted into a JSON NOT NULL column was copied to another JSON column. (Bug #21437989)
  • For debug builds, some spatial functions that accept raw byte data for spatial arguments (for example, specified as hex values) could raise an assertion if such an argument contained extra garbage following valid data. (Bug #21397107)
  • ALTER TABLE could raise an assertion for a table with an indexed virtual column having a column position greater than 64. (Bug #21391781)
  • Evaluation of virtual generated columns could fail to evaluate all base columns and result in invalid memory reads. (Bug #21390605)
  • For deeply nested JSON input, ST_GeomFromGeoJSON() or JSON_VALID() could produce stack overflow. (Bug #21389101, Bug #21377136)
  • Failure to parse a JSON string that contained a floating-point number with a large, negative exponent could cause a server exit. (Bug #21384048)
  • For debug builds, an incorrect assertion could be raised during subquery execution. (Bug #21383882)
  • For debug builds, a missing error check in Item_sum_hybrid::fix_fields() caused an assertion to be raised. (Bug #21383714)
  • For debug builds, invoking ST_AsGeoJSON() within GROUP BY ... WITH ROLLUP could raise an assertion. (Bug #21383497)
  • JSON_SEARCH() could return incorrect results if an invalid escape expression was specified. (Bug #21383284)
  • For debug builds, a NULL first argument to JSON_SET() could raise an assertion. (Bug #21381806)
  • For expressions of the form (subquery) IN (subquery), where a subquery could return a JSON value, failure to handle a row result could cause a server exit.` (Bug #21376088)
  • Failure of JSON_APPEND() to handle a legal condition could cause a server exit. (Bug #21373874)
  • Calls to ST_Buffer() could hang or raise an assertion. (Bug #21372946)
  • The server could exit in unclean fashion if configured to listen on a TCP/IP port number already in use by another server instance. (Bug #21368299)
  • Certain subqueries as arguments to PROCEDURE ANALYSE() could cause a server exit. (Bug #21350175)
  • A query with a right outer join inside a derived table might return wrong data. (Bug #21350125)
  • Starting the server with --skip-grant-tables (or with options such as --initialize for which --skip-grant-tables is implicit) prevented the INSTALL PLUGIN and UNINSTALL PLUGIN statements from working. (Bug #21335821)
  • mysql_ssl_rsa_setup could create an unwanted .rnd file in the data directory. (The file is actually created by openssl, which mysql_ssl_ras_setup invokes. mysql_ssl_rsa_setup now cleans up the file.) (Bug #21335818)
  • For spatial functions, input polygons were automatically closed if open. However, the Open Geospatial Consortium guidelines require that input polygons already be closed. Unclosed polygons are now rejected as invalid rather than being closed. (Bug #21327888)
  • When a VIRTUAL generated column was added to a table, it was not ensured that data being calculated by the generated column expression would not be out of range for the column. This could lead to inconsistent data being returned and unexpectedly failed statements.
  • ALTER TABLE now supports WITHOUT VALIDATION and WITH VALIDATION clauses to control whether ALTER TABLE validates the data for a VIRTUAL generated column:
  • With WITHOUT VALIDATION (the default if neither clause is specified), an in-place operation is performed (if possible), data integrity is not checked, and the statement finishes more quickly. However, later reads from the table might report warnings or errors for the column if values are out of range.
  • With WITH VALIDATION, ALTER TABLE copies the table. If an out-of-range or any other error occurs, the statement fails. Because a table copy is performed, the statement takes longer.
  • WITHOUT VALIDATION and WITH VALIDATION are permitted only with ADD COLUMN, CHANGE COLUMN, and MODIFY COLUMN operations. (Bug #21317507)
  • Some INFORMATION_SCHEMA queries consumed excessive memory due to suboptimal query plans and insufficient materialization. (Bug #21299665)
  • With the server configured to send error messages to syslog or a log file, messages generated prior to error log setup were sent to stderr or stdout. These messages are now buffered until error log setup has completed, then logged to the proper destination. (Bug #21296553)
  • Statement digests did not include information about optimizer hint comments, causing statements with and without hints to be aggregated. (Bug #21286261)
  • Executing a prepared statement using a derived table and an aggregate function in a subquery in the SELECT list could cause a server exit. (Bug #2127774)
  • GRANT created the account for nonexistent accounts even if the NO_AUTO_CREATE_USER SQL mode was enabled. (Bug #21271571)
  • ST_SymDifference() with multipolygon arguments could return incorrect results. (Bug #21263152)
  • A query with a NOT IN subquery that had COUNT(DISTINCT) could return incorrect results. (Bug #21243772)
  • When started using a very old data directory (from MySQL 5.0), the server could exit due to failure to properly read the old grant tables. (Bug #21216433)
  • A mulitple-table update involving generated columns that updated used a temporay table could cause a server exit or raise an assertion. (Bug #21216067)
  • Unit testing now uses Google Mock 1.7 rather than 1.6. (Bug #21215389)
  • For queries containing an expression of the form (x IN (subquery)) IN (subquery2), a combination of semi-join and subquery materialization strategies could cause a server exit. (Bug #21205577)
  • If a query contained an outer join such as LEFT JOIN (t1,t2,...) and a hint was used to disable join buffering on a right-side table but not on the others, a server exit occurred. (Bug #21205282)
  • For a cursor type of CURSOR_TYPE_READ_ONLY, retrieving the result set for the first execution of a prepared CALL staement could be missing the first result set row if the data was numeric; raise an assertion for debug builds if the data was string; cause loss of the server connection when calling mysql_stmt_fetch(). (Bug #21199582)
  • Dangling blob pointers could remain when closing an InnoDB table, resulting in a subsequent read of invalid memory and a server exit. (Bug #21153489)
  • For some operations where sorting or grouping required a temporary table, the table could have zero columns and raise an assertion. (Bug #21143151)
  • For debug builds, merging a derived table into an outer query block could raise an assertion. (Bug #21139722)
  • Queries containing an expression of the form (x IS NULL) IN (subquery) could cause a server exit. (Bug #21139402)
  • During server SSL file autogeneration, ca.pem briefly had insecure file permissions. (Bug #21138119)
  • An assertion could be raised due to incorrect error handling if a SELECT ... FOR UPDATE subquery resulted in deadlock and caused a rollback. (Bug #21096444)
  • Selecting the result of an INSERT() function call to which input was passed as a hexidecimal string could expose more information than was passed to the function. (Bug #21056907)
  • Subqueries having COUNT() with GROUP BY could yield incorrect results. (Bug #21055139)
  • The updatable property of a view is set during view creation. If the underlying table was dropped and re-created as a nonupdatable one, the updatable property of the original view was not revised accordingly. This could cause a server exit for attempts to insert or replace into the view is made. (This problem was specific to views with multiple tables/views and did not occur with update statements.) (Bug #21039264)
  • The locking functions provided by the version_token plugin were renamed: vtoken_get_read_locks(), vtoken_get_write_locks(), and vtoken_release_locks() are now named version_tokens_lock_shared(), version_tokens_lock_exclusive(), and version_tokens_unlock(), respectively.
  • These functions also failed to have any effect because they were implicitly unlocked at the end of the statement in which they were set. (Bug #21034322, Bug #21280801)
  • Servers linked against yaSSL and compiled with GCC 4.8.2 could fail to respond correctly to connection attempts until several seconds after startup.
  • yaSSL was upgraded to version 2.3.7e. (Bug #21025377)
  • When upgrading an old data directory (MySQL 5.0 or 5.1), mysql_upgrade could fail to properly read the mysql.proc table. (Bug #20968596)
  • For tables with subpartitions, the server could exit due to incorrect error handling during partition pruning if the partition could be identified but not the subpartition. (Bug #20909518)
  • mysql_upgrade could fail to look for checked tables in the wrong database during the repair phase. (Bug #20868496)
  • DELETE could check privileges for the wrong database when table aliases were used. (Bug #20777016)
  • mysqldump used incorrect syntax for generated column definitions. (Bug #20769542)
  • Within a trigger, use of a cursor that accessed OLD or NEW values from a row could cause a server exit. (Bug #20760261)
  • If a file was specified using an --init-file option, mysqld --initialize produced errors for statements in the file such as GRANT that affect user accounts. (Bug #20546898)
  • Failure during execution of an XA PREPARE statement could result in an invalid XA transaction state. Subsequent attempts to start another XA transaction led to an ER_XAER_OUTSIDE error. (Bug #20538956)
  • The audit log plugin could audit accounts named in the audit_log_exclude_accounts system variable. (Bug #20408206)
  • If a generated foreign key index was renamed by the same ALTER TABLE statement that added a new foreign key with the same name, the server could exit. (Bug #20146455)
  • ALTER TABLE operations that dropped and added the same FULLTEXT index were not performed as in-place (fast) operations that avoid using a temporary copy of the table. (Bug #20106837)
  • When the number of days calculated by DATE_FORMAT() function was negative, the server could exit. (Bug #19985318)
  • ALTER TABLE operations to add or modify columns could create geometry columns containing invalid data due to missing valida

New in MySQL 5.6.27 (Oct 7, 2015)

  • Functionality Added or Changed:
  • InnoDB: The new innodb_numa_interleave read-only configuration option allows you to enable the NUMA interleave memory policy for allocation of the InnoDB buffer pool. When innodb_numa_interleave is enabled, the NUMA memory policy is set to MPOL_INTERLEAVE for the mysqld process. After the InnoDB buffer pool is allocated, the NUMA memory policy is set back to MPOL_DEFAULT. This option is only available on NUMA-enabled systems.
  • yaSSL was upgraded to version 2.3.8. (Bug #21888925)
  • RPM .spec files were updated so that MySQL Server builds from source RPM packages will include the proper files to take advantage of operating system NUMA capabilities. This introduces a runtime dependency on libnuma.so.1. RPM and yum detect this and refuse to install if that library is not installed. (Bug #21775221)
  • yaSSL was upgraded to version 2.3.7d. This fixes a connection-failure issue when used with the thread pool plugin. (Bug #20774956)
  • Bugs Fixed:
  • InnoDB: Reloading a table that was evicted while empty caused an AUTO_INCREMENT value to be reset. (Bug #21454472, Bug #77743)
  • InnoDB: Memory allocation sanity checks were added to the memcached code. (Bug #21288106)
  • InnoDB: A memcached flush_all command raised an assertion. A function that starts a transaction was called from within assertion code. (Bug #21239299, Bug #75199)
  • InnoDB: A data corruption occurred on ARM64. GCC builtins did not issue the correct fences when setting or unsetting the lock word. (Bug #21102971, Bug #76135)
  • InnoDB: Server shutdown was delayed waiting for the purge thread to exit. To avoid this problem, the number of calls to trx_purge() was reduced, and the trx_purge() batch size was reduced to 20. (Bug #21040050)
  • InnoDB: In READ COMMITTED mode, a REPLACE operation on a unique secondary index resulted in a constraint violation.
  • InnoDB: The IBUF_BITMAP_FREE bit indicated that there was more free space in the leaf page than was actually available. (Bug #20796566)
  • InnoDB: Setting lower_case_table_names=0 on a case-insensitive file system could result in a hang condition when running an INSERT INTO ... SELECT ... FROM tbl_name operation with the wrong tbl_name letter case. An error message is now printed and the server exits when attempting to start the server with --lower_case_table_names=0 on a case-insensitive file system. (Bug #20198490, Bug #75185)
  • InnoDB: The server failed to start with an innodb_force_recovery setting greater than 3. InnoDB was set to read-only mode before redo logs were applied.
  • DROP TABLE is now supported with an innodb_force_recovery setting greater than 3. (Bug #19779113)
  • InnoDB: The trx_sys_read_pertable_file_format_id() function reported the wrong file format. (Bug #19206671)
  • Partitioning: CREATE TABLE statements that used an invalid function in a subpartitioning expression did not always fail gracefully as expected. (Bug #20310212)
  • Partitioning: Error handling for failed partitioning-related ALTER TABLE operations against non-partitioned tables was not performed correctly (Bug #20284744)
  • Partitioning: ALTER TABLE when executed from a stored procedure did not always work correctly with tables partitioned by RANGE. (Bug #16613004)
  • Replication: Repeatedly checking for ERR_LOCK_WAIT_TIMEOUT (as done, for example by repeatedly executing SHOW SLAVE STATUS) during a prolonged write lock on a table led to an assert. (Bug #21095969)
  • Replication: If statement based logging was in use, when updating multiple tables in a single statement, a single transaction could be logged as two different transactions. This was due to the binary logging process not properly identifying statements which were operating over transactional tables. The fix ensures that they are correctly identified, even if such statements do not change the contents of the tables. (Bug #16621582, Bug #21349028)
  • Replication: When the dump thread was killed while dumping an inactive binary log, some events in this log could be skipped and thus not replicated. (Bug #78337, Bug #21816399)
  • Replication: Under certain circumstances it was possible for Retrieved_Gtid_Set on the slave to contain gaps while no gaps appeared in Executed_Gtid_Set or the slave's binary logs. This could happen when slave rotated the relay log in such a way that the last event of this log contained the record which set gtid_next, and was then restarted after reading GTIDs from the following log. Following the restart, Retrieved_Gtid_Set contained GTIDs which were executed incorrectly as well as spurious or "phantom" gaps. TYhe fix for this problem adds a GTID to Retrieved_Gtid_Set before writing the event to the relay log, rather than after. If for some reason writing to relay log fails, the GTID is removed from Retrieved_Gtid_Set. (Bug #76959, Bug #21046372)
  • Replication: SAVEPOINT and ROLLBACK TO SAVEPOINT within a trigger led to an assertion. (Bug #76727, Bug #20901025)
  • Replication: While a SHOW BINLOG EVENTS statement was executing, any parallel transaction was blocked. The fix ensures that the SHOW BINLOG EVENTS process now only acquires a lock for the duration of calculating the file's end position, therefore parallel transactions are not blocked for long durations. (Bug #76618, Bug #20928790)
  • Replication: If a CREATE VIEW statement failed, it was being incorrectly written to the binary log even though it did not result in the creation of a partial view. The fix ensures that such statements are not recorded in the binary log. Additionally it was found that when a statement which had failed on a master was received by a slave with an expected error, if the statement was skipped on the slave, for example due to a replication filter, the expected error was being compared with the actual error that happened on the slave. The fix ensures that if a statement with an expected error is received by a slave, if the statement has not been filtered, only then is it compared with the actual error that happened on the slave. (Bug #76493, Bug #20797764)
  • Replication: The action specified for binlog_error_action was not always honored correctly after a hardware failure occurred during log rotation. (Bug #76379, Bug #20805298)
  • Replication: Modifying the master_info_repository or relay_log_info_repository inside a transaction and later rolling back that transaction left the repository in an unusable state. We fix this by preventing any modification of these repositories inside a transaction. (Bug #74950, Bug #20074353)
  • Replication: When relay_log_recovery is set, the error log entry that reports the new recovery positions has been extended to also report the old relay log positions. (Bug #74089, Bug #21305976)
  • Replication: When a master with --binlog_checksum=none and --gtid mode=ON was replicating to a slave with --binlog_checksum=crc32, restarting the slave's SQL thread caused an Event crc check error. This was due to the Format_description_log_event from the master not being correctly found in existing relay logs after restarting the slave's SQL thread. The fix ensures that the Previous_gtids_log_event is correctly skipped and that the correct Format_description_log_event is found in existing relay logs after restarting the slave's SQL thread. (Bug #73806, Bug #20644100, Bug #76746, Bug #20909880)
  • Replication: When the running with --relay-log-info-repository=TABLE, the mysql.slave_relay_log_info table is updated when a transaction is committed or when a flush is performed explicitly, such during relay log rotation. If a transaction that uses any nontransactional tables (such as MyISAM tables) is split across multiple relay logs, it is partially committed on relay log flush. When gtid_mode=ON, this caused the same GTID to be used for the remaining portion of the transaction, which raised an ER_GTID_NEXT_TYPE_UNDEFINED_GROUP error.
  • We fix this issue by postponing in such cases the update of the relay log information repository that normally occurs on relay log rotation until the commit for the transaction in question has been executed. This issue did not affect tables using transactional storage engines such as InnoDB. (Bug #68525, Bug #16418100)
  • The CMake checks for NUMA availability could cause compilation problems on platforms without NUMA support. (Bug #21774859)
  • Certain subqueries as arguments to PROCEDURE ANALYSE() could cause a server exit. (Bug #21350175)
  • mysql_ssl_rsa_setup could create an unwanted .rnd file in the data directory. (The file is actually created by openssl, which mysql_ssl_ras_setup invokes. mysql_ssl_rsa_setup now cleans up the file.) (Bug #21335818)
  • An assertion could be raised due to incorrect error handling if a SELECT ... FOR UPDATE subquery resulted in deadlock and caused a rollback. (Bug #21096444)
  • Selecting the result of an INSERT() function call to which input was passed as a hexidecimal string could expose more information than was passed to the function. (Bug #21056907)
  • The updatable property of a view is set during view creation. If the underlying table was dropped and re-created as a nonupdatable one, the updatable property of the original view was not revised accordingly. This could cause a server exit for attempts to insert or replace into the view is made. (This problem was specific to views with multiple tables/views and did not occur with update statements.) (Bug #21039264)
  • Servers linked against yaSSL and compiled with GCC 4.8.2 could fail to respond correctly to connection attempts until several seconds after startup. yaSSL was upgraded to version 2.3.7e. (Bug #21025377)
  • For tables with subpartitions, the server could exit due to incorrect error handling during partition pruning if the partition could be identified but not the subpartition. (Bug #20909518)
  • DELETE could check privileges for the wrong database when table aliases were used. (Bug #20777016)
  • Within a trigger, use of a cursor that accessed OLD or NEW values from a row could cause a server exit. (Bug #20760261)
  • MySQL sometimes produced no warning when it was unable to interpret a character in a given character set. (Bug #20238729)
  • On Windows, the validate_password plugin could cause a server exit during the dictionary check. (Bug #18636874)
  • On Windows, setting query_cache_min_res_unit to too large a value could result in a value of 0 and a subsequent server exit. (Bug #18487951) EXPLAIN of statements containing GROUP_CONCAT() could cause a server exit. (Bug #17865675)
  • On Windows, heap corruption in the audit log plugin caused server startup failure. (Bug #14700102)
  • RPM installation scripts if configuration files contained multiple datadir lines.
  • Now the last datadir line is used. (Bug #77878, Bug #21527467)
  • For wait events, the Performance Schema uses the CYCLE timer by default, but failed to fall back to a different timer if CYCLE was unavailable. (Bug #77577, Bug #21374104)
  • Updating VARCHAR and TEXT columns in the same UPDATE statement could produce incorrect results. When a VARCHAR column was assigned to a TEXT column and the VARCHAR column was then set to a different value, the TEXT column's result contained the VARCHAR column's new value. (Bug #77135, Bug #21143080)
  • If an INFORMATION_SCHEMA query that performed a table-open operation encountered a corrupt table and attempted to repair it, a deadlock could occur, resulting in an aborted transaction without an appropriate error being reported. Such queries now do not attempt table repair. (Bug #76912, Bug #21021848)
  • mysqladmin -u root -p could exit with a segmentation fault. (Bug #76538, Bug #20802751)
  • mysqlimport --use-threads did not actually use multiple threads. (Bug #76480, Bug #20772273)
  • The optimizer sometimes generates an index for a derived table (subquery in the FROM clause). If this occurred for a statement executed within a stored program, a memory leak could occur. (Bug #76349, Bug #20728894)
  • The optimizer could incorrectly assume an out-of-memory condition while optimizing a range scan for the OR operator, resulting in overestimation of the number of qualifying rows. (Bug #75248, Bug #20229614)
  • On platforms where the char is unsigned, the server was unable to parse collation definitions that included non-7-bit ASCII characters. Affected platforms include ARM and PowerPC.
  • The Performance Schema events_statements_history table could have an ERRORS column value of 0 when other columns indicated there were errors. (Bug #74614, Bug #19929832)
  • View creation from a UNION failed with a duplicate-column error if a SELECT statement in the UNION other than the first used the same column name multiple times. (Bug #74539, Bug #19886430)
  • Empty XML elements having the form were not handled correctly by the LOAD XML statement. (Bug #67542, Bug #16171518)

New in MySQL 5.7.8 RC (Aug 3, 2015)

  • ACCOUNT MANAGEMENT NOTES:
  • The maximum length of MySQL user names has been increased from 16 characters to 32 characters, which provides greater flexibility in choosing the user name part of MySQL account names. The change affects permitted user names in these contexts:
  • Account-management statements, such as CREATE USER, GRANT, REVOKE, and SHOW GRANTS.
  • Statements that support a DEFINER clause, such as CREATE PROCEDURE and CREATE VIEW.
  • Other statements with clauses that contain user names, such as CHANGE MASTER TO and CREATE SERVER.
  • Columns that store user names in mysql system database, INFORMATION_SCHEMA, and Performance Schema tables have been widened to accommodate 32 characters.
  • There are no changes in the client/server protocol, which exchanges user names as null-terminated strings. However, third-party programs that use this protocol to communicate may need to be modified if they use or store user names based on the assumption of 16 characters maximum.
  • The increase in maximum user name length has implications for MySQL administration:
  • Replication implication: Replication of user names longer than 16 characters to a slave that supports only shorter user names will fail. However, this should occur only when replicating from a newer master to an older slave, which is not a recommended configuration.
  • Downgrade implication: If a newer server supports any accounts with a user name longer than 16 characters, downgrades to an older version of MySQL that supports only shorter names is not possible.
  • If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change in user name length.
  • The CREATE USER statement now supports an IF NOT EXISTS clause that causes the statement to produce a warning for each named account that already exists, rather than an error. The ALTER USER and DROP USER statements now support an IF EXISTS clause that cause the statements to produce a warning for each named account that does not exist, rather than an error. For details, see CREATE USER Syntax, ALTER USER Syntax, and DROP USER Syntax.
  • These statement variants can be useful in replication scenarios when the set of accounts differs between master and slave. They also permit scripting account-management operations that otherwise would terminate for statement errors.
  • BACKUP NOTES:
  • A new client program, mysqlpump, provides an alternative to mysqldump. Significant mysqlpump features include
  • Parallel processing of databases, and of objects within databases, to speed up the dump process
  • For dump file reloading, faster secondary index creation for InnoDB tables by adding indexes after rows are inserted
  • Better control over which databases and database objects (tables, views, stored programs, user accounts) to dump
  • Dumping of user accounts as account-management statements (CREATE USER, GRANT) rather than as inserts into the mysql system database
  • Capability of creating compressed output
  • Progress indicator
  • CONFIGURATION NOTES:
  • The default configuration for systemd now sets LimitNOFILE to 5000 to increase the number of file descriptors available to the MySQL server. This change applies to Linux systems on which MySQL installation is performed using RPM packages. On such systems, the number of descriptors available is often set by the operating system to 1024. The change causes the number of descriptors to match the --open-files-limit option default value of 5000. To configure a different number of descriptors, set LimitNOFILE as described at Managing MySQL Server with systemd. (Bug #21073014)
  • JSON NOTES:
  • MySQL now supports a native JSON data type that enables efficient access to data in JSON (JavaScript Object Notation) documents. The JSON data type provides these advantages over storing JSON-format strings in a string column:
  • Automatic validation of JSON documents stored in JSON columns. Invalid documents produce an error.
  • Optimized storage format. JSON documents stored in JSON columns are converted to an internal format that permits efficient access to document elements.
  • Along with the JSON data type, a set of SQL functions is available to enable operations on JSON values, such as creation, manipulation, and searching. In addition, the CONVERT() and CAST() functions can convert values between JSON and other types.
  • OPTIMIZER NOTES:
  • The optimizer now is able to use indexes on generated columns, even when queries do not refer to such columns directly by name. The optimizer recognizes query expressions that match definitions of generated columns and uses indexes from those columns as appropriate during query execution. For details, see Optimizer Use of Generated Column Indexes.
  • The optimizer hint capability introduced in MySQL 5.7.7 has been expanded to subquery execution strategies. Subquery hints affect whether to use semi-join transformations and which semi-join strategies to permit, and, when semi-joins are not used, whether to use subquery materialization or IN-to-EXISTS transformations.
  • There is also a new duplicateweedout flag for the optimizer_switch system variable. This flag enables use of optimizer_switch to specify whether to use the Duplicate Weedout semi-join strategy, which was not previously possible.
  • The optimizer cost model has a new memory_block_read_cost parameter in the mysql.engine_cost table representing the cost of reading an index or data block from an in-memory database buffer.
  • Together with the existing io_block_read_cost parameter representing the cost of reading a block from disk, this change enables cost models for data access methods to take into account the costs of reading information from different sources; that is, the cost of reading information from disk versus reading information already in a memory buffer. For the initial implementation, the default value of memory_block_read_cost is the same as io_block_read_cost. Tuning the values remains as future work, although you can change the values to see how that affects query performance. For more information, see The Optimizer Cost Model.
  • If you upgrade to this MySQL release from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change into the mysql database.
  • PACKAGING NOTES:
  • For Windows, the MSI installer package no longer includes debugging binaries/information components (including PDB files). These are available in a separate Zip archive named mysql-VERSION-winx64-debug-test.zip for 64-bit and mysql-VERSION-win32-debug-test.zip for 32-bit. (Bug #18296012)
  • PERFORMANCE SCHEMA NOTES:
  • Current-event timing now provides more information. Previously, while a wait, stage, statement, or transaction event was executing, the respective tables displayed the event with TIMER_START populated, but with TIMER_END and TIMER_WAIT as NULL:
  • events_waits_current
  • events_stages_current
  • events_statements_current
  • events_transactions_current
  • To make it possible to determine how how long a not-yet-completed event has been running, the timer columns now are set as follows:
  • TIMER_START is populated (unchanged from previous behavior)
  • TIMER_END is populated with the current timer value
  • TIMER_WAIT is populated with the time elapsed so far (TIMER_END - TIMER_START)
  • To find events that have not yet completed (that is, have no END_EVENT_ID) and have taken longer than N picoseconds thus far, monitoring applications can use this expression in queries:
  • WHERE END_EVENT_ID IS NULL AND TIMER_WAIT > N
  • Bug #75156, Bug #20889406)
  • The Performance Schema incorporates these changes:
  • The show_compatibility_56 system variable default value, previously ON, has been changed to OFF. Applications that require 5.6 behavior should set this variable to ON until such time as they have been migrated to the new behavior for system variables and status variables. See Migrating to Performance Schema Variable Tables
  • When the Performance Schema session variable tables produced output, they included no rows for global-only variables and thus did not fully reflect all variable values in effect for the current session. This has been corrected so that each table has a row for each session variable, and a row for each global variable that has no session counterpart. This change applies to the session_variables and session_status tables.
  • It is no longer required that the show_compatibility_56 system variable be OFF for the Performance Schema system variable tables to produce output. The tables now produce output regardless of the variable value. This change applies to the global_variables, session_variables, and variables_by_thread tables.
  • WHERE clauses for SHOW VARIABLES and SHOW STATUS were deprecated in MySQL 5.7.6. This restriction has been lifted so that WHERE is supported as before 5.7.6.
  • The metadata_locks table now displays tablespace locks. Rows for these locks have an OBJECT_TYPE value of TABLESPACE.
  • The Performance Schema logs wait, stage, statement, and transaction events in these history tables:
  • events_waits_history
  • events_waits_history_long
  • events_stages_history
  • events_stages_history_long
  • events_statements_history
  • events_statements_history_long
  • events_transactions_history
  • events_transactions_history_long
  • Previously, historical event logging was controlled entirely by enabling or disabling history-related consumers in the setup_consumers table. These flags are global to the server, with the result that historical data was collected either for all threads or no threads.
  • The Performance Schema now uses history consumers in conjunction with the setup_actors table to make it possible to control collection of historical events per host, user, or account (combination of host and user). This table has a new HISTORY column that indicates whether to collect historical events (subject also to which history consumers are enabled), and each new foreground thread is matched against rows in the table. If a matching row is found, its HISTORY value is recorded in the row for the thread in the threads table, which also now has a HISTORY column.
  • Enabling historical event logging for a given session can be done independent of enabling instrumentation for it. Consequently, you can control more precisely what events are logged in history tables, with these advantages:
  • A decrease in runtime overhead when historical data is needed only for a subset of the instrumented sessions.
  • A reduction of noise in the history tables, facilitating troubleshooting on busy servers that generate a large number of events.
  • The threads table now contains a CONNECTION_TYPE column that indicates the connection protocol. It can be used to determine how the connection was made. Permitted values are TCP/IP (TCP/IP connection established without SSL), SSL/TLS (TCP/IP connection established with SSL), Socket (Unix socket file connection), Named Pipe (Windows named pipe connection), and Shared Memory (Windows shared memory connection).
  • Connection-type information is also written to the general query log for new connections, and the audit log interface was revised to incorporate the connection type.
  • For more information, see The threads Table, The General Query Log, and Writing Audit Plugins.
  • 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_schema database.
  • PLUGIN NOTES:
  • These changes were made for the Rewriter query rewrite plugin (see The Rewriter Query Rewrite Plugin):
  • There is now a single installation script, install_rewriter.sql. Previously, there were two installation scripts, install_rewriter.sql and install_rewriter_with_optional_columns.sql, which differed in whether they created the pattern_digest and normalized_columns columns of the rewrite_rules table. install_rewriter.sql now always creates those columns, so there is no need for install_rewriter_with_optional_columns.sql.
  • The enabled column of the rewrite_rules table is now defined as ENUM('YES,'NO') rather than as CHAR(1). Correspondingly, to enable a rule, set this column to YES rather than Y.
  • To upgrade if you have previously installed the Rewriter plugin, uninstall it by running the uninstallation script first, then run the installation script. After reinstalling, load your rewrite rules again (this is necessary because uninstalling drops the rules table).
  • SECURITY NOTES:
  • Community Edition RPM packages now invoke mysql_ssl_rsa_setup during installation to create default SSL and RSA key and certificate files. (Bug #20855737)
  • A new system variable, require_secure_transport, enables administrators to require all client connections to the server to be made using some form of secure transport. Qualifying connections are those that use SSL, a socket file (on Unix), or shared memory (on Windows). When this variable is enabled, the server rejects nonsecure connection attempts, which fail with an ER_SECURE_TRANSPORT_REQUIRED error.
  • This capability supplements per-account SSL requirements, which take precedence. For exmaple, if an account is defined with REQUIRE SSL, enabling require_secure_transport does not make it possible to use the account to connect using a Unix socket file.
  • SPATIAL DATA SUPPORT:
  • ST_NumInteriorRing() was added as more a standard-compliant alias of ST_NumInteriorRings(). (Bug #21362781)
  • All spatial computations now are done using Boost.Geometry functions. All older non-Boost-based algorithms have been removed. (Bug #21300713)
  • Geometry constructor functions that take WKT or WKB values (such as ST_GeomFromText() and ST_GeomFromWKB()) did not check for trailing garbage bytes. They now reject trailing nonwhitespace characters and produce an error. (Bug #21198064)
  • The required version of the Boost library for server builds has been raised from 1.57.0 to 1.58.0. (Bug #20721087)
  • Geometry object constructor functions such as Point() and MultiPolygon() now are stricter about rejecting invalid arguments. (Bug #20712775)
  • SQL MODE NOTES:
  • In MySQL 5.7.4, the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes were changed so that they did nothing when named explicitly. Instead, their effects were included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). The intent was to reduce the number of SQL modes with an effect dependent on strict mode and make them part of strict mode itself.
  • However, the change to make strict mode more strict by including ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE caused some problems. For example, in MySQL 5.6 with strict mode but not NO_ZERO_DATE enabled, TIMESTAMP columns can be defined with DEFAULT '0000-00-00 00:00:00'. In MySQL 5.7.4 with the same mode settings, strict mode includes the effect of NO_ZERO_DATE and TIMESTAMP columns cannot be defined with DEFAULT '0000-00-00 00:00:00'. This causes replication of CREATE TABLE statements from 5.6 to 5.7.4 to fail if they contain such TIMESTAMP columns.
  • The long term plan is still to have the three affected modes be included in strict SQL mode and to remove them as explicit modes in a future MySQL release. But to restore compatibility in MySQL 5.7 with MySQL 5.6 strict mode and to provide additional time for affected applications to be modified, the following changes have been made:
  • ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE again have an effect when named explicitly. This reverts a change made in MySQL 5.7.4.
  • ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE are no longer part of strict SQL mode. This reverts a change made in MySQL 5.7.4.
  • ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE are now included in the default sql_mode value, which as a result includes these modes: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, and NO_ENGINE_SUBSTITUTION.
  • With the preceding changes, stricter data checking is still enabled by default, but the individual modes can be disabled in environments where it is currently desirable or necessary to do so.
  • Although ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE again can be used separately from strict mode, it is intended that they be used together. As a reminder, a warning now occurs if they are enabled without also enabling strict mode or vice versa.
  • FUNCTIONALITY ADDED OR CHANGED:
  • InnoDB: The adaptive hash index search system is now partitioned, with each index bound to a specific partition, and each partition protected by a separate latch. Partitioning is controlled by the innodb_adaptive_hash_index_parts configuration option.
  • Prior to MySQL 5.7.8, the adaptive hash index search system was protected by a single latch (btr_search_latch) which could become a point of contention. To reduce contention, innodb_adaptive_hash_index_parts is set to 8 by default. The maximum setting is 512. (Bug #20985298)
  • InnoDB: The new innodb_log_checksum_algorithm option specifies how to generate and verify the checksum stored in redo log disk blocks. innodb_log_checksum_algorithm supports same algorithms as innodb_checksum_algorithm, which include innodb, crc32, none, and their associated strict forms. Previously, only the innodb algorithm was supported for redo log disk blocks. innodb_log_checksum_algorithm=innodb is the default setting.
  • InnoDB: InnoDB now supports page-level compression for file-per-table tablespaces. Page compression is enabled by specifying the COMPRESSION attribute when creating or altering a table. Supported compression algorithms include Zlib and LZ4. This feature, which is referred to as transparent page compression, relies on sparse file and hole punching support. It is supported on Windows with NTFS.
  • InnoDB: The new innodb_flush_sync configuration option, which is enabled by default, causes the innodb_io_capacity setting to be ignored for bursts of I/O activity that occur at checkpoints. To adhere to the limit on InnoDB background I/O activity defined by the innodb_io_capacity setting, disable innodb_flush_sync.
  • InnoDB: The default value for innodb_purge_threads and innodb_page_cleaners was changed from 1 to 4. If the number of page cleaner threads exceeds the number of buffer pool instances, innodb_page_cleaners is automatically set to the same value as innodb_buffer_pool_instances.
  • InnoDB: Internal server-layer functions were added to allow InnoDB purge threads to construct and destroy thread handle objects, and to compute virtual generated column index values when a table object is not present. This enhancement was required to support secondary indexes on virtual generated columns.
  • InnoDB: InnoDB now supports secondary indexes on virtual generated columns. For more information, see CREATE TABLE and Generated Columns.
  • InnoDB: Virtual generated column values no longer occupy space in database rows. With this change, a table rebuild is no longer required when adding or dropping virtual generated columns.
  • Virtual generated columns are still represented in InnoDB metadata. The N_COLS field of INNODB_SYS_TABLES still counts virtual generated columns, and INNODB_SYS_COLUMNS still includes virtual generated column metadata.
  • A new INFORMATION_SCHEMA table, INNODB_SYS_VIRTUAL, provides metadata about columns upon which virtual generated columns are based.
  • Replication: The behavior of SET GTID_PURGED has been changed so that it does not add any GTIDs to Previous_gtids_log_event and does not rotate the binary log. Instead the GTIDs are added to the mysql.gtid_executed table. This fix ensures that it is safe in all cases to use binlog_gtid_simple_recovery=1 for a server using MySQL 5.7.8 or later, where all binary logs were generated by servers using MySQL 5.7.8 or later. (Bug #75767, Bug #20470724)
  • Replication: When using a multi-threaded slave, each worker thread has its own queue of transactions to process. In previous MySQL versions, STOP SLAVE waited for all workers to process their entire queue. This logic has been changed so that STOP SLAVE first finds the newest transaction that was committed by any worker thread. Then, it waits for all workers to complete transactions older than that. Newer transactions are not processed. The new logic allows STOP SLAVE to complete faster in case some worker queues contain multiple transactions. (Bug #75525, Bug #20369401)
  • The patch number of the C client library is now increased for each patch version of the server. This number has the format major.minor.patch. (Bug #21341481)
  • The max_statement_time system variable was renamed to max_execution_time. The Max_statement_time_exceeded, Max_statement_time_set, and Max_statement_time_set_failed status variables were renamed to Max_execution_time_exceeded, Max_execution_time_set, and Max_execution_time_set_failed.
  • The MAX_STATEMENT_TIME option for SELECT statements was removed because its functionality is now available using the more general optimizer hint syntax (see Optimizer Hints). Statements that begin with SELECT MAX_STATEMENT_TIME = N ... should be rewritten to begin with SELECT /*+ MAX_EXECUTION_TIME(N) */ ...
  • There are some minor implementation differences between the two. MAX_STATEMENT_TIME was not permitted in non-top-level SELECT statements such as subqueries, or in stored programs, and produced an error. MAX_EXECUTION_TIME() is permitted in those contexts, but is ignored. (Bug #21306646, Bug #21306392, Bug #21306319)
  • GeometryCollection() with no arguments is now permitted as a way to create an empty geometry. (Bug #21127270)
  • Solaris tarball and PKG distributions no longer have -gcc in the distribution file names. (Bug #21047137)
  • Previously, the max_digest_length system variable controlled the maximum digest length for all server functions that computed statement digests. However, whereas the Performance Schema may need to maintain many digest values, other server functions such as query rewrite plugins need only one digest per session. Increasing the max_digest_length value has little impact on total memory requirements for those functions, but can increase Performance Schema memory requirements significantly. To enable configuring digest length separately for the Performance Schema, its digest length is now controlled by the new performance_schema_max_digest_length system variable. (Bug #20963147)
  • Use of the optimizer cost model was extended to estimating index scan costs within test_if_cheaper_ordering() for the I/O cost of accessing table blocks. (Bug #20947871)
  • mysqldump no longer dumps the sys schema by default. It is still possible to dump it by naming it explicitly on the command line (for example, mysqldump --databases sys). (Bug #20902791)
  • For non-TCP/IP connections, these changes were made when --ssl was specified to force SSL to be used. For named pipe and shared memory connections, attempts to use SSL now produce an error because these connections use non-network protocols.
  • The server now prints more descriptive diagnostic messages for bad values of secure_file_priv. (Bug #20771331)
  • The libmysqld embedded server took its default secure_file_priv value from the INSTALL_SECURE_FILE_PRIVDIR CMake option, but cannot share the same directory with a non-embedded server. The new INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR option enables a separate directory to be specified for libmysqld. The default value is NULL. (Bug #20770671)
  • mysql_ssl_rsa_setup now has a --uid=name option that enables specifying the owner for any files created by the program (if the program is executed as root). (Bug #20726413)
  • my_print_defaults now masks passwords. To display passwords in cleartext, use the new --show option. In addition, The output for client programs invoked with the --print-defaults option now masks passwords. (Bug #19953365, Bug #20903330)
  • For attempts to create a multiple-column SPATIAL index, the server previously returned an “Incorrect arguments to SPATIAL INDEX” error. Now it returns ER_TOO_MANY_KEY_PARTS (“Too many key parts specified; max 1 parts allowed”). (Bug #18320371)
  • For tables that contain object information, the Performance Schema now uses lowercase stored program names. (Bug #17818062)
  • To make the effect of password-change operations more clear, mysql_secure_installation now displays the user whose password is being changed. (Bug #17343687)
  • The shutdown timeout value in /etc/init.d/mysqld was too short for some environments. The value has been increased from 60 seconds to 600 seconds. (Bug #76900, Bug #20987568)
  • MySQL distributions now include an innodb_stress suite of test cases.
  • The data type for generated columns now permits the COLLATE attribute. (Bug #76329, Bug #20709487)
  • Connections for the FEDERATED storage engine now set the program_name session connection attribute to federated to permit identification of the connection source. (Bug #68781, Bug #16555730)
  • Previously, changes to the validate_password plugin dictionary file (named by the validate_password_dictionary_file system variable) while the server was running required a restart for the server to recognize the changes. Now validate_password_dictionary_file can be set at runtime and assigning a value causes the named file to be read without a restart.
  • In addition, two new status variables are available. validate_password_dictionary_file_last_parsed indicates when the dictionary file was last read, and validate_password_dictionary_file_words_count indicates how many words it contains. (Bug #66697, Bug #14588145)
  • The error produced for a COM_FIELD_LIST command with too much data was changed from ER_UNKNOWN_COM_ERROR to the more informative ER_MALFORMED_PACKET. (Bug #53699, Bug #11761229)
  • MySQL distributions no longer include the sql-bench directory. The INSTALL_SQLBENCHDIR CMake option has also been removed.
  • The so-called “fast mutex” code has been removed from the server sources. It provides no measurable benefit, complicates the code, and is problematic for certain architectures such as POWER8. The (undocumented) WITH_FAST_MUTEXES CMake option has also been removed.
  • Work was done to clean up the source code base, including: Removal of unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removal of function declarations without definitions.
  • The read_only system variable enables the server to be put into read-only mode, in which the server permits client updates only from users who have the SUPER privilege. A new super_read_only system variable, if enabled, prohibits client updates even from users who have SUPER. “Super” read-only mode can be useful for operations such as preparing a server for a move or upgrade because it prevents all client users from modifying data, even administrators.
  • mysqld_safe no longer uses the data directory as a possible location for setting MYSQL_HOME. (This has been deprecated since MySQL 5.0.)
  • A new system variable, disabled_storage_engines, enables administrators to designate storage engines that cannot be used to create new tables or tablespaces. By default, this variable is empty (no engines disabled), but it can be set to a comma-separated list of one or more engines. Any engine named in the value cannot be used to create tables or tablespaces with CREATE TABLE or CREATE TABLESPACE, and cannot be used with ALTER TABLE ... ENGINE or ALTER TABLESPACE ... ENGINE to change the storage engine of existing tables or tablespaces. Attempts to do so result in an ER_DISABLED_STORAGE_ENGINE error.
  • disabled_storage_engines does not restrict other DDL statements for existing tables, such as CREATE INDEX, TRUNCATE TABLE, ANALYZE TABLE, DROP TABLE, or DROP TABLESPACE. This permits a smooth transition so that existing tables or tablespaces that use a disabled engine can be migrated to a permitted engine by means such as ALTER TABLE ... ENGINE permitted_engine.
  • The default value of the table_open_cache_instances system variable has been increased from 1 to 16.
  • BUGS FIXED:
  • Incompatible Change: Internal storage format for VIRTUAL generated columns was modified. For MyISAM tables with such columns, this is an incompatible change; for upgrades, use ALTER TABLE to drop the columns before the upgrade and add them again after the upgrade. (Bug #21237637)
  • Incompatible Change: The mysql_parser plugin service interface defined in the service_parser.h header file was incorrect for the case that the MYSQL_DYNAMIC_PLUGIN macro was defined. The test for this symbol used the wrong name, so the interface did not enable the proper code. The test has been corrected, and some adjustments made to the API for function pointer members within the mysql_parser_service_st structure. Some function pointer names began with mysql_parser_, others with mysql_. For consistency, function pointer member names that began with mysql_parser_ were changed to begin with mysql_. The missing mysql_get_statement_digest function pointer member was added.
  • These modifications change the service API. Any plugin to be used with this version of MySQL that relies on the service must be recompiled. (Bug #20856729)
  • InnoDB; Partitioning: In certain rare cases the optimizer pruned all partitions for an InnoDB table but failed to remove the table from consideration as a source for obtaining matches, instead calling for the table to be initialized and prepared for fetching records. This occurred when the active index was not set during initialization. To fix this problem, we now set the active index ID during initialization even if there are no partitions to select from. This behavior also matches the way the same case is already handled in MySQL 5.6. (Bug #21211524)
  • InnoDB; Partitioning: Sorted index reads on partitioned InnoDB tables added rows to the prefetch cache, which could cause rows from the wrong partition since the prefetch cache does not support partitioned tables. Now the the prefetch cache is disabled in such cases. (Bug #20584754)
  • InnoDB; Partitioning: ALTER TABLE ADD UNIQUE INDEX failed when run concurrently with an INSERT on the same partitioned InnoDB table. (Bug #20510811, Bug #75834)
  • InnoDB; Partitioning: The CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table now shows the correct table creation time for partitioned InnoDB tables. The CREATE_TIME column of the INFORMATION_SCHEMA.PARTITIONS table now shows the correct partition creation time for a partition of partitioned InnoDB tables.
  • The UPDATE_TIME column of the INFORMATION_SCHEMA.TABLES table now shows when a partitioned InnoDB table was last updated by an INSERT, DELETE, or UPDATE. The UPDATE_TIME column of the INFORMATION_SCHEMA.PARTITIONS table now shows when a partition of a partitioned InnoDB table was last updated. (Bug #69990, Bug #17299181)
  • InnoDB: With innodb_strict_mode=OFF, a CREATE TEMPORARY TABLE ... ROW_FORMAT=Compressed TABLESPACE=innodb_file_per_table DATA DIRECTORY ... statement raised an assertion. The DATA DIRECTORY clause is not supported with temporary tables and should be ignored. (Bug #21324507)
  • InnoDB: The btr_search_drop_page_hash_index function dereferenced the adaptive hash index block before acquiring a latch, which could result in a race condition. (Bug #21310520)
  • InnoDB: A regression introduced in MySQL 5.7.2 caused an innochecksum-related memory leak. (Bug #21255718)
  • InnoDB: The records_in_range function returned a constant value for spatial indexes. (Bug #21245805, Bug #77332)
  • InnoDB: In some cases, memory was not properly allocated for rw_lock_t instances. (Bug #21242541)
  • InnoDB: SHOW ENGINE INNODB STATUS no longer reports mutex metrics. Mutex metrics are now reported by SHOW ENGINE INNODB MUTEX. (Bug #21238953, Bug #77314)
  • InnoDB: Functionality required to build adaptive hash indexes on field prefixes was reintroduced to improve sequential insert performance. The functionality was removed in MySQL 5.7.2 by the fix for Bug #21198396. (Bug #21198396)
  • InnoDB: When defining buf_block_t, a lock and a mutex were often accessed in the same vicinity, which could cause unintended cache line sharing. (Bug #21153684)
  • InnoDB: The ib_cursor_moveto function did not accept a search tuple with fewer fields than are defined for the index. (Bug #21121197, Bug #77083)
  • InnoDB: The ib_table_truncate function failed to release a transaction, resulting in a hang on server shutdown. (Bug #21121164, Bug #77084)
  • InnoDB: The ib_open_table_by_id function passed an incorrect argument to dict_table_open_on_id. (Bug #21121084, Bug #77100)
  • InnoDB: A cascade operation resulted in a duplicate entry error in FTS_DOC_ID_INDEX. The same document ID was used by two cascade operations. (Bug #21111301, Bug #77087)
  • InnoDB: Starting the server with an invalid innodb_data_file_path setting did not produce a sufficiently informative error message. (Bug #21103446, Bug #77056)
  • InnoDB: A regression introduced in MySQL 5.7.5 caused sorting to be skipped when rebuilding a table after dropping a single-column primary key. (Bug #21103101)
  • InnoDB: Opening a foreign key-referenced table with foreign_key_checks enabled resulted in an error when the table or database name contained special characters. (Bug #21094069)
  • InnoDB: The page_zip_verify_checksum function returned false for a valid compressed page. (Bug #21086723)
  • InnoDB: DDL operations for tablespaces could fail to implicitly commit the current transaction. (Bug #21081898)
  • InnoDB: The rollback of a partially completed transaction containing more than one update to a spatial index raised an assertion in row_ins_sec_index_entry_by_modify(). (Bug #21076238)
  • InnoDB: In the case of a lock conflict, shutdown could hang waiting for asynchronous rollback to finish. (Bug #21075892)
  • InnoDB: To avoid conflicts with implicitly created file-per-table tablespaces, CREATE TABLESPACE ... ADD DATAFILE no longer supports creation of tablespace data files in subdirectories under the MySQL data directory (datadir). Additionally, the data file path specified in a CREATE TABLESPACE ... ADD DATAFILE statement must be an existing directory. InnoDB no longer creates missing directories for CREATE TABLESPACE ... ADD DATAFILE statements. (Bug #21068487)
  • InnoDB: SHOW ENGINE INNODB MUTEX functionality, which was removed in MySQL 5.7.2, was revised and added back. Mutex statistics collection can now be configured dynamically using the following options:
  • To enable the collection of mutex statistics, run SET GLOBAL innodb_monitor_enable='latch';
  • To reset mutex statistics, run SET GLOBAL innodb_monitor_reset='latch';
  • To disable the collection of mutex statistics, run SET GLOBAL innodb_monitor_disable='latch';
  • Sync debug checking for the InnoDB storage engine, previously defined under UNIV_SYNC_DEBUG, is now defined under UNIV_DEBUG and is available when debugging support is compiled in using the WITH_DEBUG CMake option. When debugging support is compiled in, InnoDB sync debug checking is controlled by the innodb_sync_debug configuration option. (Bug #21052754)
  • InnoDB: A tablespace opened locally by a truncate routine was not closed in protected mode. (Bug #21046968)
  • InnoDB: An assertion was raised when truncation logic identified inactive undo tablespaces as candidates for undo log truncation. Some undo tablespaces were left inactive when the number of available undo tablespaces exceeded the number of undo logs. (Bug #21046781)
  • InnoDB: At startup, InnoDB updated the SYS_DATAFILES internal system table with the space_id and path of each system tablespace file even though a record was already present and SYS_DATAFILES.PATH matched the current value. (Bug #21044191)
  • InnoDB: In Windows debug builds, an innodb_flush_method setting of normal or unbuffered raised an assertion. (Bug #20981684)
  • InnoDB: Transactions could be subjected to rollback while performing DDL operations. The transactions were not marked as DDL transactions, and TRX_FORCE_ROLLBACK_DISABLE was not set. (Bug #20979020)
  • InnoDB: An ALTER TABLE ... IMPORT TABLESPACE operation on a table with prefix index failed with a schema mismatch error. (Bug #20977779, Bug #76877)
  • InnoDB: Initializing the database with an innodb_page_size setting of 64K and a system tablespace data file size less than 12MB raised an assertion. With an InnoDB page size of 64KB, the first system tablespace data file (ibdata1) was not large enough to contain the doublewrite buffer blocks (block1 and block2). To ensure that the doubwrite buffer blocks fit within the first system tablespace data file, a minimum data file size is now enforced. If innodb_page_size is less than or equal to 16KB, the minimum data file size for the first system tablespace data file (ibdata1) is 3MB. For innodb_page_size=32k, the minimum data file size is 6MB. For innodb_page_size=64k, the minimum data file size is 12MB. (Bug #20972309)
  • InnoDB: Full-text search operations between tables related by a foreign key constraint were not properly cascaded during iterative DML cascading operations. (Bug #20953265)
  • InnoDB: In MySQL 5.7.2, 32 of 128 undo logs (rollback segments) were reserved as non-redo undo logs for temporary table transactions. With one of the remaining undo logs always allocated to the system tablespace, 95 undo logs remained available for allocation to the system tablespace or separate undo tablespaces. This change effectively reduced the innodb_undo_tablespaces maximum limit from 126 to 95. In other words, a limit of 95 available undo logs also limited the maximum number of undo tablespaces to 95. In MySQL 5.7.8, the innodb_undo_tablespaces maximum value is officially reduced to 95. (Bug #20938115)
  • InnoDB: A memory leak occurred when a foreign key constraint object was loaded with the parent table while the child table failed to load. The foreign key constraint object should only be loaded with the child table. (Bug #20926253, Bug #21041449)
  • InnoDB: Debug only code set m_prebuilt, which may affect in-place ALTER TABLE behaviour. m_prebuilt to should not be used to store an intermediate value in debug-only code. (Bug #20921940)
  • InnoDB: The definition of the fil_node_t data structure was moved from fil0fil.cc to fil0fil.h so that diagnostic code outside that module can access information about files that belong to a tablespace. (Bug #20886222)
  • InnoDB: After upgrading to MySQL 5.7.6 or later, restarting the server after truncating a table that was originally created in MySQL 5.7.5 or earlier raised an “incorrect MERGE_THRESHOLD length in SYS_INDEXES” error. A MERGE_THRESHOLD column was added to the internal SYS_INDEXES table in MySQL 5.7.6. SYS_INDEXES records for tables that were not rebuilt or imported after upgrading did not include the new column. The TRUNCATE TABLE operation updated the table's SYS_INDEXES records to include the new column but set the MERGE_THRESHOLD value to NULL. (Bug #20882432)
  • InnoDB: A failure to load a change buffer bitmap page during a concurrent delete tablespace operation caused a server exit. (Bug #20878735)
  • InnoDB: A shutdown hang occurred when an innodb_force_recovery setting of 3 or higher prevented the rollback of transactions that were in an ACTIVE state. ACTIVE transactions are now placed in XA PREPARE state in the main-memory data structure to allow shutdown to proceed normally. The transactions are recovered as ACTIVE on the next restart and are rolled back unless innodb_force_recovery is again set to 3 or higher. (Bug #20874411)
  • InnoDB: If a server exit occurred during an XA ROLLBACK, the transaction was incorrectly recovered in XA PREPARE state. As a result, subsequent XA COMMIT transactions were possible, which would break ACID compliance and potentially cause corruption between indexes of a table. (Bug #20872655)
  • InnoDB: A CREATE TABLESPACE operation raised a Valgrind error due to a memory leak in the os_create_subdirs_if_needed function. (Bug #20865674)
  • InnoDB: Calls to buf_page_print() were removed to avoid filling mysql-test-run logs with InnoDB page dumps. Page dumps related to file I/O are still printed. (Bug #20863042)
  • InnoDB: CREATE TABLESPACE failed to move internal tablespace files to a reserved name space that starts with an innodb_ prefix, permitting internal tablespace files to be dropped. (Bug #20840368)
  • InnoDB: A TRUNCATE TABLE operation on a general tablespace table with a full-text search index raised an assertion. (Bug #20834483)
  • InnoDB: An assertion was raised on shutdown due to XA PREPARE transactions holding explicit locks. (Bug #20816223)
  • InnoDB: The fts_print_doc_id function printed too much debug information in debug builds. fts_enable_diag_print is now used instead. (Bug #20811125)
  • InnoDB: After a failed DROP TABLE operation, the purge background thread asserted while attempting to access an index page of the table. Purge should not attempt to clean a table that is marked as corrupt. Purge now checks for a corrupt primary index. (Bug #20789078, Bug #75913)
  • InnoDB: A checksum mismatch error on a crc32 checksum was encountered when restarting the server on a data file copied from a machine with a different endianness. The crc32 checksum should be recognized regardless of the native byte order of the system where the checksum was generated. (Bug #20783098, Bug #76375)
  • InnoDB: An ALTER TABLE ... DROP INDEX operation on a table with foreign key dependencies raised an assertion. (Bug #20768847)
  • InnoDB: An assertion was raised when InnoDB attempted to dereference a NULL foreign key object. (Bug #20762798)
  • InnoDB: An ALTER TABLE operation raised an assertion due a regression introduced in MySQL 5.7.6 with the introduction of native partitioning support for general tablespaces. (Bug #20759613)
  • InnoDB: In some instances, functions that call DBUG_ENTER did not call DBUG_RETURN. (Bug #20753620, Bug #76447)
  • InnoDB: A regression of the trx_is_started function in MySQL 5.7.6 caused a shutdown hang. (Bug #20744155)
  • InnoDB: The MeCab full-text plugin parser failed to handle an out-of-memory exception. (Bug #20742590)
  • InnoDB: An assertion was raised during a rollback operation due to a record the was incorrectly undelete-marked. (Bug #20734998)
  • InnoDB: An assertion was raised in a debug build when an ALTER TABLE operation invoked obsolete foreign key code while attempting to create an intrinsic temporary table as part of an optimizer plan. Temporary tables do not support foreign keys. Invocation of foreign key code is now blocked for intrinsic temporary tables. (Bug #20730289)
  • InnoDB: An INSERT operation raised an assertion. The calculation that determines the number of extents to reserve when storing a BLOB did account for compressed pages. (Bug #20713559)
  • InnoDB: Missing brackets in the fsp_flags_is_valid function could result in a failure to recognize a corrupted data file. (Bug #20671465)
  • InnoDB: A query that used a percentage character '%' as the last character in a query token raised a full-text parser plugin assertion. Full-text parser plugins created using the full-text parser plugin framework now ignore the '%' character if specified as the first or last character in a query token. Using the '%' character as the first character in a query token is not permitted by the internal SQL parser. Using the '%' character as last character in a query token is reserved for prefix matching. (Bug #20668156)
  • InnoDB: The INFORMATION_SCHEMA.FILES table now reports metadata for all InnoDB tablespace types including file-per-table tablespaces, general tablespaces, the system tablespace, temporary table tablespaces, and undo tablespaces (if present). System tablespace and temporary table tablespace metadata is no longer reported by the INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES and INFORMATION_SCHEMA.INNODB_SYS_DATAFILES tables. However, these tables continue to provide metadata for file-per-table and general tablespaces. (Bug #20660744, Bug #21086257, Bug #76182)
  • InnoDB: The InnoDB full-text search feature with the mecab parser plugin would print an empty error message. (Bug #20651493, Bug #76164)
  • InnoDB: Importing a tablespace with a full-text index resulted in an assertion when attempting to rebuild the index. (Bug #20637494)
  • InnoDB: A DML operation raised an assertion in btr_estimate_n_rows_in_range(). The assertion code was too strict. (Bug #20618309)
  • InnoDB: Defining a user-created FTS_DOC_ID column as a primary key produced incorrect full-text search relevancy rankings. (Bug #20597981)
  • InnoDB: During a table import operation, an INSERT failed with a duplicate key error on an AUTO_INCREMENT column due to an incorrectly initialized AUTO_INCREMENT value. (Bug #20597821, Bug #76037)
  • InnoDB: After dropping a full-text search index, the hidden FTS_DOC_ID and FTS_DOC_ID_INDEX columns prevented online DDL operations. (Bug #20590013, Bug #76012)
  • InnoDB: An assertion was raised on server startup when InnoDB tried to create a temporary file in a non-existent temporary directory (tmpdir) while in read-only mode. (Bug #20578834)
  • InnoDB: The strict_* forms of innodb_checksum_algorithm settings (strict_none, strict_innodb, and strict_crc32) caused the server to halt when a non-matching checksum was encountered, even though the non-matching checksum was valid. For example, with innodb_checksum_algorithm=strict_crc32, encountering a valid innodb checksum caused the server to halt. Instead of halting the server, a message is now printed to the error log and the page is accepted as valid if it matches an innodb, crc32 or none checksum. (Bug #20568464)
  • InnoDB: After moving the MySQL data directory and modifying the datadir configuration parameter to point to the new location, tables stored in general tablespaces failed to open because the tablespace data file could not be found. To address this problem, CREATE TABLESPACE ... ADD DATAFILE now creates an isl file in the MySQL data directory when a general tablespace data file is created outside of the MySQL data directory. Also, the fil_ibd_open function now searches for general tablespaces in the same way that it searches for file-per-table tablespaces. (Bug #20563954)
  • InnoDB: General tablespaces created on Windows using a relative data file path could not be opened on Unix-like systems. InnoDB failed to convert the backslash (“\”) directory separator that is used in the Windows version of the relative data file path. (Bug #20555168)
  • InnoDB: General tablespaces now support partitioned InnoDB tables, and individual partitions and subpartitions can now be assigned to a general tablespace. SHOW CREATE TABLE output was revised to include quotes around the tablespace identifier. (Bug #20554858, Bug #20588947)
  • InnoDB: An ALTER TABLE operation that added a spatial index caused the server to exit. (Bug #20547644)
  • InnoDB: Assertion code which checks for the lowest possible page number for a tablespace did not account for general tablespaces. (Bug #20544581, Bug #20810627)
  • InnoDB: The InnoDB memcached plugin handled unsigned NOT NULL integer columns incorrectly. (Bug #20535517, Bug #75864)
  • InnoDB: The following changes were implemented for full-text index auxiliary tables:
  • If the primary table is assigned to a general tablespace, full-text auxiliary tables are created in the same general tablespace.
  • Full-text auxiliary tables are created with the same row format as the primary table.
  • If the primary table was created in a location outside of the data directory using the DATA DIRECTORY clause, full-text auxiliary tables are created in the same location as the primary table.
  • InnoDB: The memcached set command permitted a negative expire time value. Expire time is stored internally as an unsigned integer. A negative value would be converted to a large number and accepted. The maximum expire time value is now restricted to INT_MAX32 to prevent negative expire time values. (Bug #20478242, Bug #75790)
  • InnoDB: An interrupted ALTER TABLE operation that rendered a child table unavailable caused an error and debug assertion after crash recovery, when the ALTER TABLE operation on the parent table detected that the foreign keys of the parent table could not be loaded. The debug assertion was removed and the error was replaced by a warning. (Bug #20476395)
  • References: This bug is a regression of Bug #19267051.
  • InnoDB: In debug builds, enabling the btr_cur_limit_optimistic_insert_debug flag raised a deadlock exception in the change buffer clustered index. (Bug #20459905, Bug #75736)
  • InnoDB: A warning message is now printed if DB_TRX_ID stored in a record is found to be greater than max_trx_id. In debug builds, an assertion is raised. (Bug #20445525)
  • InnoDB: Estimates for the number of records in a range for a given dataset could differ depending on the page size. (Bug #20427694)
  • InnoDB: During shutdown on Windows, the listener object in handle_shutdown() was freed while the listener was running, resulting in an exception in buf_pool_from_bpage(). (Bug #20421223)
  • InnoDB: SHOW ENGINE INNODB STATUS output showed negative reservation and signal count values due to a counter overflow error. (Bug #20417397)
  • InnoDB: Failure to check the status of a cursor transaction read-only option before reusing the cursor transaction for a write operation resulted in a server exit during a memcached workload. (Bug #20391552)
  • InnoDB: An assertion was raised in a debug build when populating a spatial index during an ALTER TABLE operation. The size of data tuples for compressed rows is calculated in the rec_get_converted_size_comp_prefix_low function. Debug code within the function did not account for the spatial index or the DATA_SYS_CHILD data type in the node pointers. (Bug #20372749)
  • InnoDB: CHECK TABLE returned a “wrong count” error for tables with spatial indexes. (Bug #20313067)
  • InnoDB: MDL locks taken by memcached clients caused a MySQL Enterprise Backup FLUSH TABLES WITH READ LOCK operation to hang. (Bug #20275612)
  • InnoDB: An embedded MySQL server failed to start with innodb_undo_tablespaces=2. The server was unable to locate undo tablespaces that were created when the MySQL instance was initialized. For embedded MySQL installations, the innodb_undo_directory default value of “.” may not be the same directory as the MySQL data directory. To address this problem, innodb_undo_directory is now NULL by default, requiring that a path be specified. If a path is not specified, undo tablespaces are created in the MySQL data directory, as defined by datadir. A workaround for pre-MySQL 5.7.8 embedded installations is to define an absolute path for innodb_undo_directory. (Bug #20023425)
  • InnoDB: A DML operation raised an assertion in file lock0lock.cc. A session holding an exclusive row lock on a clustered index page initiated a page reorganization while another session waited for a lock on the same row. The page reorganization changed the lock order, causing an assertion in lock_rec_add_to_queue(). (Bug #20005279)
  • InnoDB: A DROP DATABASE operation raised an assertion. (Bug #19929435)
  • InnoDB: InnoDB failed to open a tablespace after the data directory location of the tablespace was changed from a relative path to a full path. InnoDB failed to recognize that the relative path, which remained embedded in the data dictionary, pointed to the same data file as the full path. (Bug #19896685)
  • InnoDB: A TRUNCATE TABLE operation appeared to hang when run in parallel with a read-write workload. (Bug #19873470, Bug #74312)
  • InnoDB: The sorted index build feature introduced in MySQL 5.7.5 caused a performance regression when adding an index to a small table. The regression was due to excessive flushing triggered by a forced checkpoint that occurs after the sorted index build. (Bug #19865673, Bug #74472)
  • InnoDB: Updates to indexed columns could be slower in MySQL 5.7.5 and higher. In pre-MySQL 5.7.5 releases, InnoDB reserves 1/16 of the space in clustered index pages for future inserts and updates. This behaviour changed in MySQL 5.7.5 with the introduction of the innodb_fill_factor option. With innodb_fill_factor=100, B-tree index pages were completely filled during sorted index builds, and subsequent updates to index pages resulted in page splitting. To restore pre-MySQL 5.7.5 behavior, the default setting of innodb_fill_factor=100 now leaves 1/16 of the space in clustered index pages free for future index growth. (Bug #19821087, Bug #74325)
  • InnoDB: The ha_innobase::index_flags function returned invalid flags for spatial indexes. (Bug #19473391)
  • InnoDB: On Windows, asynchronous I/O requests remained waiting after InnoDB initialization was aborted. (Bug #19363615)
  • InnoDB: An index record was not found on rollback due to inconsistencies in the purge_node_t structure. (Bug #19138298, Bug #70214, Bug #21126772, Bug #21065746)
  • InnoDB: The ut_when_dtor struct, added in MySQL 5.7 to address a Valgrind issue, was removed to reduce code complexity. (Bug #18309926)
  • InnoDB: An INSERT operation raised an assertion when the transaction mode was modified after the transaction started. (Bug #15866285)
  • InnoDB: Queries that use both UNION and UNION ALL and disable the index would cause an assertion due to duplicate B-tree values. (Bug #76439, Bug #20752543)
  • InnoDB: In debug builds, attempting to create a spatial index after dropping the mysql.innodb_table_stats table raised an assertion in the btr_cur_open_at_rnd_pos_func function. (Bug #76437, Bug #20753642)
  • InnoDB: Transaction objects were passed to intrinsic table APIs, causing an assertion. Intrinsic tables, which do not support rollback and are not shared across connections, should ignore the transaction objects. (Bug #76415, Bug #20748479)
  • InnoDB: When innodb_thread_concurrency=1, queries on intrinsic temporary tables caused other sessions to hang. Queries on intrinsic temporary tables should not increment the number of active threads. (Bug #76346, Bug #20762059)
  • Partitioning: During execution of correlated subqueries, the server reinitialized a scan executed on the same table without ending the previous scan. (Bug #20949314, Bug #76810)
  • Partitioning: CREATE TABLE statements that used an invalid function in a subpartitioning expression did not always fail gracefully as expected. (Bug #20310212)
  • Partitioning: For an ordered index scan over multiple partitions, MySQL performs a merge sort across them using a priority queue whose entries hold pointers to buffers containing fetched rows. When all rows from all partitions are fetched, this queue is now empty. When this occurred, subsequent attempts to fetch rows were done by passing a null buffer pointer, which caused the server to fail. This could manifest itself when executing HANDLER ... READ ... PREV against a partitioned table. Now in such cases this pointer holds NO_CURRENT_PART_ID so that the partitioning handler is aware that the queue is empty. (Bug #20270687)
  • Partitioning: REPAIR TABLE ... QUICK could fail when used with multiple partitioned tables. (Bug #76154, Bug #20647894)
  • Partitioning: In certain cases, ALTER TABLE ... REBUILD PARTITION was not handled correctly when executed on a locked table. (Bug #75677, Bug #20437706)
  • Replication: Some replication thread statuses were not being shown in the PROCESSLIST_INFO column of the threads table. (Bug #21127308)
  • Replication: When using multiple replication channels, issuing RESET SLAVE on a non-default replication channel removes the channel, whereas issuing RESET SLAVE on the default replication channel does not remove the channel, as it always exists. In previous versions, this meant that the default replication channel did not correctly reset some configuration and status parameters. The fix ensures that issuing RESET SLAVE on the default replication channel resets all parameters. (Bug #21107331, Bug #21111229)
  • Replication: SHOW BINLOG EVENTS was not showing the correct statement for XA COMMIT ... ONE PHASE. Although the event was logged and replicated correctly, SHOW BINLOG EVENTS was showing an incorrect statement when handling the event. The fix ensures that the statement is correctly displayed. (Bug #21053526)
  • Replication: In MySQL 5.7.7 and earlier, GTIDs were automatically disabled whenever --initialize or --bootstrap were enabled. In MySQL 5.7.8 and later GTIDs are not disabled when --initialize or --bootstrap are enabled. (Bug #20980271)
  • Replication: When using mysql-test-run.pl with the --ps-protocol option to run a test against a server with log_bin=OFF, setting gtid_next and then executing a DDL statement caused an error. This was due to the DDL statement not being correctly logged to consume the GTID specified when setting gtid_next. (Bug #20954452)
  • Replication: When log_bin=ON, if a read-only XA transaction was prepared but had an empty body, a subsequent XA ROLLBACK caused an assertion. (Bug #20902763)
  • Replication: explicit_defaults_for_timestamp has been changed from a global variable to a global and session variable, and the session variable is now replicated. This means that you can change the variable and still be guaranteed that every statement uses the same value for the variable on master and slave, even if the variable is not changed synchronously on master and slave. (Bug #20866059)
  • Replication: When changing gtid_mode online, if autocommit was set to 0 and a set gtid_next=UUID:NUMBER statement had been issued, then changing gtid_mode was not being blocked. The fix ensures that variables which can only be set outside transaction context can now only be set if the thread does not own a GTID and does not hold anonymous ownership. This changes the behavior of these variables: enforce_gtid_consistency, gtid_mode, gtid_purged, session_track_gtids.
  • Replication: mysqlbinlog would apply any rewrite rules before applying the database filter. This meant that in cases when statement-based replication transactions were mixed with row-based replication transactions only one or the other type of transaction would be output. The fix changes the behavior so that the rewrite rules also apply to the USE db_name clause, rewriting the database specified by db_name according to the setting of the --rewrite-db parameter. This makes it possible to use the --database option on the query and row events. In addition, it removes the suppression of the USE db_name statement and ensures that the rewrite is done before the database filter. (Bug #20810442)
  • Replication: When slaves, and especially semisynchronous replication slaves, connected to a master there was a chance they could encounter a SLAVE HAS MORE GTIDS THAN THE MASTER HAS error. During connection the slave sends all replicated GTIDs to the master, and the master checks if all the GTIDs matching its server_uuid are included in its gtid_executed GTID set. There was a chance that a GTID was already in the slave's gtid_executed GTID set, but not in the master's gtid_executed GTID set. This was due to the GTID being added into gtid_executed after it was added to the binary log, meaning it was possible that a transaction had been replicated and applied on the slave, but not committed on the master yet. The fix ensures that the master checks if all GTIDs are in the union of gtid_executed and gtid_owned. (Bug #20464737)
  • Replication: A replication slave running with a gtid_mode other than OFF, log_bin=OFF and relay_log_info_repository=TABLE was consuming the GTID of a transaction prematurely when applying a transaction that spanned across distinct relay log files. This was caused when the slave SQL thread was flushing the relay log information to the mysql.slave_relay_log_info table while in the middle of a transaction, or immediately after the GTID of a transaction, because of the rotation of the relay log. The fix skips saving the gtid_state for operations that save the relay log information to the mysql.slave_relay_log_info table. (Bug #20451386)
  • Replication: When gtid_mode=ON, issuing a SET gtid_next='UUID:NUMBER' statement and then issuing a statement that caused an error, such as CREATE..SELECT, led to an assertion failure on COMMIT. This was due to gtid_next being incorrectly set to undefined for implicitly committing statements, even if the statement failed with an error before the implicit commit happened. (Bug #20343644, Bug #20444828)
  • Replication: If a slave was restarted with --relay-log-recovery enabled and the initialization of the default replication channel had failed, a slave could refuse to start or cause an assert in debug mode. (Bug #20191813, Bug #20236305)
  • Replication: When using RESET MASTER, the GTID state (gtid_executed and gtid_purged) is reset. On a server with log_bin=OFF, using RESET MASTER fails because the binary log is not enabled. However, since MySQL 5.7.5, GTIDs can be enabled even when the binary log is disabled. So in this case there was no way to reset the GTID state. The fix ensures that RESET MASTER can be executed on a server with GTIDs enabled and log_bin=OFF, enabling you to reset the GTID state. (Bug #19706455)
  • Replication: If statement based logging was in use, when updating multiple tables in a single statement, a single transaction could be logged as two different transactions. This was due to the binary logging process not properly identifying statements which were operating over transactional tables. The fix ensures that they are correctly identified, even if such statements do not change the contents of the tables. (Bug #16621582)
  • Replication: When starting more than one instance of mysqld on the same host at the same time, the instances could get the same server_uuid. The fix uses settings unique to each started mysqld instance to ensure that each gets a unique UUID. (Bug #16459136)
  • Replication: If flushing the cache to the binary log failed, for example due to a disk problem, the error was not detected by the binary log group commit logic. This could cause inconsistencies between the master and the slave. The fix uses the binlog_error_action variable to decide how to handle this situation. If binlog_error_action=ABORT_SERVER, then the server aborts after informing the client with an ER_BINLOGGING_IMPOSSIBLE error. If binlog_error_action=IGNORE_ERROR, then the error is ignored and binary logging is disabled until the server is restarted again. The same is mentioned in the error log file, and the transaction is committed inside the storage engine without being added to the binary log. (Bug #76795, Bug #20938915)
  • Replication: When a slave was stopped, replication_applier_status_by_worker showed worker_id as 1 and did not show the correct number. (Bug #76637, Bug #20857660)
  • Replication: Setting SESSION.GTID_NEXT=default immediately after setting SESSION.GTID_NEXT='ANONYMOUS' causes an ER_CANT_SET_GTID_NEXT_WHEN_OWNING_GTID error, but this also changes the gtid_next type from ANONYMOUS to AUTOMATIC, meaning that the next transaction could potentially cause an GTID_NEXT->TYPE != AUTOMATIC_GROUP || THD->OWNED_GTID.IS_EMPTY() assertion. To avoid this possibility, the fix ensures that setting SESSION.GTID_NEXT=default does not change the gtid_next type if it could cause an error. (Bug #76434, Bug #20753378)
  • Replication: Additional replication channels could not be added if the server had been started with server_id=0, the default. The fix ensures that a replication slave checks the server_id is greater than 0 when CHANGE MASTER TO has been issued before continuing with the initialization of a channel. (Bug #76432, Bug #20753463, Bug #20712720)
  • Replication: When a server was configured with gtid_mode=ON, log-bin=OFF, and with autocommit enabled, during commit it was possible to encounter an ASSERTION `IS_STARTED()' FAILED error. This was possible when an applier thread committed a transaction's GTID into the gtid_executed table before transaction prepare when binary logging was disabled, or binary logging was enabled and log_slave_updates was disabled. The cause was that when the server was saving a transaction's GTID into the gtid_executed table, the calculated transaction context could be committed during the save phase when autocommit was enabled. The fix ensures that the transaction context is calculated after saving the GTID's state, and then commit is executed on any remaining transactions. (Bug #76425, Bug #20748570)
  • And much more!

New in MySQL 5.7.7 RC (Jul 28, 2015)

  • Installation Notes:
  • Installers for more binary distribution types provide secure deployment. This includes installers for SLES, Solaris, OS X, FreeBSD, and Linux generic binary compressed tar distributions. These installers create a single 'root'@'localhost' account without other root or anonymous-user accounts, and do not create a test database accessible by any user. (Some installers may provide options to create additional accounts or a test database, but only if selected by the user.) Installers that run interactively and can ask the installing user for the initial root password do so. Noninteractive installers generate a random root password that the administrator can use to connect to the server the first time and choose a new password.
  • Optimizer Notes:
  • It is now possible to provide hints to the optimizer within individual SQL statements, which enables finer control over statement execution plans than can be achieved using the optimizer_switch system variable. Optimizer hints are specified as /*+ ... */ comments following the SELECT, INSERT, REPLACE, UPDATE, or DELETE keyword of statements or query blocks. Hints are also permitted in statements used with EXPLAIN, enabling you to see how hints affect execution plans.
  • Examples:
  • SELECT /*+ NO_RANGE_OPTIMIZATION(t3 PRIMARY, f2_idx) */ f1
  • FROM t3 WHERE f1 > 30 AND f1 < 33;
  • SELECT /*+ BKA(t1) NO_BKA(t2) */ * FROM t1 INNER JOIN t2 WHERE ...;
  • SELECT /*+ NO_ICP(t1, t2) */ * FROM t1 INNER JOIN t2 WHERE ...;
  • EXPLAIN SELECT /*+ NO_ICP(t1) */ * FROM t1 WHERE ...;
  • Packaging Notes:
  • Several binary distribution types have been made more modular, to split out test components into a separate distribution file. This reduces the size of the main download. In addition to the previously available test/debug distributions already available for Windows Zip archives, RPM packages, and Debian packages, the current release makes separate test distributions available for Solaris PKG files, and generic binary Linux and OS X compressed tar packages. These separate distributions have “test” in the distribution file name.
  • Generally, use of a test distribution requires that the main distribution is also installed. Additionally, for Solaris, the main and test distributions must be for the same version of MySQL.
  • Performance Schema Notes:
  • The Performance Schema incorporates these changes:
  • The MySQL sys schema is now installed by default during data directory installation. This is a set of objects that provides convenient access to data collected by the Performance Schema.
  • For new installations, mysql_install_db installs the sys schema. To permit this behavior to be suppressed, mysql_install_db now has a --skip-sys-schema option.
  • For upgrades, mysql_upgrade installs the sys schema if it is not installed, and upgrades it to the current version otherwise. To permit this behavior to be suppressed, mysql_upgrade now has a --skip-sys-schema option.
  • For sys schema usage instructions, see https://github.com/MarkLeith/mysql-sys.
  • The events_statements_history and events_transactions_history consumers now are enabled by default.
  • 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_schema database.
  • Security Notes:
  • The C client library now attempts to establish an SSL connection by default whenever the server is enabled to support SSL:
  • In the absence of an --ssl option, the client falls back to an unencrypted connection if SSL is not available.
  • To require an SSL connection and fail if SSL is unavailable, invoke the client with an explicit --ssl option.
  • To suppress the attempt at using SSL for the connection, specify the --ssl=0 option.
  • For more information, see SSL Command Options.
  • This change affects these standard MySQL client programs: mysql, mysql_config_editor, mysql_install_db, mysql_plugin, mysql_secure_installation, mysql_upgrade, mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlshow, and mysqlslap. It will also affect new releases of MySQL Connectors that are based on the C client library: Connector/C, Connector/C++, and Connector/ODBC.
  • Previously, proxy user mapping was available only for authentication plugins that implemented that capability for themselves. The MySQL server itself now can map proxy users according to granted proxy privileges. If the new check_proxy_users system variable is enabled, the server performs proxy user mapping for any authentication plugin that requests it. By default, check_proxy_users is disabled, so the server performs no proxy user mapping even for authentication plugins that request it.
  • In addition, the mysql_native_password and sha256_password built-in authentication plugins have been modified to take advantage of this server capability, and thus now are able to support proxy users. The new mysql_native_password_proxy_users and sha256_password_proxy_users system variables control whether each plugin requests proxy user mapping. By default, both variables are disabled, which produces behavior that is backward compatible with previous releases.
  • Spatial Data Support:
  • The ST_Buffer(), ST_Difference(), ST_Distance(), ST_Intersection(), ST_IsSimple(), ST_SymDifference(), and ST_Union() functions have been reimplemented to use the functionality available in Boost.Geometry. The functions may raise an exception for invalid geometry argument values when the previous implementation may not have.
  • In addition, ST_Buffer() now takes up to three optional arguments to specify point, join, and end strategies that influence buffer computation. Values for strategy arguments are produced using the new ST_Buffer_Strategy() function. See Spatial Operator Functions.
  • Functionality Added or Changed:
  • Important Change; InnoDB: The following changes were made to InnoDB configuration parameter default values:
  • The innodb_file_format default value was changed to Barracuda. The previous default value was Antelope. This change allows tables to use Compressed or Dynamic row formats.
  • The innodb_large_prefix default value was changed to ON. The previous default was OFF. When innodb_file_format is set to Barracuda, innodb_large_prefix=ON allows index key prefixes longer than 767 bytes (up to 3072 bytes) for tables that use a Compressed or Dynamic row format.
  • The innodb_strict_mode default value was changed to ON. The previous default was OFF. When innodb_strict_mode is enabled, InnoDB raises error conditions in certain cases, rather than issuing a warning and processing the specified statement (perhaps with unintended behavior).
  • The configuration parameter default changes described above may affect replication and mysqldump operations. Consider the following recommendations when using the new default settings:
  • When replicating or replaying mysqldump data from older MySQL versions to MySQL 5.7.7 or higher, consider setting innodb_strict_mode to OFF to avoid errors. Target settings should not be more strict than source settings.
  • When replicating from MySQL 5.7.7 or higher to older slaves, consider setting innodb_file_format=Barracuda and innodb_large_prefix=ON on the slave so that the target and source have the same settings.
  • The following file format related configuration parameters are deprecated and will be removed in a future release:
  • innodb_file_format
  • innodb_file_format_check
  • innodb_file_format_max
  • innodb_large_prefix
  • These four configuration parameters were provided for creating tables compatible with earlier versions of InnoDB in MySQL 5.1. Now that MySQL 5.1 has reached the end of its product lifecycle, the parameters are no longer required. Also, the file format scheme, by which named file formats would be introduced as new features were added, was not used after introduction of the Barracuda file format. InnoDB formats have changed since the introduction of the Barracuda file format, but new named file formats have not been added.
  • If non-default values are used for any of the four deprecated parameters, InnoDB prints a deprecation and removal warning to the server error log. The same warning is issued to the client if the parameters are set dynamically using a SET statement.
  • Important Change; InnoDB: The innodb_buffer_pool_dump_at_shutdown and innodb_buffer_pool_load_at_startup configuration options are now enabled by default. With this change, a percentage of most-recently-used buffer pool pages is dumped at server shutdown and restored at server startup. This behavior helps avoid a lengthy buffer pool warmup period after restarting the server, particularly for instances with large buffer pools. The innodb_buffer_pool_dump_pct option defines the percentage of buffer pool pages that are dumped. The default value for innodb_buffer_pool_dump_pct is reduced from 100 to 25.
  • These configuration option default value changes represent a change in behaviour at server shutdown and startup. If you prefer the previous default values, it is recommended that you configure the options explicitly in your MySQL configuration file after upgrading to MySQL 5.7.7 or later, and before restarting the server.
  • For more information, see Preloading the InnoDB Buffer Pool for Faster Restart.
  • Important Change; InnoDB: The innodb_checksum_algorithm default value is now crc32. The previous default setting was innodb. This change also means that innodb_checksums=ON is now equivalent to innodb_checksum_algorithm=crc32 instead of innodb_checksum_algorithm=innodb.
  • InnoDB: The InnoDB MeCab full-text parser plugin now supports the eucjpms, cp932, and utf8mb4 character sets.
  • InnoDB: To address a scalability bottleneck for some workloads where LOCK_grant is locked in read-mode, LOCK_grant locks are now partitioned. Read lock requests on LOCK_grant now acquire one of multiple LOCK_grant partitions. Write locks must acquire all partitions.
  • To address another scalability bottleneck, the server no longer performs unnecessary lock acquisitions when creating interal temporary tables.
  • Replication: The XA implementation in MySQL has been made much more compatible with the XA specification. A prepared XA transaction is no longer rolled back at disconnect. Now when replicating using the binary log, an XA transaction in PREPARED state persists in the binary log until an explicit XA COMMIT or XA ROLLBACK statement is issued. In prior versions, an XA transaction that was in PREPARED state would be rolled back on clean server shutdown or client disconnect. Similarly, an XA transaction that was in PREPARED state would still exist in PREPARED state in case the server was shutdown abnormally and then started again, but the contents of the transaction could not be written to the binary log. As part of this feature a new event, XA_prepare_log_event, has been added to track XA transactions in the PREPARED state and enable them to be replicated. To finalize a two-phase XA transaction, the XA COMMIT or XA ROLLBACK is recorded separately in the binary log, possibly interleaving with other transactions. XA transactions committed with XA COMMIT ONE PHASE are logged as one part using XA_prepare_log_event.
  • Replication: The defaults of some replication related variables have been modified. The following changes have been made:
  • binlog_gtid_simple_recovery=TRUE
  • binlog-format=ROW
  • binlog_error_action=ABORT_SERVER
  • sync_binlog=1
  • slave_net_timeout=60
  • Additionally, the session scope of gtid_executed has been deprecated. The global scope of gtid_executed remains supported.
  • Performance Schema stage event instruments that provide statement progress information now are enabled and timed by default. The affected instruments are those displayed by this statement:
  • SELECT * FROM performance_schema.setup_instruments WHERE
  • ENABLED='YES' AND NAME LIKE "stage/%";
  • The XID column of Performance Schema transaction tables (for example, events_transactions_current) has been split into three columns to permit access to the component parts of XID values. The new columns are XID_FORMAT_ID, XID_GTRID, and XID_BQUAL.
  • Previously, view definitions were not permitted to contain derived tables (subqueries) in the FROM clause. This restriction has now been lifted.
  • Previously, derived tables (subqueries) or views in the FROM clause could not be merged into the outer query if they contained subqueries in the SELECT list. Instead, they were processed using materialization. This restriction has now been lifted so that queries previously executed using materialization can be executed more quickly using merging.
  • In MySQL 5.7.6, the NO_AUTO_CREATE_USER was deprecated. (It is preferable to create MySQL accounts with CREATE USER rather than GRANT.) Now the default SQL mode includes NO_AUTO_CREATE_USER and assignments to sql_mode that change the NO_AUTO_CREATE_USER mode state produce a warning, except assignments that set sql_mode to DEFAULT. NO_AUTO_CREATE_USER will be removed in a future MySQL release, at which point its effect will be enabled at all times (GRANT will not create accounts).
  • Work was done to clean up the source code base, including: Removal of unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removal of function declarations without definitions.
  • Bugs Fixed:
  • InnoDB: FLUSH TABLE ... FOR EXPORT, which is an unsupported operation for tables residing in a general tablespace, failed to report a warning message.
  • InnoDB: The MeCab parser accessed the byte beyond the length of the document resulting in an Invalid read of size 1 Valgrind error. Document allocation size is now length + 1 byte.
  • InnoDB: A debug assertion should not be raised for static mutexes.
  • InnoDB: Tablespace and file path data updates to internal system tables during startup caused undo log corruption. The updates were made before calling truncate::fixup_tables(), which does not expect to encounter changed pages.
  • InnoDB: A TRUNCATE TABLE operation on a temporary table raised an assertion. The temporary table object was incompletely constructed when reloaded from SYS_TABLES.
  • InnoDB: Return value 16 when calling pthread_mutex_destroy() warnings were returned during atexit() processing.
  • InnoDB: A debug variable used to modify the first page of a tablespace raised an assertion when set to a nonexistent tablespace ID.
  • InnoDB: A buffer pool load operation raised an assertion when attempting to read pages that were placed out of tablespace bounds by a preceding TRUNCATE TABLE operation.
  • InnoDB: Removal of a foreign key object from the data dictionary cache during error handling caused the server to exit.
  • InnoDB: An assertion was raised during a redo log resize operation that was triggered by a file size mismatch encountered during recovery. Code introduced in MySQL 5.6.8 to automatically handle redo log file size mismatches failed to ensure that the buffer pool was clean prior to recreating redo log files.
  • InnoDB: An InnoDB memcached extra_col_value[] array was freed without checking the allocated flag, causing a server exit.
  • InnoDB: A DML operation performed while a flushing operation was in progress raised a memcached-related assertion.
  • InnoDB: A CHECK TABLE operation on a table with a spatial index raised an assertion. The row_sel_sec_rec_is_for_clust_rec function failed to handle an externally stored field.
  • InnoDB: CHECK TABLE reported misplaced rows after an in-place ALTER TABLE operation on a “partitioned by key” table. An in-place operation that drops and adds the primary key should not be permitted for tables that are partitioned by key.
  • InnoDB: Estimates that were too low for the size of merge chunks in the result sorting algorithm caused a server exit.
  • InnoDB: An ALTER TABLE ... RENAME operation raised an invalid assertion. The assertion code used an incorrect transaction object.
  • InnoDB: Running mysql_upgrade after a binary upgrade to MySQL 5.7.6 caused a server exit on a system with tablespace data files that were created in MySQL 5.1 or earlier. The fix for Bug #17345513 in MySQL 5.7.6 failed to address all instances of garbage FIL_PAGE_TYPE values in tablespace data files created in MySQL 5.1 or earlier.
  • With this patch, the manual process described in the MySQL 5.7.6 release notes entry for Bug #17345513 for repairing non-index pages that contain invalid FIL_PAGE_TYPE values is no longer necessary.
  • The patch for Bug #17345513 also failed to recompute page checksums after resetting invalid FIL_PAGE_TYPE values. Upon restarting the server, a failure would occur due to an apparent page corruption. The page checksum is now recomputed before the new FIL_PAGE_TYPE value is written to the data file.
  • InnoDB: For full-text searches, the optimizer could choose an index that does not produce correct relevancy rankings.
  • Partitioning: The MySQL Server unnecessarily requested the default number of partitions for a table whenever it opened a partitioned table. This was unnecessary since the server already has this information about the table to be opened. Now the server requests this information only when needed—that is, only if it is creating or altering a partitioned table.
  • Partitioning: A number of ALTER TABLE statements that attempted to add partitions, columns, or indexes to a partitioned table while a write lock was in effect for this table were not handled correctly.
  • Partitioning: Executing an ALTER TABLE on a partitioned table on which a write lock was in effect could cause subsequent SQL statements on this table to fail.
  • Replication: Some memory copy operations being performed on the Performance Schema replication_connection_status table were using an incorrect length, which could lead to a buffer overflow error or truncated output. The fix ensures that the correct length is used.
  • Replication: When using multi-source replication on a multi-threaded slave (where slave_parallel_workers is greater than 1), and slave_transaction_retries was greater than 1, the slave would fail to open the relay log file. This was due to the slave worker incorrectly constructing the relay log file path for its replication channel.
  • Replication: When the automatic_sp_privileges variable is set, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine, if the user does not already have these privileges. When a privileged user creates a procedure with DEFINER as a non privileged user on a master, the current user is considered to be a privileged user and the mysql.procs_priv table is not updated. When such a statement was replicated to slave, the non-privileged DEFINER was considered as the current user on the slave and privileges were being allocated. This caused a difference in the privileges that were being allocated on the master and the slave. The fix ensures that creater of the stored routine is added to the binary log, and the slave now checks first if the user exists before granting privileges. To maintain compatibility with previous versions, the DEFINER is used when the INVOKER is not available. As part of this fix, anonymous users can be used to replicate from master to slave.
  • Replication: If the I/O thread on a replication slave failed while it was in the initialization phase, it was not providing this information in the Last_IO_Error field after issuing SHOW SLAVE STATUS. The fix ensures that such errors are reported correctly in the Last_IO_Error field.
  • Replication: After issuing RESET SLAVE, the RECEIVED_TRANSACTION_SET field in the performance_schema.replication_connection_status table showed incorrect values. This could cause an incorrect string value error.
  • Replication: When gtid_mode=ON and slave_net_timeout was set to a low value, the slave I/O thread could appear to hang. This was due to the slave heartbeat not being sent regularly enough when the dump thread found many events that could be skipped. The fix ensures that the heartbeat is sent correctly in such a situation.
  • The query rewrite framework introduced in MySQL 5.7.6 produced excesssive mutex acquisition that caused performance degradation under some conditions.
  • CMake failed to detect the OpenSSL version properly for recent versions of OpenSSL (the format of the version string changed).
  • GRANT and ALTER USER could clear the password-expiration flag for operations not related to resetting the password.
  • SHOW CREATE USER did not work for clients older than MySQL 5.7.
  • For upgrades from MySQL 5.6 to 5.7 that involve moving mysql.user table passwords from the Password column to the authentication_string column, mysql_upgrade neglected to handle rows with an empty plugin value and a pre-4.1 password hash.
  • For table-modifying statements, the parser could dereference the parse tree without checking for out-of-memory conditions or null pointers.
  • The deprecated IDENTIFIED BY PASSWORD syntax is supported only for CREATE USER and GRANT, but ALTER USER failed to reject it. ALTER USER now produces a syntax error.
  • mysql_stmt_prepare() could leak memory allocated to metadata.
  • With InnoDB as the default temporary table storage engine, InnoDB sometimes made incorrect assumptions about temporary table key part lengths.
  • Selecting from the Performance Schema global_variables table resulted in a spurious warning about the sql_log_bin system variable.
  • Debian packages were missing some dependencies.
  • For the embedded server, proper deprecation warning were not produced for SHOW VARIABLES and SHOW STATUS statements that included a WHERE clause.
  • A server exit could be caused by a query that contained a HAVING clause, which itself contained an IN() subquery predicate, where the subquery referenced a column of the query.
  • A subquery that contained a user-defined variable could cause an assertion to be raised.
  • In MySQL 5.7.6, the PASSWORD() function was deprecated, but no warning was produced when it was invoked. Similarly, the old_passwords system variable was deprecated, but no warning was produced when it was set.
  • The server could exit if a client using the cleartext authentication plugin attempted to connect with an empty password.
  • A query cache invalidation function used a too-small buffer for holding encoded database names, which could result in a server exit.
  • Valgrind warnings were silenced for display of GTID-related debug information.
  • Some queries that had a derived table (subquery) in the FROM clause could raise an assertion.
  • A table-modifying statement that followed a failed table-modifying could result in a server exit.
  • AddressSanitizer compilation errors were silenced.
  • Corrections were made for a number of code issues that resulted in compiler warnings about array bounds, possibly uninitialized variables, and variables being set but not used.
  • Union queries over views containing ENUM or SET values were not handled properly.
  • A natural left join between between a derived table and a regular table, joined with another natural left join to another regular table could cause a server exit.
  • The optimizer could try to create an index of the wrong data type on internal temporary tables.
  • A multiple-table UPDATE statement where one of the specified tables was a derived table could cause a server exit.
  • Mishandling of SRID values within ST_GeomFromGeoJSON() could cause an assertion to be raised.
  • Under certain conditions, LCASE(), DECODE(), and ENCODE() could have source and destination overlap in memory-copying operations.
  • ST_Distance() could return incorrect results on 32-bit platforms.
  • If a view was processed using the MERGE algorithm and had an ORDER BY clause, an error occurred if the view was queried using GROUP BY with the ONLY_FULL_GROUP_BY SQL mode enabled, unless the query selected all view columns.
  • For debug builds, the optimizer could reject use of LooseScan for eq_ref access joins and raise an assertion. The optimizer now permits this combination for query execution.
  • An out-of-range error in a subquery could raise an assertion.
  • Renaming the mysql.procs_priv table and executing SHOW GRANTS resulted in a server exit.
  • Ordering by a GROUP_CONCAT() result could cause a server exit.
  • The server could exit due to an inappropriate full-text lookup using a full-text predicate within a subquery that contained an outer reference.
  • For a prepared statement with an ORDER BY that refers by column number to a GROUP_CONCAT() expression that has an outer reference, repeated statement execution could cause a server exit.
  • For a materialized internal temporary table used with semi-joins, the optimizer could add an index to it but then use an inappropriate lookup strategy, causing a server exit.
  • The optimizer could raise an assertion due to incorrectly associating an incorrect field with a temporary table.
  • Specifying --general_log_file= (with an empty value) at server startup caused the server to fail and exit.
  • Improper propagation of ORDER BY for a derived table or view used within a multiple-table UPDATE could raise an assertion.
  • The thd_proc_info() function defined in plugin.h was not actually implemented. This has been changed to set_thd_proc_info().
  • For debug builds, an assertion was raised when calculating the symmetric difference between a MultiLineString and a MultiPoint.
  • mysql_install_db started mysqld in bootstrap mode, but failed to wait for it to finish, causing premature shutdown and the need for crash recovery.
  • Inappropriate -Werror options could appear in mysql_config --cflags output.
  • SET PASSWORD ... = PASSWORD('auth_string') syntax was to be deprecated in MySQL 5.7.6, but was made illegal. This syntax is now available again, but generates a warning due to its deprecated status. These alternatives remain available, the first of which now should be considered the preferred form:
  • ALTER USER ... IDENTIFIED BY 'auth_string';
  • SET PASSWORD ... = 'auth_string';
  • The mysql client could exit prematurely when invoked with the --quick option.
  • CHECK TABLE ... FOR UPGRADE did not report temporal columns that use the old datetime format (from before MySQL 5.6.4). Consequently, mysql_upgrade did not know to issue REPAIR TABLE statements to rebuild tables that contain such columns, and subsequent ALTER TABLE statements were unable to perform fast alterations to the extent possible had the tables been repaired. Now, if the avoid_temporal_upgrade system variable is disabled, CHECK TABLE reports old temporal columns and REPAIR TABLE upgrades tables from old temporal format to the new format.
  • With the offline_mode system variable enabled, the server sometimes failed to accept connection from a user with the SUPER privilege due to a race condition.
  • Information written to the slow query log for HANDLER ... READ statements always had rows_sent and rows_examined values of 0.
  • mysql_real_connect() could close a file descriptor twice if the server was not running.
  • Some key descriptors used by the optimizer were uninitialized.
  • EXPLAIN could show incorrect filtered values for queries that included a LIMIT clause.

New in MySQL 5.6.26 (Jul 28, 2015)

  • The firewall implements a DETECTING intrusion-detection mode. For accounts in this mode, the firewall detects suspicious statements and writes them to the error log but does not deny access. The new Firewall_access_suspicious status variable counts the number of such statements. The sp_set_firewall_mode() stored procedure now synchronizes between in-memory rules and those in persistent storage for DETECTING mode, just as it does for PROTECTING mode.
  • A new sp_reload_firewall_rules() stored procedure reloads the in-memory rules for a registered account from the rules stored in the mysql.firewall_whitelist table, providing better control over firewall operation for individual accounts.
  • A new mysql_firewall_flush_status() UDF resets firewall access-counter status variables.
  • To upgrade MySQL Enterprise Firewall if you have a version installed from a previous release, first uninstall the old version. Then install the new version and register your firewall configuration again. For instructions, see Installing or Uninstalling MySQL Enterprise Firewall.
  • Performance Schema Notes:
  • Current-event timing now provides more information. Previously, while a wait, stage, or statement event was executing, the respective tables displayed the event with TIMER_START populated, but with TIMER_END and TIMER_WAIT as NULL:
  • events_waits_current
  • events_stages_current
  • events_statements_current
  • To make it possible to determine how how long a not-yet-completed event has been running, the timer columns now are set as follows:
  • TIMER_START is populated (unchanged from previous behavior)
  • TIMER_END is populated with the current timer value
  • TIMER_WAIT is populated with the time elapsed so far (TIMER_END − TIMER_START)
  • To find events that have not yet completed (that is, have no END_EVENT_ID) and have taken longer than N picoseconds thus far, monitoring applications can use this expression in queries:
  • WHERE END_EVENT_ID IS NULL AND TIMER_WAIT > N
  • Security Notes:
  • Security Fix: 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 following modifications were made:
  • The key length used in vio/viosslfactories.c for creating Diffie-Hellman keys has been increased from 512 to 2,048 bits.
  • The linked OpenSSL library for the MySQL Commercial Server has been updated from version 1.0.1m to version 1.0.1p. Issues fixed in the new version are described at http://www.openssl.org/news/vulnerabilities.html. This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead.
  • Functionality Added or Changed:
  • Replication: When using a multi-threaded slave, each worker thread has its own queue of transactions to process. In previous MySQL versions, STOP SLAVE waited for all workers to process their entire queue. This logic has been changed so that STOP SLAVE first finds the newest transaction that was committed by any worker thread. Then, it waits for all workers to complete transactions older than that. Newer transactions are not processed. The new logic allows STOP SLAVE to complete faster in case some worker queues contain multiple transactions.
  • Previously, the max_digest_length system variable controlled the maximum digest length for all server functions that computed statement digests. However, whereas the Performance Schema may need to maintain many digest values, other server functions such as MySQL Enterprise Firewall need only one digest per session. Increasing the max_digest_length value has little impact on total memory requirements for those functions, but can increase Performance Schema memory requirements significantly. To enable configuring digest length separately for the Performance Schema, its digest length is now controlled by the new performance_schema_max_digest_length system variable.
  • Previously, changes to the validate_password plugin dictionary file (named by the validate_password_dictionary_file system variable) while the server was running required a restart for the server to recognize the changes. Now validate_password_dictionary_file can be set at runtime and assigning a value causes the named file to be read without a restart.
  • In addition, two new status variables are available. validate_password_dictionary_file_last_parsed indicates when the dictionary file was last read, and validate_password_dictionary_file_words_count indicates how many words it contains.
  • Bugs Fixed:
  • InnoDB: The ib_cursor_moveto function did not accept a search tuple with fewer fields than are defined for the index.
  • InnoDB: The ib_table_truncate function failed to release a transaction, resulting in a hang on server shutdown.
  • InnoDB: The ib_open_table_by_id function passed an incorrect argument to dict_table_open_on_id.
  • InnoDB: On Unix-like platforms, os_file_create_simple_no_error_handling_func and os_file_create_func opened files in different modes when innodb_flush_method was set to O_DIRECT.
  • InnoDB: Opening a foreign key-referenced table with foreign_key_checks enabled resulted in an error when the table or database name contained special characters.
  • InnoDB: The page_zip_verify_checksum function returned false for a valid compressed page.
  • InnoDB: An ALTER TABLE ... IMPORT TABLESPACE operation on a table with prefix index failed with a schema mismatch error.
  • InnoDB: A failure to load a change buffer bitmap page during a concurrent delete tablespace operation caused a server exit.
  • InnoDB: Importing a tablespace with a full-text index resulted in an assertion when attempting to rebuild the index.
  • InnoDB: After dropping a full-text search index, the hidden FTS_DOC_ID and FTS_DOC_ID_INDEX columns prevented online DDL operations.
  • InnoDB: The InnoDB memcached plugin handled unsigned NOT NULL integer columns incorrectly.
  • InnoDB: A DROP DATABASE operation raised an assertion.
  • InnoDB: An index record was not found on rollback due to inconsistencies in the purge_node_t structure.
  • Partitioning: In certain cases, ALTER TABLE ... REBUILD PARTITION was not handled correctly when executed on a locked table.
  • Replication: If flushing the cache to the binary log failed, for example due to a disk problem, the error was not detected by the binary log group commit logic. This could cause inconsistencies between the master and the slave. The fix uses the binlog_error_action variable to decide how to handle this situation. If binlog_error_action=ABORT_SERVER, then the server aborts after informing the client with an ER_BINLOGGING_IMPOSSIBLE error. If binlog_error_action=IGNORE_ERROR, then the error is ignored and binary logging is disabled until the server is restarted again. The same is mentioned in the error log file, and the transaction is committed inside the storage engine without being added to the binary log.
  • Replication: When using GTIDs, a multi-threaded slave which had relay_log_recovery=1 and that stopped unexpectedly could encounter a relay-log-recovery cannot be executed when the slave was stopped with an error or killed in MTS mode error upon restart. The fix ensures that the relay log recovery process checks if GTIDs are in use or not. If GTIDs are in use, the multi-threaded slave recovery process uses the GTID protocol to fill any unprocessed transactions.
  • Replication: When two slaves with the same server_uuid were configured to replicate from a single master, the I/O thread of the slaves kept reconnecting and generating new relay log files without new content. In such a situation, the master now generates an error which is sent to the slave. By receiving this error from the master, the slave I/O thread does not try to reconnect, avoiding this problem.
  • Compilation failed when building MySQL without the Performance Schema.
  • Incorrect cost calculation for the semi-join Duplicate Weedout strategy could result in a server exit.
  • MySQL Enterprise Firewall recorded prepared statements as they were received by the server, not as normalized digests.
  • Identifiers in normalized statements were sometimes quoted and sometimes not, an inconsistency that caused matching failure for statement digests and digest texts. This caused problems for MySQL Enterprise Firewall and for Performance Schema aggregation by digest. Identifiers now are quoted consistently.
  • For MySQL Enterprise Firewall operation, max_digest_length had to be larger than mysql_firewall_max_query_size or normalized statements were truncated.
  • Enabling MySQL Enterprise Firewall and binary logging could result in the server reading freed memory.
  • For large values of max_digest_length, the Performance Schema could encounter an overflow error when computing memory requirements, resulting in a server exit.
  • The Spencer regex library used for the REGEXP operator could be subject to heap overflow in some circumstances.
  • A buffer-overflow error could occur for mysqlslap during option parsing.
  • An off-by-one error in string-copying code could result in a buffer overflow.
  • GROUP BY or ORDER BY on a CHAR(0) NOT NULL column could lead to a server exit.
  • For some status variables that should monotonically increase, SHOW GLOBAL STATUS in one session could show them as decreasing when other concurrent sessions changed user or disconnected.
  • mysql-systemd-start failed if datadir was set in /etc/my.cnf.
  • A call to the MySQL Enterprise Firewall sp_set_firewall_mode() stored procedure with an invalid user name produced an error but added the user to the firewall_users table anyway.
  • Ubuntu packages were missing dependencies for killall and psmisc.
  • When choosing join order, the optimizer could incorrectly calculate the cost of a table scan and choose a table scan over a more efficient eq_ref join.

New in MySQL 5.6.25 (Jun 2, 2015)

  • Functionality Added or Changed:
  • MySQL Enterprise Firewall operates on parser states and does not work well together with the query cache, which circumvents the parser. MySQL Enterprise Firewall now checks whether the query cache is enabled. If so, it displays a message that the query cache must be disabled and does not load. (Bug #20913616)
  • my_print_defaults now masks passwords. To display passwords in cleartext, use the new --show option. (Bug #19953365)
  • MySQL distributions now include an innodb_stress suite of test cases.
  • Bugs Fixed:
  • InnoDB; Partitioning: The CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table now shows the correct table creation time for partitioned InnoDB tables. The CREATE_TIME column of the INFORMATION_SCHEMA.PARTITIONS table now shows the correct partition creation time for a partition of partitioned InnoDB tables.
  • The UPDATE_TIME column of the INFORMATION_SCHEMA.TABLES table now shows when a partitioned InnoDB table was last updated by an INSERT, DELETE, or UPDATE. The UPDATE_TIME column of the INFORMATION_SCHEMA.PARTITIONS table now shows when a partition of a partitioned InnoDB table was last updated. (Bug #69990, Bug #17299181)
  • InnoDB: An assertion was raised on shutdown due to XA PREPARE transactions holding explicit locks. (Bug #20816223)
  • InnoDB: The strict_* forms of innodb_checksum_algorithm settings (strict_none, strict_innodb, and strict_crc32) caused the server to halt when a non-matching checksum was encountered, even though the non-matching checksum was valid. For example, with innodb_checksum_algorithm=strict_crc32, encountering a valid innodb checksum caused the server to halt. Instead of halting the server, a message is now printed to the error log and the page is accepted as valid if it matches an innodb, crc32 or none checksum. (Bug #20568464)
  • InnoDB: The memcached set command permitted a negative expire time value. Expire time is stored internally as an unsigned integer. A negative value would be converted to a large number and accepted. The maximum expire time value is now restricted to INT_MAX32 to prevent negative expire time values. (Bug #20478242, Bug #75790)
  • InnoDB: Removal of a foreign key object from the data dictionary cache during error handling caused the server to exit. (Bug #20442523)
  • InnoDB: SHOW ENGINE INNODB STATUS output showed negative reservation and signal count values due to a counter overflow error. (Bug #20417397)
  • InnoDB: Failure to check the status of a cursor transaction read-only option before reusing the cursor transaction for a write operation resulted in a server exit during a memcached workload. (Bug #20391552)
  • InnoDB: MDL locks taken by memcached clients caused a MySQL Enterprise Backup FLUSH TABLES WITH READ LOCK operation to hang. (Bug #20275612)
  • InnoDB: Estimates that were too low for the size of merge chunks in the result sorting algorithm caused a server exit. (Bug #20049521)
  • InnoDB: For full-text searches, the optimizer could choose an index that does not produce correct relevancy rankings. (Bug #74686, Bug #19950568)
  • Partitioning: When creating a partitioned table, partition-level DATA DIRECTORY or INDEX DIRECTORY option values that contained an excessive number of characters were handled incorrectly. (Bug #20809045)
  • Partitioning: Executing an ALTER TABLE on a partitioned table on which a write lock was in effect could cause subsequent SQL statements on this table to fail. (Bug #74288, Bug #74634, Bug #19784790, Bug #19918805)
  • Replication: When binary logging was enabled, using stored functions and triggers resulting in a long running procedure that inserted many records caused the memory use to increase rapidly. This was due to memory being allocated per variable. The fix ensures that in such a situation, memory is allocated once and the same memory is reused. (Bug #75879, Bug #20531812)
  • Replication: If an error was encountered while adding a GTID to the received GTID set, the log lock was not being correctly released. This could cause a deadlock. (Bug #75781, Bug #20492319)
  • Replication: A slave running MySQL 5.6.24 or earlier could not connect to a master running MySQL 5.7.6 and later that had gtid_mode=OFF_PERMISSIVE or gtid_mode=ON_PERMISSIVE. The fix ensures that a slave running MySQL 5.6.25 and later can connect to such a master as long as the slave's gtid_mode is compatible. In other words, a slave running MySQL 5.6.25 and later which has gtid_mode=OFF can connect to a master running MySQL 5.7.6 and later which has gtid_mode=OFF_PERMISSIVE, and a slave running MySQL 5.6.25 and later which has gtid_mode=ON can connect to a master running MySQL 5.7.6 and later which has gtid_mode=ON_PERMISSIVE. Other combinations are incompatible. (Bug #75769, Bug #20471216)
  • Replication: If an error occurred when using a multi-threaded slave, issuing a CHANGE MASTER TO statement which resulted in an ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS error, and then issuing RESET SLAVE, made it impossible to change master due to repeated ER_MTS_CHANGE_MASTER_CANT_RUN_WITH_GAPS errors. Running the debug version of mysqld caused an unexpected exit in this case. The fix ensures that the recovery process for multi-threaded slaves avoids this. (Bug #75574, Bug #20411374)
  • Replication: When using semisynchronous replication performance was degrading when the number of threads increased beyond a certain threshold. To improve performance, now only the thread which is committing is responsible for deleting the active transaction node. All other operations do not touch this active transaction list. (Bug #75570, Bug #20574628)
  • Replication: Using mysqlbinlog to process log events greater than 1.6GB failed with an out of memory error. This was caused by an internal error converting the length variable. The fix upgrades the length variable to avoid overflow in both encoding and decoding functions. (Bug #74734, Bug #20350989)
  • Replication: When master_info_repository=TABLE the receiver thread stores received event information in a table. The memory used in the process of updating the table was not being freed correctly and this could lead to an out of memory error. The fix ensures that after an event is flushed to the relay log file by a receiver thread, the memory used is freed. (Bug #72885, Bug #19390463, Bug #69848, Bug #20124342)
  • Replication: Using mysqlbinlog to replay a relay log which ended with GTID_LOG_EVENT could cause the following error:
  • ERROR 1790 (HY000) @@SESSION.GTID_NEXT cannot be changed by a client that owns a GTID. The client owns UUID:GTID. Ownership is released on COMMIT or ROLLBACK.
  • If a relay log rotate happens (either through a receiver thread restart or after issuing the ROTATE command) exactly after writing a GTID_LOG_EVENT, when replaying such a relay log's end ROTATE_EVENT, it was mistakenly identified as being inside a transaction, whereas the transaction was actually started after GTID_LOG_EVENT. This caused mysqlbinlog to append SET @@SESSION.GTID_NEXT='AUTOMATIC', resulting in two GTID_NEXT statements one after the other. The fix ensures that mysqlbinlog generates SET @@SESSION.GTID_NEXT='AUTOMATIC' only outside of a transaction and when there has not been a previous GTID_LOG_EVENT.
  • Similarly, using mysqlbinlog to concatenate and replay a relay log which contained a partial GTID transaction caused the above error. A relay log can contain a partial GTID transaction when AUTO_POSITION is enabled if a receiver thread is restarted when it is in the middle of transferring a transaction from a master. On restart the slave retrieves the full transaction again. In this case, the first relay log contains a partial GTID transaction and the second relay log contains the full GTID transaction again. When using mysqlbinlog to concatenate such a relay log, the partial transaction was not being correctly detected and therefore a ROLLBACK was not being correctly generated. The fix identifies partial GTID transactions using the format description event of the second relay log, ensuring that a ROLLBACK is correctly added. (Bug #70711, Bug #17650326)
  • For small values of the read_rnd_buffer_size system variable, internal caching of temporary results could fail and cause query execution failure. (Bug #20895852)
  • The normalize_statement() UDF used by MySQL Enterprise Firewall could cause a server exit for certain password-related statements. (Bug #20873209)
  • A failed FLUSH PRIVILEGES statement followed by statements to create or drop accounts could cause a server exit. (Bug #20857652)
  • std::stringstream code used by MySQL Enterprise Firewall could cause a server exit. (Bug #20848536)
  • SHOW VARIABLES mutexes were being locked twice, resulting in a server exit. (Bug #20788853)
  • ull2dec() was modified to avoid a problem with GCC 5 in optimized mode. (Bug #20768820)
  • Using GCC 5, debug builds failed due to compiler warnings. (Bug #20768717)
  • A Provides rule in RPM .spec files misspelled “mysql-embedded” as “mysql-emdedded”. (Bug #20734434)
  • The mysql_firewall_max_query_size system variable should be read only at runtime, but it was possible to modify it. (Bug #20608993)
  • MySQL Enterprise Firewall could leak memory in the unlikely event of failure to store information in an INFORMATION_SCHEMA table. (Bug #20593257)
  • Using a MySQL 5.6 version of mysqladmin to change the password for an account on a MySQL 5.7.6 installation resulted in an unusable account password. (Bug #20590548)
  • AddressSanitizer compilation errors were silenced. (Bug #20459338, Bug #75740, Bug #20459363)
  • Under certain conditions, the libedit command-line library could write outside an array boundary and cause a client program crash. (Bug #20318154)
  • mysql_config_editor could exit abnormally while encrypting passwords. (Bug #20294225)
  • Host value matching for the grant tables could fail to use the most specific of values that contained wildcard characters. (Bug #20181776)
  • For MySQL distributions linked against yaSSL, a corrupt client key file could cause clients to exit. (Bug #20168526)
  • For join queries with a large number of tables, the server could exit converting the join to a semi-join. (Bug #20109861)
  • Deleting rows from mysql.user following by granting privileges to a new account could result in a server exit. (Bug #20031475)
  • Renaming the mysql.procs_priv table and executing SHOW GRANTS resulted in a server exit. (Bug #20006361)
  • Within a stored procedure, access to view columns after DDL or FLUSH TABLES statements in the procedure could cause a server exit. (Bug #19897405)
  • Execution of certain BINLOG statements while temporary tables were open by HANDLER statements could cause a server exit. (Bug #19894987)
  • For a prepared statement with an ORDER BY that refers by column number to a GROUP_CONCAT() expression that has an outer reference, repeated statement execution could cause a server exit. (Bug #19814337)
  • CMake configuration was adjusted to handle new warnings reported by Clang 3.5, using the -Wpointer-bool-conversion and -Wundefined-bool-conversion compiler options. (Bug #19584183)
  • Loading corrupt spatial data into a MyISAM table could cause the server to exit during index building. (Bug #19573096)
  • Specifying --general_log_file= (with an empty value) at server startup caused the server to fail and exit. (Bug #19392264)
  • CMake configuration was adjusted to handle warnings reported by Clang 3.3. (Bug #17486216)
  • Some MySQL Enterprise Firewall diagnostic messages were written outside the control of the log_error_verbosity system variable. (Bug #76612, Bug #20848331)
  • The server rejected empty COM_SHUTDOWN packets. (Bug #76552, Bug #20810928)
  • References: This bug was introduced by Bug #14525642.
  • Inappropriate -Werror options could appear in mysql_config --cflags output. (Bug #76019, Bug #20590904)
  • In the Performance Schema threads table, the PROCESSLIST_STATE and PROCESSLIST_INFO values did not change for the thread/sql/main main thread instrument as the thread state changed. (Bug #74517, Bug #19887143)
  • Certain queries for the INFORMATION_SCHEMA TABLES and COLUMNS tables could lead to excessive memory use when there were large numbers of empty InnoDB tables. (Bug #72322, Bug #18592390)
  • Queries that included a HAVING clause based on nondeterministic functions could produce incorrect results. (Bug #69638, Bug #17055185)
  • For logging of prepared statements to the general query log, the Execute line was logged after statement execution, not before. (Bug #69453, Bug #16953758, Bug #20536590)
  • MySQL failed to compile using OpenSSL 0.9.8e. (Bug #68999, Bug #16861371)

New in MySQL 5.6.24 (Apr 8, 2015)

  • MySQL Enterprise Notes:
  • MySQL Enterprise Edition now includes MySQL Enterprise Firewall, an application-level firewall that enables database administrators to permit or deny SQL statement execution based on matching against whitelists of accepted statement patterns. This helps harden MySQL Server against attacks such as SQL injection or attempts to exploit applications by using them outside of their legitimate query workload characteristics.
  • Each MySQL account registered with the firewall has its own statement whitelist, enabling protection to be tailored per account. For a given account, the firewall can operate in recording or protecting mode, for training in the accepted statement patterns or protection against unacceptable statements.
  • Functionality Added or Changed:
  • CMake support was updated to handle CMake version 3.1. (Bug #20344207)
  • 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 version system variable. (Bug #74917, Bug #20052694)
  • ALTER TABLE did 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, and TIMESTAMP columns 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_upgrade controls whether ALTER TABLE implicitly upgrades temporal columns found to be in pre-5.6.4 format. This variable is disabled by default. Enabling it causes ALTER TABLE not to rebuild temporal columns and thereby be able to take advantage of possible fast alterations.
  • show_old_temporals controls whether SHOW CREATE TABLE output includes comments to flag temporal columns found to be in pre-5.6.4 format. Output for the COLUMN_TYPE column of the INFORMATION_SCHEMA.COLUMNS table is affected similarly. This variable is disabled by default.
  • Both variables are deprecated and will be removed in a future MySQL release. (Bug #72997, Bug #18985760)
  • Statement digesting as done previously by the Performance Schema is now done at the SQL level regardless of whether the Performance Schema is compiled in and is available to other aspects of server operation that could benefit from it. The default space available for digesting is 1024 bytes, but can be changed at server startup using the max_digest_length system variable.
  • Bugs Fixed:
  • InnoDB: A TRUNCATE TABLE operation on a temporary table raised an assertion. The temporary table object was incompletely constructed when reloaded from SYS_TABLES. (Bug #20527363, Bug #72080)
  • 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: Optimizing a FULLTEXT index raised an assertion. The last optimized word of a FULLTEXT index is stored in the CONFIG table value column which is defined as CHAR(50). An assertion was raised when the last optimized word was greater than 50 characters in length. The CONFIG table value column is defined as CHAR(200) as of MySQL 5.6.24 and MySQL 5.7.6.
  • If your innodb_ft_max_token_size setting is greater than 50, it is recommended that you recreate existing InnoDB FULLTEXT indexes after upgrading to MySQL 5.6.24 or MySQL 5.7.6 to avoid this issue. FULLTEXT indexes created after upgrading to MySQL 5.6.24 or MySQL 5.7.6 are unaffected. (Bug #20418326)
  • InnoDB: An InnoDB memcached extra_col_value[] array was freed without checking the allocated flag, causing a server exit. (Bug #20400373)
  • InnoDB: A DML operation performed while a flushing operation was in progress raised a memcached-related assertion. (Bug #20390277)
  • InnoDB: The memcached process_arithmetic_command raised an assertion. The wrong error code was returned for a nonexistent decr key. (Bug #20386835)
  • InnoDB: The expiration time (exptime) defined using the memcached set command was ignored. InnoDB memcached set the expiration time to an interval value instead of a system time value. (Bug #20381342, Bug #70055)
  • 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: A full-text search optimization operation raised an assertion. (Bug #20281800)
  • InnoDB: Due to a regression introduced in MySQL 5.6.20, mysqld stop did not stop the mysqld server process while the InnoDB memcached plugin was active. (Bug #20078646, Bug #74956)
  • References: This bug is a regression of Bug #18409840.
  • InnoDB: An ALTER TABLE ... RENAME failure on a table with a FULLTEXT index raised an assertion. (Bug #20043707)
  • InnoDB: A severe error occurred during the log apply phase of an online ALTER TABLE operation that was converting a table with a UTF-8 charset to ROW_FORMAT=REDUNDANT. (Bug #19843246)
  • InnoDB: When dummy tables are created, the autoinc_mutex member of the of the dict_table_t object was created unnecessarily. Similarly, the zip_pad.mutex object of dict_index_t object was created unnecessarily for dummy indexes. To avoid unnecessary mutex contention, autoinc_mutex and zip_pad.mutex objects are now allocated and initialized on the first lock attempt. (Bug #19788198, Bug #73361)
  • InnoDB: An ALTER TABLE ... RENAME operation raised an invalid assertion. The assertion code used an incorrect transaction object. (Bug #18523599)
  • References: This bug is a regression of Bug #17447500.
  • InnoDB: A memcached append operation on an INT column caused a segmentation fault. append operations on INT columns are not supported and are now blocked. (Bug #75200, Bug #20209756)
  • Partitioning: A number of ALTER TABLE statements that attempted to add partitions, columns, or indexes to a partitioned table while a write lock was in effect for this table were not handled correctly. (Bug #74451, Bug #74478, Bug #74491, Bug #74560, Bug #74746, Bug #74841, Bug #74860, Bug #74869, Bug #19856162, Bug #19864284, Bug #19873019, Bug #19891663, Bug #19990815, Bug #20026661, Bug #20031966, Bug #20033503, Bug #19827845)
  • Partitioning: Executing an ALTER TABLE on a partitioned table on which a write lock was in effect could cause subsequent SQL statements on this table to fail. (Bug #74288, Bug #74634, Bug #19784790, Bug #19918805)
  • References: See also Bug #19856162, Bug #74451.
  • Replication: When replicating from a 5.7.6 or later server to a 5.6.23 or earlier server, if the older version applier thread encountered an Anonymous_gtid_log_event it caused an assert. The fix ensures that these new log events added in MySQL 5.7.6 and later do not cause this problem with 5.6.24 and later slaves. If gtid_mode is OFF and the applier thread encounters a Gtid_log_event, the applier thread aborts with an error. If gtid_mode is ON and the applier thread encounters a Anonymous_gtid_log_event, the applier thread aborts with an error. (Bug #20436436)
  • Replication: When the automatic_sp_privileges variable is set, the server automatically grants the EXECUTE and ALTER ROUTINE privileges to the creator of a stored routine, if the user does not already have these privileges. When a privileged user creates a procedure with DEFINER as a non privileged user on a master, the current user is considered to be a privileged user and the mysql.procs_priv table is not updated. When such a statement was replicated to slave, the non-privileged DEFINER was considered as the current user on the slave and privileges were being allocated. This caused a difference in the privileges that were being allocated on the master and the slave. The fix ensures that creater of the stored routine is added to the binary log, and the slave now checks first if the user exists before granting privileges. To maintain compatibility with previous versions, the DEFINER is used when the INVOKER is not available. As part of this fix, anonymous users can be used to replicate from master to slave. (Bug #20049894)
  • 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 latin1 character set. (Bug #19855907)
  • Replication: When gtid_mode=ON and slave_net_timeout was set to a low value, the slave I/O thread could appear to hang. This was due to the slave heartbeat not being sent regularly enough when the dump thread found many events that could be skipped. The fix ensures that the heartbeat is sent correctly in such a situation. (Bug #74607, Bug #19975697)
  • CMake failed to detect the OpenSSL version properly for recent versions of OpenSSL (the format of the version string changed). (Bug #20756770)
  • For execution of prepared statements, no check was made whether an audit log plugin returned an error, so statement success could erroneously be returned. (Bug #20567900)
  • Debian packages were missing some dependencies. (Bug #20561621)
  • Corrections were made for a number of code issues that resulted in compiler warnings about array bounds, possibly uninitialized variables, and variables being set but not used. (Bug #20458574)
  • Following execution of a GRANT ... WITH GRANT OPTION statement, execution of a prepared statement with a view could cause a server exit. (Bug #20030284)
  • NULL as an expression was not recognized as a literal for calculation of Performance Schema statement digests. (Bug #20015246)
  • A user with a name of event_scheduler could view the Event Scheduler process list without the PROCESS privilege. (Bug #20007583, Bug #20754369)
  • Trying to create a user after dropping columns from the mysql.user table could result in a server exit. (Bug #19910140)
  • Ordering by a GROUP_CONCAT() result could cause a server exit. (Bug #19880368, Bug #20730220)
  • A malformed mysql.proc table row could result in a server exit for DROP DATABASE of the database associated with the proc row. (Bug #19875331)
  • SHOW GRANTS after connecting using a proxy user could display the password hash of the proxied user. (Bug #19817663)
  • Large values of the transaction_prealloc_size system variable could cause the server to allocate excessive amounts of memory. The maximum value has been adjusted down to 128K. A similar change was made for transaction_alloc_block_size. Transactions can still allocate more than 128K if necessary; this change reduces the amount that can be preallocated, as well as the maximum size of the incremental allocation blocks. (Bug #19770858, Bug #20730053)
  • Certain queries on the INFORMATION_SCHEMA.INNODB_FT_CONFIG table could cause a server exit. (Bug #19703520)
  • 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)
  • Certain InnoDB errors caused stored function and trigger condition handlers to be ignored. (Bug #19683834, Bug #20094067)
  • The optimizer could raise an assertion due to incorrectly associating an incorrect field with a temporary table. (Bug #19612819, Bug #20730129)
  • Audit log filtering was not applied to connection events. (Bug #19509398)
  • With audit_log_connection_policy=ERRORS, successful COM_QUIT events were errroneously written to the audit log. (Bug #19509373)
  • The value of the Audit_log_events status variable did not equal the sum of the other audit log counters. (Bug #19509336)
  • The Audit_log_events_filtered status variable did not increment when audit log events were filtered. (Bug #19509263)
  • Many new features were added to the audit log plugin in MySQL 5.6.20, but the version number was not increased. The version has been bumped to 1.1. (Bug #19502900)
  • The server could exit due to an optimizer failure to allocate enough memory for resolving outer references. (Bug #18782905, Bug #19892803)
  • If the audit log file was found to be corrupt at server startup, an appropriate error message was not always written. Also, if the plugin is loaded, it will be initialized regardless of whether the log was corrupt, except in the case that renaming the log file fails. (Bug #14584292)
  • Creating a FEDERATED table with an AUTO_INCREMENT column using a LIKE clause results in a server exit. (Bug #12671631)
  • The group_concat_max_len system variable could be set to its maximum value at runtime, but not in an option file. (Bug #74037, Bug #19670915)
  • A server warning error message referred to the obsolete table_cache system variable rather than to table_open_cache. Thanks to Daniël van Eeden for the patch to fix some of the instances. (Bug #73373, Bug #19285052, Bug #75081, Bug #20135780)
  • In the DIGEST_TEXT column of Performance Schema statement events tables, references to system variables of the form @@var_name were stored as @ @ var_name. (Bug #71634, Bug #18304086)
  • If the WITH_SSL CMake option was specified with an incorrect path to the SSL installation or the path to an unsupported (too old) SSL installation, the option was implicitly changed to the bundled value and yaSSL was used instead. Now CMake exits with an error so the user knows that the option value must be changed. (Bug #69744, Bug #17162055)
  • mysql_real_connect() could close a file descriptor twice if the server was not running. (Bug #69423, Bug #19226740)
  • Notification of events for the general log were received by the audit log plugin only of the general query log was enabled. Now notifications are posted regardless of whether the general query log is enabled. (Bug #60782, Bug #12368204, Bug #20536590)

New in MySQL 5.7.6 Milestone 16 Dev (Mar 10, 2015)

  • FUNCTIONALITY ADDED OR CHANGED:
  • Incompatible Change: A new C API function, mysql_real_escape_string_quote(), has been implemented as a replacement for mysql_real_escape_string() because the latter function can fail to properly encode characters when the NO_BACKSLASH_ESCAPES SQL 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().
  • InnoDB: InnoDB system tablespace data is now exposed in the INNODB_SYS_TABLESPACES and INNODB_SYS_DATAFILES Information Schema tables.
  • InnoDB: CHECK TABLE functionality was enhanced for InnoDB SPATIAL indexes. Previously, CHECK TABLE only performed minimal checks on InnoDB SPATIAL indexes. Enhanced functionality includes an R-tree validity check and a check to ensure that the R-tree row count matches the clustered index.
  • InnoDB: The default setting for the internal_tmp_disk_storage_engine option, which defines the storage engine the server uses for on-disk internal temporary tables, is now INNODB. With this change, the Optimizer uses the InnoDB storage engine instead of MyISAM for internal temporary tables. For related information, see How MySQL Uses Internal Temporary Tables.
  • 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_handler base class, which is now the interface for partitioning-specific storage engine functionality.
  • InnoDB: The MERGE_THRESHOLD value for index pages is now configurable using a COMMENT clause with CREATE TABLE, ALTER TABLE, and CREATE INDEX statements. If the page-full percentage for an index page falls below the MERGE_THRESHOLD value when a row is deleted or when a row is shortened by an UPDATE operation, InnoDB attempts to merge the index page with a neighboring index page. The default MERGE_THRESHOLD value is 50, which is the previously hard-coded value.
  • InnoDB: InnoDB now supports native partitioning. Previously, InnoDB relied on the ha_partition handler, which creates a handler object for each partition. With native partitioning, a partitioned InnoDB table uses a single partition-aware handler object. This enhancement reduces the amount of memory required for partitioned InnoDB tables.
  • The following changes accompany InnoDB native partitioning support:
  • Partition definition (.par) files are no longer created. Partition definitions are stored in the internal data dictionary.
  • For partitioned InnoDB tables, FLUSH TABLES does not reset the “next” AUTO_INCREMENT value. Instead, the next AUTO_INCREMENT value is kept and used after the FLUSH TABLES operation. If the highest AUTO_INCREMENT value is deleted before a FLUSH TABLES operation, it is not reused afterwards.
  • Minor changes to statistics could result in changed execution plans.
  • The minimum number of rows estimated for a partitioned InnoDB table is 1 instead of 2.
  • The minimum number of rows estimated for range read on a partitioned InnoDB table index is 0 per partition instead of 1.
  • Instead of only including the largest partitions when calculating matching rows in an index range, all partitions in the read set (after pruning is completed) are included. As a result, statistics for matching index rows are more accurate, but time spent during the Optimizer phase may increase for tables with numerous partitions.
  • InnoDB: All remaining code related to the innodb_file_io_threads system variable, which was removed in MySQL 5.5, was removed from the source code.
  • InnoDB: To support future development, the code that initializes, validates and handles tablespace and table flags was refactored. Also, the fil_create_ibd_tablespace function was refactored, and some functions and variables related to single tablespaces were renamed.
  • 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.
  • The adaptive flushing algorithm gives flushing priority to old modified pages in the buffer pool instance that contains the greatest number of old modified pages.
  • On platforms where it is possible, page_cleaner threads are given priority over other MySQL/InnoDB threads to help page flushing keep pace with the current workload.
  • 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.
  • 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_max setting is too high.
  • New metrics for monitoring page_cleaner thread activity were added to the INNODB_METRICS table:
  • buffer_flush_adaptive_avg_pass: Number of adaptive flushes passed during the recent Avg period.
  • buffer_flush_adaptive_avg_time_est: Estimated time (ms) spent for adaptive flushing recently.
  • buffer_flush_adaptive_avg_time_slot: Avg time (ms) spent for adaptive flushing recently per slot.
  • buffer_flush_adaptive_avg_time_thread: Avg time (ms) spent for adaptive flushing recently per thread.
  • buffer_flush_avg_pass: Number of flushes passed during the recent Avg period.
  • buffer_flush_avg_time: Avg time (ms) spent for flushing recently.
  • buffer_flush_n_to_flush_by_age: Number of pages targeted by LSN Age for flushing.
  • buffer_LRU_batch_flush_avg_pass: Number of LRU batch flushes passed during the recent Avg period.
  • buffer_LRU_batch_flush_avg_time_est: Estimated time (ms) spent for LRU batch flushing recently.
  • buffer_LRU_batch_flush_avg_time_slot: Avg time (ms) spent for LRU batch flushing recently per slot.
  • buffer_LRU_batch_flush_avg_time_thread: Avg time (ms) spent for LRU batch flushing recently per thread.
  • buffer_LRU_get_free_loops: Total loops in LRU get free.
  • buffer_LRU_get_free_waits: Total sleep waits in LRU get free.
  • InnoDB: InnoDB now supports the creation of general tablespaces using CREATE TABLESPACE syntax.
  • InnoDB: Replication-related support was added to InnoDB which enables prioritization of slave applier transactions over other transactions in deadlock scenarios. This transaction prioritization mechanism is reserved for future use.
  • InnoDB: InnoDB now provides a built-in full-text ngram parser plugin that supports Chinese, Japanese, and Korean (CJK), and an installable MeCab full-text parser plugin for Japanese.
  • For more information see InnoDB ngram Full-Text Parser, and InnoDB MeCab Full-Text Parser Plugin.
  • InnoDB: The Performance Schema now instruments stage events for monitoring InnoDB ALTER TABLE and buffer pool load operations. The new stage events include:
  • stage/innodb/alter table (read PK and internal sort)
  • stage/innodb/alter table (merge sort)
  • stage/innodb/alter table (insert)
  • stage/innodb/alter table (flush)
  • stage/innodb/alter table (log apply index)
  • stage/innodb/alter table (log apply table)
  • stage/innodb/alter table (end)
  • stage/innodb/buffer pool load
  • InnoDB: InnoDB now supports 32KB and 64KB page sizes. For both page sizes, the maximum record size is 16KB. ROW_FORMAT=COMPRESSED is not supported when innodb_page_size is set to 32k or 64k. For innodb_page_size=32k, extent size is 2MB. For innodb_page_size=64k, extent size is 4MB.
  • Replication: The variable binlogging_impossible_mode has been renamed binlog_error_action. binlogging_impossible_mode is now deprecated. (Bug #19507567)
  • 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_commit is set to 1, which reduces the amount of synchronization operations. This can lead to improved performance. (Bug #19424075)
  • Replication: There is now a Previous_gtids event in every binary log, regardless of the value of gtid_mode. In previous versions, it was only generated when gtid_mode=on. Similarly, there is now an Anonymous_gtid event before every transaction when gtid_mode=off. These changes ensure that similar per-transaction events are generated regardless of the type of binary logging in use. As well as enabling the newly added ability to change gtid_mode online, this also has a positive impact on the recovery of gtid_purged and gtid_executed.
  • 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.
  • 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.
  • 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_mode is now dynamic. It can be set by SUPER from a top-level statement. The states OFF_PERMISSIVE and ON_PERMISSIVE have been added.
  • The variable enforce_gtid_consistency is now dynamic. It can be set by SUPER from a top-level statement.
  • The status variable Ongoing_anonymous_transaction_count has been introduced. This shows the number of ongoing transactions which have been marked as anonymous.
  • The status variables Ongoing_anonymous_gtid_violating_transaction_count and Ongoing_automatic_gtid_violating_transaction_count have been introduced in debug-enabled builds. They are not available in non-debug builds. These variables count the number of ongoing transactions that violate GTID consistency, which use gtid_next=ANONYMOUS and gtid_next=AUTOMATIC, respectively.
  • 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.
  • Undocumented functions in the C client library now are hidden. This help minimize namespace pollution, and permits linking for applications that require functions both from yaSSL (in the client library) and from OpenSSL. (Bug #20476596)
  • 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 /Ob1 to enable inlining. The new WIN_DEBUG_NO_INLINE CMake option can be used to control inlining. The default value is OFF (inlining enabled); if set to ON, inlining is disabled. (Bug #20316320)
  • yaSSL was upgraded to version 2.3.7. (Bug #19695101, Bug #20201864)
  • The new -DWITH_UBSAN=ON CMake 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_data has 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 \C in the prompt command 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 version system variable. (Bug #74917, Bug #20052694)
  • The required version of the Boost library for server builds has been raised from 1.55.0 to 1.57.0. (Bug #74666, Bug #19940297, Bug #73432, Bug #19320102)
  • Previously, the auth_socket authentication plugin checked the socket user name only against the MySQL user name specified by the client program to the server. Now, if those names do not match, the plugin also checks whether the socket user name matches the name specified in the authentication_string column of the mysql.user table 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 libmysqlclient version number has been incremented to 20.0.0. (Bug #74206, Bug #19729266)
  • A new CMake option, WITH_MSCRT_DEBUG, is available to control Visual Studio CRT memory leak tracing. The default is OFF. (Bug #73064, Bug #19031370)
  • Beginning with MySQL 5.7.2, the server disables at startup any account that has no authentication plugin. The server now writes a more extensive message to the error log in this case to indicate how to reenable such accounts. (Bug #73026, Bug #19011337)
  • ALTER TABLE did 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, and TIMESTAMP columns 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_upgrade controls whether ALTER TABLE implicitly upgrades temporal columns found to be in pre-5.6.4 format. This variable is disabled by default. Enabling it causes ALTER TABLE not to rebuild temporal columns and thereby be able to take advantage of possible fast alterations.
  • show_old_temporals controls whether SHOW CREATE TABLE output includes comments to flag temporal columns found to be in pre-5.6.4 format. Output for the COLUMN_TYPE column of the INFORMATION_SCHEMA.COLUMNS table is affected similarly. This variable is disabled by default.
  • Both variables are deprecated and will be removed in a future MySQL release. (Bug #72997, Bug #18985760)
  • The minimum value of the stored_program_cache system 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)
  • Features have been added to MySQL 5.7.6 which are reserved for future use. These specific changes were implemented:
  • The following errors were added:
  • ER_BEFORE_DML_VALIDATION_ERROR
  • ER_PREVENTS_VARIABLE_WITHOUT_RBR
  • ER_RUN_HOOK_ERROR
  • ER_TRANSACTION_ROLLBACK_DURING_COMMIT
  • ER_GROUP_REPLICATION_CONFIGURATION
  • ER_GROUP_REPLICATION_RUNNING
  • ER_GROUP_REPLICATION_APPLIER_INIT_ERROR
  • ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT
  • ER_GROUP_REPLICATION_COMMUNICATION_LAYER_SESSION_ERROR
  • ER_GROUP_REPLICATION_COMMUNICATION_LAYER_JOIN_ERROR
  • The following Performance Schema tables were added:
  • replication_group_members
  • replication_group_member_stats
  • Additionally, the GROUP_NAME variable was added to the replication_connection_status table.
  • The variable transaction_write_set_extraction was added.
  • The following SQL statements were added:
  • START GROUP_REPLICATION
  • STOP GROUP_REPLICATION
  • The following items are deprecated and will be removed in a future MySQL release. Where alternatives are shown, applications should be updated to use them.
  • The ENCRYPT(), DES_ENCRYPT(), and DES_DECRYPT() functions. Consider using AES_ENCRYPT() and AES_DECRYPT() instead.
  • The sync_frm system variable. This variable will be removed when .frm files become obsolete.
  • The global character_set_database and collation_database system variables are deprecated and will be removed in a future version of MySQL.
  • Assigning a value to the session character_set_database and collation_database system variables is deprecated and assignments produce a warning. The session variables will become read only in a future version of MySQL and assignments will produce an error. It will remain possible to access the session variables to determine the database character set and collation for the default database.
  • Conversion of pre-MySQL 5.1 database names containing special characters to 5.1 format with the addition of a #mysql50# prefix. (For information about these conversions, see Mapping of Identifiers to File Names.) Because such conversions now are deprecated, the --fix-db-names and --fix-table-names options for mysqlcheck and the UPGRADE DATA DIRECTORY NAME clause for the ALTER DATABASE statement 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.
  • For queries that combine ORDER BY with LIMIT, the optimizer may switch to an index that applies to the ORDER BY. In some cases, the decision to switch was based on a heuristic rather than on cost. The optimizer now uniformly makes the decision whether to switch on a cost basis. This should result in better performanance when switching would cause a query to read an entire index or a large part of it to find qualifying rows.
  • References: See also Bug #73837, Bug #19579507, Bug #16522053.
  • The variable session_track_gtids was added, which enables a tracker that captures GTIDs and appends them to the OK packet.
  • The plugin and servers tables in the mysql system database now are InnoDB (transactional) tables. Previously, these were MyISAM (nontransactional) tables.
  • In consequence of this change, INSTALL PLUGIN and UNINSTALL PLUGIN are now included among the statements that cause an implicit commit (see Statements That Cause an Implicit Commit).
  • If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate these changes into the mysql database.
  • Refactoring within the optimizer resulted in the following improvements to EXPLAIN output:
  • Output that showed ORDER BY col_name for implicitly grouped queries no longer does so.
  • Output for INSERT statements involving partition pruning now shows only the partitions actually used, not all partitions in the table.
  • Output for UPDATE, INSERT, or DELETE statements 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”.
  • References: See also Bug #70553, Bug #17575172.
  • 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-number N lines in sql/share/errmsg-utf8.txt, with each such line resetting the numbering to N.
  • 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, and DROP TABLESPACE. It also includes DDL statements that affect tablespace contents: ALTER TABLE, CREATE INDEX, CREATE TABLE, DROP INDEX, DROP TABLE, LOCK TABLES, RENAME TABLE, and TRUNCATE TABLE.
  • BUGS FIXED:
  • Incompatible Change; InnoDB: File page type validation on data files created prior to MySQL 5.1 could result in a failure due to invalid file page type values in some pages. Prior to MySQL 5.1, InnoDB did not initialize the FIL_PAGE_TYPE field when creating a page. InnoDB only initialized the FIL_PAGE_TYPE field to FILE_PAGE_INDEX when flushing a B-tree page. For other page types, InnoDB left garbage or invalid FIL_PAGE_TYPE values in the FIL_PAGE_TYPE field. Since MySQL 5.1, InnoDB initializes FILE_PAGE_TYPE for every page. Because pre-MySQL 5.1 data files could contain garbage or invalid FILE_PAGE_TYPE values, FILE_PAGE_TYPE must be reset when flushing pages.
  • With this patch, a non-index page that contains FIL_PAGE_INDEX or FIL_PAGE_RTREE in the FIL_PAGE_TYPE field may trigger failures when the page is written to disk. You can address the failure by modifying the data file to replace the invalid FIL_PAGE_TYPE value with FIL_PAGE_UNKNOWN. The error log message provides the tablespace ID and page number of the page with the invalid FIL_PAGE_TYPE value.
  • Before MySQL 5.6, the page size was set to 16384 bytes at compilation time. FIL_PAGE_TYPE is defined as 24. So, if page number P of a tablespace file is affected, the data at byte offset 16384*P+24 should contain the bytes 0x45 0xbf (FIL_PAGE_INDEX) or 0x45 0xbe (FIL_PAGE_RTREE). These bytes should be replaced with 0x00 0x0d (FIL_PAGE_UNKNOWN).
  • If the page contains the strings infimum and supremum at byte offset 99 or 101 (75 or 77 bytes after the start of the FIL_PAGE_TYPE), the page could be an index page, and there may be actual corruption.
  • InnoDB: Opening and closing of intrinsic temporary tables caused a negative table reference count in InnoDB Monitor output. (Bug #20608113)
  • InnoDB: A duplicate database page corruption error message was removed from buf0buf.cc. (Bug #20605167)
  • InnoDB: The NAME column of the INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO table 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 a .ibd file path string. (Bug #20430105)
  • InnoDB: An undefined reference error occurred when building MySQL with DWITH_EXTRA_CHARSETS=none. (Bug #20429800)
  • InnoDB: Optimizing a FULLTEXT index raised an assertion. The last optimized word of a FULLTEXT index is stored in the CONFIG table value column which is defined as CHAR(50). An assertion was raised when the last optimized word was greater than 50 characters in length. The CONFIG table value column is defined as CHAR(200) as of MySQL 5.6.24 and MySQL 5.7.6.
  • If your innodb_ft_max_token_size setting is greater than 50, it is recommended that you recreate existing InnoDB FULLTEXT indexes after upgrading to MySQL 5.6.24 or MySQL 5.7.6 to avoid this issue. FULLTEXT indexes created after upgrading to MySQL 5.6.24 or MySQL 5.7.6 are unaffected. (Bug #20418326)
  • InnoDB: The innodb_optimize_point_storage option and related internal data types (DATA_POINT and DATA_VAR_POINT) were removed. (Bug #20415831)
  • InnoDB: fts_optimize_thread() set a NULL exit_event when the server started to shut down, and before fts_optimize_thread was started. (Bug #20389745)
  • InnoDB: The memcached process_arithmetic_command raised an assertion. The wrong error code was returned for a nonexistent decr key. (Bug #20386835)
  • InnoDB: The expiration time (exptime) defined using the memcached set command was ignored. InnoDB memcached 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_square function raised an assertion. (Bug #20379160)
  • InnoDB: The innobase_close_thd function and related wrapper functions and pointers were removed. The functions and pointers were introduced with the InnoDB memcached 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 InnoDB tables that store persistent statistics. (Bug #20330831)
  • InnoDB: The INFORMATION_SCHEMA.TABLES UPDATE_TIME field, enabled for InnoDB tables in MySQL 5.7.2, was not updated for XA COMMIT of recovered transactions that were in XA PREPARE state. (Bug #20303205)
  • InnoDB: An incorrect expression was used in /storage/innobase/trx/trx0trx.cc. trx->lock.rec_pool.empty() was used instead of trx->lock.table_pool.empty(). (Bug #20294158, Bug #75373)
  • InnoDB: In /storage/innobase/handler/ha_innodb.cc, a va_end() was missing in returns that were added in MySQL 5.7.5. (Bug #20285744, Bug #75323)
  • InnoDB: A full-text search optimization operation raised an assertion. (Bug #20281800)
  • InnoDB: A tablespace export operation set the purge state to PURGE_STATE_STOP, but the purge thread did not check the purge state until the current purge operation was completed. In the case of a large history list, the tablespace export operation was delayed, waiting for the current purge operation to finish. The purge state is now checked with every purge batch. (Bug #20266847, Bug #75298)
  • InnoDB: When a page is read from disk, there is a check for pending insert buffer entries which involves acquiring a latch on the insert buffer page. If pending entries are found, they are merged. Because the change buffer is only applicable to B-tree secondary leaf pages in non-temporary tablespaces, insert buffer merge is not necessary for all page types. Using page_type, page_level, and tablespace type information from the page that is read from disk, insert buffer merge is now skipped for non-applicable page types. (Bug #20220909)
  • InnoDB: The name of the internal pseudo-tablespace that is created for the InnoDB redo log was changed from ib_logfile101 to innodb_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 INDEX operation raised an assertion due to assertion code that did not allow an online index status of ONLINE_INDEX_ABORTED_DROPPED. The assertion code was relaxed. (Bug #20198726)
  • InnoDB: Attempting to access the table name for a table that was NULL due to a prior inconsistency caused a crash in innobase_update_foreign_cache() when printing an error. (Bug #20146176)
  • InnoDB: An error occurred when the push_warning_printf function was invoked during server recovery. This function was previously used to print a warning message to the client. Also, current_thd was 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_index flag, which was used inconsistently and redundant, was removed. (Bug #20136192)
  • InnoDB: A memory access violation in fts_optimize_thread caused 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_leaves while 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_METRICS adaptive_hash_searches_btree counter 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 InnoDB memcached plugin was active. (Bug #20078646, Bug #74956)
  • References: This bug is a regression of Bug #18409840.
  • InnoDB: The commit_node member from the tab_node_t and ind_node_t query graph objects, used during table and index creation, were removed. The commit_node member was initialized but never used. Unused TABLE_COMMIT_WORK and INDEX_COMMIT_WORK execution steps were also removed. (Bug #20060218)
  • InnoDB: An ALTER TABLE ... RENAME failure on a table with a FULLTEXT index raised an assertion. (Bug #20043707)
  • InnoDB: A duplicate key error encountered during a REPLACE operation on a temporary table raised an assertion. (Bug #20040791)
  • InnoDB: An ALTER TABLE operation 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 TABLE failed to check if the table is corrupted. An ALTER TABLE operation that affects InnoDB metadata should be refused if the clustered index is corrupted or the table is marked as corrupted. An ALTER TABLE operation should also be refused if the table is not rebuilt and a corrupted secondary index would remain after the ALTER TABLE operation. (Bug #20015132, Bug #74810)
  • InnoDB: On Windows, renaming a FULLTEXT search file name raised an assertion. (Bug #20001827)
  • InnoDB: A row update operation raised an assertion in row_upd_sec_index_entry(). In row_merge_read_clustered_index(), the cached spatial index was not inserted prior to the mini-transaction commit. Once the mini-transaction was committed, the clustered index page was updated or freed, resulting in the primary key fields for cached spatial index entries pointing to invalid addresses. (Bug #19999469)
  • InnoDB: An assertion was raised in the btr_cur_search_to_nth_level function. Both shared locks (s-locks) and shared-exclusive locks (sx-locks) should be permitted for all latch modes. (Bug #19984494)
  • InnoDB: An ALTER TABLE operation on a table with a FULLTEXT index raised an assertion. The table was already present in the cache and the FULLTEXT indexes were already initialized. When the table was reloaded, the FULLTEXT indexes were initialized again, causing the assertion. (Bug #19978288)
  • InnoDB: An UPDATE operation 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 BLOB or TEXT data inserted in a single transaction were revised. (Bug #19975322)
  • InnoDB: Server logs reported a vector subscript out of range error. (Bug #19955501)
  • InnoDB: CHECK TABLE failed 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_extents function now accesses metadata from cached fields instead of the tablespace header page in the buffer pool.
  • This patch also includes the following optimizations:
  • To avoid lookups, fsp_fill_free_list() and some other functions now take a fil_space_t pointer instead of a numeric tablespace identifier.
  • The fil_extend_space_to_desired_size function was renamed to fil_space_extend and 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 TABLE operation 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 TABLE operation 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 bug 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 bug is a regression of Bug #19314480.
  • InnoDB: A missing DBUG_RETURN() in ha_innobase::update_row raised an assertion. (Bug #19904800)
  • InnoDB: In debug builds, setting the innodb_limit_optimistic_insert_debug debug configuration option to 1 caused an infinite B-tree page split. (Bug #19904003, Bug #74605)
  • InnoDB: An ALTER TABLE ... DROP PRIMARY KEY, ADD PRIMARY KEY operation that changed the prefix length of the primary key field raised an assertion in the bulk insert code. (Bug #19896922)
  • InnoDB: Some InnoDB diagnostic 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_intrinsic option, 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_BUILTINS was removed from the InnoDB source in MySQL 5.7.6. InnoDB now 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 TABLE operation that was converting a table with a UTF-8 charset to ROW_FORMAT=REDUNDANT. (Bug #19843246)
  • 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 bug is a regression of Bug #19149177.
  • InnoDB: The logic used to select native 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: 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 TABLES operation raised an assertion. (Bug #19803418)
  • InnoDB: The dict_boot() function did not set the maximum length of columns used for index fields, resulting in dict_index_node_ptr_max_size() returning incorrect values. (Bug #19791849)
  • InnoDB: When dummy tables are created, the autoinc_mutex member of the of the dict_table_t object was created unnecessarily. Similarly, the zip_pad.mutex object of dict_index_t object was created unnecessarily for dummy indexes. To avoid unnecessary mutex contention, autoinc_mutex and zip_pad.mutex objects are now allocated and initialized on the first lock attempt. (Bug #19788198, Bug #73361)
  • InnoDB: log_sys->mutex was not held when reading the fil_space_t::max_lsn field, causing a race condition. (Bug #19729855)
  • References: This bug 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: InnoDB performed 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 in fil_io() that returns DB_TABLESPACE_DELETED. (Bug #19719727)
  • InnoDB: To ease future development, the ha_innobase::create function was refactored. (Bug #19718568)
  • InnoDB: Redundant conditional branching and a redundant a check for srv_read_only_mode were removed from ha_innobase::create(). Redundant conditional branching and an unused local variable were removed from ha_innobase::delete_table(). (Bug #19712822)
  • InnoDB: Unused code related to UTF-8 handling for InnoDB FULLTEXT indexes 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 to dict_drop_index_tree(). (Bug #19710798)
  • InnoDB: The InnoDB change buffer tree, which was created inside the InnoDB data dictionary cache unnecessarily, is now created directly, bypassing the cache. This patch also removes the DICT_UNIVERSAL flag, which was set in in connection with DICT_IBUF. Neither of the flags is used for persistent data structures, which makes DICT_UNIVERSAL unnecessary. (Bug #19710650)
  • InnoDB: The fil_space_t::tablespace_version field, introduced to keep track of ALTER TABLE...DISCARD TABLESPACE followed by ALTER TABLE IMPORT TABLESPACE operations, was removed. The tablespace_version field ensured that a change buffer merge would not occur for old buffered entries while a tablespace with the same space_id was 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 InnoDB diagnostic messages and interfaces. This patch also adds a new function, innobase_quote_identifier, for quoting FOREIGN KEY constraints and column names in SHOW CREATE TABLE output. (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_INDEXES internal data dictionary table before being committed. Uncommitted entries were identified by a prefix (defined as TEMP_INDEX_PREFIX). TEMP_INDEX_PREFIX was also used in the InnoDB data dictionary cache, resulting in complications when displaying or comparing index names. To address this problem, a new dict_index_t::uncommitted flag was introduced along with accessor methods is_committed() and set_committed(). Before this change, some InnoDB INFORMATION_SCHEMA tables displayed uncommitted index names with a preceding question mark. The question mark prefix is now omitted. (Bug #19702328)
  • InnoDB: InnoDB displayed 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 FULLTEXT indexes, a lookup for the FTS_DOC_ID_INDEX was performed during DML operations. To avoid the costly lookups, a pointer to FTS_DOC_ID_INDEX is now cached at DDL time. (Bug #19693488)
  • InnoDB: To simplify code, the is_redo_skipped flag, introduced in MySQL 5.7.5 with the CREATE INDEX bulk 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_NAME redo log record, which provides the information necessary to identify tablespace files that changed since the last checkpoint, were emitted on log checkpoint even though there were no changes to tablespace files. If a tablespace file is missing or unreadable on crash recovery, the inconsistency should be ignored if there are no redo logs to apply. For related information, see Tablespace Discovery During Crash Recovery. (Bug #19685095)
  • InnoDB: An unused parameter, archive_space_id, that was passed and ignored in the log_group_init function, 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)) or attribute((pure)). The problem is known to occur on Debian Wheezy 7.6 x86 with g++-4.6 (Debian 4.6.3-14) 4.6.3 or g++ (Debian 4.7.2-5) 4.7.2, and on Debian Jessie/Sid amd64 with gcc (Debian 4.9.1-15) 4.9.1 or g++ (Debian 4.9.1-15) 4.9.1. The bug may exist in other gcc-4.x versions as well any GCC version that accepts the attribute((const)) or attribute((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_clock value is now stored to allow the buf_page_optimistic_get() function, used to get optimistic access to a database page, to succeed in most cases. An unnecessary PAGE_HEAP_TOP (record heap top pointer) and FIL_PAGE_TYPE (file page type) set was removed from btr0bulk.cc. (Bug #19611367)
  • InnoDB: The dict_set_corrupted() function attempted to update the clustered index of the SYS_INDEXES data dictionary table incorrectly. (Bug #19584379)
  • InnoDB: Compiling with the new Clang 3.5 release resulted in a number of InnoDB compilation warnings. (Bug #19579603)
  • InnoDB: Removed unused API definitions from api0api.h and api0api.cc source files. (Bug #19579149)
  • InnoDB: The DICT_TF2_USE_FILE_PER_TABLE flag should be tested by the dict_table_use_file_per_table function to verify that the table uses a file-per-table tablespace. (Bug #19578222)
  • InnoDB: With innodb_create_intrinsic enabled, temporary tables created during ALTER TABLE operations were marked as intrinsic temporary tables, resulting in an assertion. Enabling innodb_create_intrinsic should only affect CREATE TABLE and CREATE INDEX operations. (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 INSERT operation on a spatial index resulted in a crash in split_rtree_node(). The mbr_join_square function 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 bug 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, and ib::fatal). (Bug #19495721)
  • InnoDB: The InnoDB data dictionary was not updated when a ALTER TABLE ... CHANGE COLUMN operation changed the case of the column name. (Bug #19465984)
  • InnoDB: InnoDB returned a table not found error for a missing tablespace file. (Bug #19419026)
  • InnoDB: InnoDB shutdown stalled due to a user thread that was in a waiting state. (Bug #19386426)
  • InnoDB: After upgrading to MySQL 5.7, an ALTER TABLE operation 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 INDEX operation, crash recovery failed due to a regression introduced with the CREATE INDEX bulk insert enhancement introduced in MySQL 5.7.5. (Bug #19316315, Bug #19308426)
  • InnoDB: On non-Windows platforms, os-file_pread and os_file_pwrite functions 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_thread and 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=6 resulted in a hang. (Bug #19265668, Bug #73341)
  • InnoDB: The fil_inc_pending_ops() and fil_decr_pending_ops() functions have been replaced by fil_space_acquire() and fil_space_release(). This change removes a space ID lookup. The new functions are implemented in buf_load(), fsp_get_available_space_in_free_extents(), and lock_rec_block_validate(), which is a debug function. The patch for this bug also removed fil_tablespace_is_being_deleted(), which was an orphaned function. (Bug #19149177)
  • InnoDB: If the log sequence number (LSN) has not increased, the log_write_up_to() function should not initiate redo log writing. (Bug #19068569, Bug #73109)
  • InnoDB: A CREATE TABLE operation failed with a table is full error when running a MySQL server with innodb_flush_method=O_DIRECT on a Linux system with an ext3 file system. The error was due to an internal posix_fallocate() failure that occurs when O_DIRECT is specified. To allow the file operation to proceed, the internal posix_fallocate() failure now prints an error message to the error log. (Bug #18903979)
  • InnoDB: As part of a cleanup of InnoDB INSERT code paths, assertion code was added to ha_innobase::end_stmt() and other places at the start of DDL. Debug code was added to row_log_table_apply(). Assertion code was added to intrinsic temporary table-related functions, and unused parameters were removed. (Bug #18894337)
  • References: This bug is a regression of Bug #11758237.
  • 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 Mac OS X), InnoDB stores the database name as specified in the InnoDB internal 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 .ibd file 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 bug is a regression of Bug #17373659.
  • InnoDB: In debug builds, the InnoDB Lock Monitor asserted after a DROP TABLE operation, and the InnoDB Monitor encountered an assertion in buf_page_get_gen. (Bug #18062698, Bug #71343, Bug #18173184, Bug #68116)
  • InnoDB: A CREATE TABLE operation that failed when innodb_strict_mode was enabled succeeded without printing a warning when innodb_strict_mode was disabled. (Bug #17852083)
  • InnoDB: buf_LRU_free_page() would call buf_page_set_sticky(bpage), needlessly making removed pages sticky in some cases. (Bug #17407091, Bug #70228)
  • InnoDB: A slow shutdown (innodb_fast_shutdown=0) after crash recovery raised an assertion. Slow shutdown did not wait for background rollback operations to finish before proceeding. (Bug #16862810)
  • InnoDB: The criteria used to define a small tablespace was inconsistent. Thanks to Laurynas Biveinis for the patch. (Bug #16696906, Bug #68970)
  • InnoDB: For explicit cache coherency, a write barrier was added to the head of os_thread_create_func(), and a read barrier was added to assertion code in rw_lock_free_func(). (Bug #13364876, Bug #62692, Bug #18870970, Bug #72809)
  • InnoDB: A memcached append operation on an INT column caused a segmentation fault. append operations on INT columns 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 KEY partitioning, their order may help determine the partition in which the row is placed. Changing this order by means of an ALTER TABLE that uses ALGORITHM=INPLACE can lead to inconsistency when placing rows in partitions; in other words, a row inserted before such an operation operation is placed in one partition, but the same row inserted afterwards is placed in a different one. For this reason, altering the order of a multicolumn index online is no longer allowed when that index is also used as the base for partitioning the table by KEY; instead, you must use a copying ALTER TABLE to perform the change. (Bug #17896265)
  • Replication: When enforce_gtid_consistency was set to WARN, if a second GTID consistency violating statement within a transaction was encountered, it was not raising a warning. This was due to the fact that by design the transaction context was marked as GTID violating, hence no other warnings were being issued until the transaction committed. The fix ensures that a warning is raised for all statements inside a transaction correctly. (Bug #20414559)
  • Replication: After restarting a slave, the first relay log was missing the Previous_gtids log event. Since MySQL version 5.7.6, a Previous_gtids log event is added to every log. This fix ensures that a Previous_gtids log 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_gtids log 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 latin1 character set. (Bug #19855907)
  • Replication: If a client thread on a slave executed FLUSH TABLES WITH READ LOCK while the master executed a DML, executing SHOW SLAVE STATUS in 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 multi-threaded slave enabled, resetting the slave and then executing RESET SLAVE ALL, START SLAVE or STOP SLAVE resulted in a crash. This has now been fixed and the multi-threaded slave can be restarted in a multi-source replication setup. (Bug #19784641)
  • Replication: The CHANGE REPLICATION FILTER statement can be used to create an empty filter, for example when clearing previously configured replication filters. This caused a crash in previous versions when creating an empty filter for REPLICATE_DO_TABLE, REPLICATE_IGNORE_TABLE, REPLICATE_WILD_DO_TABLE, or REPLICATE_WILD_IGNORE_TABLE. This fix ensures that these replication filters can be safely cleared by setting the filter to be empty. (Bug #19711674)
  • Replication: When using a MySQL version that had been compiled with the WITH_DEBUG option enabled, using expire_logs_days to purge binary logs caused a restart to crash the server. This problem arose after the fix for Bug #17283409. The fix ensures that current_thd is checked before calling DEBUG_SYNC(). (Bug #19553099)
  • Replication: When using a multi-threaded slave, the slave receiver (SQL) thread stopped with an ER_MTS_CANT_PARALLEL error when issuing a LOAD DATA INFILE statement 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 multi-threaded slave applier incorrectly handling DELETE_FILE events. The fix ensures that a multi-threaded slave handles DELETE_FILE events 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_EVENT and FORMAT_DESCRIPTION_EVENT is replicated from master and written into the new relay log. When using a multi-threaded slave, problems such as error 1755 were encountered when applying the remaining part of the group in the relay log. This fix ensures that if MASTER_AUTO_POSITION is enabled, then the worker rolls back the partial group, finishes its work, and then applies the new complete copy of the group. If MASTER_AUTO_POSITION is disabled, the worker does not roll back the partial group. (Bug #19545298)
  • Replication: When using row-based replication with slave_type_conversions enabled, a binary log with more than one Rows_log_event in succession caused a crash. This was due to the temporary tables generated as part of the slave_type_conversions process 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 multi-threaded slave generated error 1755. Because the Previous_gtids log event is logged using the master's server_id and not the slave's server_id, the previous events were not being skipped correctly. This fix ensures that the events in Previous_gtids log 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_checksum enabled by default meant that the last 4 bytes of events from the older master were being incorrectly interpreted as the checksum. A warning is now generated and to avoid such a situation, set slave_sql_verify_checksum=0 to disable checksums on the slave. (Bug #17276183)
  • Replication: When using multi-source replication and a multi-threaded 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 multi-threaded 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 BINLOG statement, resulted in an assertion. The fix ensures that a rollback happens only for a slave when a transaction spans multiple binary log files. Rollback does not happen now if the Format_description comes from the BINLOG statement being executed in the MySQL client. (Bug #74597, Bug #19928622)
  • Replication: The GTIDs of transactions committed in a group were not added to gtid_executed in order and this sometimes caused temporary gaps in gtid_executed. When these gaps occurred, the server would have to add and remove intervals from the GTID set, and this requires a mutex, which would cause contention and could reduce performance. The fix ensures that GTIDs are added to gtid_executed in the same commit order without gaps. (Bug #74328, Bug #19982543)
  • Replication: In a replication topology where:
  • the slave had GTID_MODE=ON and MASTER_AUTO_POSITION=1
  • the master had GTID_MODE=ON and had not executed any transactions since it was started
  • if the slave used the MASTER_POS_WAIT function to wait until it had received the full binary log from the master while the master had not executed any transactions, then the MASTER_POS_WAIT function would never finish, or would time out. This was caused because after a server restart, the master's binary log ends with a Previous_gtids log event but this event was not being replicated, so the slave was not made aware of the master's binary log position. The fix ensures that the Previous_gtids log event is replicated correctly, so that the slave becomes aware of the correct binary log position on the master, ensuring that the MASTER_POS_WAIT function can finish. (Bug #73727, Bug #19507923)
  • Replication: When restarting MySQL with relay_log_recovery enabled to recover from a crash, if the SQL thread had never been started, the position from which to start recovery was not correctly initialized because Relay_Master_Log_File was missing. This fix ensures that in such a situation each of the relay logs, starting from the first relay log file, is searched for a rotate event from the master, which specifies where replication started from. This rotate event is then used to set the SQL thread's Relay_Master_Log_File and Relay_Log_Pos and recovery continues as normal. (Bug #73039, Bug #19021091)
  • Replication: When using GTIDs for replication and with MASTER_AUTO_POSITION enabled, if a slave requested GTIDs which had been already been purged by the master, the master was sending all available GTIDs. This happened because the master reads all available binary logs and searches for a binary log which contains a GTID that is not contained in the union of gtid_executed and gtid_retrieved. If such a GTID is found, the master starts sending the information starting from that location. In a situation where the union of the slave's gtid_executed and gtid_retreived set did not contain the master's gtid_purged set, 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 multi-threaded slave with GTID based replication, enabling --replicate-same-server-id caused the slave thread to stop with an error and replication could not be started. This was caused by a Previous_gtids log event not being correctly filtered in such a setup and reaching the worker thread. The fix ensures that Previous_gtids log 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_executed set. This situation could occur for example if the SQL thread had not applied the transaction or a RESET MASTER statement was issued on the slave to clean up its gtid_executed set. The fix ensures that a GTID based replication slave using auto positioning does not ask for a fully received transaction twice, regardless of the slave's gtid_executed set, and it now only adds a GTID to the Retrieved_Gtid_Set when the whole transaction has been received. (Bug #72392, Bug #18629623, Bug #17943188)
  • Replication: When using SHOW SLAVE STATUS to monitor replication performance, Seconds_Behind_Master sometimes displayed unexpected lag behind the master. This was caused by Previous_gtids log events being written to the slave's relay log with a timestamp behind the master, and then being used to calculate the Seconds_Behind_Master. This fix ensures that events generated on the slave that are added to the relay log and are not used when calculating Seconds_Behind_Master. (Bug #72376, Bug #18622657)
  • Replication: The global scope for the sql_log_bin system variable has been deprecated, and this variable can now be set with session scope only. The statement SET GLOBAL SQL_LOG_BIN now produces an error. It remains possible for now to read the global value of sql_log_bin, but doing so produces a warning. You should act now to remove from your applications any dependencies on reading this value, as the ability to do so will be removed in the next major MySQL release following MySQL 5.7. (Bug #67433, Bug #15868071)
  • 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 .dll plugin (intended for Windows) resulted in a memory leak. (Bug #20439894)
  • On 32-bit platforms, byte-count calculations for utf8 arguments for RPAD() could overflow and cause a server exit. (Bug #20316028)
  • Pushed joins were not working for NDB tables. (Bug #20234994)
  • mysqltest had a memory leak if another process shut down the server. (Bug #20221262)
  • For some queries with LIMIT, EXPLAIN could indicate that execution would be done using filesort, but execution actually was done using an index read. (Bug #20219846)
  • A bulk INSERT followed by other statements followed by LOAD DATA could produce incorrect AUTO_INCREMENT values. (Bug #20126635)
  • 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)
  • During token processing, the parser check whether a token contained 7-bit data could be applied to the wrong token. (Bug #20086997)
  • For debug builds, the server could raise an assertion during DELETE processing 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() and mysql_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, and ROLLUP caused an assertion to be raised. (Bug #20034943)
  • 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 #20032855)
  • NULL as an expression was not recognized as a literal for calculation of Performance Schema statement digests. (Bug #20015246)
  • A user with a name of event_scheduler could view the Event Scheduler process list without the PROCESS privilege. (Bug #20007583)
  • The mysql client could exit prematurely when invoked with the --xml option. (Bug #19974879)
  • InnoDB table checksum calculati

New in MySQL 5.6.23 (Feb 3, 2015)

  • Security Notes:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated from version 1.0.1j to version 1.0.1k.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead. (Bug #20375530)
  • Functionality Added or Changed:
  • Support for the SSL 2.0 and SSL 3.0 protocols has been disabled because they provide weak encryption. Support was added for the TLS 1.1 and TLS 1.2 protocols. (Bug #19820550)
  • References: See also Bug #19921150
  • yaSSL was upgraded to version 2.3.7. (Bug #19695101, Bug #20201864)
  • The valid date range of the SSL certificates in mysql-test/std_data has been extended to the year 2029. (Bug #18366947)
  • Bugs Fixed:
  • 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: An ALTER TABLE ... ADD INDEX operation raised an assertion due to assertion code that did not allow an online index status of ONLINE_INDEX_ABORTED_DROPPED. The assertion code has been relaxed. (Bug #20198726)
  • InnoDB: An error occurred when the push_warning_printf function was invoked during server recovery. This function was previously used to print a warning message to the client. Also, current_thd was NULL when the server was restarted. (Bug #20144839)
  • InnoDB: An ALTER TABLE operation 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: Error messages regarding a size limitation on BLOB or TEXT data inserted in a single transaction have been revised. (Bug #19975322)
  • InnoDB: DML operations on a table with full-text search indexes raised an invalid assertion. (Bug #19905246)
  • References: This bug is a regression of Bug #19314480.
  • InnoDB: A multiple-table delete operation caused the server to halt. (Bug #19815702)
  • InnoDB: A FLUSH TABLES operation raised an assertion. (Bug #19803418)
  • 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: On non-Windows platforms, os-file_pread and os_file_pwrite functions 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 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 integer column value was handled incorrectly for the memcached incr and decr commands. (Bug #69415, Bug #20083106, Bug #74874, Bug #20044123)
  • Partitioning: A failed ALTER TABLE ... TRUNCATE PARTITION statement or a failed TRUNCATE TABLE statement against a partitioned table sometimes left inconsistent metadata in the table cache; subsequent SQL statements reusing this metadata failed, and could in some cases also lead to a failure of the server. (Bug #74292, Bug #19786861)
  • Replication: If a client thread on a slave executed FLUSH TABLES WITH READ LOCK while the master executed a DML, executing SHOW SLAVE STATUS in 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 an XA transaction was active, executing an internal rollback, for example using the BINLOG statement, resulted in an assertion. The fix ensures that a rollback happens only for a slave when a transaction spans multiple binary log files. Rollback does not happen now if the Format_description comes from the BINLOG statement being executed in the MySQL client. (Bug #74597, Bug #19928622)
  • 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 SHOW SLAVE STATUS to monitor replication performance, Seconds_Behind_Master sometimes displayed unexpected lag behind the master. This was caused by Previous_gtids_log_events being written to the slave's relay log with a timestamp behind the master, and then being used to calculate the Seconds_Behind_Master. This fix ensures that events generated on the slave that are added to the relay log and are not used when calculating Seconds_Behind_Master. (Bug #72376, Bug #18622657)
  • On Ubuntu 14.10, MySQL install operations could fail to reload AppArmor. (Bug #20092641)
  • EXPLAIN within an XA transaction could raise an assertion. (Bug #19941492)
  • Binary log files created by streaming the binary log from a remote server with mysqlbinlog were given an access mode more permissive than the original files. (Bug #19649868)
  • If the audit_log plugin 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)
  • For failure to create a temporary table due to being out of file descriptors, the server exited rather than returning an error. (Bug #18948649)
  • For some queries that contained a derived table (subquery in the FROM clause), delay of materialization resulted in a suboptimal execution plan due to a less accurate row-count estimate. (Bug #18607971)
  • For UPDATE and DELETE statements, the server could exit after attempting to access an uninitialized data structure. (Bug #18036143)
  • Starting the server with start service or mysqld_safe could result in failure to use the correct plugin directory. (Bug #17619241)
  • FLUSH TABLES on a FEDERATED table failed if the table had been idle longer than the wait_timeout time plus the TCP keepalive time. (Bug #17599258)
  • Selecting all columns from INFORMATION_SCHEMA.TABLES did 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)
  • If my_write() encountered a disk-full condition, it could return an incorrect error value. (Bug #16078792, Bug #19984788)
  • InnoDB boolean full-text searches incorrectly handled + combined with parentheses; for example, +word1 +(>word2

New in MySQL 5.6.22 (Dec 2, 2014)

  • Compilation Notes:
  • Noisy compiler warnings on FreeBSD 10 were silenced.
  • CMake workarounds for older Mac OS X and XCode versions were removed. On Mac OS X, compilation always uses Clang, even for 32-bit builds.
  • Compilation on Mac OS X is now supported for Mac OS 10.8 and up, using XCode 5 and up. Compilation on older versions may work but is unsupported.
  • Previously, the MYSQL_MAINTAINER_MODE CMake option was turned on by default for debug builds and off for release builds, and MYSQL_MAINTAINER_MODE caused -Werror to be enabled when building with GCC. This made it cumbersome to enable -Werror under certain conditions, such as when compiling with Clang.
  • Now, MYSQL_MAINTAINER_MODE is on by default when compiling debug builds with GCC, and MYSQL_MAINTAINER_MODE enbles -Werror regardless of whether GCC or Clang is used. Enabling -Werror with Clang can be done simply by explicitly setting -DMYSQL_MAINTAINER_MODE=1 when running CMake. In addition, some compilation warnings reported by Clang 3.4 were fixed, making it possible to build the default debug build with -Werror.
  • Build support was modified to produce the same warnings for Clang as for gcc.
  • CMake configuration for the Clang compiler sets more appropriate flags for building on Linux. Specifically, -g -fno-omit-frame-pointer -fno-strict-aliasing is now added.
  • Security Notes:
  • The linked OpenSSL library for the MySQL Commercial Server has been updated from version 1.0.1h to version 1.0.1j.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server, which uses the yaSSL library instead.
  • Functionality Added or Changed:
  • Replication: The variable binlogging_impossible_mode has been renamed binlog_error_action. binlogging_impossible_mode is now deprecated.
  • The new -DWITH_UBSAN=ON CMake option enables the Undefined Behavior Sanitizer. This feature is supported by GCC 4.9 and up, and Clang 3.4 and up.
  • Bugs Fixed:
  • InnoDB: An ALTER TABLE operation 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.
  • InnoDB: In debug builds, setting the innodb_limit_optimistic_insert_debug debug configuration option to 1 caused an infinite B-tree page split.
  • InnoDB: The dict_set_corrupted() function attempted to update the clustered index of the SYS_INDEXES data dictionary table incorrectly.
  • 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.
  • InnoDB: The InnoDB data dictionary was not updated when a ALTER TABLE ... CHANGE COLUMN operation changed the case of the column name.
  • InnoDB: A memory access violation caused fts_optimize_thread and mysqld to terminate.
  • InnoDB: A procedure, called from a function to perform an operation on a temporary table, caused the server to halt.
  • InnoDB: Attempting to shut down the server after starting the server with innodb_force_recovery=6 resulted in a hang.
  • InnoDB: A COMMIT operation related to full-text search resulted in a segmentation fault.
  • InnoDB: If a database is named using uppercase letters on a MySQL server with lower_case_table_names=2 (which is default on Mac OS X), InnoDB stores the database name as specified in the InnoDB internal system table (SYS_TABLES) but stores the name in lowercase on disk. During crash recovery, the case mismatch resulted in a conflict that would mark the tablespace .ibd file as missing. The patch for this bug converts database names to lowercase on crash recovery.
  • InnoDB: In debug builds, the InnoDB Lock Monitor asserted after a DROP TABLE operation, and the InnoDB Monitor encountered an assertion in buf_page_get_gen.
  • InnoDB: A CREATE TABLE operation that failed with innodb_strict_mode=ON would succeed without printing a warning with innodb_strict_mode=OFF.
  • 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 before the assertion code in rw_lock_free_func().
  • InnoDB: The MySQL 5.6.20 patch for Bug #16963396 / MySQL Bug #69477 limited the size of redo log BLOB writes to 10% of the redo log file size. This limitation has been relaxed. Redo log BLOB writes are now limited to 10% of the total redo log size (innodb_log_file_size * innodb_log_files_in_group).
  • As a result, innodb_log_file_size * innodb_log_files_in_group should be 10 times larger than the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields). No action is required if innodb_log_file_size * innodb_log_files_in_group is already sufficiently large or if your tables contain no BLOB data.
  • Partitioning: When multiple columns are used in KEY partitioning, their order may help determine the partition in which the row is placed. Changing this order by means of an ALTER TABLE that uses ALGORITHM=INPLACE can lead to inconsistency when placing rows in partitions; in other words, a row inserted before such an operation operation is placed in one partition, but the same row inserted afterwards is placed in a different one. For this reason, altering the order of a multicolumn index online is no longer allowed when that index is also used as the base for partitioning the table by KEY; instead, you must use a copying ALTER TABLE to perform the change.
  • Replication: When using a MySQL version that had been compiled with the WITH_DEBUG option enabled, using expire_logs_days to purge binary logs caused a restart to crash the server. This problem arose after the fix for Bug #17283409. The fix ensures that current_thd is checked before calling DEBUG_SYNC().
  • 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_EVENT and FORMAT_DESCRIPTION_EVENT is replicated from master and written into the new relay log. When using a multi-threaded slave, problems such as error 1755 were encountered when applying the remaining part of the group in the relay log. This fix ensures that if MASTER_AUTO_POSITION is enabled, then the worker rolls back the partial group, finishes its work, and then applies the new complete copy of the group. If MASTER_AUTO_POSITION is disabled, the worker does not roll back the partial group.
  • Replication: When using row-based replication with slave_type_conversions enabled, a binary log with more than one Rows_log_event in succession caused a crash. This was due to the temporary tables generated as part of the slave_type_conversions process 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.
  • Replication: When using binary log files that had been manually copied from the master, for example to avoid I/O thread reading delay, the multi-threaded slave generated error 1755. Because the Previous_gtid_log_event is logged using the master's server_id and not the slave's server_id, the previous events were not being skipped correctly. This fix ensures that the events in Previous_gtid_log_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).
  • 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_checksum enabled by default meant that the last 4 bytes of events from the older master were being incorrectly interpreted as the checksum. A warning is now generated and to avoid such a situation, set slave_sql_verify_checksum=0 to disable checksums on the slave.
  • Replication: When restarting MySQL with relay_log_recovery enabled to recover from a crash, if the SQL thread had never been started, the position from which to start recovery was not correctly initialized because Relay_Master_Log_File was missing. This fix ensures that in such a situation each of the relay logs, starting from the first relay log file, is searched for a rotate event from the master, which specifies where replication started from. This rotate event is then used to set the SQL thread's Relay_Master_Log_File and Relay_Log_Pos and recovery continues as normal.
  • Replication: When using GTIDs for replication and with MASTER_AUTO_POSITION enabled, if a slave requested GTIDs which had been already been purged by the master, the master was sending all available GTIDs. This happened because the master reads all available binary logs and searches for a binary log which contains a GTID that is not contained in the union of gtid_executed and gtid_retrieved. If such a GTID is found, the master starts sending the information starting from that location. In a situation where the union of the slave's gtid_executed and gtid_retreived set did not contain the master's gtid_purged set, 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."
  • 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.
  • Replication: The global scope for the sql_log_bin system variable has been deprecated, and this variable can now be set with session scope only. The statement SET GLOBAL SQL_LOG_BIN now produces an error. It remains possible for now to read the global value of sql_log_bin, but you should act to remove from your applications any dependencies on reading this value, as the ability to do so will be removed in a future MySQL release.
  • InnoDB table checksum calculation could yield an incorrect result if the value of the innodb_checksum_algorithm system variable was modified during the operation.
  • GROUP BY on a CHAR(0) NOT NULL column could lead to a server exit.
  • With the validate_password plugin activated and dictionary lookups enabled, passing a user-defined variable to PASSWORD() could cause a server exit.
  • Debian packages were built using the complex set of character sets, not the all set of character sets.
  • mysqldump failed to report a disk-full error if the dump destination was located on an NFS mount.
  • InnoDB permitted a foreign key to be created which referenced a parent table for which the user did not have sufficient privileges.
  • Copying InnoDB tables containing full-text columns from Windows to Linux caused a server exit on Linux during full-text index initialization.
  • On Windows, the replace utility did not work.
  • On CentOS 6, specifying a relative path name for the --socket option caused MySQL startup script failure.
  • In Solaris 11.2, dtrace -V output changed from Sun D to Oracle D, causing detection of DTrace availability to fail during MySQL configuration.
  • 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 symlink to the underlying libmysqlclient library. The output now refers directly to libmysqlclient. (The implication is that it is no longer necessary to maintain the symlink for the sake of being able to use mysql_config --libs_r.)
  • 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.
  • Compilation on Windows using Visual Studio 2013 resulted in “unresolved external symbol” errors.
  • OLD_PASSWORD() is deprecated, but no warning was produced when it was invoked.
  • Certain queries for which subquery materialization or UNION DISTINCT was used together with a hash index on a temporary table could produce incorrect results or cause a server exit.
  • The IS_FREE_LOCK() and IS_USED_LOCK() function implementations contained a race condition due to which they could access freed memory when a user lock was concurrently checked and freed. Accessing freed memory could result in an incorrect function return value or server exit.
  • LOCK TABLES sometimes acquired an insufficiently strong lock for implicitly locked tables.
  • The ENABLED_LOCAL_INFILE CMake option incorrectly was enabled by default.
  • Use of ODBC-format date literals could produce incorrect query results.
  • mysql_install_db ignored option files in the default locations.
  • mysql_setpermission failed to properly quote user names in SQL statements that it generated.

New in MySQL 5.6.21 (Sep 24, 2014)

  • InnoDB Notes:
  • The --skip-innodb option is now deprecated and its use results in a warning. It will be removed in a future MySQL release. This also applies to its synonyms (--innodb=OFF, --disable-innodb, and so forth).
  • MySQL Enterprise Notes:
  • MySQL Enterprise Edition now includes a set of encryption functions based on the OpenSSL library that expose OpenSSL capabilities at the SQL level. These functions enable Enterprise applications to perform the following operations:
  • Implement added data protection using public-key asymmetric cryptography
  • Create public and private keys and digital signatures
  • Perform asymmetric encryption and decryption
  • Use cryptographic hashing for digital signing and data verification and validation
  • Functionality Added or Changed:
  • Internally, spatial data types such as Geometry are represented as BLOB values, so when invoked with the --hex-blob option, mysqldump now displays spatial values in hex.
  • Bugs Fixed:
  • InnoDB; Partitioning: Large numbers of partitioned InnoDB tables could consume much more memory when used in MySQL 5.6 or 5.7 than the memory used by the same tables used in previous releases of the MySQL Server.
  • InnoDB: An ALTER TABLE ... ADD FOREIGN KEY operation could cause a serious error.
  • InnoDB: In debug builds, an INSERT operation affecting compressed tables would raise a sync-related assertion.
  • InnoDB: Retrieval of multiple values with a single get command would return incorrect results instead of an error message. The InnoDB memcached plugin does not currently support retrieval of multiple values with a single get command.
  • InnoDB: Attempting to perform operations on a timed out key would cause the memcached daemon to crash and restart.
  • InnoDB: With a transaction isolation level less than or equal to READ COMMITTED, gap locks were not taken when scanning a unique secondary index to check for duplicates. As a result, duplicate check logic failed allowing duplicate key values in the unique secondary index.
  • InnoDB: In rare cases, the purge process would attempt to delete a secondary index record that was not marked for deletion, resulting in an inconsistent secondary index.
  • InnoDB: During recovery, a segmentation fault would occur when marking a table as corrupt.
  • InnoDB: A failed in-place ALTER TABLE operation would leave behind non-unique temporary file names in the data dictionary preventing future ALTER TABLE operations on the same table due to temporary file name conflicts. To avoid this problem, temporary file names are made unique by appending a static global number that is initialized to a random distributed 32-bit number using ut_time() and ut_crc32(). The number is then incremented atomically for each assigned temporary file name. Previously, temporary files were named using the format #sql-ibtid, where tid is the table ID. Temporary files are now named using the format #sql-ibtid-inc, where tid is the table ID and inc is the incremented number.
  • InnoDB: srv_active_wake_master_thread() was called directly in innobase_commit and innobase_prepare, waking up the master thread and incrementing srv_activity_count. srv_active_wake_master_thread() should only be called after committing write transactions, not after read-only transactions or rollbacks. This patch also replaces some calls to srv_active_wake_master_thread() with calls to ib_wake_master_thread().
  • InnoDB: An in-place ALTER TABLE operation on a table with a broken foreign key constraint could raise an assertion.
  • InnoDB: Inserting a record into an InnoDB table with a key that falls between the maximum key of a full page and the minimum key of the “next” page could result in unnecessary page splits and under-filled pages. If the insert point is at the end of a page, InnoDB now attempts to insert to the next page before splitting the page.
  • Replication: After the fix for Bug #16861624, killing a multi-threaded slave worker which was waiting for a commit lock caused a debug assertion to fail. This fix ensures that such a situation can not occur.
  • Replication: When committing a transaction, a flag is now used to check whether a thread has been created, rather than checking the thread itself, which uses more resources, particularly when running the server with master_info_repository=TABLE.
  • Replication: A multi-threaded slave now checks that a free worker is available to dispatch the next event. In previous versions, a multi-threaded slave crashes with a worker error if the thread coordinator can not find a free worker. The crash was caused when the coordinator did not return a free worker, for example if the coordinator was aborted at the same time using STOP SLAVE.
  • Replication: When mysqlbinlog processed multiple binary log files into a single output file, this file was not in a useful state for point-in-time recovery, when it failed with the error, When @@SESSION.GTID_NEXT is set to a GTID, you must explicitly set it to a different value after a COMMIT or ROLLBACK. Please check GTID_NEXT variable manual page for detailed explanation. Current @@SESSION.GTID_NEXT is 'xyz'. When mysqlbinlog processes a binary log containing GTIDs, it outputs SET gtid_next statements, but gtid_next is set to undefined whenever a commit occurs; this left gtid_next undefined when the server had finished processing the output from mysqlbinlog. When the next binary log file started with one or more anonymous statements or transactions, the combination of gtid_next being left undefined at the end of the first binary log and the second binary log containing anonymous transactions to the error described previously (Error 1837, ER_GTID_NEXT_TYPE_UNDEFINED_GROUP).
  • To fix this issue, now, whenever mysqlbinlog encounters this situation, it inserts SET gtid_next = AUTOMATIC if required to avoid leaving the previous binary log with gtid_next undefined.
  • In addition, as a result of this fix, mysqlbinlog no longer outputs session variable information for every binary log; now, this value is printed only once unless it changes.
  • Replication: When the I/O thread reconnected to a master using GTIDs and multithreaded slaves while in the middle of a transaction, it failed to abort the transaction, leaving a partial transaction in the relay log, and then retrieving the same transaction again. This occurred when performing a rotation of the relay log. Now when reconnecting, the server checks before rotating the log in such cases, and waits first for any ongoing transaction to complete.
  • Replication: When using semisynchronous replication, if the binary log position was changed to a future position on a slave then an assertion error was generated on the master. This fix ensures that in such a situation the future position is correctly acknowledged and an error is instead generated on the slave.
  • Replication: When an SQL thread which was waiting for a commit lock was killed and restarted it caused a transaction to be skipped on slave. This fix ensures that thread positions are correctly persisted and transactions resume at the correct position.
  • Replication: On a master that is using semisynchronous replication, where rpl_semi_sync_master_wait_no_slave is enabled and rpl_semi_sync_master_timeout is set to long timeout, killing the I/O thread could cause the server to hang on shutdown. This fix ensures that if the dump thread finds that there no semisynchronous slaves connected to the master, the setting of rpl_semi_sync_master_wait_no_slave is ignored and the shutdown proceeds correctly.
  • Replication: When using row-based replication, setting a slave's slave_rows_search_algorithms variable to HASH_SCAN caused an ER_RECORD_NOT_FOUND error even though that record existed in the storage layer. This fix ensures that the unique key for each record is correctly maintained and such a situation does not occur.
  • Replication: When an event group was spanned across multiple relay log files, a slave could incorrectly identify GTID-header group boundaries. This meant that when a transaction was retried, or if the SQL thread was stopped in the middle of a transaction after some rotates, the Gtid_log_event was being silently skipped on the slave, and the transaction was logged with the slave's GTID. This problem also impacted on using START SLAVE UNTIL MASTER_LOG_POS = log_pos; with GTIDs enabled. If log_pos was in the middle of a transaction, the Gtid_log_event was not correctly detected as the beginning of the transaction and replication stopped before this event. With this fix, threads correctly detect that they are part of a group, and this is used to check if a Gtid_log_event is part of a transaction.
  • Replication: The error messages generated when a duplicate server UUID causes issues during replication have been improved. The slave error now identifies the duplicate server UUID and the master error identifies the zombie thread that has been killed.
  • Replication: The CLIENT_REMEMBER_OPTIONS flag for compressed slave connections is no longer reset and all options are retained. This restores functionality of all options to compressed slave connections.
  • Replication: When using row-based replication, running a long transaction involving a large number of events could trigger an Out of Memory (OOM) error if the slave's table structure was not compatible with the master's table structure. Such an incompatible situation could occur if the table on the slave had been manually changed, or when replicating between different MySQL versions that have different data types. This OOM error was caused because the virtual temporary tables created for the row conversion were not being freed until the end of the transaction, which was a problem when replicating large numbers of events.
  • Starting with this version, such virtual tables are correctly freed during the conversion process.
  • With DTrace support enabled, certain other compilation options could cause the build to fail.
  • yaSSL client code did not validate the encryption size or session ID length, which could cause the client to exit.
  • yaSSL could fail preauthorization if the client supplied inaccurate buffer lengths.
  • Competition between threads could lead to timeout failure trying to rotate the audit log file.
  • LPAD() and RPAD() could cause a server exit if the pad string argument was not well formed.
  • The optimizer could create a zero-length column for a temporary table, causing a server exit.
  • MOD for very small decimal right-hand arguments could cause a server exit.
  • The client library now includes a call to X509_verify_cert_error_string() in the SSL certificate verification code, to be more robust in detecting invalid certificates.
  • If the left-hand-side of an IN predicate was a scalar subquery but returned no row, the server could exit.
  • The thread_concurrency system variable is deprecated, but no warning resulted from setting it at server startup.
  • Sending a SIGQUIT or SIGINT signal to mysql could result in a glibc double free or corruption error.
  • Invalid memory access could occur when using prepared statements if a mysql client connection was lost after statement preparation was complete and there was at least one statement that was in initialized state but not prepared yet.
  • LIKE matches failed for code points of HALF WIDTH KATAKANA in the sjis and cp932 character sets.
  • On EL7, installation of MySQL from RPM packages could fail if postfix had previously been installed using yum.
  • mysql_upgrade could fail if the mysql.user table contained multiple accounts with the same user name and host name where the host name differed in lettercase. This is still not permitted, but now mysql_upgrade prints a more informative error message to indicate the nature of the problem:
  • ERROR 1644 (45000): Multiple accounts exist for user_name, host_name
  • that differ only in Host lettercase; remove all except one of them
  • If the general query log or slow query log file was set to a FIFO or socket file, and the file reader went away, the server stopped executing statements. Now the server detects such files, logs an error message, and continues with the appropriate log disabled.
  • A simultaneous OPTIMIZE TABLE and online ALTER TABLE on the same InnoDB table could result in deadlock.
  • The query cache was not invalidated for a table when a CASCADE DELETE or CASCADE UPDATE referential constraint was specified and the database name or table name contained special characters.

New in MySQL 5.6.20 (Jul 31, 2014)

  • Security Notes:
  • Security Fix: The linked OpenSSL library for the MySQL 5.6 Commercial Server has been updated from version 1.0.1g to version 1.0.1h. Versions of OpenSSL prior to and including 1.0.1g are reported to be vulnerable to CVE-2014-0224.
  • This change does not affect the Oracle-produced MySQL Community build of MySQL Server 5.6, which uses the yaSSL library instead. (CVE-2014-0224)
  • InnoDB Notes:
  • Important Change: Redo log writes for large, externally stored BLOB fields could overwrite the most recent checkpoint. The 5.6.20 patch limits the size of redo log BLOB writes to 10% of the redo log file size. The 5.7.5 patch addresses the bug without imposing a limitation. For MySQL 5.5, the bug remains a known limitation.
  • As a result of the redo log BLOB write limit introduced for MySQL 5.6, innodb_log_file_size should be set to a value greater than 10 times the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields). Failing to do so could result in “Row size too large” errors. No action is required if your innodb_log_file_size setting is already sufficiently large or your tables contain no BLOB data.
  • Functionality Added or Changed:
  • Replication: The new system variable binlog_impossible_mode controls what happens if the server cannot write to the binary log, for example, due to a file error. For backward compatibility, the default for binlog_impossible_mode is IGNORE_ERROR, meaning the server logs the error, halts logging, and continues updates to the database. Setting this variable to ABORT_SERVER makes the server halt logging and shut down if it cannot write to the binary log.
  • CMake support was updated to handle CMake version 3.
  • New Debian7, Ubuntu12.04, and Ubuntu14.04 distribution support that was introduced with 5.6.17 now comes with the platform-specific packaging source placed under the packaging directory, in the deb-precise, deb-wheezy, and deb-trusty directories.
  • Support for LinuxThreads has been removed from the source code. LinuxThreads was superseded by NPTL in Linux 2.6.
  • By default, mysql_install_db creates a my.cnf file in the installation base directory using a template. This may be undesireable for some deployments. To enable this behavior to be suppressed, mysql_install_db now supports a --keep-my-cnf option to preserve any existing my.cnf file and not create a new my.cnf file.
  • The mysqlhotcopy utility is now deprecated and will be removed in a future version of MySQL. Among the reasons for this: It works only for the MyISAM and ARCHIVE storage engines; it works on Unix but not Windows. Alternatives include mysqldump and MySQL Enterprise Backup.
  • The timed_mutexes system variable has no effect and is deprecated.
  • Bugs Fixed:
  • Important Change; Replication: A DROP TABLE statement may be divided into multiple statements before it is sent to the binary log if it contains regular (not temporary) tables and temporary tables, or if it contains temporary tables using both transactional and non-transactional storage engines. Now, when using GTIDs, DROP TABLE statements affecting these combinations of tables are no longer allowed unless the value of the gtid_next system variable is AUTOMATIC. This is because, with GTIDs enabled on the server, issuing a DROP TABLE in the cases just described while having only one GTID associated with each statement (the SQL thread does this following SET gtid_next='uuid:number') causes problems when there are not enough GTIDs for assignment to all the resulting statements following the division of the original DROP TABLE.
  • A DROP TABLE statement might be split due to the behavior of the statement with respect to the current transaction varying, depending on table characteristics, as follows:
  • DROP TABLE of a regular (not temporary) table is committed immediately
  • DROP TABLE of a temporary table using a transactional storage engine is committed with the current transaction (following COMMIT)
  • DROP TABLE of a temporary table that uses a nontransactional storage engine is committed immediately
  • Naming all three of these types of tables in a single DROP TABLE statement causes the MySQL server to divide the original statement into three separate DROP TABLE statements in the binary log. If GTIDs are enabled but the value of gtid_next is not AUTOMATIC, issuing a DROP TABLE statement that mixes any of the table types described previously causes the server to have an insufficient number of GTIDs to write with all of the resulting statements into the binary log. In addition, DROP TABLE IF EXISTS is always written in the binary log for all tables specified in the statement, even if some or all of the tables do not exist.
  • Because temporary tables are handled differently by DROP TABLE depending on whether they use a transactional or nontransactional storage engine, any tables named by a DROP TEMPORARY TABLE statement that do not exist are assumed to be transactional. This means that, if a DROP TEMPORARY TABLE with two nontransactional temporary tables is issued on the master, it would writes only one DROP TABLE statement naming both tables. If one of the temporary tables no longer exists on the slave, then, when the SQL thread executes the statement, it tries to divide it into multiple statements due to it affecting a nontransactional (but existing) temporary table and a nonexistent transactional temporary table; this leads to problems because the SQL thread has only one GTID for the original DROP TABLE statement but must write two DROP TABLE statements in the binary log.
  • In addition, when the slave dropped temporary tables after detecting that the master had restarted, it logged one DROP TABLE statement per pseudo-thread and per database, but combined temporary tables using transactional and nontransactional storage engines in a single DROP TABLE statement.
  • Now, we throw an error in the client session if gtid_next is set to a uuid:number value and a DROP TABLE statement is issued mixing any of the table types described previously.
  • In addition, we now group the nonexistent temporary tables and assume them to be transactional only if at least one transactional temporary table is dropped by the statement. If no transactional temporary tables are dropped, any nonexistent temporary tables are assumed to be nontransactional temporary tables.
  • The slave now also handles dropping of temporary tables correctly in the event of the restart by the master.
  • InnoDB: Opening a parent table that has thousands of child tables could result in a long semaphore wait condition.
  • InnoDB: For single item full-text searches, deleted documents were included in inverse document frequency (IDF) calculations.
  • InnoDB: On mysqld start, specifying multiple data files using the innodb_data_file_path option would return a Space id in fsp header error after data is written to the second file.
  • InnoDB: A DELETE operation on a table with full-text search indexes raised an assertion.
  • InnoDB: When calling the memcached flush_all command, InnoDB attempts to initialize a connection and a transaction. If the transaction is in TRX_STATE_NOT_STARTED state, InnoDB would fail to set CONN_DATA->CRSR_TRX to NULL, resulting in a serious error.
  • InnoDB: When InnoDB is built as a shared library, attempting to load the InnoDB full-text search (FTS) INFORMATION_SCHEMA plugin would fail with a Can't open shared library 'ha_innodb.so' error.
  • InnoDB: A regression introduced in MySQL 5.6.5 would cause full-text search index tables to be created in the system tablespace (space 0) even though innodb_file_per_table was enabled.
  • InnoDB: The InnoDB memcached plugin would call plugin_del without acquiring the lock_plugin mutex. This bug fix also addresses a race condition in ib_cursor_delete_row.
  • InnoDB: The fix for Bug#16418661 added superfluous buf_flush_list() logic to InnoDB startup code.
  • InnoDB: A race condition in fts_get_next_doc_id resulted in Duplicate FTS_DOC_ID and Cannot find index FTS_DOC_ID_INDEX in InnoDB index translation table errors.
  • InnoDB: Due to differences in memory ordering on different processor types, some mutex and read-write lock flags were not read consistently.
  • Partitioning: Selecting from a table having multiple columns in its primary key and partitioned by LIST COLUMNS(R), where R was the last (rightmost) column listed in the primary key definition, returned an incorrect result.
  • Replication: mysqlbinlog --raw did not check for errors caused by failed writes, which could result in silent corruption of binary logs. Now in such cases it stops with an error.
  • Replication: When a slave worker thread tried to execute a statement that was too large, the resulting error caused a crash. Now in such cases, the error is truncated to fit the size of the buffer.
  • Replication: When using row-based replication, updating or deleting a row on the master that did not exist on the slave led to failure of the slave when it tried to process the change. This problem occurred with InnoDB tables lacking a primary key.
  • Replication: Quotation marks were not always handled correctly by LOAD DATA INFILE when written into the binary log.
  • Replication: Beginning in MySQL 5.6.20, when a user specified AUTO_INCREMENT value falls outside of the range between the current AUTO_INCREMENT value and the sum of the current and number of rows affected values it is replicated correctly. In previous versions, an error was generated by the slave even if the user specified AUTO_INCREMENT value fell outside of the range.
  • Replication: A group of threads involved in acquiring locks could deadlock when the following events occurred:
  • Dump thread reconnects from slave; on master, a new dump thread tries to kill zombie dump threads; having acquired the thread's LOCK_thd_data, it is about to acquire LOCK_log.
  • Application thread executing show binary logs, having acquired LOCK_log and about to acquire LOCK_index.
  • Application thread executing PURGE BINARY LOGS; having acquired LOCK_index, it is about to acquire LOCK_thread_count.
  • Application thread executing SHOW PROCESSLIST (or SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST), having acquired LOCK_thread_count and about to acquire the zombie dump thread's LOCK_thd_data.
  • This leads to the 4 threads deadlocking in the same order which the threads have been listed here.
  • This problem arises because there are ordering rules for LOCK_log and LOCK_index, as well as rules for ordering LOCK_thread_count and LOCK_thd_data, but there are no rules for ordering across these two sets of locks. This was because the internal mysqld_list_processes() function invoked by SHOW PROCESSLIST acquired LOCK_thread_count for the complete lifetime of the function as well as acquiring and releasing each thread's LOCK_thd_data. Now this function takes a copy of the threads from the global thread list and performs its traversal on these, and only after releasing LOCK_thread_count. During this traversal, removal from the global thread list is blocked using LOCK_thd_remove such that the copies that would otherwise be destroyed by the removal remain valid during traversal. The locking order following this fix is shown here:
  • LOCK_thd_remove -> LOCK_thd_data -> LOCK_log -> LOCK_index -> LOCK_thread_count
  • Replication: On Windows, mysqldump failed if the error log file was deleted (missing) from the active MySQL server.
  • Replication: Client applications should be able to set the BINLOG_DUMP_NON_BLOCK flag in the initial handshake packet (COM_BINLOG_DUMP). Clients connecting to a server issuing a COM_BINLOG_DUMP with the flag unset do not get an EOF when the server has sent the last event in the binary log, which causes the connection to block. This flag, which was removed in error in MySQL 5.6.5, is now restored in the current release.
  • As part of this fix, a new --connection-server-id option is added to mysqlbinlog. This option can be used by the client to test a MySQL server for the presence of this issue.
  • When a SELECT included a derived table in a join in its FROM list and the SELECT list included COUNT(DISTINCT), the COUNT() returned 1 even if the underlying result set was empty.
  • Enabling optimizer trace could cause a server exit for queries with a subquery in a HAVING clause.
  • SHA and MD5 functions failed for operations using the internal filename character set and could cause a server exit.
  • Large arguments passed to mysqldump could lead to buffer overflow and program exit.
  • Compiler flags were not passed to DTrace, causing problems for 32-bit builds cross-compiled on 64-bit platforms.
  • ALTER TABLE on a partitioned table could result in the wrong storage engine being written into the table's .frm file and displayed in SHOW CREATE TABLE.
  • With the max_heap_table_size system variable set to a large value (20GB), creation of a temporary table or a table using the MEMORY storage engine caused a server exit.
  • For debug builds, a 0x00 character in a full-text query string that used the ujis_japanese_ci, utf8mb4_turkish_ci, or eucjpms_bin collation could raise an assertion.
  • mysqladmin password masked the old password given on the command line, but not the new password.
  • yaSSL code had an off-by-one error in certificate decoding that could cause buffer overflow.
  • yaSSL code had an opendir() without a corresponding closedir().
  • For full-text queries on InnoDB tables, attempts to access deleted document IDs could lead to a server exit.
  • MyISAM temporary files could be used to mount a code-execution attack.
  • For queries that selected from the Performance Schema events_statements_current table, adding an ORDER BY clause could produce incorrect results.
  • If a query had both MIN()/MAX() and aggregate_function(DISTINCT) (for example, SUM(DISTINCT)) and was executed using Loose Index Scan, the result values of MIN()/MAX() were set improperly.
  • For UNION statements, the rows-examined value was calculated incorrectly. This was manifest as too-large values for the ROWS_EXAMINED column of Performance Schema statement tables (such as events_statements_current).
  • Clients could determine based on connection error message content whether an account existed.
  • An assertion could be raised when creating a index on a prefix of a TINYBLOB or GEOMETRY column in an InnoDB column.
  • Use of a nonmultibyte algorithm for skipping leading spaces in multibyte strings could cause a server exit. (Bug #12368495, Bug #18315770)
  • For a view defined on a UNION, the server could create an invalid view definition.
  • Configuring with cmake -DWITHOUT_SERVER to build clients without the server failed for builds outside of the source tree.
  • With big_tables enabled, queries that used COUNT(DISTINCT) on a simple join with a constant equality condition on a non-duplicate key returned incorrect results.
  • Deadlock could occur if three threads simultaneously performed INSTALL PLUGIN, SHOW VARIABLES, and mysql_change_user().
  • mysql_config_editor exited when given an empty argument to the --login-path option.
  • MySQL did not compile with Bison 3. A workaround is to downgrade to Bison 2.
  • Uninstalling and reinstalling semisynchronous replication plugins while semisynchronous replication was active caused replication failures. The plugins now check whether they can be uninstalled and produce an error if semisynchronous replication is active. To uninstall the master-side plugin, there must be no semisynchronous slaves. To uninstall the slave-side plugin, there must be no semisynchronous I/O threads running.
  • If there was a predicate on a column referenced by MIN() or MAX() and that predicate was not present in all the disjunctions on key parts earlier in the compound index, Loose Index Scan returned an incorrect result.
  • Client auto-reconnect did not work for clients linked against libmysqlclient, even with MYSQL_OPT_RECONNECT enabled.
  • Upgrades using RPM packages could change the ownership of an installation directory.
  • Proxy users were unable to execute statements if the proxied user password had expired.
  • A new CMake option, SUNPRO_CXX_LIBRARY, enables linking against libCstd instead of stlport4 on Solaris 10 or later. This works only for client code because the server depends on C++98. Example usage:
  • cmake -DWITHOUT_SERVER=1 -DSUNPRO_CXX_LIBRARY=Cstd
  • File permissions and line endings of several test and configuration files were made more consistent to avoid warnings from package checkers. (Bug #68521, Bug #16415173, Bug #16395459, Bug #68517, Bug #16415032, Bug #71112, Bug #17919313, Bug #71113, Bug #17919422)

New in MySQL 5.6.19 (May 31, 2014)

  • Functionality Added or Changed:
  • The obsolete and unmaintained charset2html utility has been removed from MySQL distributions. (Bug #71897, Bug #18352347)
  • The mysqlbug, mysql_waitpid, and mysql_zap utilities have been deprecated and will be removed in MySQL 5.7.
  • Bugs Fixed:
  • InnoDB: After upgrading from 5.6.10 to MySQL versions up to and including MySQL 5.6.18, InnoDB would attempt to rename obsolete full-text search auxiliary tables on server startup, resulting in an assertion failure. (Bug #18634201, Bug #72079)
  • InnoDB: For each insert, memset would be called three times to allocate memory for system fields. To reduce CPU usage, the three memset calls are now combined into a single call. (Bug #17858679, Bug #71014)
  • InnoDB: Enabling the InnoDB Table Monitor would result in a ib_table->stat_initialized assertion failure. (Bug #17039528, Bug #69641)
  • InnoDB: Setting innodb_max_dirty_pages_pct=0 would leave 1% of dirty pages unflushed. Buffer pool flushing is initiated when the percentage of dirty pages is greater innodb_max_dirty_pages_pct. The internal variables that store the innodb_max_dirty_pages_pct value and the percentage of dirty pages (buf_get_modified_ratio_pct and srv_max_buf_pool_modified_pct) were defined as unsigned integer data types, which meant that a innodb_max_dirty_pages_pct value of 0 required a dirty pages percentage of 1 or greater to initiate buffer pool flushing.
  • To address this problem, the buf_get_modified_ratio_pct and srv_max_buf_pool_modified_pct internal variables are redefined as double data types, which changes the range value for innodb_max_dirty_pages_pct and innodb_max_dirty_pages_pct_lwm from 0 .. 99 to 0 .. 99.99. Additionally, buffer pool flushing is now initiated when the percentage of dirty pages is “greater than or equal to” innodb_max_dirty_pages_pct. (Bug #13029450, Bug #62534)
  • Replication: Log rotation events could cause group_relay_log_pos to be moved forward incorrectly within a group. This meant that, when the transaction was retried, or if the SQL thread was stopped in the middle of a transaction following one or more log rotations (such that the transaction or group spanned multiple relay log files), part or all of the group was silently skipped.
  • This issue has been addressed by correcting a problem in the logic used to avoid touching the coordinates of the SQL thread when updating the log position as part of a relay log rotation whereby it was possible to update the SQL thread's coordinates when not using a multi-threaded slave, even in the middle of a group. (Bug #18482854)
  • Replication: When running the server with --gtid-mode=ON, STOP SLAVE followed by START SLAVE resulted in a mismatch between the information provided by INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO and the Slave_open_temp_tables status variable: the INNODB_TEMP_TABLE_INFO table showed that no temporary tables existed, but Slave_open_temp_tables had a nonzero value. (Bug #18364070)
  • References: See also Bug #18236612.
  • Replication: In certain cases, the server mishandled triggers and stored procedures that tried to modify other tables when called by CREATE TABLE ... SELECT. This is now handled correctly as an error. (Bug #18137535)
  • Replication: When used on a table employing a transactional storage engine, a failed TRUNCATE TABLE was still written to the binary log and thus replayed on the slave. This could lead to inconsistency when the master retained data that was removed on the slave.
  • Now in such cases TRUNCATE TABLE is logged only when it executes successfully. (Bug #17942050, Bug #71070)
  • Replication: The server did not always handle the auto.cnf file correctly in cases where this file's permissions were incorrect. (Bug #17786581, Bug #70891)
  • Replication: When the binary log was rotated due to receipt of a SIGHUP signal, the new binary log did not contain the Previous_gtid_event required for subsequent processing of that binary log's GTID events. Now when SIGHUP is received, steps are taken to insure that the server writes the necessary Previous_gtid_event to the new log before writing any GTID events to the new log. (Bug #17026898)
  • Replication: When gtid_mode=ON, and a transaction is filtered out on the slave, the GTID of the transaction is still logged on the slave as an “empty” transaction (consisting of a GTID followed immediately by BEGIN and then COMMIT). This is necessary to prevent the transaction from being retransmitted the next time the slave reconnects or is involved in a failover. The current fix addresses two issues relating to such “empty” transactions:
  • No empty transaction was generated for CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statements.
  • If the slave used a database filter (--replicate-do-db or --replicate-ignore-db option), no empty transaction was generated.
  • (Bug #71326, Bug #18095502, Bug #18145032)
  • The server could fail to properly reprepare triggers that referred to another table after that table was truncated. (Bug #18596756)
  • Certain INFORMATION_SCHEMA queries could cause a server exit. (Bug #18319790)
  • For indexes on prefixes or character string columns, index corruption could occur for assignment of binary data to the column due to improper character counting. (Bug #18359924)
  • Solaris-specific scripts were included in and installed by non-Solaris packages. (Bug #18305641)
  • Concurrent execution of a FLUSH TABLE operation and a stored program that used a cursor could cause a server exit. (Bug #18158639)
  • The client library could cause clients to exit due to incorrectly mapping the client error number to the corresponding message, if reallocation of packet buffer memory occurred. (Bug #18080920)
  • Calling mysql_get_server_version() with an invalid connection handler argument caused the client to exit. Now it returns 0 and reports a CR_COMMANDS_OUT_OF_SYNC error. (Bug #18053212)
  • mysqldump could create table definitions in the dump file that resulted in Too many columns errors when reloading the dump file. (Bug #17477959)
  • On Windows, calling mysql_thread_init() call without mysql_init() caused the client to exit. windows. Now it returns a nonzero result because it is an error to call mysql_thread_init() before the client library is initialized with mysql_library_init(). (Bug #17514920)
  • The optimizer trace could cause a server exit in cases where a subquery was transformed away. (Bug #17458054)
  • The Debug Sync facility could lose a signal, leading to a spurious ER_DEBUG_SYNC_TIMEOUT error. (Bug #14765080, Bug #18221750)
  • Compilation problems were fixed for errors reported by Clang and gcc when compiling in C++11 mode. (Bug #66803, Bug #14631159)
  • CMake produced not-useful warnings about INTERFACE_LINK_LIBRARIES policy. (Bug #71089, Bug #17905155, Bug #17894997)
  • LOAD DATA LOCAL INFILE could use all CPU if import errors occurred when there were no line delimiters. (Bug #51840, Bug #11759519)
  • On Windows, REPAIR TABLE and OPTIMIZE TABLE failed for MyISAM tables with .MYD files larger than 4GB. (Bug #69683, Bug #17235179)
  • A statement of the following form broke row-based replication because it created a table having a field of data type BIGINT with a display width of 3000, which is beyond the maximum acceptable value of 255: CREATE TABLE t1 AS SELECT REPEAT('A',1000) DIV 1 AS a; (Bug #71179, Bug #17994219)
  • Updates could fail to update all applicable rows in cases where multiple key values were identical except for trailing spaces. (Bug #69684, Bug #17156940)

New in MySQL 5.7.4 Milestone 14 Dev (Apr 1, 2014)

  • Performance Schema Notes:
  • Information about prepared statements is available in the prepared_statements_instances table. This table enables inspection of prepared statements used in the server and provides aggregated statistics about them.
  • The performance_schema_max_prepared_statements_instances system variable controls the size of the table.
  • The Performance_schema_prepared_statements_lost status variable indicates how many prepared statements could not be instrumented.
  • Security Notes:
  • Incompatible Change: MySQL deployments installed using RPM packages now are secure by default.
  • The following changes have been implemented as the default deployment characteristics:
  • The installation process creates only a single root account, 'root'@'localhost', automatically generates a random password for this account, and marks the password expired. The MySQL administrator must connect as root using the random password and use SET PASSWORD to select a new password. (The random password is found in the $HOME/.mysql_secret file.)
  • Installation creates no anonymous-user accounts.
  • Installation creates no test database.
  • Installation creates a single root account, 'root'@'localhost', that has no password.
  • A test database is created that is accessible by any user.
  • Incompatible Change: MySQL now enables database administrators to establish a policy for automatic password expiration: Any user who connects to the server using an account for which the password is past its permitted lifetime must change the password.
  • The implementation has these components:
  • The default_password_lifetime system variable defines global password expiration policy. A value of N greater than zero means that passwords have a lifetime of N days. A value of 0 disables automatic password expiration. The default is 360; passwords must be changed approximately once per year.
  • The mysql.user table has new columns that store expiration policy information for individual accounts:
  • password_last_changed indicates when the password was last changed. The server uses this column when clients connect to determine whether the password is past its lifetime and must be changed per the expiration policy in effect.
  • password_lifetime indicates the account password lifetime. A value of N greater than zero means that the password has a lifetime of N days. 0 disables automatic password expiration. NULL (the default) means that the global expiration policy applies.
  • The ALTER USER statement has new options to set password expiration policy for individual accounts.
  • Functionality Added or Changed:
  • Performance; InnoDB: InnoDB now supports multiple page_cleaner threads for flushing dirty pages from buffer pool instances. A new system variable, innodb_page_cleaners, is used to specify the number of page_cleaner threads. The default value of 1 maintains the pre-MySQL 5.7.4 configuration in which there is only a single page_cleaner thread. This enhancement builds on work completed in MySQL 5.6.2, which introduced a single page cleaner thread to offload buffer pool flushing work from the InnoDB master thread.
  • Incompatible Change: The AES_ENCRYPT() and AES_DECRYPT() functions now permit control of the block encryption mode and take an optional initialization vector argument:
  • The new block_encryption_mode system variable controls the mode for block-based encryption algorithms. Its default value is aes-128-ecb, which signifies encryption using a key length of 128 bits and ECB mode.
  • An optional init_vector argument provides an initialization vector for encryption modes that require it:
  • AES_ENCRYPT(str,key_str[,init_vector])
  • AES_DECRYPT(crypt_str,key_str[,init_vector])
  • A random string of bytes to use for the initialization vector can be produced by calling the new RANDOM_BYTES() function.
  • Incompatible Change: The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes now do nothing. Instead, their previous effects are included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). In other words, strict mode now means the same thing as the previous meaning of strict mode plus the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes. This change reduces the number of SQL modes with an effect dependent on strict mode and makes them part of strict mode itself.
  • InnoDB: InnoDB now supports the Transportable Tablespace feature for partitioned InnoDB tables and individual InnoDB table partitions. This enhancement eases backup procedures for partitioned tables and enables copying of partitioned tables and individual table partitions between MySQL instances. For additional information, see Copying Tablespaces to Another Server (Transportable Tablespaces). (Bug #18121824, Bug #70196, Bug #18304194, Bug #71784)
  • InnoDB: Parameters used to identify an InnoDB pages are replaced by two new classes, and fold value and zip_size value calculations have been optimized. These changes simplify code by reducing the number of page identifier parameters passed to functions. (Bug #18073495)
  • InnoDB: The Fusion-io Non-Volatile Memory (NVM) file system on Linux provides atomic write capability, which makes the InnoDB doublewrite buffer redundant. For system tablespace files (ibdata files) located on Fusion-io devices that support atomic writes, the InnoDB doublewrite buffer is automatically disabled. (Bug #18069105)
  • InnoDB: Reverse index leaf page scan has been optimized. btr_pcur_restore_position_func() can now perform optimistic restoration for reverse cursors, which reduces block->mutex contention on the root page, especially for concurrent reverse scans. (Bug #17666170)
  • InnoDB: A new system variable, innodb_log_write_ahead_size, allows you to configure the write-ahead block size for redo logs to a value that matches the operating system or file system cache block size in order to avoid “read-on-write” for redo log writes. Read-on-write occurs when redo log blocks are not entirely cached to the operating system or file system due to a mismatch between write-ahead block size for redo logs and operating system or file system cache block size. Avoiding read-on-write improves throughput stability for redo log writes. (Bug #17571371)
  • InnoDB: MySQL now supports rebuilding regular and partitioned InnoDB tables using online DDL (ALGORITHM=INPLACE) for the following operations:
  • OPTIMIZE TABLE
  • ALTER TABLE ... FORCE
  • ALTER TABLE ... ENGINE=INNODB (when run on an InnoDB table)
  • InnoDB: New global configuration parameters, innodb_status_output and innodb_status_output_locks, allow you to dynamically enable and disable the standard InnoDB Monitor and InnoDB Lock Monitor for periodic output. Previously, enabling and disabling these monitors for periodic output required creating and dropping specially named tables (innodb_monitor and innodb_lock_monitor). For additional information, see InnoDB Monitors.
  • InnoDB: The InnoDB Tablespace Monitor and InnoDB Table Monitor are removed in MySQL 5.7.4. For the Tablespace Monitor, equivalent functionality will be introduced before the GA release of MySQL 5.7. For the Table Monitor, equivalent information can be obtained from InnoDB INFORMATION_SCHEMA tables.
  • InnoDB: MySQL now includes a gb18030 character set that supports the China National Standard GB18030 character set. For more information about MySQL character set support, see Character Set Support.
  • Replication: The binary log dump thread has been optimized by removing unnecessary reallocation of the send buffer. Previously, memory was allocated then freed for every event sent to the slave, even when this was not strictly necessary. Following this optimization, the MySQL Server can make better use of hardware resources by having the dump thread employ adaptative memory allocation, which can also result in less CPU usage. (Bug #11747349, Bug #31932, Bug #11752288, Bug #43426, Bug #13727951)
  • Replication: Implemented separate threads for sending and receiving semisynchronous replication acknowledgement signals, so that event streams and ACK streams can be sent and received simultaneously. This should reduce many common delays and thus improve performance with semisynchronous replication in a number of settings.
  • Replication: It is now possible in many cases to execute CHANGE MASTER TO without first issuing STOP SLAVE. This capability is added by implementing the following changes in the behavior of the CHANGE MASTER TO statement, which now depends only on whether the slave SQL thread or slave I/O thread is stopped.
  • If the SQL thread is stopped, you can execute CHANGE MASTER TO using the RELAY_LOG_FILE, RELAY_LOG_POS, and MASTER_DELAY options, even if the slave I/O thread is running. No other options may be used with this statement when the I/O thread is running.
  • If the I/O thread is stopped, you can execute CHANGE MASTER TO using any of the options for this statement except RELAY_LOG_FILE, RELAY_LOG_POS, or MASTER_DELAY, even when the SQL thread is running. These three options cannot be used when the I/O thread is running.
  • Both the SQL thread and the I/O thread must be stopped before issuing CHANGE MASTER TO with MASTER_AUTO_POSITION = 1.
  • Performance Schema performance was improved in the following ways:
  • When a thread connects, reset of all per-thread statistics is now delayed until a statistic is actually collected. This lazy initialization benefits workloads with very short-lived sessions, for which instrumentation is disabled.
  • When a thread disconnects, the per-thread statistics are aggregated to a parent only for statistics that actually collected data. This optimization benefits workloads with very short-lived sessions, for which instrumentation is disabled.
  • For statement instrumentation, reset of an individual EVENT_NAME statistic is also now delayed until a statistic is actually collected. This benefits all workloads that contain only a few types of statements (SELECT, INSERT, UPDATE, DELETE, and so forth) from the very large set statements supported in MySQL. Only statements for event names actually executed are aggregated on disconnect.
  • The memory footprint of internal memory buffers is reduced, by removing some attributes reserved for future use, that were in fact not used. In particular, statistics for mutexes, rwlocks and conditions now need less memory.
  • On Windows, NOMINMAX is set using the ADD_DEFINITIONS() CMake macro rather than in config.h.cmake so that it is set even without including my_config.h. (Bug #18192896)
  • On Solaris, mysql_config --libs now includes -R/path/to/library so that libraries can be found at runtime. (Bug #18235669)
  • CMake support for compiling MySQL with gcc on Solaris was improved. Binary distributions for Solaris now are built using gcc rather than Sun Studio, to enable compilation of code not handled by Sun Studio. The client programs and the client libraries except the embedded library are still built using Sun Studio.
  • The CHECK_FUNCTION_REPLACEMENT() CMake macro was removed from Windows.cmake and replacement functions are set explicitly instead since the result of the check was already hard coded in WindowsCache.cmake. (Bug #18116661)
  • MySQL now compiles using Clang 3.4. (Bug #18047020)
  • In MySQL 5.7.1, the MySQL test suite mysql-test-run.sh program was modified to start the server with InnoDB rather than MyISAM as the default storage engine. All tests in the MySQL test suite were modified to include a force_default_myisam.inc file. This had to be done because most legacy test results were recorded with the MyISAM engine and failed with a result difference if run with InnoDB. A project is underway to migrate these tests and remove force_default_myisam.inc for tests that do not need MyISAM. In 5.7.4, the rpl and binlog suites and parts of the main suite were migrated. (Bug #17902011)
  • Performance Schema instrumentation was added to capture GTIDs for transaction events. (Bug #17799147)
  • Performance Schema overhead was reduced for the pfs_lock implementation and the uses of atomic operations in general. (Bug #17766582)
  • CMake now aborts the configuration process on Windows if a Visual Studio version earlier than 2010 is used. (Bug #17730320)
  • A new CMake option, WITH_MSAN, permits enabling MemorySanitizer for compilers that support it. (Bug #17632319)
  • Previously, ALTER TABLE in MySQL 5.6 could alter a table such that the result had temporal columns in both 5.5 and 5.6 format. Now ALTER TABLE upgrades old temporal columns to 5.6 format for ADD COLUMN, CHANGE COLUMN, MODIFY COLUMN, ADD INDEX, and FORCE operations. This conversion cannot be done using the INPLACE algorithm, so specifying ALGORITHM=INPLACE in these cases results in an error. (Bug #17246318)
  • Overhead was reduced for filesort comparison operations. (Bug #14635144)
  • Overhead was reduced for metadata lock acquisition for DML statements. (Bug #58627, Bug #11765641)
  • CMake now supports a -DTMPDIR=dir_name option to specify the default tmpdir value. If unspecified, the value defaults to P_tmpdir in . Thanks to Honza Horak for the patch. (Bug #68338, Bug #16316074)
  • Based on community feedback, the default value of 10 for the eq_range_index_dive_limit system variable has proven to be too low. The default has been raised to 200. (Bug #70586, Bug #17587952)
  • Code instrumented with Valgrind did not preallocate memory in alloc_root(), to help find bugs. This behavior is now also enabled if ASAN (address sanitizer) is used. (Bug #44582, Bug #11753184)
  • mysql_install_db provides a more informative diagnostic message when required Perl modules are missing. (Bug #69844, Bug #18187451)
  • MySQL now supports server-side timeouts for execution of SELECT statements:
  • SELECT supports a MAX_STATEMENT_TIME option to specify a timeout for individual queries. For example: SELECT MAX_STATEMENT_TIME = 5000 id, name FROM my_table WHERE ...
  • The max_statement_time system variable specifies the timeout value for SELECT statements executed within the session that include no MAX_STATEMENT_TIME option. If the value is 0, timeouts are not enabled.
  • The Max_statement_time_exceeded, Max_statement_time_set, and Max_statement_time_set_failed status variables provide information about SELECT statements affected by timeouts. Timeout values are in milliseconds.
  • The metadata locking subsystem implementation now uses lock-free hashing rather than a hash protected by a mutex. An implication of this change is that the metadata_locks_cache_size and metadata_locks_hash_instances system variables no longer have any effect, so they are deprecated and will be removed in a future MySQL release.
  • The deprecated IGNORE clause for ALTER TABLE has been removed and its use produces an error.
  • The metadata locking subsystem now uses a lock-free algorithm for acquiring and releasing locks typical for DML statements. This gives better performance/scalability on multi-core machines in workloads involving lots of small read-only transactions.
  • To make it possible to change connections in a load-balanced environment, it is necessary to detect in the response packet whether there is session state to take into consideration when deciding whether a switch can be made.
  • For this purpose, session state consists of these values:
  • The default schema (database)
  • Session-specific values for system variables
  • User-defined variables
  • Temporary tables
  • Prepared statements
  • The OK response packet of the MySQL client/server protocol now includes tracker information so that session state changes can be detected. The tracker mechanism provides a means for MySQL Connectors, Fabric, and client applications to determine whether any session context is available to ensure session migration from one server to another.
  • The user interface to control the tracker and retrieve state-change information from it has the following components, which enable implementation of state-change tracking on the client side:
  • Clients can request notification when there is a change to any of the session state-related values just listed, in the form of a flag that is set in the OK packet received from the server after the change occurs. To control notification, enable or disable the session_track_state_change system variable. This variable is disabled by default.
  • Clients can request notification of changed values for certain specific types of session state information:
  • The default schema name. To control notification, enable or disable the session_track_schema system variable. This variable is enabled by default.
  • The session values of system variables. Notification occurs for the system variables named by the session_track_system_variables system variable. By default, notification is enabled for time_zone, autocommit, character_set_client, character_set_results, and character_set_connection. (The latter three variables are those affected by SET NAMES.)
  • To enable applications to extract the state-change information returned in the OK packet by the server, the MySQL C API includes a pair of functions:
  • mysql_session_track_get_first() fetches the first state-change information received from the server.
  • mysql_session_track_get_next() fetches any remaining state-change information received from the server. Following a successful call to mysql_session_track_get_first(), call this function repeatedly as long as it returns success.
  • The mysqltest program has enable_session_track_info and disable_session_track_info commands to enable and disable tracking of session state-change information.
  • mysqlbug, an obsolete program for generating bug reports, has been removed from the source code.
  • Bugs Fixed:
  • Incompatible Change: Old clients (older than MySQL 5.5.7) failed to parse authentication data correctly if the server was started with the --default-authentication-plugin=sha256_password option.
  • Important Change; InnoDB; Partitioning: The FLUSH TABLES statement's FOR EXPORT option is now supported for partitioned InnoDB tables. (Bug #16943907)
  • InnoDB; Replication: Using the InnoDB memcached plugin (see InnoDB Integration with memcached) with innodb_api_enable_binlog set to 1 caused the server to leak memory. (Bug #70757, Bug #17675622)
  • InnoDB: trx_undo_truncate_start would write to the redo log for temporary undo log segments, resulting in a purge thread assertion. (Bug #18252937)
  • InnoDB: A !sync_check_iterate(check) assertion occurred in fts_create_doc_id() during an INSERT operation. (Bug #18253210)
  • InnoDB: The GCC 4.4 Compiler would emit a bogus warnings about InnoDB parsing functions, indicating that output is uninitialized. (Bug #18192536)
  • InnoDB: log_mutex_exit should be called before log_buffer_extend when the log buffer mutex is held. (Bug #18202904)
  • InnoDB: InnoDB would write to the redo log for some operations on temporary tablespaces. (Bug #18226934)
  • InnoDB: Doublewrite buffer error messages referenced page numbers in an inconsistent manner. (Bug #18242594)
  • InnoDB: The truncate_t::drop_indexes and truncate_t::create_indexes methods would disable redo logging when modifying the system tablespace. (Bug #18236000)
  • InnoDB: Unused parameters and variables along with disabled functionality has been removed from redo log code. This patch also includes redo log code improvements including test enablement, addition of Valgrind instrumentation, and minor code refactoring. (Bug #18251675)
  • InnoDB: An invalid memmove in fts_query_fetch_document would cause a serious error. (Bug #18229433)
  • InnoDB: For full-text queries, a failure to check that num_token is less than max_proximity_item could result in an assertion. (Bug #18233051)
  • InnoDB: InnoDB would perform unnecessary redo log writes and flushing for temporary tablespaces. (Bug #18236692)
  • InnoDB: The user defined type, xid_t, was defined multiple times. (Bug #18251254)
  • InnoDB: To simplify code and reduce memory usage, InnoDB redo log scan records for file-level operations, previously stored in a hash table, are now processed immediately. (Bug #18180875)
  • InnoDB: The loader in some Solaris versions would refuse to start a GCC-compiled binary (such as the mysqld binary) that uses the PAUSE assembler instruction. (Bug #18122171)
  • InnoDB: Temporary tablespace file size did not match the file size specified by --innodb-temp-data-file-path due to an error in file size allocation logic. (Bug #18141070)
  • InnoDB: innodb_ft_result_cache_limit now has a hardcoded maximum value of 4294967295 bytes or (2**32 -1). The maximum value was previously defined as the maximum value of ulong. (Bug #18180057, Bug #71554)
  • InnoDB: InnoDB would fail to restore a corrupt first page of a system tablespace data file from the doublewrite buffer, resulting in a startup failure. (Bug #18144349, Bug #18058884)
  • InnoDB: An UPDATE resulted in a memory access error in lock_rec_other_trx_holds_expl. The transaction list (trx_sys->rw_trx_list) was traversed without acquiring the transaction subsystem mutex (trx_sys->mutex). (Bug #18161853)
  • InnoDB: TRUNCATE TABLE on Windows would report multiple 'chsize' returned OS error 71 errors. (Bug #18176071, Bug #71173)
  • InnoDB: A regression introduced by Bug #14329288 would result in a performance degradation when a compressed table does not fit into memory. (Bug #18124788, Bug #71436)
  • InnoDB: In the case of a corrupted clustered index on a temporary table, the server would crash on an INSERT instead of returning an error. In the case of a corrupted clustered index on a normal table, an error was not returned and the INSERT would succeed. (Bug #18064548)
  • InnoDB: Specifying an alternate directory for InnoDB tables using datadir and then moving .ibd files to the default MySQL data directory would result in a serious error when attempting a DROP TABLE operation. (Bug #18063570)
  • InnoDB: The UNIV_LOG_DEBUG debug flag, which is no longer fully functional, has been removed. (Bug #18080537)
  • InnoDB: A compilation error (unable to find string literal operator) was returned when building in c++11 mode. (Bug #18082139)
  • InnoDB: INFORMATION_SCHEMA.INNODB_TRX contained a bogus transaction ID that did not match transaction ID values printed elsewhere. The method used to retrieve transaction IDs was inconsistent. (Bug #18111007)
  • InnoDB: The maximum value for innodb_thread_sleep_delay is now 1000000 microseconds. The previous maximum value (4294967295 microseconds on 32-bit and 18446744073709551615 microseconds on 64-bit) was unnecessarily large. Because the maximum value of innodb_thread_sleep_delay is limited by the value set for innodb_adaptive_max_sleep_delay (when set to a non-zero value), the maximum value for innodb_thread_sleep_delay is now the same as the maximum value for innodb_adaptive_max_sleep_delay. (Bug #18117322)
  • InnoDB: The fil_node_create function would perform an unnecessary hash table lookup. (Bug #18116588)
  • InnoDB: When starting the server, unnecessary “checking space” log messages would be printed when processing the doublewrite buffer. (Bug #18101380)
  • InnoDB: A full-text tokenizer thread would terminate with an incorrect error message. (Bug #18021306)
  • InnoDB: Attempting to uninstall the InnoDB memcached plugin while the InnoDB memcached plugin is still initializing would kill the InnoDB memcached daemon thread. Uninstall should wait until initialization is complete. (Bug #18038948)
  • InnoDB: In debug builds, creating a unique index on a binary column, with input data containing duplicate keys, would cause an assertion. (Bug #18010711)
  • InnoDB: Logging functions were not used consistently. The bug fix replaces occurrences of fprintf(stderr, message) and fputs() with ib_logf(). Also, because ib_logf() emits a timestamp with each message, the bug fix removes unnecessary occurrences of ut_print_timestamp(). (Bug #17935793, Bug #17534737)
  • InnoDB: A boolean mode full-text search query would result in a memory access violation during parsing. (Bug #17978763)
  • InnoDB: The srv_monitor_thread would crash in the lock_print_info_summary() function due to a race condition between the srv_monitor_thread and purge coordinator thread. (Bug #17980590, Bug #70430)
  • InnoDB: On Windows, a regression introduced in 5.7.3 would allow log writes during sync operations, which should not be allowed due to an issue in some Windows environments. (Bug #17824101)
  • InnoDB: Due to a parser error, full-text search queries that include a sub-expression could return the wrong result. (Bug #17840768)
  • InnoDB: The innochecksum tool did not use a Windows-specific API to retrieve file size information, which resulted in an incorrect error message (Error: ibdata1 cannot be found) when the MySQL 5.6 innochecksum 2GB file size limit was exceeded. innochecksum now provides support for files larger than 2GB in both MySQL 5.6 and MySQL 5.7. (Bug #17810862, Bug #70936)
  • InnoDB: Due to a regression introduced by the fix for Bug#17371537, memory was not allocated for the default memcached engine when using the default memcached engine as the backstore for data instead of InnoDB. (Bug #17800829)
  • InnoDB: If a crash occurred while temporary tables are active, InnoDB would report an invalid error message on restart indicating that a temporary table does not exist in the InnoDB internal data dictionary. (Bug #17779729)
  • InnoDB: A page allocation for an undo log due would fail with a “table is full” error message instead of an “undo log is full” error message. (Bug #17779822)
  • InnoDB: ut_free could be called more than once in succession. (Bug #17763472)
  • InnoDB: An index tree modification could result in a deadlock. (Bug #17754767)
  • InnoDB: Manipulating a table after discarding its tablespace using ALTER TABLE ... DISCARD TABLESPACE could result in a serious error. (Bug #17700280)
  • InnoDB: A race condition in DebugPolicy::enter() would cause a segmentation fault in sync_array_cell_print. (Bug #17713784)
  • InnoDB: Persistent optimizer statistics would cause stalls due to latch contention. (Bug #17699331, Bug #70768)
  • InnoDB: MATCH() ... AGAINST queries that use a long string as an argument for AGAINST() could result in an error when run on an InnoDB table with a full-text search index. (Bug #17640261)
  • InnoDB: An InnoDB full-text search failure would occur due to an “unended” token. The string and string length should be passed for string comparison. (Bug #17659310)
  • InnoDB: Databases names beginning with a digit or special character would cause a full-text search (FTS) parser error. (Bug #17607687)
  • InnoDB: For debug builds, the table rebuilding variant of online ALTER TABLE, when run on tables with BLOB columns, would cause an assertion in the row_log_table_apply_update function. For normal builds, a DB_PRODUCTION error would be returned. (Bug #17661919)
  • InnoDB: Under certain conditions, a regression introduced by the fix for Bug #11758237 would cause an assertion error when INSERT ... ON DUPLICATE KEY UPDATE or REPLACE statements encounter a DB_DUPLICATE_KEY error. (Bug #17604730)
  • InnoDB: In debug builds, a merge insert buffer during a page read would cause a memory access violation. (Bug #17561188)
  • InnoDB: The patch for Bug #16852278, which simplifies and optimizes comparison functions in InnoDB, caused a query performance regression. (Bug #17543588)
  • InnoDB: Truncating a memcached InnoDB table while memcached is performing DML operations would result in a serious error. (Bug #17468031)
  • InnoDB: In sync0rw.ic, rw_lock_x_lock_func_nowait would needlessly call os_thread_get_curr_id. (Bug #17509710, Bug #70417)
  • InnoDB: Attempting to rename a table to a missing database would result in a serious error. (Bug #17447500)
  • InnoDB: If a tablespace data file path is updated in a .isl file and then a crash recovery is performed, the updated tablespace data file path is read from the .isl file but the SYS_DATAFILES table would not be not updated. The SYS_DATAFILES table is now updated with the new data file path after crash recovery. (Bug #17448389)
  • InnoDB: The server could fail to restart if a crash occurred immediately following a RENAME TABLE in an ALTER TABLE, RENAME TABLE sequence. (Bug #17463290)
  • InnoDB: If the first page (page 0) of file-per-table tablespace data file was corrupt, recovery would be halted even though the doublewrite buffer contained a clean copy of the page. (Bug #17335427, Bug #70087)
  • InnoDB: The InnoDB memcached Readme file (README-innodb_memcached) incorrectly stated that libevent 1.6.0 is linked statically into daemon memcached. The bundled version of libevent is 1.4.12, not 1.6.0. (Bug #17324419, Bug #70034)
  • InnoDB: Attempting to reset a replication slave while innodb_force_recovery is greater than 0 would return a cryptic error message: ERROR(1030) HY000: Got error -1 from storage engine. The error message has been changed to: ERROR HY000: Operation not allowed when innodb_force_recovery > 0. Replication options such as --relay-log-info-repository=TABLE and --master-info-repository=TABLE store information in tables in InnoDB. When innodb_force_recovery is greater than 0, replication tables cannot be updated which may cause replication administration commands to fail. (Bug #17287443, Bug #69907)
  • InnoDB: When creating a table there are a minimum of three separate inserts on the mysql.innodb_index_stats table. To improve CREATE TABLE performance, there is now a single COMMIT operation instead of one for each insert. (Bug #17323202, Bug #70063)
  • InnoDB: The server would halt with an assertion in lock_rec_has_to_wait_in_queue(lock) due to a locking-related issue and a transaction being prematurely removed from trx_sys->rw_trx_set. (Bug #17320977)
  • InnoDB: The ALTER TABLE INPLACE algorithm would fail to decrease the auto-increment value. (Bug #17250787, Bug #69882)
  • InnoDB: Comments in btr0cur.cc incorrectly stated that btr_cur_pessimistic_update() and btr_cur_optimistic_update() would accept a NULL value. (Bug #17231743, Bug #69847)
  • InnoDB: dict_table_schema_check would call dtype_sql_name needlessly. (Bug #17193801, Bug #69802)
  • InnoDB: The function os_file_get_status would not work with raw devices. (Bug #17023438, Bug #69424)
  • InnoDB: fil_check_first_page() failed to check if fsp_flags_get_zip_size() returned a valid value, which resulted in a segmentation fault when starting mysqld. (Bug #17033182)
  • InnoDB: The lock_rec_other_has_expl_req function in lock0lock.cc would perform unnecessary work. (Bug #17016214, Bug #69576)
  • InnoDB: Valgrind would report uninitialized values while running a rollback debug test. The Valgrind warnings should only appear in Valgrind-instrumented builds. (Bug #16969876)
  • InnoDB: During crash recovery, an incorrect transaction active time would result in rolling back an uncommitted transaction. (Bug #16936961, Bug #69438)
  • InnoDB: Heap block debugging information (file_name, lineno), used for logging diagnostics, would appear in release builds. This information should only appear in debug builds. (Bug #16924719, Bug #69422)
  • InnoDB: Renaming a column while also adding or dropping columns in the same ALTER TABLE operation would cause an error. (Bug #16864981)
  • InnoDB: An online ALTER TABLE operation would consume more memory than expected. During an online ALTER TABLE operation, an online log buffer containing a head and tail buffer is created for each index that is created or rebuilt. The tail buffer is the writer context and is only required for concurrent write operations on an index while the ALTER TABLE operation is in progress. The head buffer is the reader context and is only required during the log apply phase. To reduce memory consumption, the tail buffer is now allocated when the first DML statement is run on the index, and the head buffer is only allocated in the log apply phase and freed afterwards. (Bug #16868967, Bug #69325, Bug #17911720)
  • InnoDB: A type name (srv_shutdown_state) was the same as a variable name. The srv_shutdown_state type name has been changed to srv_shutdown_t. (Bug #16735398)
  • InnoDB: On Windows, the full-text search (FTS) object ID was not in the expected hexadecimal format. (Bug #16559254)
  • InnoDB: The buf_buddy_relocate function would perform an unnecessary hash lookup. (Bug #16596057)
  • InnoDB: Server shutdown would result in a hang with the following message written to the error log: “[NOTE] InnoDB: Waiting for purge thread to be suspended.” (Bug #16495065)
  • InnoDB: InnoDB would fail to start when innodb_data_file_path specified the data file size in kilobytes by appending K to the size value. (Bug #16287752)
  • InnoDB: Fetching and releasing pages from the buffer pool and tracking the page state are expensive and complex operations. Prior to the bug fix, these operations were performed using a page mutex. Using a page mutex to track several things is expensive and does not scale well. The bug fix separates fetch and release tracking (in-use state) of a page from page I/O state tracking. Fetch and release is now tracked using atomics where available.
  • For portability, a new CMake build option, INNODB_PAGE_ATOMIC_REF_COUNT (default ON), can be used to disable atomic page reference counting on platforms where atomics support is not available. When atomic page reference counting is enabled (default), “[Note] InnoDB: Using atomics to ref count buffer pool pages” is printed to the error log at server startup. If atomic page reference counting is disabled, “[Note] InnoDB: Using mutexes to ref count buffer pool pages” is printed instead. (Bug #16249481, Bug #68079)
  • InnoDB: An insert buffer merge would cause an assertion error due to incorrectly handled ownership information for externally stored BLOBs.
  • InnoDB: Assertion failure in thread thread_num in file ibuf0ibuf.cc line 4080
  • InnoDB: Failing assertion: rec_get_deleted_flag(rec, page_is_comp(page))
  • (Bug #14668683)
  • InnoDB: Decreasing the auto_increment_increment value would have no affect on the next auto-increment value. (Bug #14049391, Bug #65225)
  • InnoDB: Table renaming errors would appear in the LATEST FOREIGN KEY ERROR section of the SHOW ENGINE INNODB STATUS output. (Bug #12762390, Bug #61746)
  • InnoDB: The page latching algorithm for b-trees would lock sibling leaf pages, prolonging dictionary locks. The bug fix implements prefectching of sibling leaf pages to reduce index lock holding time. (Bug #12734249, Bug #61736)
  • InnoDB: An INSERT ...ON DUPLICATE KEY UPDATE statement run on a table with multiple unique indexes would sometimes cause events to be incorrectly written to the binary log. (Bug #11758237, Bug #50413)
  • InnoDB: BUF_READ_AHEAD_AREA would frequently call ut_2_power_up for workloads with a high I/O rate. The calculation is now performed once and the result is stored in the buf_pool_t structure. (Bug #11762242, Bug #54814)
  • InnoDB: UNIV_SYNC_DEBUG, which was disabled in univ.i with the fix for Bug#16720368, is now enabled. (Bug #69617, Bug #17033591)
  • Partitioning: Queries using the index_merge optimization (see Index Merge Optimization) could return invalid results when run against tables that were partitioned by HASH. (Bug #17588348, Bug #70588)
  • Partitioning: When no partition had returned a row since the last HA_ERR_KEY_NOT_FOUND error, the use of uninitialized memory in the priority queue used for returning rows in sorted order could lead to a crash of the server. (Bug #17401628)
  • Replication: When running the server with --gtid-mode=ON, STOP SLAVE followed by START SLAVE resulted in a mismatch between the information provided by INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO and the Slave_open_temp_tables status variable: the INNODB_TEMP_TABLE_INFO table showed that no temporary tables existed, but Slave_open_temp_tables had a nonzero value. (Bug #18236612)
  • Replication: Attempting to use semisynchronous replication concurrently with SSH connections caused the server to fail. (Bug #18219471)
  • Replication: When MASTER_HEARTBEAT_PERIOD was not included in CHANGE MASTER TO, the statement reset Slave_heartbeat_period to its default value and Slave_received_heartbeats to 0. Now the heartbeat period is not changed by CHANGE MASTER TO unless explicitly set using MASTER_HEARTBEAT_PERIOD. In addition, the statement no longer resets Slave_received_heartbeats. (Bug #18185490)
  • Replication: The MASTER_SSL_CRL and MASTER_SSL_CRLPATH options are not available when using yaSSL; MySQL Replication now sets these to NULL automatically whenever yaSSL is enabled. (Bug #18165937)
  • Replication: mysqlbinlog did not free up memory used by its event buffer when using the --rewrite-db option. (Bug #18164998)
  • Replication: After setting MASTER_SSL_CRLPATH using a CHANGE MASTER TO statement, the option value was not displayed properly in the SSL_CRL_PATH column of the Performance Schema replication_connection_configuration table. (Bug #18174719)
  • Replication: Setting --slave-parallel-workers to 1 or greater and starting the slave caused the slave SQL thread to use but not release memory until the slave was restarted with STOP SLAVE and START SLAVE. (Bug #18001777, Bug #71197)
  • Replication: When a slave was configured with replication filters and --log-warnings=2, every statement which was filtered caused an entry to be written in the error log. For busy servers which generated many statements to be filtered, the result was that the error log could quickly grow to many gigabytes in size. Now a throttle is used for such errors, so that an error message is printed only once in a given interval, saying that this particular error occurred a specific number of times during that interval. (Bug #17986385)
  • Replication: When the master and the slave both had gtid_mode=OFF set initially, and the slave SQL thread was stopped while there remained anonymous transactions in the relay log, if the slave was then restarted with gtid_mode=ON, then the slave assigned GTIDs such transactions. This could cause problems when the slave was later promoted to a master, as the transactions would be played again on the promoted master's slaves, leading quickly to inconsistencies on those slaves. (Bug #17813449)
  • Replication: When the master and the slave both had gtid_mode=ON set initially, and the slave SQL thread was stopped while there remained GTID transactions in the relay log, if the slave was then restarted with gtid_mode=OFF, then the slave SQL thread executed any anonymous transaction it encountered without writing its GTID to the binary log, with the result that the GTID was lost. This could cause problems when the slave was later promoted to a master, as the transaction would be played again on the promoted master's slaves, leading quickly to inconsistencies on those slaves. (Bug #17827018)
  • Replication: When the binary log I/O cache grew to exactly 32768 bytes and the current transaction was preceded by a transaction whose size was greater than 32768 bytes, events could be corrupted when written into the binary log. (Bug #17842137)
  • Replication: Creating and dropping large numbers of temporary tables could lead to increased memory consumption. (Bug #17806014)
  • Replication: SHOW SLAVE STATUS used incorrect values when reporting MASTER_SSL_CRL and MASTER_SSL_CRLPATH. (Bug #17772911, Bug #70866)
  • Replication: Binary log events could be sent to slaves before they were flushed to disk on the master, even when sync_binlog was set to 1. This could lead to either of those of the following two issues when the master was restarted following a crash of the operating system:
  • Replication cannot continue because one or more slaves are requesting replicate events that do not exist on the master.
  • Data exists on one or more slaves, but not on the master.
  • Such problems are expected on less durable settings (sync_binlog not equal to 1), but it should not happen when sync_binlog is 1. To fix this issue, a lock (LOCK_log) is now held during synchronization, and is released only after the binary events are actually written to disk. (Bug #17632285, Bug #70669)
  • Replication: mysqlbinlog --verbose failed when it encountered a corrupt row event in the binary log. Such a row event could also cause the slave to fail. (Bug #17632978)
  • Replication: When log_warnings is greater than 1, the master prints binary log dump thread information—containing the slave server ID, binary log file name, and binary log position—in mysqld.1.err. A slave server ID greater than 2 billion was printed with a negative value in such cases. (Bug #17641586, Bug #70685)
  • Replication: When running the slave with --slave-parallel-workers at 1 or greater, setting --slave-skip-errors=all caused the error log to be filled with with instances of the warning Slave SQL: Could not execute Query event. Detailed error: ;, Error_code: 0. (Bug #17581990, Bug #68429)
  • Replication: When semi-synchronous replication was configured on an independent server with no slaves and rpl_semi_sync_master_wait_no_slave was set to OFF, the master still waited for an ACK from the slave. When rpl_semi_sync_master_wait_no_slave is set to OFF, the master should revert to normal replication when the number of slaves reaches zero during the specified timeout period. Now in such cases the server checks whether semi-synchronous replication is switched on, and, if so, goes on to check whether any slaves are connected. If none are connected, semi-synchronous replication is disabled until such time that the user sets the value of rpl_semi_sync_master_wait_no_slave to ON. (Bug #17510411, Bug #70360)
  • Replication: A number of possible state messages used as values for the PROCESSLIST_STATE column of the Performance Schema threads table were longer than the width of the column (64 characters).
  • The long state messages have now been rewritten, and shortened accordingly. This fix applies in MySQL 5.7 and later. (Bug #17319380)
  • Replication: Seconds_Behind_Master in the output of SHOW SLAVE STATUS could under some conditions be reported as 0 when it should have had a value greater than zero. (Bug #17233214)
  • Replication: The server did not handle correctly the insertion of a row larger than 4 GB when using row-based replication. (Bug #17081415)
  • Replication: When using row-based replication, an additional auto-increment column on the slave version of a table was not updated correctly; a zero was inserted instead. (Bug #17066269, Bug #69680)
  • Replication: Statements involving the Performance Schema tables should not be written to the binary log, because the content of these tables is applicable only to a given MySQL Server instance, and may differ greatly between different servers in a replication topology. The database administrator should be able to configure (INSERT, UPDATE, or DELETE) or flush (TRUNCATE TABLE) performance schema tables on a single server without affecting others. However, when replicating from a MySQL 5.5 master to a MySQL 5.5 or later slave, warnings about unsafe statements updating Performance Schema tables were elevated to errors. For MySQL 5.6 and later slaves, this prevented the simultaneous use of performance_schema and GTIDs (see Replication with Global Transaction Identifiers).
  • This fix causes all updates on tables in the performance_schema database to be filtered on the master and not replicated, regardless of the type of logging that is in effect. Prior to this fix, statements using were handled by being marked as unsafe for replication, which caused warnings during execution; the statements were nonetheless written to the binary log, regardless of the logging format in effect.
  • Existing replication behavior for tables in the INFORMATION_SCHEMA database is not changed by this fix.
  • For more information, see MySQL Performance Schema. (Bug #16814264)
  • Replication: Invalid event offsets in the binary log were not always handled correctly, which could lead to replication failure. (Bug #16736412, Bug #69087)
  • Replication: Semisynchronous replication became very slow if there were many dump threads (such as from mysqlbinlog or slave I/O connections) working at the same time. It was also found that semisynchronous master plugin functions were called even when the dump connections did not support semisynchronous replication, which led to locking of the plugin lock as well as wasting time on necessary code.
  • After this fix, non-semisynchronous dump threads no longer call semisynchronous master functions to observe binary events. (Bug #70218, Bug #17434690)
  • Replication: The semisynchronous replication plugin was called twice for a DDL statement, incrementing Rpl_semi_sync_master_yes_tx by 2 instead of 1 each time such a statement was executed. (Bug #70410, Bug #17509011)
  • During compilation, attempts to create sql_yacc.h could be made from multiple directories simultaneously. (Bug #18319335)
  • MySQL distributions for Solaris now include a source tarball for gcc under the share directory, to comply with GPL conditions resulting from inclusion of the C++ runtime library. (Bug #18306484)
  • mysql_secure_installation attempted to free memory incorrectly and exited abnormally after a failed attempt to read an option file. (Bug #18255657)
  • Compilation failed if MySQL was configured with CFLAGS set to include a -Werror option with an argument. (Bug #18173037)
  • A shared libmysqld embedded server library was not built on Linux. (Bug #18123048, Bug #16430656, Bug #68559)
  • The default compiler flags are picked up from cmake/build_configurations/compiler_options.cmake. This can be switched off by the CMake -DWITH_DEFAULT_COMPILER_OPTIONS=0 option. However, it could also be switched off for the C or C++ compilers if the CFLAGS or CXXFLAGS environment variables were set.
  • Those environment variables now have no such effect. To specify compiler flags, use -DWITH_DEFAULT_COMPILER_OPTIONS=0 option, or the -DCMAKE_C_FLAGS=flags and -DCMAKE_C_FLAGS=flags options can be used. (Bug #18158812)
  • While printing the server version, the mysql client did not check for buffer overflow in a string variable. (Bug #18186103)
  • mysql_secure_installation exited if mysql_install_db had been run with the --skip-random-passwords option. (Bug #18181665)
  • When the optimizer attempted to use MRR or DS-MRR to read an internally created temporary table, the server could exit or raise an assertion. (Bug #18172819)
  • A bug in the range optimizer code that handles index merge could lead to a server exit or missing rows in the result set. (Bug #18136628)
  • Building MySQL from source on Windows using Visual Studio 2008 would fail with an identifier not found error due to a regression introduced by the patch for Bug#16249481. (Bug #18057449)
  • Repeated rebuilds in the same source tree resulted in libmysqld.a increasing in size each time. (Bug #18082702)
  • mysql_config improperly produced nonempty output when invoked with the --libmysqld-libs (or a synonym) if MySQL was configured with the WITHOUT_SERVER option. (Bug #18102839)
  • Type casting during LIKE pattern match operations could cause a server exit. (Bug #18114294)
  • SHOW GRANTS could be used to view the password hash for a proxied user. Password hash display now requires the SUPER privilege. (Bug #18057514)
  • On Microsoft Windows, the rw-lock backup implementation for the my_atomic_* functions was always used. Now, the native Microsoft Windows implementation is used, where available. (Bug #18054042)
  • Link failures were fixed on Solaris SPARC and Linux 64-bit platforms. (Bug #18004599)
  • When tables are reopened from the table cache and the current thread is not instrumented for the Performance Schema, the server exited attempting to populate OWNER_THREAD_ID in the table_handles table. (Bug #18047865)
  • A memory leak occurred within the Performance Schema during server startup. (Bug #18003651)
  • storage/ndb/CMakeLists.txt reset the CMake cache for some compiler flags for which the result should have been saved. (Bug #17949504)
  • Compilation used different warning flags for Clang and GCC, producing different warning output depending on which compiler you use. Warning output is now consistent for the two compilers. (Bug #17959689)
  • Building libevent was incorrectly dependent on MySQL being configured with the -DWITH_INNODB_MEMCACHED=1 option. (Bug #17964544)
  • On Solaris, configuration failed if no STL_LIBRARY_NAME was found. (Bug #17954277)
  • The audit log plugin could cause a server exit during log file rotation operations when there were many operations happening for multiple connections. (Bug #17930339)
  • The SUM_SORT_MERGE_PASSES column value in the Performance Schema events_statements_summary_by_digest table was calculated incorrectly. (Bug #17938255)
  • During shutdown, a mutex that was still locked could be removed, causing a server exit. (Bug #17959898)
  • If the Performance Schema events_statements_summary_by_digest table was full when a statement with a new digest was found, the Performance_schema_digest_lost status variable was not incremented. (Bug #17935314)
  • FORCE INDEX [FOR ORDER BY] (index_name) did not work for joins.
  • The fix for this bug also also changes the warning created for EXPLAIN. Instead of printing only {IGNORE|USE|FORCE} INDEX it now also prints FOR {GROUP BY|ORDER BY|JOIN} if that was specified in the query. (Bug #17889511)
  • Shutdown of open connection threads could fail to occur cleanly during server shutdown. (Bug #17863690)
  • DECIMAL NOT NULL items could return NULL in subqueries. (Bug #17921777)
  • mysql_secure_installation exited if it connected using SSL and the user had an expired password. (Bug #17880395)
  • With the compressed client/server protocol enabled, Performance Schema statement instrumentation could raise an assertion. (Bug #17794846)
  • For debug builds, inserts into a multiple-table view could raise an assertion. (Bug #17834434)
  • The optimizer could push down a condition when the index did not have the key part present in the condition. (Bug #17814492)
  • For debug builds, the filesort algorithm could raise a spurious assertion. (Bug #17734642)
  • The mysql_get_option symbol was missing from libmysql.dll. (Bug #17733103)
  • Build and execution problems were fixed for builds made with gcc 4.8.1 in 32-bit mode on SPARC. (Bug #17740390)
  • The server could exit when executing an INSERT ... SELECT with UNION, ROLLUP, and ON DUPLICATE KEY UPDATE with a subquery. (Bug #17727506)
  • The patch for Bug #16041903 introduced an incorrect DBUG_ASSERT that in debug builds raised a spurious assertion. (Bug #17746721)
  • Valgrind errors were produced during row comparator setup. (Bug #17755540)
  • In some cases, UNIX_TIMESTAMP() could return NULL when it should return 0. (Bug #17728371)
  • An assertion could be raised if a filesort failed to resize its main buffer when record properties changed. (Bug #17757914)
  • The resetconnection command for mysql did not report proper errors if the server was down or the user password had expired. (Bug #17772561)
  • Compilation failed if MySQL was configured using -DWITH_LIBWRAP=1. (Bug #17738805)
  • Contraction information in a collation could be mishandled, resulting in incorrect decisions about whether a character is part of a contraction, and miscalculation of contraction weights. (Bug #17760379)
  • The cache used for the Index Merge access method was freed only after successful retrieval of all rows. Interruption or failure of the operation led to a file descriptor leak. (Bug #17708621)
  • The optimizer calculated the cost for joined buffer scans incorrectly, evaluating rows filtered out by attached conditions not once, but once per join buffer. (Bug #17694707)
  • Incorrect reference counting in the range optimizer module resulted in potential for missing or duplicate rows in the query result set. (Bug #17619119)
  • Using the mysqldump --set-gtid-purged option with no value caused mysqldump to crash. (Bug #17650245)
  • A race condition between Performance Schema statement event threads led to a server exit. (Bug #17637970)
  • For debug builds, an aggregate function in a subquery join condition could raise an assertion. (Bug #17602807)
  • If SAFE_MUTEX was enabled (true only for debug builds), THR_LOCK_mutex was used before being initialized. (Bug #17641055, Bug #70639)
  • After the fix for Bug #16409270, it was not possible to #include following #include . (Bug #17514554)
  • An addressing error in accessing the join buffer could produce invalid results or a server exit. (Bug #17513341)
  • The parser permitted some queries with multiple ORDER BY clauses, which then failed during execution and caused a server exit. (Bug #17473479)
  • For debug builds, the server could exit for statements that inserted into a BLOB column declared as NOT NULL using a subquery that retrieved from a BLOB column and included GROUP BY NULL. (Bug #17458917)
  • Insufficient cleanup after removal of a SELECT_LEX structure caused dereferencing of a NULL pointer and a server exit. (Bug #17458169)
  • Within a CASE expression, use of a subquery referencing the VALUES() function could cause a server exit. (Bug #17458914)
  • mysql_config incorrectly included some flags to generate compiler warning output. (Bug #17400967)
  • The parser silently accepted duplicate ORDER BY clauses and/or LIMIT clauses before ORDER BY clauses in subqueries. These caused failures during query execution. Fixing this problem results in some changes in parser behavior. The parser no longer accepts:
  • A LIMIT clause before an ORDER BY clause
  • A LIMIT clause in a parentheses-less SELECT statement before a UNION keyword
  • An INTO clause after a PROCEDURE ANALYSE() clause
  • (Bug #17426017, Bug #17703542, Bug #17727401)
  • SET PASSWORD combined with assignment of a variable from a subquery result could raise an assertion. (Bug #17458750)
  • On Windows, mysql_secure_installation exited if the root password was expired. (Bug #17415203)
  • For CASE expressions involving floating-point numbers, the max_length and decimal values could be computed incorrectly. The logic for CASE was corrected to be the same as for COALESCE(), which performs a similar operation. (Bug #17388045)
  • If accepting a connection attempt failed due to an out-of-memory error, the server could access a stale thread structure for a previously disconnected connection, resulting in Valgrind errors. (Bug #17398792)
  • With semi-join optimization enabled, queries with nested subqueries could cause a server exit due to incorrect resolution of references to columns in the middle query block. (Bug #17398972)
  • The SHA256 password authentication algorithm allocated a buffer one byte too short. (Bug #17397073)
  • A client crash occurred if mysql_set_server_option() or several other C API functions were called before mysql_real_connect(). (Bug #17338958)
  • In some cases, the optimizer wrote fixed-length temporary MyISAM tables to disk rather than variable-length temporary tables. (Bug #17231940)
  • Enabling the validate_password plugin could result in incorrect password hashes being stored in the mysql.user table. (Bug #17065383)
  • For debug builds, the second execution of a prepared statement processed using a semi-join could cause a server exit. (Bug #16988465)
  • A spurious assertion was raised for queries processed using a semi-join LooseScan optimization that required rows to be returned in order. (Bug #16977389)
  • A circular dependency problem involving sql/sql_builtin.cc was resolved. (Bug #16877045)
  • For accounts authenticated using the sha256_password plugin, setting the password after the password had been expired did not clear the password-expired flag. (Bug #16872181)
  • During server shutdown, file information was freed before calling query_logger.cleanup(), leading to a memory leak. (Bug #16859266)
  • For prepared INSERT INTO ... SELECT statements, nonexistent column names were not reported during statement preparation, but only later at statement execution. (Bug #16820562)
  • Multiple-table updates failed to update under certain conditions. (Bug #16767011)
  • Crash recovery of temporary tables used uninitialized memory. (Bug #16754540)
  • On Mac OS X 10.7, a race condition involving vio_shutdown() and the select-based implementation of vio_io_wait() could cause a server exit. (Bug #16354789, Bug #17733393)
  • Host names in example URLs used within the source code were replaced by names in the example.com domain, the domain intended by IANA for this purpose. (Bug #15890092)
  • On Mac OS X, preloading of client plugins specified with the LIBMYSQL_PLUGINS environment variable could fail unless the plugins were located in the hardwired default plugin directory. The C API now checks during plugin preloading for a LIBMYSQL_PLUGIN_DIR environment variable which can be set to the path name of the directory in which to look for client plugins. (Bug #13994567, Bug #18110355)
  • For utf8 and utf8mb4 strings, handler functions unnecessarily called a Unicode conversion function. (Bug #14057034)
  • Certain (... NULL ...) IN (...) expressions returned NULL when they should return 0, such as SELECT (NULL, 1) IN ((0, 0), (0, 0)). (Bug #13944462)
  • Several -W warning flags were turned off for compilation in maintainer mode if MySQL was configured with -DWITH_INNODB_MEMCACHED=1. (Bug #13898319)
  • The optimizer set up for dynamic range access in some cases where range access cannot be used, resulting in fallback to a table scan. (Bug #13814468)
  • Executing mysqladmin shutdown for a server running with the thread pool plugin enabled and servicing a large number of concurrent connections caused the server to exit abnormally. (Bug #13788920)
  • Calling the ExtractValue() function with an invalid XPath expression could in some cases lead to a failure of the server. (Bug #12428404, Bug #61065)
  • Use of a nonmulti-byte algorithm for skipping leading spaces in multi-byte strings could cause a server exit. (Bug #12368495)
  • With ONLY_FULL_GROUP_BY SQL mode enabled, a query that uses GROUP BY on a column derived from a subquery in the FROM clause failed with a column isn't in GROUP BY error, if the query was in a view. (Bug #11923239)
  • For the utf8_bin collation, ORDER BY LOWER(col_name) could produce incorrect ordering. (Bug #69005, Bug #16691598)
  • Several issues identified by the Coverity static analysis tool were fixed. Thanks to Honza Horak for the patch. (Bug #70830, Bug #17760511)
  • On Windows, the --local-service server option did not work, and was not displayed in the --help message. (Bug #69637, Bug #17049656)
  • The server wrote an excessive number of “Sort aborted” messages to the error log. (Bug #70173, Bug #17372396)
  • It was not possible to query a view with an ORDER BY clause that referenced an alias in the SELECT clause of the view definition, unless all columns in the view were named in the select list.
  • To handle this problem, the server now writes a view differently into the .frm file that stores the view definition. If you experience view-evaluation errors such as just described, drop and recreate the view so that the .frm file contains the updated view representation. (Bug #69678, Bug #17077305)
  • Overhead was reduced within critical sections of the my_fopen() and my_register_filename() mysys functions. Thanks to Po-Chun Chang for the patch. (Bug #70848)
  • The prototype of the Performance Schema instrumentation API mysql_cond_timedwait() call was fixed to be drop-in compatible with pthread_cond_timedwait(). This fix affects only implementers of third-party plugins. (Bug #70628, Bug #17702677)
  • For debug builds, JSON-format EXPLAIN statements for queries that involve semi-join materialization could cause a server exit. (Bug #70014, Bug #17305943)
  • For an existing user, GRANT with an empty password (IDENTIFIED BY [PASSWORD] '') did not change the password. (Bug #69899, Bug #17256161)
  • The make_atomic_cas_body64 implementation on IA32 with gcc but without gcc builtins could be miscompiled due to an incorrect constraint. The patch also causes MySQL to use builtin atomics when compiled using Clang. (Bug #63451, Bug #17242996)
  • The wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_sync mutex was not properly instrumented for the Performance Schema. (Bug #70939, Bug #17813333)
  • Complex updates of Performance Schema tables involving joins or subqueries failed to update every row. (Bug #70025, Bug #17309657)
  • For the path specified with the --basedir option, mysql_plugin attempted to unlink the path rather than free the memory in which the path was stored. (Bug #69752, Bug #17168602)
  • Compilation problems were fixed for errors reported by Clang and gcc when compiling in C++11 mode. (Bug #66803, Bug #14631159)
  • The optimizer could choose ref access over eq_ref access when cost of a nonunique access was evaluated before cost of a unique index. (Bug #54808, Bug #11762236)
  • COUNT(DISTINCT) sometimes produced an incorrect result when the last read row contained a NULL value. (Bug #68749, Bug #16539979, Bug #71028, Bug #17867117)
  • When run by root, mysqld --help --verbose exited with a nonzero error code after displaying the help message. (Bug #70058, Bug #17324415)
  • MySQL client programs from a Community Edition distribution could not connect using SSL to a MySQL server from an Enterprise Edition. This was due to a difference in certificate handling by yaSSL and OpenSSL (used for Community and Enterprise, respectively). OpenSSL expected a blank certificate to be sent when not all of the --ssl-ca, --ssl-cert, and --ssl-key options were specified, and yaSSL did not do so. To resolve this, yaSSL has been modified to send a blank certificate when an option is missing. (Bug #68788, Bug #16715064)
  • sql_resolver.cc referred to partitioning code that should have been protected by an #ifdef, even when MySQL was configured with -DWITH_PARTITION_STORAGE_ENGINE=OFF. (Bug #71010, Bug #17876794)
  • An incorrect result could be returned for a query with an IF() predicate in the WHERE clause combined with OUTER JOIN in a subquery that is transformed to a semi-join. (A workaround is to disable semi-join using SET optimizer_switch='semijoin=off';) (Bug #70608, Bug #17600176)
  • Downloading of the Google Mock library could fail during configuration. This is fixed by requiring CMake 2.8.2 or higher. (Bug #69854, Bug #17231722)
  • A full-text search combined with derived tables (subqueries in the FROM clause) caused a server exit.
  • Now if a full-text operation depends on a derived table, the server produces an error indicating that a full-text search cannot be done on a materialized table. (Bug #68751, Bug #16539903)
  • Some scripts displayed out-of-date information regarding where to report bugs. (Bug #68742, Bug #16530527)
  • CMake produced not-useful warnings about INTERFACE_LINK_LIBRARIES policy. (Bug #71089, Bug #17905155, Bug #17894997)
  • CMake produced a warning in ssl.cmake due to malformed syntax. (Bug #71094, Bug #17905144)
  • Previously, the first stage executed within a statement was stage/sql/init. This collided with a different stage named init and was incompatible with the starting stage for SHOW PROFILE. The first stage executed within a statement is now named stage/sql/starting. (Bug #71201, Bug #17993294)
  • Some files in the Performance Schema file_instances table were not being removed because the file-removal operation was not instrumented. (Bug #69782, Bug #17209750)
  • mysqldump --single-transaction acquired metadata locks for each dumped table but did not release them until the dump operation finished. Consequently, other DDL operations on a dumped table blocked even after the table itself had been dumped. mysqldump now attempts to release metadata locks earlier. (Bug #71017, Bug #17862905)
  • Updating a FEDERATED table with UPDATE... JOIN caused a server exit when the local table contained a single row and that row could be joined to a row in the FEDERATED table. (Bug #68354, Bug #16324629)
  • The mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlslap, and mysqlshow programs now support a --secure-auth option that prevents sending passwords to the server in old (pre-4.1) format. This option is enabled by default; use --skip-secure-auth to disable it. (Bug #69051, Bug #16723046)
  • During configuration, CMake improperly checked for the C++ header file cxxabi.h. (Bug #71268, Bug #18147458)
  • On Mac OS X, the libmysqlclient dylib file linked to itself. (Bug #61699, Bug #13890998, Bug #61243, Bug #12590037)
  • gcov printed warnings without file names. (Bug #33269, Bug #11747622)
  • cmake/configure.pl listed instances of WITH_COMMENT rather than the correct option COMPILATION_COMMENT. (Bug #65834, Bug #14298560)
  • FLUSH STATUS cleared a variable that could result a subsequent implicit commit of an XA transaction causing a server exit. (Bug #70854, Bug #17911445)
  • A deadlock error occurring during subquery execution could cause an assertion to be raised. (Bug #69969, Bug #17307201)
  • The Performance Schema stage/sql/Waiting to get readlock instrument is no longer used and has been removed. (Bug #71298, Bug #18035404)
  • A query that creates a temporary table to find distinct values and has a constant value in the projected list could produce incorrect results. (Bug #70657, Bug #17634335)
  • mysqlbinlog leaked memory in relation to --rewrite-db processing. (Bug #71283, Bug #18027692)
  • Messages written by the server to the error log for LDML collation definition problems were missing the collation name. (Bug #68144, Bug #16204175)
  • Configuring with -DWITH_DEBUG=1 did not have the same effect as configuring with -DCMAKE_BUILD_TYPE=Debug. (Bug #70647, Bug #17632854)
  • mysqlcheck did not correctly handle table names containing dots. (Bug #68015, Bug #16064833)
  • Previously, for EXPLAIN output, the rows-examined estimate for Performance Schema tables always displayed as 1000. Now a more accurate estimate is displayed based on sizing parameters used when allocating memory for each table. This results in no change of behavior because Performance Schema tables have no indexes. (Bug #71278, Bug #18024455)
  • Optimizer trace

New in MySQL 5.6.17 (Mar 28, 2014)

  • Functionality Added or Changed:
  • Incompatible Change - The AES_ENCRYPT() and AES_DECRYPT() functions now permit control of the block encryption mode and take an optional initialization vector argument.
  • The new block_encryption_mode system variable controls the mode for block-based encryption algorithms. Its default value is aes-128-ecb, which signifies encryption using a key length of 128 bits and ECB mode.
  • An optional init_vector argument provides an initialization vector for encryption modes that require it.
  • AES_ENCRYPT(str,key_str[,init_vector])
  • AES_DECRYPT(crypt_str,key_str[,init_vector])
  • A random string of bytes to use for the initialization vector can be produced by calling the new RANDOM_BYTES() function.
  • For more information, see Encryption and Compression Functions.
  • These changes make statements that use AES_ENCRYPT() or AES_DECRYPT() unsafe for statement-based replication and they cannot be stored in the query cache. Queries that use RANDOM_BYTES() are unsafe for statement-based replication and cannot be stored in the query cache.
  • Incompatible Change - The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes now do nothing. Instead, their previous effects are included in the effects of strict SQL mode (STRICT_ALL_TABLES or STRICT_TRANS_TABLES). In other words, strict mode now means the same thing as the previous meaning of strict mode plus the ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE modes. This change reduces the number of SQL modes with an effect dependent on strict mode and makes them part of strict mode itself.
  • To prepare for the SQL mode changes in this version of MySQL, it is advisable before upgrading to read SQL Mode Changes in MySQL 5.7. That discussion provides guidelines to assess whether your applications will be affected by these changes.
  • The deprecated ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, and NO_ZERO_IN_DATE SQL modes are still recognized so that statements that name them do not produce an error, but will be removed in a future version of MySQL. To make advance preparation for versions of MySQL in which these modes do not exist, applications should be modified to not refer to those mode names.
  • InnoDB - MySQL now supports rebuilding regular and partitioned InnoDB tables using online DDL (ALGORITHM=INPLACE) for the following operations:
  • OPTIMIZE TABLE
  • ALTER TABLE ... FORCE
  • ALTER TABLE ... ENGINE=INNODB (when run on an InnoDB table)
  • Online DDL support reduces table rebuild time and permits concurrent DML, which helps reduce user application downtime. For additional information, see Overview of Online DDL. (Bug #13975225)
  • On Solaris, mysql_config --libs now includes -R/path/to/library so that libraries can be found at runtime. (Bug #18235669)
  • mysql_install_db provides a more informative diagnostic message when required Perl modules are missing. (Bug #69844, Bug #18187451)
  • The IGNORE clause for ALTER TABLE is now deprecated and will be removed in a future version of MySQL. ALTER IGNORE TABLE causes problems for replication, prevents online ALTER TABLE for unique index creation, and causes problems with foreign keys (rows removed in the parent table).
  • Bugs Fixed:
  • Incompatible Change: Old clients (older than MySQL 5.5.7) failed to parse authentication data correctly if the server was started with the --default-authentication-plugin=sha256_password option.
  • Note - As a result of this bug fix, MySQL 5.6.16 clients cannot connect to a 5.6.17 server using an account that authenticates with the sha256_password plugin. Similarly, MySQL 5.7.3 clients cannot connect to a 5.7.4 server using an account that authenticates with the sha256_password plugin. (Bug #17495562)
  • Important Change; InnoDB; Partitioning: The FLUSH TABLES statement's FOR EXPORT option is now supported for partitioned InnoDB tables. (Bug #16943907)
  • InnoDB: Running a SELECT on a partitioned table caused a memory access violation in memcpy(). (Bug #18383840)
  • InnoDB: An invalid memmove in fts_query_fetch_document would cause a serious error. (Bug #18229433)
  • InnoDB: For full-text queries, a failure to check that num_token is less than max_proximity_item could result in an assertion. (Bug #18233051)
  • InnoDB: innodb_ft_result_cache_limit now has a hardcoded maximum value of 4294967295 bytes or (2**32 -1). The maximum value was previously defined as the maximum value of ulong. (Bug #18180057, Bug #71554)
  • InnoDB: InnoDB would fail to restore a corrupt first page of a system tablespace data file from the doublewrite buffer, resulting in a startup failure. (Bug #18144349, Bug #18058884)
  • InnoDB: An UPDATE resulted in a memory access error in lock_rec_other_trx_holds_expl. The transaction list (trx_sys->rw_trx_list) was traversed without acquiring the transaction subsystem mutex (trx_sys->mutex). (Bug #18161853)
  • InnoDB: A regression introduced by Bug #14329288 would result in a performance degradation when a compressed table does not fit into memory. (Bug #18124788, Bug #71436)
  • InnoDB: The maximum value for innodb_thread_sleep_delay is now 1000000 microseconds. The previous maximum value (4294967295 microseconds on 32-bit and 18446744073709551615 microseconds on 64-bit) was unnecessarily large. Because the maximum value of innodb_thread_sleep_delay is limited by the value set for innodb_adaptive_max_sleep_delay (when set to a non-zero value), the maximum value for innodb_thread_sleep_delay is now the same as the maximum value for innodb_adaptive_max_sleep_delay. (Bug #18117322)
  • InnoDB: A full-text tokenizer thread would terminate with an incorrect error message. (Bug #18021306)
  • InnoDB: Attempting to uninstall the InnoDB memcached plugin while the InnoDB memcached plugin is still initializing would kill the InnoDB memcached daemon thread. Uninstall should wait until initialization is complete. (Bug #18038948)
  • InnoDB: In debug builds, creating a unique index on a binary column, with input data containing duplicate keys, would cause an assertion. (Bug #18010711)
  • InnoDB: The srv_monitor_thread would crash in the lock_print_info_summary() function due to a race condition between the srv_monitor_thread and purge coordinator thread. (Bug #17980590, Bug #70430)
  • InnoDB: Attempting to add an invalid foreign key when foreign key checking is disabled (foreign_key_checks=0) would cause a serious error. (Bug #17666774)
  • InnoDB: For debug builds, the table rebuilding variant of online ALTER TABLE, when run on tables with BLOB columns, would cause an assertion in the row_log_table_apply_update function. For normal builds, a DB_PRODUCTION error would be returned. (Bug #17661919)
  • InnoDB: When creating a table there are a minimum of three separate inserts on the mysql.innodb_index_stats table. To improve CREATE TABLE performance, there is now a single COMMIT operation instead of one for each insert. (Bug #17323202, Bug #70063)
  • InnoDB: The server would halt with an assertion in lock_rec_has_to_wait_in_queue(lock) due to a locking-related issue and a transaction being prematurely removed from trx_sys->rw_trx_set. (Bug #17320977)
  • InnoDB: Server shutdown would result in a hang with the following message written to the error log: “[NOTE] InnoDB: Waiting for purge thread to be suspended.” (Bug #16495065)
  • InnoDB: InnoDB would fail to start when innodb_data_file_path specified the data file size in kilobytes by appending K to the size value. (Bug #16287752)
  • InnoDB: An insert buffer merge would cause an assertion error due to incorrectly handled ownership information for externally stored BLOBs.
  • InnoDB: Assertion failure in thread thread_num in file ibuf0ibuf.cc line 4080
  • InnoDB: Failing assertion: rec_get_deleted_flag(rec, page_is_comp(page))
  • Bug #14668683)
  • InnoDB: Decreasing the auto_increment_increment value would have no affect on the next auto-increment value. (Bug #14049391, Bug #65225)
  • Partitioning: When the index_merge_intersection flag (enabled by default) or the index_merge_union flag was enabled by the setting of the optimizer_switch system variable, queries returned incorrect results when executed against partitoned tables that used the MyISAM storage engine, as well as partitioned InnoDB tables that lacked a primary key. (Bug #18167648)
  • References: See also Bug #16862316, Bug #17588348, Bug #17648468.
  • Replication: The MASTER_SSL_CRL and MASTER_SSL_CRLPATH options are not available when using yaSSL; MySQL Replication now sets these to NULL automatically whenever yaSSL is enabled. (Bug #18165937)
  • Replication: Setting --slave-parallel-workers to 1 or greater and starting the slave caused the slave SQL thread to use but not release memory until the slave was restarted with STOP SLAVE and START SLAVE. (Bug #18001777, Bug #71197)
  • Replication: When a slave was configured with replication filters and --log-warnings=2, every statement which was filtered caused an entry to be written in the error log. For busy servers which generated many statements to be filtered, the result was that the error log could quickly grow to many gigabytes in size. Now a throttle is used for such errors, so that an error message is printed only once in a given interval, saying that this particular error occurred a specific number of times during that interval. (Bug #17986385)
  • Replication: SHOW SLAVE STATUS used incorrect values when reporting MASTER_SSL_CRL and MASTER_SSL_CRLPATH. (Bug #17772911, Bug #70866)
  • References: This bug was introduced by Bug #11747191.
  • Replication - Binary log events could be sent to slaves before they were flushed to disk on the master, even when sync_binlog was set to 1. This could lead to either of those of the following two issues when the master was restarted following a crash of the operating system.
  • Replication cannot continue because one or more slaves are requesting replicate events that do not exist on the master.
  • Data exists on one or more slaves, but not on the master.
  • Such problems are expected on less durable settings (sync_binlog not equal to 1), but it should not happen when sync_binlog is 1. To fix this issue, a lock (LOCK_log) is now held during synchronization, and is released only after the binary events are actually written to disk. (Bug #17632285, Bug #70669)
  • Replication: When running the slave with --slave-parallel-workers at 1 or greater, setting --slave-skip-errors=all caused the error log to be filled with with instances of the warning Slave SQL: Could not execute Query event. Detailed error: ;, Error_code: 0. (Bug #17581990, Bug #68429)
  • References: See also Bug #17986385.
  • Replication: A number of possible state messages used as values for the PROCESSLIST_STATE column of the Performance Schema threads table were longer than the width of the column (64 characters).
  • The long state messages are now silently truncated in order to avoid errors. This fix applies in MySQL 5.6 only; a permanent fix for the issue is made in MySQL 5.7 and later. (Bug #17319380)
  • Replication: The server did not handle correctly the insertion of a row larger than 4 GB when using row-based replication. (Bug #17081415)
  • Replication: When using row-based replication, an additional auto-increment column on the slave version of a table was not updated correctly; a zero was inserted instead. (Bug #17066269, Bug #69680)
  • Replication: Statements involving the Performance Schema tables should not be written to the binary log, because the content of these tables is applicable only to a given MySQL Server instance, and may differ greatly between different servers in a replication topology. The database administrator should be able to configure (INSERT, UPDATE, or DELETE) or flush (TRUNCATE TABLE) performance schema tables on a single server without affecting others. However, when replicating from a MySQL 5.5 master to a MySQL 5.5 or later slave, warnings about unsafe statements updating Performance Schema tables were elevated to errors. For MySQL 5.6 and later slaves, this prevented the simultaneous use of performance_schema and GTIDs (see Replication with Global Transaction Identifiers).
  • This fix causes all updates on tables in the performance_schema database to be filtered on the master and not replicated, regardless of the type of logging that is in effect. Prior to this fix, statements using were handled by being marked as unsafe for replication, which caused warnings during execution; the statements were nonetheless written to the binary log, regardless of the logging format in effect.
  • Existing replication behavior for tables in the INFORMATION_SCHEMA database is not changed by this fix.
  • For more information, see MySQL Performance Schema. (Bug #16814264)
  • References: See also Bug #14741537, Bug #18259193.
  • Replication: Modifying large amounts of data within a transaction can cause the creation of temporary files. Such files are created when the size of the data modified exceeds the size of the binary log cache (max_binlog_cache_size). Previously, such files persisted until the client connection was closed, which could allow them to grow until they exhausted all available disk space in tmpdir. To prevent this from occurring, the size of a temporary file created in this way in a given transaction is now reset to 0 when the transaction is committed or rolled back. (Bug #15909788, Bug #18021493, Bug #66237)
  • Replication: The server checks to determine whether semisynchronous replication has been enabled without a lock, and if this is the case, it takes the lock and checks again. If semisynchronous replication was disabled after the first but prior to the second one, this could cause the server to fail. (Bug #14511533, Bug #66411)
  • References: See also Bug #17920923.
  • Replication: Semisynchronous replication became very slow if there were many dump threads (such as from mysqlbinlog or slave I/O connections) working at the same time. It was also found that semisynchronous master plugin functions were called even when the dump connections did not support semisynchronous replication, which led to locking of the plugin lock as well as wasting time on necessary code.
  • After this fix, non-semisynchronous dump threads no longer call semisynchronous master functions to observe binary events. (Bug #70218, Bug #17434690)
  • mysql_install_db could hang while reading /dev/random to generate a random root password. (Bug #18395378)
  • Compilation failed if MySQL was configured with CFLAGS set to include a -Werror option with an argument. (Bug #18173037)
  • A shared libmysqld embedded server library was not built on Linux. (Bug #18123048, Bug #16430656, Bug #68559)
  • While printing the server version, the mysql client did not check for buffer overflow in a string variable. (Bug #18186103)
  • Building MySQL from source on Windows using Visual Studio 2008 would fail with an identifier not found error due to a regression introduced by the patch for Bug#16249481. (Bug #18057449)
  • On Microsoft Windows, the rw-lock backup implementation for the my_atomic_* functions was always used. Now, the native Microsoft Windows implementation is used, where available. (Bug #18054042)
  • When tables are reopened from the table cache and the current thread is not instrumented for the Performance Schema, a table handle was unnecessarily instrumented. (Bug #18047865)
  • The audit log plugin could cause a server exit during log file rotation operations when there were many operations happening for multiple connections. (Bug #17930339)
  • The SUM_SORT_MERGE_PASSES column value in the Performance Schema events_statements_summary_by_digest table was calculated incorrectly. (Bug #17938255)
  • If the Performance Schema events_statements_summary_by_digest table was full when a statement with a new digest was found, the Performance_schema_digest_lost status variable was not incremented. (Bug #17935314)
  • The optimizer could push down a condition when the index did not have the key part present in the condition. (Bug #17814492)
  • Contraction information in a collation could be mishandled, resulting in incorrect decisions about whether a character is part of a contraction, and miscalculation of contraction weights. (Bug #17760379)
  • DROP TRIGGER succeeded even with the read_only system variable enabled. (Bug #17503460)
  • If used to process a prepared CALL statement for a stored procedure with OUT or INOUT parameters, mysql_stmt_store_result() did not properly set the flags required to retrieve all the result sets. (Bug #14492429, Bug #17849978)
  • When run by root, mysqld --help --verbose exited with a nonzero error code after displaying the help message. (Bug #70058, Bug #17324415)
  • MySQL client programs from a Community Edition distribution could not connect using SSL to a MySQL server from an Enterprise Edition. This was due to a difference in certificate handling by yaSSL and OpenSSL (used for Community and Enterprise, respectively). OpenSSL expected a blank certificate to be sent when not all of the --ssl-ca, --ssl-cert, and --ssl-key options were specified, and yaSSL did not do so. To resolve this, yaSSL has been modified to send a blank certificate when an option is missing. (Bug #68788, Bug #16715064)
  • The mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlslap, and mysqlshow programs now support a --secure-auth option that prevents sending passwords to the server in old (pre-4.1) format. This option is enabled by default; use --skip-secure-auth to disable it. (Bug #69051, Bug #16723046)
  • A deadlock error occurring during subquery execution could cause an assertion to be raised. (Bug #69969, Bug #17307201)
  • The Performance Schema stage/sql/Waiting to get readlock instrument is no longer used and has been removed. (Bug #71298, Bug #18035404)
  • A query that creates a temporary table to find distinct values and has a constant value in the projected list could produce incorrect results. (Bug #70657, Bug #17634335)
  • Messages written by the server to the error log for LDML collation definition problems were missing the collation name. (Bug #68144, Bug #16204175)
  • mysqlcheck did not correctly handle table names containing dots. (Bug #68015, Bug #16064833)
  • Aggregating the results of a subquery in the FROM clause could produce incorrect results. (Bug #71244, Bug #18014565)
  • For system variables that take a string value, SET statements permitted an unquoted value, but values that contained dots were parsed incorrectly and only part of the value was assigned. For example, SET GLOBAL slow_query_log_file = my_slow.log assigned the value my_slow. Now such values must be quoted or an error occurs. (Bug #69703, Bug #17075846)
  • A temporal literal string without delimiters and more than 14 digits was validated as a TIMESTAMP/DATETIME value with a two-digit precision fractional seconds part. But fractional seconds should always be separated from other parts of a time by a decimal point. (Bug #69714, Bug #17080703)
  • The msql2mysql, mysql_convert_table_format, mysql_find_rows, mysql_fix_extensions, mysql_setpermission, and mysqlaccess utilities are now deprecated and will be removed in MySQL 5.7. (Bug #27482, Bug #69012, Bug #69014, Bug #69015, Bug #69016, Bug #69017, Bug #11746603, Bug #16699248, Bug #16699279, Bug #16699284, Bug #16699317, Bug #18179576)

New in MySQL 5.6.16 (Jan 31, 2014)

  • Functionality Added or Changed:
  • Previously, ALTER TABLE in MySQL 5.6 could alter a table such that the result had temporal columns in both 5.5 and 5.6 format. Now ALTER TABLE upgrades old temporal columns to 5.6 format for ADD COLUMN, CHANGE COLUMN, MODIFY COLUMN, ADD INDEX, and FORCE operations. This conversion cannot be done using the INPLACE algorithm, so specifying ALGORITHM=INPLACE in these cases results in an error. (Bug #17246318)
  • CMake now supports a -DTMPDIR=dir_name option to specify the default tmpdir value. If unspecified, the value defaults to P_tmpdir in . Thanks to Honza Horak for the patch. (Bug #68338, Bug #16316074)
  • Bugs Fixed:
  • InnoDB; Replication: Using the InnoDB memcached plugin (see InnoDB Integration with memcached) with innodb_api_enable_binlog set to 1 caused the server to leak memory. (Bug #70757, Bug #17675622)
  • InnoDB: A boolean mode full-text search query would result in a memory access violation during parsing. (Bug #17978763)
  • InnoDB: When new indexes are added by an ALTER TABLE operation, instead of only saving table-level statistics and statistics for the new indexes, InnoDB would save statistics for the entire table, including the table's other indexes. This behavior slowed ALTER TABLE performance. (Bug #17848838, Bug #16511145)
  • InnoDB: Due to a parser error, full-text search queries that include a sub-expression could return the wrong result. (Bug #17840768)
  • InnoDB: The innochecksum tool did not use a Windows-specific API to retrieve file size information, which resulted in an incorrect error message (Error: ibdata1 cannot be found) when the MySQL 5.6 innochecksum 2GB file size limit was exceeded. innochecksum now provides support for files larger than 2GB in both MySQL 5.6 and MySQL 5.7. (Bug #17810862, Bug #70936)
  • InnoDB: Due to a regression introduced by the fix for Bug#17371537, memory was not allocated for the default memcached engine when using the default memcached engine as the backstore for data instead of InnoDB. (Bug #17800829)
  • InnoDB: InnoDB would report an incorrect operating system error code after failing to initialize. (Bug #17788055, Bug #70867)
  • InnoDB: Manipulating a table after discarding its tablespace using ALTER TABLE ... DISCARD TABLESPACE could result in a serious error. (Bug #17700280)
  • InnoDB: Persistent optimizer statistics would cause stalls due to latch contention. (Bug #17699331, Bug #70768)
  • InnoDB: MATCH() ... AGAINST queries that use a long string as an argument for AGAINST() could result in an error when run on an InnoDB table with a full-text search index. (Bug #17640261)
  • InnoDB: An InnoDB full-text search failure would occur due to an “unended” token. The string and string length should be passed for string comparison. (Bug #17659310)
  • InnoDB: In debug builds, a merge insert buffer during a page read would cause a memory access violation. (Bug #17561188)
  • InnoDB: Truncating a memcached InnoDB table while memcached is performing DML operations would result in a serious error. (Bug #17468031)
  • InnoDB: In sync0rw.ic, rw_lock_x_lock_func_nowait would needlessly call os_thread_get_curr_id. (Bug #17509710, Bug #70417)
  • InnoDB: Attempting to rename a table to a missing database would result in a serious error. (Bug #17447500)
  • InnoDB: If a tablespace data file path is updated in a .isl file and then a crash recovery is performed, the updated tablespace data file path is read from the .isl file but the SYS_DATAFILES table would not be not updated. The SYS_DATAFILES table is now updated with the new data file path after crash recovery. (Bug #17448389)
  • InnoDB: If the first page (page 0) of file-per-table tablespace data file was corrupt, recovery would be halted even though the doublewrite buffer contained a clean copy of the page. (Bug #17335427, Bug #70087)
  • InnoDB: The InnoDB memcached Readme file (README-innodb_memcached) incorrectly stated that libevent 1.6.0 is linked statically into daemon memcached. The bundled version of libevent is 1.4.12, not 1.6.0. (Bug #17324419, Bug #70034)
  • InnoDB: Attempting to reset a replication slave while innodb_force_recovery is greater than 0 would return a cryptic error message: ERROR(1030) HY000: Got error -1 from storage engine. The error message has been changed to: ERROR HY000: Operation not allowed when innodb_force_recovery > 0. Replication options such as --relay-log-info-repository=TABLE and --master-info-repository=TABLE store information in tables in InnoDB. When innodb_force_recovery is greater than 0, replication tables cannot be updated which may cause replication administration commands to fail. (Bug #17287443, Bug #69907)
  • InnoDB: The ALTER TABLE INPLACE algorithm would fail to decrease the auto-increment value. (Bug #17250787, Bug #69882)
  • InnoDB: Comments in btr0cur.cc incorrectly stated that btr_cur_pessimistic_update() and btr_cur_optimistic_update() would accept a NULL value. (Bug #17231743, Bug #69847)
  • InnoDB: dict_table_schema_check would call dtype_sql_name needlessly. (Bug #17193801, Bug #69802)
  • InnoDB: The function os_file_get_status would not work with raw devices. (Bug #17023438, Bug #69424)
  • InnoDB: During crash recovery, an incorrect transaction active time would result in rolling back an uncommitted transaction. (Bug #16936961, Bug #69438)
  • InnoDB: Heap block debugging information (file_name, lineno), used for logging diagnostics, would appear in release builds. This information should only appear in debug builds. (Bug #16924719, Bug #69422)
  • InnoDB: Renaming a column while also adding or dropping columns in the same ALTER TABLE operation would cause an error. (Bug #16864981)
  • InnoDB: An online ALTER TABLE operation would consume more memory than expected. During an online ALTER TABLE operation, an online log buffer containing a head and tail buffer is created for each index that is created or rebuilt. The tail buffer is the writer context and is only required for concurrent write operations on an index while the ALTER TABLE operation is in progress. The head buffer is the reader context and is only required during the log apply phase. To reduce memory consumption, the tail buffer is now allocated when the first DML statement is run on the index, and the head buffer is only allocated in the log apply phase and freed afterwards. (Bug #16868967, Bug #69325, Bug #17911720)
  • InnoDB: On Windows, the full-text search (FTS) object ID was not in the expected hexadecimal format. (Bug #16559254)
  • References: See also Bug #16559119.
  • InnoDB: Fetching and releasing pages from the buffer pool and tracking the page state are expensive and complex operations. Prior to the bug fix, these operations were performed using a page mutex. Using a page mutex to track several things is expensive and does not scale well. The bug fix separates fetch and release tracking (in-use state) of a page from page I/O state tracking. Fetch and release is now tracked using atomics where available.
  • For portability, a new CMake build option, INNODB_PAGE_ATOMIC_REF_COUNT (default ON), can be used to disable atomic page reference counting on platforms where atomics support is not available. When atomic page reference counting is enabled (default), “[Note] InnoDB: Using atomics to ref count buffer pool pages” is printed to the error log at server startup. If atomic page reference counting is disabled, “[Note] InnoDB: Using mutexes to ref count buffer pool pages” is printed instead. (Bug #16249481, Bug #68079)
  • InnoDB: Table renaming errors would appear in the LATEST FOREIGN KEY ERROR section of the SHOW ENGINE INNODB STATUS output. (Bug #12762390, Bug #61746)
  • InnoDB: UNIV_SYNC_DEBUG, which was disabled in univ.i with the fix for Bug#16720368, is now enabled. (Bug #69617, Bug #17033591)
  • Partitioning: Queries using the index_merge optimization (see Index Merge Optimization) could return invalid results when run against tables that were partitioned by HASH. (Bug #17588348, Bug #70588)
  • Partitioning: When no partition had returned a row since the last HA_ERR_KEY_NOT_FOUND error, the use of uninitialized memory in the priority queue used for returning rows in sorted order could lead to a crash of the server. (Bug #17401628)
  • Replication: When the binary log I/O cache grew to exactly 32768 bytes and the current transaction was preceded by a transaction whose size was greater than 32768 bytes, events could be corrupted when written into the binary log. (Bug #17842137)
  • Replication: Creating and dropping large numbers of temporary tables could lead to increased memory consumption. (Bug #17806014)
  • Replication: mysqlbinlog --verbose failed when it encountered a corrupt row event in the binary log. Such a row event could also cause the slave to fail. (Bug #17632978)
  • References: See also Bug #16960133.
  • Replication: When log_warnings is greater than 1, the master prints binary log dump thread information—containing the slave server ID, binary log file name, and binary log position—in mysqld.1.err. A slave server ID greater than 2 billion was printed with a negative value in such cases. (Bug #17641586, Bug #70685)
  • Replication: mysqlbinlog did not properly decode DECIMAL values in a row-based binary log. This could cause invalid values to be printed out for DECIMAL columns. (Bug #17544169)
  • References: See also Bug #14309019.
  • Replication: Seconds_Behind_Master in the output of SHOW SLAVE STATUS could under some conditions be reported as 0 when it should have had a value greater than zero. (Bug #17233214)
  • References: See also Bug #16579028.
  • Replication: The semisynchronous replication plugin was called twice for a DDL statement, incrementing Rpl_semi_sync_master_yes_tx by 2 instead of 1 each time such a statement was executed. (Bug #70410, Bug #17509011)
  • Compilation errors occurred on Solaris 10; resolved by including my_config.h before system header files. (Bug #18046811)
  • FORCE INDEX [FOR ORDER BY] (index_name) did not work for joins.
  • The fix for this bug also also changes the warning created for EXPLAIN. Instead of printing only {IGNORE|USE|FORCE} INDEX it now also prints FOR {GROUP BY|ORDER BY|JOIN} if that was specified in the query. (Bug #17889511)
  • With the compressed client/server protocol enabled, Performance Schema statement instrumentation could raise an assertion. (Bug #17794846)
  • In some cases, UNIX_TIMESTAMP() could return NULL when it should return 0. (Bug #17728371)
  • An assertion could be raised if a filesort failed to resize its main buffer when record properties changed. (Bug #17757914)
  • The cache used for the Index Merge access method was freed only after successful retrieval of all rows. Interruption or failure of the operation led to a file descriptor leak. (Bug #17708621)
  • Using the mysqldump --set-gtid-purged option with no value caused mysqldump to crash. (Bug #17650245)
  • A race condition between Performance Schema statement event threads led to a server exit. (Bug #17637970)
  • In a view definition requireing resolution of aggregrate expressions within a subquery to an outer query, selecting from the view could cause a server exit. (Bug #17547804)
  • References: This bug is a regression of Bug #16436383.
  • An addressing error in accessing the join buffer could produce invalid results or a server exit. (Bug #17513341)
  • mysql_config incorrectly included some flags to generate compiler warning output. (Bug #17400967)
  • With semi-join optimization enabled, queries with nested subqueries could cause a server exit due to incorrect resolution of references to columns in the middle query block. (Bug #17398972)
  • In some cases, the optimizer wrote fixed-length temporary MyISAM tables to disk rather than variable-length temporary tables. (Bug #17231940)
  • Enabling the validate_password plugin could result in incorrect password hashes being stored in the mysql.user table. (Bug #17065383)
  • For accounts authenticated using the sha256_password plugin, setting the password after the password had been expired did not clear the password-expired flag. (Bug #16872181)
  • On Mac OS X 10.7, a race condition involving vio_shutdown() and the select-based implementation of vio_io_wait() could cause a server exit. (Bug #16354789, Bug #17733393)
  • Host names in example URLs used within the source code were replaced by names in the example.com domain, the domain intended by IANA for this purpose. (Bug #15890092)
  • For utf8 and utf8mb4 strings, handler functions unnecessarily called a Unicode conversion function. (Bug #14057034)
  • Several -W warning flags were turned off for compilation in maintainer mode if MySQL was configured with -DWITH_INNODB_MEMCACHED=1. (Bug #13898319)
  • Calling the ExtractValue() function with an invalid XPath expression could in some cases lead to a failure of the server. (Bug #12428404, Bug #61065)
  • Use of a nonmulti-byte algorithm for skipping leading spaces in multi-byte strings could cause a server exit. (Bug #12368495)
  • With ONLY_FULL_GROUP_BY SQL mode enabled, a query that uses GROUP BY on a column derived from a subquery in the FROM clause failed with a column isn't in GROUP BY error, if the query was in a view. (Bug #11923239)
  • For the utf8_bin collation, ORDER BY LOWER(col_name) could produce incorrect ordering. (Bug #69005, Bug #16691598)
  • Several issues identified by the Coverity static analysis tool were fixed. Thanks to Honza Horak for the patch. (Bug #70830, Bug #17760511)
  • On Windows, the --local-service server option did not work, and was not displayed in the --help message. (Bug #69637, Bug #17049656)
  • It was not possible to query a view with an ORDER BY clause that referenced an alias in the SELECT clause of the view definition, unless all columns in the view were named in the select list.
  • To handle this problem, the server now writes a view differently into the .frm file that stores the view definition. If you experience view-evaluation errors such as just described, drop and recreate the view so that the .frm file contains the updated view representation. (Bug #69678, Bug #17077305)
  • The prototype of the Performance Schema instrumentation API mysql_cond_timedwait() call was fixed to be drop-in compatible with pthread_cond_timedwait(). This fix affects only implementers of third-party plugins. (Bug #70628, Bug #17702677)
  • The make_atomic_cas_body64 implementation on IA32 with gcc but without gcc builtins could be miscompiled due to an incorrect constraint. The patch also causes MySQL to use builtin atomics when compiled using Clang. (Bug #63451, Bug #17242996)
  • Complex updates of Performance Schema tables involving joins or subqueries failed to update every row. (Bug #70025, Bug #17309657)
  • For the path specified with the --basedir option, mysql_plugin attempted to unlink the path rather than free the memory in which the path was stored. (Bug #69752, Bug #17168602)
  • COUNT(DISTINCT) sometimes produced an incorrect result when the last read row contained a NULL value. (Bug #68749, Bug #16539979, Bug #71028, Bug #17867117)
  • sql_resolver.cc referred to partitioning code that should have been protected by an #ifdef, even when MySQL was configured with -DWITH_PARTITION_STORAGE_ENGINE=OFF. (Bug #71010, Bug #17876794)
  • In incorrect result could be returned for a query with an IF() predicate in the WHERE clause combined with OUTER JOIN in a subquery that is transformed to a semi-join. (A workaround is to disable semi-join using SET optimizer_switch='semijoin=off';) (Bug #70608, Bug #17600176)
  • A full-text search combined with derived tables (subqueries in the FROM clause) caused a server exit.
  • Now if a full-text operation depends on a derived table, the server produces an error indicating that a full-text search cannot be done on a materialized table. (Bug #68751, Bug #16539903)
  • Some scripts displayed out-of-date information regarding where to report bugs. (Bug #68742, Bug #16530527)
  • Some files in the Performance Schema file_instances table were not being removed because the file-removal operation was not instrumented. (Bug #69782, Bug #17209750)
  • mysqldump --single-transaction acquired metadata locks for each dumped table but did not release them until the dump operation finished. Consequently, other DDL operations on a dumped table blocked even after the table itself had been dumped. mysqldump now attempts to release metadata locks earlier. (Bug #71017, Bug #17862905)
  • Updating a FEDERATED table with UPDATE... JOIN caused a server exit when the local table contained a single row and that row could be joined to a row in the FEDERATED table. (Bug #68354, Bug #16324629)
  • mysql_install_db referred to the obsolete mysqlbug script for reporting problems. It now refers to http://bugs.mysql.com/ instead. (Bug #29716, Bug #11746921)

New in MySQL 5.6.15 (Dec 4, 2013)

  • Packaging Notes:
  • Previously, MySQL Server distributions included the MySQL Reference Manual in Info format (the Docs/mysql.info file). Because the license for the manual restricts redistribution, its inclusion in Community packages caused problems for downstream redistributors, such as those who create Linux distributions. Community distributions of MySQL Server no longer include the mysql.info file, to make the repackaging and redistribution process easier (for example, the source tarball and its checksum can be used directly). This change applies to all source and binary Community packaging formats. Commercial (Enterprise) distributions are unchanged.
  • For those who wish to continue using the MySQL Reference Manual in Info format, we have made it available at http://dev.mysql.com/doc/.
  • Functionality Added or Changed:
  • Incompatible Change: Several statement instruments in the setup_instruments table are used by the Performance Schema during the early stages of statement classification before the exact statement type is known. These instruments were renamed to more clearly reflect their “abstract” nature:
  • Old Instrument Name New Instrument Name
  • statement/com/ statement/abstract/new_packet
  • statement/com/Query statement/abstract/Query
  • statement/rpl/relay_log statement/abstract/relay_log
  • In addition, statistics for abstract instruments are no longer collected in the following tables, because no such instrument is ever used as the final classification for a statement:
  • events_statements_summary_by_thread_by_event_name
  • events_statements_summary_by_account_by_event_name
  • events_statements_summary_by_user_by_event_name
  • events_statements_summary_by_host_by_event_name
  • events_statements_summary_global_by_event_name
  • Applications that refer to the old instrument names must be updated with the new names. For more information about the use of abstract instruments in statement classification, see Performance Schema Statement Event Tables.
  • The Performance Schema now instruments the read/write lock Delegate::lock, which is used for the following classes:
  • Trans_delegate
  • Binlog_storage_delegate
  • Binlog_transmit_delegate
  • Binlog_relay_IO_delegate
  • A different instrument name is used for each subclass, to have distinct statistics for distinct uses. The instruments are visible in the schema.setup_instruments table and have these names:
  • wait/synch/rwlock/sql/Trans_delegate::lock
  • wait/synch/rwlock/sql/Binlog_storage_delegate::lock
  • wait/synch/rwlock/sql/Binlog_transmit_delegate::lock
  • wait/synch/rwlock/sql/Binlog_relay_IO_delegate::lock
  • A new CMake option, WITH_ASAN, permits enabling address sanitization for compilers that support it.
  • The hash function used for metadata locking was modified to reduce overhead.
  • Bugs Fixed:
  • InnoDB: A regression introduced by the fix for Bug#17371537 resulted a memory leak for memcached insert operations.
  • InnoDB: The trx->error_key_num field was not initialized in the error injection code found in storage/innobase/handler/handler0alter.cc. The error_key_num field is usually 0 but can be a non zero value if the memory buffer of a DDL transaction object is reused.
  • InnoDB: Fault-tolerant code found in the log apply code for InnoDB ALTER TABLE ... IN PLACE could result in data corruption.
  • InnoDB: Databases names beginning with a digit would cause a full-text search (FTS) parser error.
  • InnoDB: An ALTER TABLE ... CHANGE [COLUMN] operation would result in an rbt_empty(index_cache->words) assertion.
  • InnoDB: Running SHOW ENGINE INNODB STATUS on one connection thread and killing that thread by running a KILL CONNECTION statement from a different connection thread would result in a severe error.
  • InnoDB: An excessive amount of memory would be consumed when querying INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE. The problem would occur for very large full-text search indexes.
  • InnoDB: CHECK TABLE would ignore the QUICK option.
  • InnoDB: The information_schema.innodb_metrics index_merge counter was not incremented in btr0btr.cc. This patch also introduces new counters (index_page_reorg_attempts, index_page_reorg_successful and index_page_discards) and renames the index_merges counter to “index_page_merge_attempts” to distinguish it from the index_page_merge_successful counter.
  • InnoDB: Setting the O_DIRECT flag on a file on tmpfs on some operating systems would result in an error printed to the error log. Creating multiple temporary tables on tmpfs would cause the error to be printed repeatedly. The error message has been changed to a warning that is only printed once when running CREATE TABLE multiple times.
  • InnoDB: In debug builds, test case failures would occur due to ibuf_contract_ext performing merges and dict_stats_update returning evicted pages back into the buffer pool while ibuf_change_buffering_debug is enabled.
  • InnoDB: InnoDB would fail to return an error when attempting to run a query after discarding the tablespace.
  • InnoDB: A severe error would occur after discarding a tablespace.
  • InnoDB: During a TRUNCATE TABLE operation, InnoDB: Trying to TRUNCATE a missing index of table ... warnings would be printed to the error log. These warnings should not be printed when the index is a full-text search (FTS) index.
  • InnoDB: Full-text index creation on a large table would fail due to insufficient temporary table space and result in a misleading “incorrect key file” error.
  • InnoDB: The InnoDB mecached plugin would update a record before inserting to the binlog, which would cause slave server replication to stop. The insert should occur before the update.
  • InnoDB: During parallel full-text search (FTS) index creation, a scanner thread reads in documents and passes them to the tokenizer. The tokenizer frees documents from memory when tokenization is complete. When tokenizing documents with a large amount of text, the tokenizer thread would not keep pace with the scanner thread. As a result, memory would not be freed fast enough and the “tokenization pending list” would grow in size.
  • InnoDB: A full-text search (FTS) BOOLEAN MODE query with an invalid character in the query string could result in a memory access violation failure.
  • InnoDB: trx_create and trx_free would be called for every memcached get request.
  • InnoDB: The hardcoded size for the srv_max_n_threads variable was insufficient. The variable setting is now configured based on the maximum number of connection threads and InnoDB background threads.
  • InnoDB: In btr_validate_level there are checks to ensure that all B-tree pages are marked when allocated. The checks would fail on the change buffer because the allocation of change buffer pages is handled differently than other B-tree pages.
  • InnoDB: When the change buffer is enabled, InnoDB would fail to write a transaction log record when merging a record from the insert buffer to a secondary index page if the insert was performed as an “update-in-place”.
  • InnoDB: A SELECT COUNT (*) query would run very slowly when run concurrently with a LOAD DATA operation.
  • InnoDB: An existing full-text index would become invalid after running ALTER TABLE ADD FULLTEXT due to an unsynchronized full-text cache.
  • InnoDB: Due to a regression in MySQL 5.6, creating or dropping tables with innodb_force_recovery set to 3 (SRV_FORCE_NO_TRX_UNDO) would fail. Additionally, this bug fix includes a code modification that sets InnoDB to read-only when innodb_force_recovery is set to a value greater than 3 (SRV_FORCE_NO_TRX_UNDO).
  • InnoDB: An InnoDB memcached configuration error message contained an incorrect file name. The error message stated, Please create config table containers in database innodb_memcache by running innodb_config.sql. error 31. The correct file name is innodb_memcached_config.sql. Also, the “error 31” portion of the error message has been translated to its text equivalent, which is “Table not found”.
  • InnoDB: In mutex_spin_wait(), the sync_array_reserve_cell function could fail to find an empty slot on systems with sync wait arrays that are small in size, resulting in an error.
  • InnoDB: When index_read_map is called for an exact search and fails to return a record due to non-matching search criteria, the cursor would be positioned on the next record after the searched key. A subsequent call to index_next would return the next record instead of returning the previous non-matching row, thereby skipping a record.
  • InnoDB: Full-text search (FTS) index savepoint information would not be set resulting in a severe error when attempting to rollback to the savepoint.
  • InnoDB: Converting a table with a large number of columns from MyISAM to InnoDB would cause an assertion due to insufficient log buffer space. Instead of asserting, InnoDB now attempts to increase log buffer size automatically if the redo log size is too large.
  • Partitioning: The storage engine was set incorrectly during a rebuild of a partition; the table storage engine was ignored and the default storage engine used instead. Thus, in MySQL 5.1, it was possible for REBUILD PARTITION to change the partition storage engine from InnoDB to MyISAM, and for the reverse (rebuilding partitions of MyISAM tables causing the partitions to use InnoDB) to occurin MySQL 5.5 and later. Now, when rebuilding partitions, the storage engine actually used by the table is checked and used by the handler for the rebuild operation, so that the partition storage engine is not inadvertently changed.
  • Partitioning: After disabling the parent table's indexes with ALTER TABLE ... DISABLE KEYS, rebuilding any of its partitions enabled the indexes on those partitions, leading MyISAM to fail with an error when the optimizer tried to use one of the affected indexes.
  • Now in such cases, we check for disabled indexes on the table before rebuilding any of its partitions. If the indexes have been disabled, then we disable them on the partition following the rebuild.
  • Replication: A replication master did not handle correctly the disabling of the semisync plugin on the master and the slave, with a subsequent stopping of the slave.
  • Replication: The final argument in the SET clause of a LOAD DATA ... SET statement was repeated in the binary log.
  • Replication: When an error encountered by the dump thread while reading events from the active binary log file was a temporary error, so that the dump thread tried to read the event, it was possible for the dump thread to seek the wrong position, which could cause one or more events to be resent. To prevent this, the thread's position is obtained after each correct read of an event.
  • In addition, with this fix, only binary logs that are not closed normally are marked as possibly being corrupted.
  • Finally, two warnings are added; these are now returned when a dump thread encounters a temporary error.
  • Replication: When stopping the I/O thread, it was possible with a very large transaction (equivalent to a binary log size greater than 100MB) that the thread did not receive the transaction to the end. When reconnecting with MASTER_AUTO_POSITION=1 it then tried to fetch changes from the next transaction, which could lead to loss of the incomplete transaction and its data.
  • Replication: Setting rpl_semi_sync_master_enabled while the master was waiting for a reply from the slave could in some cases cause the master to fail.
  • Replication: Trying to set CHANGE MASTER TO ... MASTER_AUTO_POSITION = 0 failed with error 1777 (ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON). Replication: The value of LAST_INSERT_ID() was not correctly replicated when filtering rules were used on the slave.
  • Replication: An internal function used for storing GTID values could sometimes try to handle them as strings of the wrong length.
  • Replication: During row-based replication with binlog_row_image set to MINIMAL, updating only some columns of a table having 9 or more columns caused mysqlbinlog to fail when it was used with the --verbose option.
  • Replication: Issuing a GRANT statement with invalid parameters caused the master to write LOST_EVENTS events into its binary logs, causing replication to stop. Now such cases, if one or more grants or revocations of privileges are successful, an incident is written to the log; otherwise, only a warning is logged.
  • libmysqlclient version 18 files were removed from MySQL-shared-compat RPM packages to avoid a conflict between the MySQL-shared and MySQL-shared-compat RPM packages.
  • Enabling Index Merge optimizer switches and setting a small sort_buffer_size value could lead to a server exit.
  • Semi-join materialization strategy was not used for VARCHAR columns longer than 512 bytes, resulting in use of a less-efficient strategy and worse query performance. (The limit in characters rather than bytes depends on the column character set; 170 characters for utf8, for example.)
  • Some license and documentation files were missing from Windows MSI packages.
  • Selecting from the Performance Schema session_connect_attrs table under high load could cause a server exit.
  • Compilation failures under Visual Studio 2012 were corrected.
  • The CLIENT_CONNECT_WITH_DB flag was improperly handled in the C client library. This could lead to a malformed packet sent to the server.
  • An assertion was raised if SET PASSWORD was used for an account that has been manually deleted from the mysql.user table but still present in memory. The mysql_options() C API function could leak memory if called more than once with the MYSQL_SET_CLIENT_IP option.
  • The CONV() function could call abs(INT_MIN), which is undefined, and cause a server exit.
  • An error array in the SSL code was missing a comma, leading to implicit concatenation of adjacent messages and a resulting off-by-one error in the relationship between error numbers and messages.
  • The filesort implementation sometimes failed to allocate enough buffer space, leading to a server exit.
  • GRANT without an IDENTIFIED BY clause resulted in an error even for existing users.
  • GROUP_CONCAT() with an invalid separator could cause a server exit.
  • An internal InnoDB string routine could write past the end of a buffer.
  • GIS intersection-related code was missing a return value check, leading to a loop in nondebug builds and a raised assertion in debug builds.
  • Using the binary client/server protocol, the second execution of a prepared statement for a query with parameters in the LIMIT clause raised an assertion.
  • For upgrades using the Windows MSI package installer, the upgrade dialog message was missing the “from” version.
  • Very long database names in queries could cause the server to exit. Standalone Windows MSI packages did not have the ALLUSERS property set. They now set ALLUSERS=1. For earlier MSI packages in this MySQL series, a workaround is to use the following command:
  • C:\> msiexec /i msi_installer_name ALLUSERS=1
  • Recursion by functions called as arguments to XPath expressions was not handled correctly, sometimes causing such expressions to fail.
  • For an ALTER TABLE statement that renamed or changed the default value of a BINARY column, the alteration was done using a table copy and not in place.
  • Some possible cases of memory use after being freed were fixed.
  • In debug builds, static initialization code could call DBUG functions before the DBUG subsystem was initialized.
  • With the thread pool plugin enabled, the the PROCESSLIST_USER and PROCESSLIST_HOST columns of the Performance Schema threads table were always NULL for client sessions. Also, for the main thread, those columns were not NULL but set to a user account.
  • As part of the bug fix implementation, Performance Schema instrumentation for the thread pool plugin was changed to use thread_pool, not sql
  • COUNT(DISTINCT) should not count NULL values, but they were counted when the optimizer used Loose Index Scan.
  • For queries of the form UPDATE ... WHERE unique_key ORDER BY ... LIMIT ..., incorrect rows could be updated. Unique keys permit multiple NULL values, but the optimizer did not always consider all of them.
  • If asked to upgrade a server that was running without InnoDB enabled, mysql_upgrade issued complaints about InnoDB tables not existing (tables that will not exist unless InnoDB is available).
  • In some cases, range conditions over indexes defined on column prefixes returned incomplete result sets. (For example, SELECT ... WHERE 'abcdef1' < col_name AND col_name < 'abcdef9', where the index on col_name indexed only the first 6 characters.)
  • Performance Schema instrumentation overhead was reduced for frequent connect/disconnect operations.
  • Setting host_cache_size at startup had no effect.
  • InnoDB full-text searches failed to find records within transactions that included savepoints.
  • Some INSERT INTO ... SELECT ... FROM statements were slow unless the tmp_table_size and max_heap_table_size system variables were set large enough to permit the temporary table used for query processing to be stored in the MEMORY storage engine.
  • Incorrect reference counting in the range optimizer module resulted in potential for missing or duplicate rows in the query result set.
  • Host names in grant tables are stored in lowercase, but mysql_install_db could fail to observe this convention, leading to accounts that could not be dropped with DROP USER.
  • The server uses the ethernet hardware address for UUID generation, but made assumptions about the names of ethernet devices rather than querying the system for their names.
  • Several issues identified by the Coverity static analysis tool were fixed.
  • Missing va_end() calls were added to logging and UCS2 code.
  • Killing a query that is performing a filesort operation resulted in an ER_SERVER_SHUTDOWN (Server shutdown in progess) error.

New in MySQL 5.6.13 (Jul 31, 2013)

  • Functionality Added or Changed:
  • Important Change; Replication: By default, when promoting integers from a smaller type on the master to a larger type on the slave (for example, from a SMALLINT column on the master to a BIGINT column on the slave), the promoted values are treated as though they are signed. Now in such cases it is possible to modify or override this behavior using one or both of ALL_SIGNED, ALL_UNSIGNED in the set of values specified for the slave_type_conversions server system variable. For more information, see Row-based replication: attribute promotion and demotion, as well as the description of the variable. (Bug #15831300)
  • Previously, program options could be specified in full or as any unambiguous prefix. For example, the --compress option could be given to mysqldump as --compr, but not as --comp because the latter is ambiguous. Option prefixes now are deprecated. They can cause problems when new options are implemented for programs. A prefix that is currently unambiguous might become ambiguous in the future. If an unambiguous prefix is given, a warning now occurs to provide feedback. Warning: Using unique option prefix compr instead of compress is deprecated and will be removed in a future release. Please use the full name instead.
  • Option prefixes are no longer supported in MySQL 5.7; only full options are accepted. (Bug #16996656)
  • The C API libmysqlclient shared-library .so files now have version 18.1.0 (up from version 18.0.0 used in MySQL 5.5). (Bug #16809055)
  • In batch mode, mysql formatted result status messages such as “"Query OK, 1 row affected"” but did not print them. Now these messages are not formatted. (Bug #69486, Bug #16971432)
  • Bugs Fixed:
  • Performance; Important Change; InnoDB: InnoDB would fail to open a tablespace that has multiple data files. This removes the known limitation that was in MySQL Server 5.6.12. (Bug #17033706, Bug #69623)
  • Performance; InnoDB: A code regression introduced in MySQL 5.6 negatively impacted DROP TABLE and ALTER TABLE performance. This could cause a performance drop between MySQL Server 5.5.x and 5.6.x. (Bug #16864741, Bug #69316)
  • Performance; InnoDB: When innodb_thread_concurrency is set to a non-zero value, there was a possibility that all innodb_concurrency_tickets would be released after each row was read, resulting in a concurrency check after each read. This could impact performance of all queries. One symptom could be higher system CPU usage. We strongly recommend that you upgrade to MySQL Server 5.6.13 if you use this setting. This could cause a performance drop between MySQL Server 5.5.x and 5.6.x. (Bug #68869, Bug #16622478)
  • Incompatible Change: It is possible for a column DEFAULT value to be valid for the sql_mode value at table-creation time but invalid for the sql_mode value when rows are inserted or updated. In this case, 0 should be accepted for the CREATE TABLE but rejected for the INSERT. However, the server did not evaluate DEFAULT values used for inserts or updates against the current sql_mode. In the example, the INSERT succeeds and inserts '0000-00-00' into the DATE column.
  • The server now applies the proper sql_mode checks to generate a warning or error at insert or update time.
  • A resulting incompatibility for replication if you use statement-based logging (binlog_format=STATEMENT) is that if a slave is upgraded, a nonupgraded master will execute the preceding example without error, whereas the INSERT will fail on the slave and replication will stop.
  • To deal with this, stop all new statements on the master and wait until the slaves catch up. Then upgrade the slaves followed by the master. Alternatively, if you cannot stop new statements, temporarily change to row-based logging on the master (binlog_format=ROW) and wait until all slaves have processed all binary logs produced up to the point of this change. Then upgrade the slaves followed by the master and change the master back to statement-based logging. (Bug #68041, Bug #16078943)
  • MySQL Cluster: CREATE LOGFILE GROUP failed with a syntax error when INITIAL_SIZE, UNDO_BUFFER_SIZE, or both options were specified. (Bug #13116514)
  • InnoDB: The server would crash during a memcached set operation. The failure was due to a padded length value for a utf8 char column. During a memcached update operation, a field from an old tuple would be copied with a data length that was less than the padded utf8 char column value. This fix ensures that old tuples are not copied. Instead, a new tuple is created each time. (Bug #16875543)
  • InnoDB: When CHECK TABLE found a secondary index that contained the wrong number of entries, it would report an error but not mark the index as corrupt. CHECK TABLE now marks the index as corrupt when this error is encountered, but only the index is marked as corrupt, not the table. As a result, only the index becomes unusable until it is dropped and rebuilt. The table is unaffected. (Bug #16914007)
  • InnoDB: InnoDB would attempt to gather statistics on partially created indexes. (Bug #16907783)
  • InnoDB: A full-text search using the IN BOOLEAN MODE modifier would result in an assertion failure. (Bug #16927092)
  • References: This bug is a regression of Bug #16516193.
  • InnoDB: The two INFORMATION_SCHEMA tables for the InnoDB buffer pool could show an invalid page type for read-fixed blocks. This fix will show the unknown page type for blocks that are I/O-fixed for reading. (Bug #16859867)
  • InnoDB: During an insert buffer merge, InnoDB would invoke lock_rec_restore_from_page_infimum() on a potentially invalid record pointer. (Bug #16806366)
  • InnoDB: The innodb_rwlock_x_spin_waits item in the INFORMATION_SCHEMA.INNODB_METRICS table would show the same value as the innodb_rwlock_x_os_waits item. (Bug #16798175)
  • InnoDB: A memory leak would occur when inserting or replacing a row in a full-text search index on a table with more than 96 columns. (Bug #16809167)
  • InnoDB: In debug builds, an assertion could occur in OPT_CHECK_ORDER_BY when using binary directly in a search string, as binary may include NULL bytes and other non-meaningful characters. This fix will remove non-meaningful characters before the search is run. (Bug #16766016)
  • InnoDB: The page_zip_validate() consistency check would fail after compressing a page, in page_zip_compress(). This problem was caused by page_zip_decompress(), which would fail to set heap_no correctly when a record contained no user data bytes. A record with no user data bytes occurs when, for example, a primary key is an empty string and all secondary index fields are NULL or an empty string. (Bug #16736929)
  • InnoDB: A race condition would occur between ALTER TABLE ... ADD KEY and INSERT statements, resulting in an “Unable to Purge a Record” error. (Bug #16628233)
  • InnoDB: A full-text search that returns large result sets would consume an excessive amount of memory due to use of a red-black tree for holding full-text search results. This fix reduces and imposes a limit on memory consumption. If the limit is exceeded, a message is returned indicating that the full-text search query exceeds the maximum allowed memory. (Bug #16625973)
  • InnoDB: Restarting InnoDB in read-only mode and running a workload would occasionally return a global_segment < os_aio_n_segments assertion. (Bug #16362046)
  • InnoDB: When the InnoDB shutdown mode (innodb_fast_shutdown) is set to 2 and the master thread enters the flush loop, the thread would not be able to exit under some circumstances. This could lead to a shutdown hang. (Bug #16411457)
  • InnoDB: While printing a UTF-8 table name, InnoDB would truncate the table name, resulting in an incomplete buffer and subsequent Valgrind error. This bug fix also addresses an incorrect debugging error message. (Bug #16066351)
  • InnoDB: Attempting to create a table while in innodb_read_only mode would result in the following error: ERROR 1015 (HY000): Can't lock file (errno: 165 - Table is read only). (Bug #15963619)
  • InnoDB: Due to a resource related bug, creating numerous tables that have a simple a full-text search index would cause excessive memory usage. This fix adds a global configuration parameter to limit the total memory size that full-text search indexes can use. If the global memory limit is reached by an index operation, a force sync is triggered. (Bug #14834698, Bug #16817453)
  • InnoDB: In the error log, a full-text search index would be reported missing from the data dictionary during a TRUNCATE TABLE operation. After restarting mysqld, the following InnoDB error would be reported: “InnoDB: Error: trying to load index idx13 for table test/g1 but the index tree has been freed..” (Bug #12429565)
  • InnoDB: Creating a table with a comment or default textual value containing an apostrophe that is escaped with a backslash would sometimes cause the InnoDB storage engine to omit foreign key definitions. (Bug #61656, Bug #12762377)
  • InnoDB: Setting foreign_key_checks=0 and running ALTER TABLE to change the character set of foreign key columns for a database with multiple tables with foreign key constraints would leave the database in an inconsistent state. Subsequent ALTER TABLE operations (using the COPY algorithm) with foreign_key_checks=1 would fail due to the detected inconsistency. Reversion of the partially executed ALTER TABLE operation would also fail, resulting in the loss of the table being altered. When running the same ALTER TABLE operation with a RENAME clause, the inconsistency would not be detected but if the ALTER TABLE operation failed for some other reason, reversion of the partially executed ALTER TABLE would fail with the same result.
  • The bug fix temporarily disables foreign_key_checks while the previous table definition is restored. (Bug #65701, Bug #14227431)
  • InnoDB: Successive deletes in descending key order would lead to under-filled InnoDB index pages. When an InnoDB index page is under-filled, it is merged with the left or right sibling node. The check performed to determine if a sibling node is available for merging was not functioning correctly. (Bug #68501, Bug #16417635)
  • InnoDB: The pthread_mutex, commit_threads_m, which was initialized but never used, has been removed from the code base. (Bug #60225, Bug #11829813)
  • InnoDB: When running an InnoDB full-text search in boolean mode, prefixing an asterisk (*) to a search string ('*string') would result in an error whereas for MyISAM, a prefixed asterisk would be ignored. To ensure compatibility between InnoDB and MyISAM, InnoDB now handles a prefixed asterisk in the same way as MyISAM. (Bug #68948, Bug #16660607)
  • InnoDB: The row_check_index_for_mysql method, which checks for NULL fields during an index scan or CHECK TABLE operation, would iterate unnecessarily. Thanks to Po-Chun Chang for the patch to correct this issue. (Bug #69377, Bug #16896647)
  • Partitioning: When upgrading to MySQL 5.5.31 or higher, a message is written into the output of mysql_upgrade when encountering a partitioned table for which the ALGORITHM option is required to maintain binary compatibility with the original; the message includes the ALTER TABLE statement required to make the change. For such a table having a sufficiently large number of partitions, the message was truncated with an error before the complete ALTER TABLE statement could be written. (Bug #16589511)
  • Partitioning: When a range specified in the WHERE condition of a query against a table partitioned by RANGE entirely within that of one of the partitions, the next partition was also checked for rows although it should have been pruned away. In this case, partition pmax was checked, even though the range given in the WHERE clause lay entirely within partition p3. (Bug #16447483)
  • Partitioning: When dropping a partitioned table, the table's .par file was deleted first, before the table definition or data. This meant that, if the server failed during the drop operation, the table could be left in an inconsistent state in which it could neither be accessed nor dropped.
  • Now, when dropping a partitioned table, the table's .par file is not removed until all table data has been deleted.
  • When executing DROP TABLE of a partitioned table, in the event that its .par file is determined to be missing, the table's .frm file is now immediately deleted, in effect forcing the drop to complete.
  • Replication: The condition leading to the issue fixed in Bug #16579083 continued to raise an error even though the condition itself no longer cause the issue to occur. (Bug #16931177, Bug #69369)
  • References: See also Bug #16271657, Bug #16491597, Bug #68251, Bug #68569.
  • Replication: When rpl_semi_sync_master_timeout was set to an extremely large value, semi-synchronous replication became very slow, especially when many sessions were working in parallel. It was discovered that the code to calculate this timeout was inside the wait loop itself, with the result that an increase in the value of rpl_semi_sync_master_timeout caused repeated iterations. This fix improves the method used to calculate wakeup times, and moves it outside of the wait loop, so that it is executed one time only. (Bug #16878043, Bug #69341)
  • Replication: It was possible to cause a deadlock after issuing FLUSH TABLES WITH READ LOCK by issuing STOP SLAVE in a new connection to the slave, then issuing SHOW SLAVE STATUS using the original connection.
  • The fix for this includes the addition of the rpl_stop_slave_timeout system variable, to control the time in seconds to wait for slave to stop after issuing STOP SLAVE before returning a warning. (Bug #16856735)
  • Replication: Some expressions employing variables were not handled correctly by LOAD DATA. (Bug #16753869)
  • Replication: In some circumstances, the message in the Last_Error column from the output of SHOW SLAVE STATUS referred to GTID_NEXT_LIST although this variable is not currently implemented (the name is reserved for possible future use). Now in such cases the error message no longer refers to this variable. (Bug #16742886, Bug #69096)
  • References: See also Bug #16715809, Bug #69045.
  • Replication: The error displayed by SHOW SLAVE STATUS when a worker thread fails to apply an event contained no event coordinate information. The GTID for the event's group was also not shown. Now in such cases, the text shown for Last_SQL_Error is prefixed with the (physical) master binary log coordinates, as well as the value of gtid_next when this has been set. (Bug #16594095)
  • Replication: Linker errors occurred if the header file log_event.h was included in an application containing multiple source files, because the file rpl_tblmap.cc was included in log_event.h. This fix moves the inclusion of rpl_tblmap.cc into the source files that use log_event.h. (Bug #16607258)
  • Replication: The warning issued when specifying MASTER_USER or MASTER_PASSWORD with CHANGE MASTER TO was unclear for a number of reasons, and has been changed to read, Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see 'START SLAVE Syntax' in the MySQL Manual for more information. (Bug #16460123, Bug #16461303, Bug #68602, Bug #68599)
  • Replication: After a transaction was skipped due to its GTID already having been logged, all remaining executed transactions were incorrectly skipped until gtid_next was pointed to a different GTID.
  • To avoid this incorrect behavior, all transactions—even those that have been skipped—are marked as undefined when they are commited or rolled back, so that an error is thrown whenever a second transaction is executed following the same SET @@session.gtid_next statement. (Bug #16223835)
  • Replication: After the client thread on a slave performed a FLUSH TABLES WITH READ LOCK and was followed by some updates on the master, the slave hung when executing SHOW SLAVE STATUS. (Bug #68460, Bug #16387720)
  • For debug builds, improper use of SAFE_MUTEX within dbug.c caused different code areas to have different ideas about size and contents of a mutex. This could result in out-of-bounds memory writes. (Bug #16945343)
  • Sql_condition::set_subclass_origin() could perform an out-of-bounds read. (Bug #16969091)
  • Initialization of keycache_* variables (see Multiple Key Caches) during server startup could write to incorrect memory. (Bug #16945503)
  • Reads from message buffers for closed connections could occur. (Bug #17003702)
  • The server could exit while using a cursor to fetch rows from a UNION query. (Bug #16983143)
  • The range optimizer incorrectly assumed that any geometry function on a spatial index returned rows in ROWID order, which could result in incorrect query results. (Bug #16960800)
  • The server did excessive locking on the LOCK_active_mi and active_mi->rli->data_lock mutexes for any SHOW STATUS LIKE 'pattern' statement, even when the pattern did not match status variables that use those mutexes (Slave_heartbeat_period, Slave_last_heartbeat, Slave_received_heartbeats, Slave_retried_transactions, Slave_running). Now attempts to show those variables do not lock those mutexes. This might result is slightly stale data, but better performance. (Bug #16904035)
  • Full-text phrase search in InnoDB tables could read incorrect memory. (Bug #16885178)
  • It was not possible to keep several major versions of MySQL in the same yum repository. (Bug #16878042)
  • The Performance Schema could spawn a thread using incorrect instrumentation information. (Bug #16939689)
  • INSERT ... ON DUPLICATE KEY UPDATE could cause a server exit if a column with no default value was set to DEFAULT. (Bug #16756402)
  • References: This bug is a regression of Bug #14789787.
  • The code base was modified to account for new warning checks introduced by gcc 4.8. (Bug #16729109)
  • Compiling failed with -DMY_ATOMIC_MODE_RWLOCKS=1 or on platforms on which MySQL did not support lockless atomic operations (such as ARM). (Bug #16736461)
  • In a prepared statement or stored routine, if the HAVING clause of a subquery referenced some column of the GROUP BY of the parent query, the server could exit. (Bug #16739050)
  • The read-only open_files_limit system variable did not show maximum number of open files the mysqld process could have, but instead the number that was requested after adjusting the --open-files-limit command-line option. (Bug #16657588)
  • Some rows for a session could be missing sporadically from the Performance Schema session_connect_attrs table while the session was executing a workload. (Bug #16576980)
  • The server could make the wrong decision about whether an account password was expired. (Bug #16604641)
  • Upgrading from community SLES RPM packages to commercial packages for the same MySQL version failed with conflict errors. (Bug #16545296)
  • A full-text search syntax error failed to print to standard output. (Bug #16429688, Bug #16765397)
  • Unlike MyISAM, InnoDB does not support boolean full-text searches on nonindexed columns, but this restriction was not enforced, resulting in queries that returned incorrect results. (Bug #16434374)
  • If the optimizer was using a loose index scan, the server could exit while attempting to create a temporary table. (Bug #16436567)
  • Incorrect results or a server exit could be caused by a reference to an aggregated expression inside a nested subquery, where the aggregated expression was evaluated in a query block more than two levels outer to the reference. (Bug #16436383)
  • In debug builds, failure in the range optimizer for an ER_LOCK_DEADLOCK or ER_LOCK_WAIT_TIMEOUT error could go undetected and cause an assertion to be raised when a response was sent to the client. In release builds, this problem manifested as clients receiving an OK for a statement that had failed. (Bug #16366994, Bug #16247110)
  • An assertion could be raised when creating a index on a prefix of a TINYBLOB column in an InnoDB column. (Bug #16368875)
  • A server exit could occur for queries of the form SELECT (SELECT 1 FROM t1) IN (SELECT a FROM t1) when attempting to evaluate the constant left-hand argument to the IN subquery predicate. (Bug #16369522)
  • No warning was generated if a duplicate index existed after dropping a column associated with a multiple-column index. (Bug #16315351)
  • SELECT DISTINCT with WITH ROLLUP could result in a Duplicate entry 'NULL' for key '' error. (Bug #16314835)
  • The server could exit in do_copy_not_null() due to an improper NULL-value check. (Bug #16316564)
  • Transforming some subqueries that select temporal or BIGINT types or to a semijoin caused a server exit on the second execution of prepared statements or stored programs. (Bug #16319671)
  • The usual failed-login attempt accounting was not applied to failed COM_CHANGE_USER commands. (Bug #16241992)
  • A user variable referenced during execution of a prepared statement is set to memory that is freed at the end of execution. A second execution of the statement could result in Valgrind warnings when accessing this memory. (Bug #16119355)
  • Misoptimization of left expressions in prepared statements could cause a server exit. (Bug #16095534)
  • The optimizer trace could print ranges for key parts that were not usable for range access. (Bug #14615536)
  • When running a query on INFORMATION_SCHEMA.INNODB_BUFFER_PAGE that requested table_name and index_name values, query results would include index pages without table_name or index_name values. (Bug #14529666)
  • Several COM_xxx commands in the client-server protocol did not have length checks for incoming network packets, which could result in various problems for malformed input. (Bug #14525642)
  • Passwords in statements were not obfuscated before being written to the audit log. (Bug #14536456)
  • With the thread pool plugin in use, normal connection termination caused the Aborted_clients status variable to be incremented. (Bug #14081240)
  • On Windows, command-line options of the form --opt_name="opt_value" worked but --opt_name='opt_value' did not.
  • On all platforms, for Performance Schema options of the form --performance_schema_instrument="instrument=value", invalid instrument names now are rejected. (Bug #13955232)
  • MySQL Installer, if run in custom install or change mode, offered installation options that had no effect. (Bug #12928601)
  • Incorrect results could be returned from queries that used several aggr_func(DISTINCT) functions (where aggr_func() is an aggregate function such as COUNT()) when these referred to different columns of the same composite key. (Bug #12328597)
  • If an UPDATE containing a subquery caused a deadlock inside InnoDB, the deadlock was not properly handled by the SQL layer. The SQL layer then tried to unlock the row after InnoDB rolled back the transaction, raising an assertion inside InnoDB. (Bug #69127, Bug #16757869)
  • Boolean plugin system variables did not behave well on machines where char is unsigned; some code attempted to assign a negative value to these. (Bug #59905, Bug #11864205)
  • In the absence of SQL_CALC_FOUND_ROWS in the preceding query, FOUND_ROWS() should return the number of rows in the result set, but this did not always happen if the query contained ORDER BY. (Bug #69271, Bug #16827872)
  • Unoptimized versions of the xxxkorr() macros in my_global.h were used on 64-bit x86 processors. (Bug #61179, Bug #12565703)
  • sql-common/client_plugin.c contained a nonportable use of a va_list parameter. (Bug #62769, Bug #13252623)
  • mysqldump assumed the existence of the general_log and slow_log tables in the mysql database. It failed if invoked to dump tables from an older server where these tables do not exist. (Bug #65670, Bug #14236170)
  • Full-text search on InnoDB tables failed on searches for words containing apostrophes. (Bug #69216, Bug #16801781)
  • Full-text search on InnoDB tables failed on searches for literal phrases combined with + or - operators. (Bug #68720, Bug #16516193)
  • Optimizations that used extended secondary keys (see Use of Index Extensions) worked only for InnoDB, even for storage engines with the requisite underlying capabilities. (Bug #68469, Bug #16391678)
  • With big_tables enabled, queries that used COUNT(DISTINCT) on a simple join with a constant equality condition on a non-duplicate key returned incorrect results. (Bug #52582, Bug #11760197)
  • mysql_install_db incorrectly tried to create the mysql.innodb_table_stats and mysql.innodb_index_stats tables if InnoDB was not available. (Bug #68438, Bug #16369955)
  • If one session had any metadata lock on a table, another session attempting CREATE TABLE [IF NOT EXISTS] for the same table would hang. This occurred due to an attempt in the second session to acquire an exclusive metadata lock on the table before checking whether the table already existed. An exclusive metadata lock is not compatible with any other metadata locks, so the session hung for the lock timeout period if another session had the table locked.
  • Now the server attempts to acquire a shared metadata lock on the table first to check whether it exists, then upgrade to an exclusive lock if it does not. If the table does exist, an error occurs for CREATE TABLE and a warning for CREATE TABLE IF NOT EXISTS. (Bug #63144, Bug #13418638)
  • Attempts to build from a source RPM package could fail because the build process attempted to refer to a pb2user that might not exist. (Bug #64641, Bug #13865797, Bug #69339, Bug #16874980)
  • A typo in cmake/dtrace.cmake prevented DTrace support from being enabled by -DENABLE_DTRACE-on. (Bug #60743, Bug #12325449)
  • When an internal buffer was too small for the workload, the Performance Schema could spend a lot of time in an internal spin loop attempting to allocate a memory buffer, and fail. (Bug #69382, Bug #16945618)
  • Some LEFT JOIN queries with GROUP BY could return incorrect results. (Bug #68897, Bug #16620047)
  • References: This bug is a regression of Bug #11760517.
  • For queries with ORDER BY ... LIMIT, the optimizer could choose a nonordering index for table access. (Bug #69410, Bug #16916596)
  • When selecting a union of an empty result set (created with WHERE 1=0 or WHERE FALSE) with a derived table, incorrect filtering was applied to the derived table. (Bug #69471, Bug #16961803)
  • References: This bug is a regression of Bug #15848521.
  • Comparison of a DATETIME value and a string did not work correctly for the utf8_unicode_ci collation. (Bug #68795, Bug #16567381)

New in MySQL 5.6.12 (Jun 4, 2013)

  • Functionality Added or Changed:
  • mysql_upgrade now verifies that the server version matches the version against which it was compiled, and exits if there is a mismatch. In addiion, a --version-check option permits specifying whether to enable version checking (the default), or disable checking if given as --skip-version-checking.
  • Bugs Fixed:
  • Incompatible Change: When used for an existing MySQL account, the GRANT statement could produce unexpected reults if it included an IDENTIFIED WITH clause that named an authentication plug differing from the plugin named in the corresponding mysql.user table row.
  • Because IDENTIFIED WITH is intended for GRANT statements that create a new user, it is now prohibited if the named account already exists.
  • Important Change; Replication: When the server was running with --binlog-ignore-db and SELECT DATABASE() returned NULL (that is, there was no currently selected database), statements using fully qualified table names in dbname.tblname format were not written to the binary log. This was because the lack of a currently selected database in such cases was treated as a match for any possible ignore option rather than for no such option; this meant that these statements were always ignored.
  • Now, if there is no current database, a statement using fully qualified table names is always written to the binary log.
  • InnoDB; Partitioning: Joins involving partitioned InnoDB tables having one or more BLOB columns were not always handled correctly. The BLOB column or columns were not required to be join columns, or otherwise to be named or referenced in the statement containing the join, for this issue to occur.
  • InnoDB: In debug builds, an online ALTER TABLE operation that performed a full table copy would raise an assertion. The assertion was due to a race condition that would occur during BLOB retrieval, when applying the table modification log to any log block except for the very last one. This fix modifies row_log_table_apply_convert_mrec() to ensure that an index B-tree lock is acquired to protect the access to log->blobs and the BLOB page.
  • InnoDB: When the function trx_rollback_or_clean_recovered() rolls back or cleans up transactions during a crash recovery, it removes the trx objects from the trx_sys list without freeing up the memory used by those objects. To prevent a memory leak, this fix adds trx_free_for_background() calls to trx_rollback_resurrected(), the function that removes the trx objects.
  • InnoDB: A missing comma in SHOW STATUS output would break MySQL Enterprise Monitor parsing.
  • InnoDB: After a clean shutdown, InnoDB does not check .ibd file headers at startup. As a result, in a crash recovery scenario, InnoDB could load a corrupted tablespace file. This fix implements consistency and status checks to avoid loading corrupted files.
  • InnoDB: A memory leak would occur in dict_check_tablespaces_and_store_max_id() when space_id is equal to zero.
  • InnoDB: When ADD PRIMARY KEY columns are reordered in an ALTER TABLE statement (for example: ALTER TABLE t1 ADD PRIMARY KEY(a,b), CHANGE a a INT AFTER b), the log apply for UPDATE operations would fail to find rows.
  • InnoDB: DML operations on compressed temporary tables would result in a Valgrind error in the buffer manager stack.
  • InnoDB: This fix addresses a race condition that would occur between the rollback of a recovered transaction and creation of a secondary index in a locked operation. The race condition would corrupt the secondary index.
  • InnoDB: For ALTER TABLE operations on InnoDB tables that required a table-copying operation, other transactions on the table might fail during the copy. However, if such a transaction issued a partial rollback, the rollback was treated as a full rollback.
  • InnoDB: Under certain circumstances, LRU flushing would take a long time possibly affecting all flushing activity and causing a shutdown timeout.
  • InnoDB: The recv_writer thread would only start after all redo log scans finished. In the case of multiple redo log scans, accumulated redo records would be applied after each scan and before processing the next scan. The absence of the recv_writer thread to help with flushing would slow recovery or result in a server startup timeout. This fix ensures that the recv_writer thread starts before the first scan batch is processed.
  • InnoDB: This fix replaces the IB_ULONGLONG_MAX constant with LSN_MAX where the code refers to log sequence numbers, or with TRX_ID_MAX where trx->no is initialized to an undefined value. This change does not alter the value of the constant.
  • InnoDB: This fix corrects the text for InnoDB error 6025, which stated, “InnoDB: read can't be opened in ./ib_logfile0 mode.”. The corrected message states, “InnoDB: ./ib_logfile0 can't be opened in read mode.” The variable and mode in the message construct were transposed.
  • InnoDB: The page_zip_available function would count some fields twice.
  • InnoDB: This fix removes most calls to OS_THREAD_SLEEP from InnoDB.
  • InnoDB: Concurrently inserting into a full-text table would cause some inserts to fail. Duplicate values would be generated for full-text search document IDs when performing inserts into a hidden full-text search document ID column.
  • InnoDB: FLUSH TABLES FOR EXPORT would sleep too often while flushing pages from buffer pools.
  • InnoDB: In cases where threads are forced to do single page flushing, fsync() would be triggered for all data files. This fix allows for synchronous single page flushing.
  • InnoDB: In debug builds, an insert would fail with an invalid assertion: sync_thread_levels_g(array, level - 1, TRUE).
  • InnoDB: Multiple concurrent calls to dict_update_statistics() would result in unnecessary server load.
  • InnoDB: On 64-bit Windows builds, INNODB_BUFFER_POOL_SIZE would not accept an allocation of more than 32GB. This limitation was due to a bug that truncated the internal value for the InnoDB buffer pool size to 32 bits on 64-bit Windows builds.
  • InnoDB: Crash recovery would fail with a !recv_no_log_write assertion when reading a page.
  • InnoDB: Creating a foreign key constraint using the ALTER TABLE INPLACE algorithm requires foreign_key_checks to be set to 0 (SET foreign_key_checks = 0;). As a result, an appropriate duplicate ID check would not be performed.
  • InnoDB: RENAME TABLE would result in a hang due to a MySQL mutex acquisition deadlock.
  • InnoDB: DROP DATABASE failed if the database contained an InnoDB table that had a data file in an external data directory. The external data file had an “InnoDB Symbolic Link” file type (.isl) that was not recognized by MySQL. This fix adds .isl as a known InnoDB file type.
  • InnoDB: When tables are linked by foreign key constraints, loading one table would open other linked tables recursively. When numerous tables are linked by foreign key constraints, this would sometimes lead to a thread stack overflow causing the server to exit. Tables linked by foreign key constraints are now loaded iteratively. Cascade operations, which were also performed in a recursive manner, are now performed iteratively using an explicit stack.
  • InnoDB: When calling the lock_rec_block_validate() function after releasing the kernel mutex, there is a chance the lock might be invalid and result in a Valgrind error due to an invalid read on lock->index. This fix copies the lock->index when the kernel mutex is being held and passes the lock->index to lock_rec_block_validate().
  • InnoDB: Under testing, a FLUSH TABLE operation resulted in a timeout due to a missing acknowledgement that the purge thread had stopped.
  • InnoDB: For a compressed table, the “page reorganize” function would ignore the innodb_log_compressed_pages option and always log the entire compressed page, which increased the size of the redo log. The “page reorganize” function now adheres to the innodb_log_compressed_pages option and does not log compressed page images to the redo log when innodb_log_compressed_pages is set to “OFF”.
  • InnoDB: After disabling foreign key checks with SET foreign_key_checks=0 and performing a DROP INDEX, the table was no longer accessible after restarting the server. This fix allows the table with missing foreign key indexes to be accessed when SET foreign_key_checks=0. When the table is accessible, the user must recreate the missing indexes to fulfill the foreign key constraints.
  • InnoDB: When a transaction is in READ COMMITTED isolation level, gap locks are still taken in the secondary index when a row is inserted. This occurs when the secondary index is scanned for duplicates. The function row_ins_scan_sec_index_for_duplicate() always calls the function row_ins_set_shared_rec_lock() with LOCK_ORDINARY irrespective of the transaction isolation level. This fix modifies the row_ins_scan_sec_index_for_duplicate() function to call row_ins_set_shared_rec_lock() with LOCK_ORDINARY or LOCK_REC_NOT_GAP, based on the transaction isolation level.
  • InnoDB: Starting mysqld with --innodb_log_buffer_size=50GB failed to allocate memory and returned NULL. For non-debug builds there was no check in place and a segmentation fault occurred. This fix adds a log message stating that memory failed to be allocated, and adds an assertion.
  • InnoDB: When UNIV_DEBUG is enabled in debug builds, buf_validate() is often called which sometimes results in false alarms in tests on semaphore wait timeout. This fix increases counter values to reduce false alarms.
  • InnoDB: While processing read-write workloads, InnoDB would scan more pages than are required for flushing, unnecessarily consuming CPU resource.
  • InnoDB: The explain_filename function, which provides information about a partition by parsing the file name, would return an error when attempting to parse a file name with no partition information.
  • InnoDB: Stopping the server, removing a database table (d1.t1) .frm file from the data directory, restarting the server, and dropping the database (d1), would cause an assertion.
  • InnoDB: An active FLUSH TABLE FOR EXPORT thread would cause a hang during shutdown. The fix ensures that trx_is_interrupted() is checked during ibuf_merge.
  • InnoDB: A multi-row INSERT ... ON DUPLICATE KEY UPDATE insert failure, caused by a duplicate key error, would result in duplicate auto-increment values.
  • Replication: Point-in-time recovery could fail when trying to restore a single database from a binary log in row-based format using mysqlbinlog with the --database option.
  • Replication: Issuing a FLUSH TABLES statement on a GTID-enabled master caused replication to fail. It was found that this misbehavior was introduced by the fix for Bug #16062608, which disallowed statements that perform an implicit commit but whose changes are not logged when gtid_next is set to any value other than AUTOMATIC. The changes made in that fix have been reverted, and such statements are (again) allowed without regard to the value of this variable.
  • Replication: A crash-on-commit error caused InnoDB to lose the previous transaction following execution of a RESET MASTER statement. This occurred because the prepare phase caused a flush to disk, while the commit phase did not perform a corresponding flush within InnoDB.
  • To fix this problem, RESET MASTER now causes storage engine logs to be flushed on commit.
  • Replication: When used with the options --dump-slave --include-master-host-port, mysqldump printed the port number within quotation marks, as if it were a string value rather than an integer.
  • Replication: When processing an Update_rows_log_event or Delete_rows_log_event from the binary log, the before image is hashed and stored in a hash table. Following this, the original table is scanned for the desired records; subsequent processing hashes each record fetched from the original table and performs a lookup for it in the hash table. However, columns read from the image that had originally been set to NULL could instead contain random or “garbage” data, causing the lookup (and thus replication) to fail with an error such as Could not execute Update_rows event on table.
  • Replication: Due to time resolution issues on some systems, the time to be taken by the dump thread for a reply from the slave could be calculated to be less than zero, leading to Semi-sync master wait for reply fail to get wait time errors. Since this condition does not have a negative impact on replication, errors caused by these conditions have been reduced to warnings.
  • Replication: When one or more GTID log events but no previous GTIDs log events were found in the binary log, the resulting error was mishandled and led to a failure of the server. (This is an extremely rare condition that should never occur under normal circumstances, and likely indicates that the binary log file has somehow been corrupted.) Now in such cases, an appropriate error is issued, and is handled correctly.
  • Replication: Running the server with both the --log-slave-updates and --replicate-wild-ignore-table options in some cases caused updates to user variables not to be logged.
  • Replication: When using mysqlbinlog and the mysql client to roll forward two or more binary logs on a server having GTIDs enabled, the gtid_next variable was not properly reset when switching from the first to the second binary log, causing processing to halt with an error at that point.
  • Replication: The mysqlbinlog options --include-gtids, --exclude-gtids, and --skip-gtids did not work correctly when trying to process multiple files.
  • Replication: When the size of an execution event exceeded the maximum set for the buffer (slave_pending_jobs_size_max), row-based replication could hang with Waiting for slave workers to free pending events.
  • Replication: Extra binary log rotations were performed due to concurrent attempts at rotation when the binary log became full, which were allowed to succeed. This could lead to the unnecessary creation of many small binary log files.
  • Replication: Attempting to execute START SLAVE after importing new slave_master_info and slave_relay_log_info tables failed with an empty error message. Now an appropriate error and message are issued in such cases.
  • Replication: Restarting the server after the slave_relay_log_info table had been emptied caused mysqld to fail while trying to return an error.
  • Replication: Following disconnection from the master, the slave could under certain conditions report erroneously on reconnection that it had received a packet that was larger than slave_max_allowed_packet, causing replication to fail.
  • Replication: An SQL thread error during MTS slave recovery caused the slave to fail.
  • Replication: When using the options --read-from-remote-server --stop-never --base64-output=decode-rows --verbose, mysqlbinlog failed to reset the counter used to store the current position within the file when the binary log on the server was rotated.
  • Replication: When using mysqldump to back up a database created with MySQL 5.6.4 or an earlier version, setting --set-gtid-purged=AUTO caused the backup to fail, because pre-5.6.5 versions of MySQL did not support GTIDs, and it could not be determined if GTIDs were enabled for the database. This fix makes sure mysqldump does not attempt to output a SET @@global.gtid_purged statement when backing up any pre-5.6.5 databases.
  • Replication: Deadlocks could sometimes occur on group commits with a high number of concurrent updates, as well as when one client held a lock from a commit while another client imposed a lock while rotating the binary log.
  • Replication: When semisynchronous replication was enabled, the automatic dropping on the master of an event created using ON COMPLETION NOT PRESERVE caused the master to fail.
  • Replication: Setting a SET column to NULL inside a stored procedure caused replication to fail.
  • Replication: The binary log contents got corrupted sometimes, because the function MYSQL_BIN_LOG::write_cache always thought it had reached the end-of-cache when the function my_b_fill() reported a '0,' while that could also mean an error had occurred. This fix makes sure that whenever my_b_fill() returns a '0,' an error check is performed on info->error.
  • Replication: PURGE BINARY LOGS by design does not remove binary log files that are in use or active, but did not provide any notice when this occurred. Now, when log files are not removed under such conditions, a warning is issued; this warning includes information about the file or files were not removed when the statement was issued.
  • Replication: When replicating to a BLACKHOLE table using the binary logging format, updates and deletes cannot be applied and so are skipped. Now a warning is generated for this whenever it occurs.
  • Note:
  • binlog_format=STATEMENT is recommended when replicating to tables that use the BLACKHOLE storage engine.
  • Removing a server RPM package did not shut down the existing server if it was running.
  • Overhead for setting PROCESSLIST_STATE values in the Performance Schema THREADS table has been reduced.
  • The Windows authentication plugin failed to free a context buffer for each connection.
  • The DBUG_PRINT() macro unnecessarily evaluated arguments when debugging was not enabled.
  • When index condition pushdown was used on a descending range scan and the first range interval did not contain any qualifying records, the result of the range scan could be empty even if other range intervals contained qualifying records.
  • The server could attempt a filesort operation for a zero-size sort length, causing it to exit.
  • my_load_defaults() was modified to accommodate some problems under compilation with gcc 4.7.2 that could cause a client crash during option processing.
  • Opening a cursor on a SELECT within a stored procedure could cause a segmentation fault.
  • SET PASSWORD treated user@'%' and user@'' as referring to the same mysql.user table row.
  • Geometry methods that worked with WKB data performed insufficient input data validation, which could cause Valgrind errors or a server exit.
  • Some INFORMATION_SCHEMA queries that used ORDER BY did not use a filesort optimization as they did in MySQL 5.5. (Bug #16423536)
  • Performance Schema parameter autosizing at startup did not take into account later autosizing changes to other startup parameters on which the Performance Schema parameters depended.
  • The WKB reader for spatial operations could fail and cause a server exit.
  • Optimizer heuristics inappropriately preferred range access over ref access in cases when the ref access referred to a column of a table earlier in the join seqence.
  • Manually-created accounts (using INSERT) with a malformed password effectively had no password.
  • Several scripts in the sql-bench directory that were supposed to be executable did not have the executable access bit set.
  • For debug builds, DBUG_EXPLAIN resulted in a buffer overflow when the debug system variable value was more than 255 characters.
  • Within an XA transaction in ACTIVE state, statements causing an implicit commit could result in metadata locks being released too early.
  • Installing Debian packages on Ubuntu 12.10 succeeded using dpkg, but not with Software Center 5.4.1.4.
  • For debug builds, with an XA transaction in IDLE or PREPARED status, execution of a query with the query cache enabled could cause a server exit.
  • thread_pool_high_priority_connection could not be set at server startup.
  • Re-execution of a stored procedure could cause a server exit in Item_field::fix_outer_field.
  • A GROUP_CONCAT() invocation containing subquery having an outer reference caused the server to exit.
  • With secure_auth enabled, a user with a password that used the pre-4.1 (old) hashing could not update it to use the 4.1 (new) hashing.
  • For debug builds, GROUP_CONCAT(... ORDER BY) within an ORDER BY clause could cause a server exit.
  • The validate_password plugin did not always enforce appropriate constraints against assigning empty passwords.
  • For debug builds, the server could exit for queries involving a nested subquery, a subquery tranformed into a semi-join and using a view.
  • The range optimizer could set up incorrect ranges for queries that used XOR operations.
  • mysql_secure_installation could not connect to the server if the account used had an expired password. It invoked mysql noninteractively, resulting in that program failing to connect. Now mysql supports a --connect-expired-password option that indicates to the server that it can handle sandbox mode for expired-password accounts even if invoked noninteractively, and mysql_secure_installation invokes mysql with this option.
  • If loose index scan was used on a query that used MIN(), a segmentation fault could occur.
  • If multiple statements were sent in a single request, the audit log plugin logged only the last one. Now it logs each statement separately.
  • For debug builds, an assertion was incorrectly raised for queries executed using eq_ref access and filesort.
  • An outer join between a regular table and a derived table that is implicitly groups could cause a server exit.
  • A prepared statement that used GROUP_CONCAT() and an ORDER BY clause that named multiple columns could cause the server to exit.
  • Creating a FEDERATED table without specifying a connection string caused a server exit. ORDER BY MATCH ... AGAINST could cause a server exit.
  • Client programs from MySQL 5.6.4 and up could confuse older servers during the connection process by using newer protocol features not understood by older servers.
  • When a partition is missing, code in ha_innodb.cc would retry 10 times and sleep for a microsecond each time while holding LOCK_open. The retry logic for partitioned tables was introduced as a fix for Bug#33349 but did not include a test case to validate it. This fix removes the retry logic for partitioned tables. If the problem reported in Bug#33349 reappears, a different solution will be explored.
  • The mysql.server script exited with an error if the status command was executed with multiple servers running.
  • Use of the VALUES() function in the VALUES() clause of an INSERT statement could result in Valgrind warnings or an unstable server, possibly leading to a server exit.
  • In some cases, REVOKE could fail to revoke the GRANT OPTION privilege.
  • The mysql client allocated but did not free a string after reading each line in interactive mode, resulting in a memory leak.
  • Killing a connection while it was in the process of disconnecting could lead to an assertion being raised, Valgrind warnings, and general unstability.
  • INSERT ... ON DUPLICATE KEY UPDATE on a view could cause a server exit. (Bug #14261010)
  • Grouping by an outer BLOB column in a subquery caused a server exit.
  • The server could exit due to improper handling of the error from an invalid comparison.
  • The CMake check for unsigned time_t failed on all platforms.
  • mysqladmin debug causes the server to write debug information to the error log. On systems that supported mallinfo(), the memory-status part of this output was incorrect in 64-bit environments when mysqld consumed more than 4GB memory.
  • Now the server uses malloc_info() to obtain memory-status information. malloc_info() does not report the memory that the glibc malloc() implementation internally allocates using mmap(). However, it does provide the memory usage information in all the memory arenas.
  • This bug fix also involves a change of output format. The server now writes memory information in XML format rather than as plain text.
  • The mysql client incorrectly used latin1 for certain comparisons even if started with a multibyte default character set, resulting in a client crash.
  • The url columns in the mysql datatbase help tables were too short to hold some of the URLs in the help content. These columns are now created as type TEXT to accommodate longer URLs.
  • mysqld --help and mysqld --verbose --help performed unnecessary logging.
  • InnoDB does not support full-text parser plugins, but failed to report an error if they were specified. Now an ER_INNODB_NO_FT_USES_PARSER error is returned.
  • If Loose Index Scan was used to evaluate a query that compared an integer column to an integer specified as a quoted string (for example, col_name = '1'), the query could return incorrect results.
  • IF() function evaluations could produce different results when executed in a prepared versus nonprepared statement.
  • If a function such as AES_DECRYPT() that requires SSL support failed, the error could affect later calls to functions that require SSL support.
  • In a MySQL server newer than MySQL 5.5 using a nonupgraded mysql.user table (for which mysql_upgrade had not been run), statements to set passwords caused a server exit due to a faulty check for the password_expired column.
  • It is now possible to suppress installation of the mysql-test directory after compiling MySQL from source by invoking CMake with the INSTALL_MYSQLTESTDIR option explicitly set to empty:
  • cmake . -DINSTALL_MYSQLTESTDIR=. Previously, attempts to do this resulted in an error.
  • When only counting events but not timing them, Performance Schema would report MIN_TIMER_WAIT values as a large number instead of 0.
  • Using range access with an index prefix could produce incorrect results.
  • For debug builds, metadata locking for CREATE TABLE ... SELECT could raise an assertion.
  • A new CMake option, WITH_EDITLINE, is provided to indicate whether to use the bundled or system libedit/editline library. The permitted values are bundled (the default) and system.
  • WITH_EDITLINE replaces WITH_LIBEDIT, which has been removed.
  • When specified in an option file, the plugin-dir client option was ignored.
  • Indexes on derived tables that were used during the first invocation of a stored procedure were not used in subsequent invocations.
  • For DELETE and UPDATE statements, EXPLAIN displayed NULL in the ref column for some cases where const is more appropriate.
  • The optimizer could choose a poor execution plan for queries with ORDER BY ... LIMIT.
  • FOUND_ROWS() could return an incorrect value if the preceding query used filesort.

New in MySQL 5.6.11 (Apr 19, 2013)

  • Functionality Added or Changed:
  • Replication: The functions GTID_SUBTRACT() and GTID_SUBSET() were formerly available in libmysqld only when it was built with replication support. Now these functions are always available when using this library, regardless of how it was built.
  • MySQL no longer uses the default OpenSSL compression. (Bug #16235681)
  • There is now a distinct error code (ER_MUST_CHANGE_PASSWORD_LOGIN) for the error sent by the server to a client authenticating with an expired password. (Bug #16102943)
  • mysql_config_editor now supports --port and --socket options for specifying TCP/IP port number and Unix socket file name. (Bug #15851247)
  • mysqlcheck has a new --skip-database option. The option value is the name of a database (case sensitive) for which checks should be skipped.
  • mysql_upgrade uses this option to upgrade the system tables in the mysql database before tables in other databases: It upgrade the mysql database, then all databases except the mysql database. This avoids problems that can occur if user tables are upgraded before the system tables. (Bug #14697538)
  • The only supported value for the innodb_mirrored_log_groups system variable is 1, so this variable is now deprecated. Setting it to 1 at startup results in a warning. Setting it to a value other than 1 at startup results in an error and the server exits. This variable will be removed in a future release.
  • Bugs Fixed:
  • Performance; InnoDB: Switching the MySQL table used by the InnoDB memcached interface (using the @@ notation), was made more efficient, by reading cached information about the cache policy to use for each table. This optimization lets you frequently switch between tables during a session that uses the memcached interface, without incurring I/O overhead from examining table metadata each time. (Bug #16206654)
  • Performance; InnoDB: Performance was improved for operations on tables with many rows that were deleted but not yet purged. The speedup applies mainly to workloads that perform bulk deletes, or updates to the primary key columns, and where the system is busy enough to experience purge lag. (Bug #16138582, Bug #68069)
  • Performance; InnoDB: The DROP TABLE statement for a table using compression could be slower than necessary, causing a stall for several seconds. MySQL was unnecessarily decompressing pages in the buffer pool related to the table as part of the DROP operation. (Bug #16067973)
  • Performance; InnoDB: The I/O routines used when the AIO subsystem were made more efficient, to merge consecutive I/O requests into a single operation. This fix solves a performance issue introduced during the 5.6 development cycle. (Bug #16043841, Bug #67973)
  • Incompatible Change; Partitioning: Changes in the KEY partitioning hashing functions used with numeric, date and time, ENUM, and SET columns in MySQL 5.5 makes tables using partitioning or subpartitioning by KEY on any of the affected column types and created on a MySQL 5.5 or later server incompatible with a MySQL 5.1 server. This is because the partition IDs as calculated by a MySQL 5.5 or later server almost certainly differ from those calculated by a MySQL 5.1 server for the same table definition and data as a result of the changes in these functions.
  • The principal changes in the KEY partitioning implementation in MySQL 5.5 resulting in this issue were as follows: 1. The hash function used for numeric and date and time columns changed from binary to character-based. 2. The base used for hashing of ENUM and SET columns changed from latin1 ci characters to binary.
  • The fix involves adding the capability in MySQL 5.5 and later to choose which type of hashing to use for KEY partitioning, which is implemented with a new ALGORITHM extension to the PARTITION BY KEY option for CREATE TABLE and ALTER TABLE. Specifying PARTITION BY KEY ALGORITHM=1 ([columns]) causes the server to use the hashing functions as implemented in MySQL 5.1; using ALGORITHM=2 causes the server to use the hashing functions from MySQL 5.5 and later. ALGORITHM=2 is the default. Using the appropriate value for ALGORITHM, you can perform any of the following tasks:
  • Create KEY partitioned tables in MySQL 5.5 and later that are compatible with MySQL 5.1, using CREATE TABLE ... PARTITION BY KEY ALGORITHM=1 (...).
  • Downgrade KEY partitioned tables that were created in MySQL 5.5 or later to become compatible with MySQL 5.1, using ALTER TABLE ... PARTITION BY KEY ALGORITHM=1 (...).
  • Upgrade KEY partitioned tables originally created in MySQL 5.1 to use hashing as in MySQL 5.5 and later, using ALTER TABLE ... PARTITION BY KEY ALGORITHM=2 (...).
  • Important: After such tables are upgraded, they cannot be used any longer with MySQL 5.1 unless they are first downgraded again using ALTER TABLE ... PARTITION BY KEY ALGORITHM=1 (...) on a MySQL server supporting this option.
  • This syntax is not backward compatible, and causes errors in older versions of the MySQL server. When generating CREATE TABLE ... PARTITION BY KEY statements, mysqldump brackets any occurrence of ALGORITHM=1 or ALGORITHM=2 in conditional comments such that it is ignored by a MySQL server whose version is not at least 5.5.31. An additional consideration for upgrades is that MySQL 5.6 servers prior to MySQL 5.6.11 do not ignore the ALGORITHM option in such statements when generated by a MySQL 5.5 server, due to the that the conditional comments refer to version 5.5.31; in this case, you must edit the dump manually and remove or comment out the option wherever it occurs before attempting to load it into a MySQL 5.6.10 or earlier MySQL 5.6 server. This is not an issue for dumps generated by MySQL 5.6.11 or later version of mysqldump, where the version used in such comments is 5.6.11. For more information, see ALTER TABLE Partition Operations.
  • As part of this fix, a spurious assertion by InnoDB that a deleted row had previously been read, causing the server to assert on delete of a row that the row was in the wrong partition, was also removed. (Bug #14521864, Bug #66462, Bug #16093958, Bug #16274455)
  • Important Change; Replication: Executing a statement that performs an implicit commit but whose changes are not logged when gtid_next is set to any value other than AUTOMATIC is not permitted. Now in such cases, the statement fails with an error. This includes the statements in the following list:
  • CHANGE MASTER TO
  • START SLAVE
  • STOP SLAVE
  • REPAIR TABLE
  • OPTIMIZE TABLE
  • ANALYZE TABLE
  • CHECK TABLE
  • CREATE SERVER
  • ALTER SERVER
  • DROP SERVER
  • CACHE INDEX
  • LOAD INDEX INTO CACHE
  • FLUSH
  • RESET
  • Important Change; Replication: The version number reported by mysqlbinlog --version has been increased to 3.4. (Bug #15894381, Bug #67643)
  • Important Note; Replication: It was possible to replicate from a table to a same-named view using statement-based logging, while using row-based logging instead led to a failure on the slave. Now the target object type is checked prior to performing any DML, and an error is given if the target on the slave is not actually a table. This is true regardless of the binary logging format in use. (Bug #11752707, Bug #43975)
  • InnoDB: When ADD PRIMARY KEY columns are reordered in an ALTER TABLE statement (for example: ALTER TABLE t1 ADD PRIMARY KEY(a,b), CHANGE a a INT AFTER b), the log apply for UPDATE operations would fail to find rows. (Bug #16586355)
  • InnoDB: ALTER TABLE operations on InnoDB tables that added a PRIMARY KEY using a column prefix could produce an incorrect result. (Bug #16544336)
  • InnoDB: For ALTER TABLE operations on InnoDB tables that required a table-copying operation, other transactions on the table might fail during the copy. However, if such a transaction issued a partial rollback, the rollback was treated as a full rollback. (Bug #16544143)
  • InnoDB: When parsing a delimited search string such as “abc-def” in a full-text search, InnoDB now uses the same word delimiters as MyISAM. (Bug #16419661)
  • InnoDB: This fix improves code readability by addressing naming inconsistencies for InnoDB PERFORMANCE_SCHEMA key declarations. (Bug #16414044)
  • InnoDB: This fix disables a condition for extra splitting of clustered index leaf pages, on compressed tables. Extra page splitting was only done to reserve space for future updates, so that future page splits could be avoided. (Bug #16401801)
  • InnoDB: For InnoDB tables, if a PRIMARY KEY on a VARCHAR column (or prefix) was empty, index page compression could fail. (Bug #16400920)
  • InnoDB: Status values in the INNODB_FT_CONFIG table would not update. The INNODB_FT_CONFIG is intended for internal configuration and should not be used for statistical information purposes. To avoid confusion, column values that are intended for internal use have been removed from the INNODB_FT_CONFIG table. This fix also removes the INNODB_FT_INSERTED table and other internal full text search-related tables that were unintentionally exposed. (Bug #16409494)
  • InnoDB: With innodb_api_enable_mdl=OFF, an ALTER TABLE operation on an InnoDB table that required a table copy could cause a server exit. (Bug #16287411)
  • InnoDB: Improper testing of compatibility between the referencing and referenced during ALTER TABLE ... ADD FOREIGN key could cause a server exit. (Bug #16330036)
  • InnoDB: Rollback did not include changes made to temporary tables by read-only transactions. (Bug #16310467)
  • InnoDB: The InnoDB page-splitting algorithm could recurse excessivly. (Bug #16345265)
  • InnoDB: For debug builds, InnoDB status exporting was subject to a race condition that could cause a server exit. (Bug #16292043)
  • InnoDB: When using ALTER TABLE to set an AUTO_INCREMENT column value to a user-specified value, InnoDB would set the AUTO_INCREMENT value to the user-specified value even when the AUTO_INCREMENT value is greater than the user-specified value. This fix ensures that the AUTO_INCREMENT value is set to the maximum of the user-specified value and MAX(auto_increment_column)+1, which is the expected behaviour. (Bug #16310273)
  • InnoDB: Importing a tablespace with the configuration file present would not import the data file. This problem would occur when all pages are not flushed from the buffer pool after a table is altered using the copy and rename approach. This fix ensures that all pages are flushed from the buffer pool when a table is altered using the copy and rename approach. (Bug #16318052)
  • InnoDB: RENAME TABLE would result in a hang due to a MySQL mutex acquisition deadlock. (Bug #16305265)
  • InnoDB: Internal read operations could be misclassified as synchronous when they were actually asynchronous. When the I/O requests returned sooner than expected, threads could be scheduled inefficiently. This issue mainly affected read-ahead requests, and thus had relatively little impact on I/O performed by user queries. (Bug #16249505, Bug #68197)
  • InnoDB: The lock_validate function, which is only present in debug builds, acquired and released mutexes to avoid hogging them. This behavior introduced a window wherein changes to the hash table could occur while code traversed the same set of data. This fix updates lock_validate logic to collect all records for which locks must be validated, releases mutexes, and runs a loop to validate record locks. (Bug #16235056)
  • InnoDB: ALTER TABLE functions would perform a check to see if InnoDB is in read-only mode (srv_read_only_mode=true). If InnoDB was in read-only mode, the check would return a successful status and do nothing else. This fix replaces srv_read_only_mode check conditions with debug assertions. (Bug #16227539)
  • InnoDB: An improper call to abort() by InnoDB could result in a server exit. (Bug #16263506)
  • InnoDB: When the InnoDB buffer pool is almost filled with 4KB compressed pages, inserting into 16KB compact tables would cause 8KB pages_free to increase, which could potentially slow or stall inserts. (Bug #16223169)
  • InnoDB: An assertion failure would occur in heap->magic_n == MEM_BLOCK_MAGIC_N due to a race condition that appeared when row_merge_read_clustered_index() returned an error. (Bug #16275237)
  • InnoDB: This fix removes an unnecessary debug assertion related to page_hash locks which only affects debug builds. The debug assertion is no longer valid and should have been removed when hash_lock array was introduced in MySQL 5.6. (Bug #16263167)
  • InnoDB: The InnoDB memcached plugin could encounter a serious error under a heavy load, such as produced by benchmark runs. (Bug #16182660, Bug #68096)
  • InnoDB: If the MySQL server halted at a precise moment when a purge operation was being applied from the change buffer, the operation could be incorrectly performed again during the next restart. A workaround was to set the configuration option innodb_change_buffering=changes, to turn off change buffering for purge operations. (Bug #16183892, Bug #14636528)
  • InnoDB: When InnoDB locking code was revised, a call to register lock waits was inadvertently removed. This fix adds the call back to the InnoDB locking code. (Bug #16208201)
  • InnoDB: A direct call to the trx_start_if_not_started_xa_low() function would cause a debug assertion. (Bug #16178995)
  • InnoDB: In the case of LOCK WAIT for an insert in a foreign key table, InnoDB could report a false dictionary-changed error and cause the insert to fail rather than being retried. (Bug #16174255)
  • InnoDB: In some cases, deadlock detection did not work, resulting in sessions hanging waiting for a lock-wait timeout. (Bug #16169638)
  • InnoDB: An in-place ALTER TABLE on an InnoDB table could fail to delete the statistics for the old primary key from the mysql.innodb_index_stats table. (Bug #16170451)
  • InnoDB: This fix updates InnoDB code in ha_innodb.cc and handler0alter.cc to use TABLE::key_info instead of both TABLE::key_info and TABLE_SHARE::key_info. (Bug #16215361)
  • InnoDB: Arithmetic underflow during page compression for CREATE TABLE on an InnoDB table could cause a server exit. (Bug #16089381)
  • InnoDB: For debug builds, online ALTER TABLE operations for InnoDB tables could cause a server exit during table rebuilding. (Bug #16063835)
  • InnoDB: In some cases, the InnoDB purge coordinator did not use all available purge threads, resulting in suboptimal purge activity. (Bug #16037372)
  • InnoDB: On systems that cannot handle unaligned memory access, depending on the stack frame alignment, a SIGBUS error could occur during startup. This issue was observed on Solaris 64-bit systems. (Bug #16021177)
  • InnoDB: ALTER TABLE for InnoDB tables was not fully atomic. (Bug #15989081)
  • InnoDB: When innodb_mirrored_log_groups was set to a value other than the default 1, the MySQL server encountered a serious error during startup while loading the InnoDB memcached plugin. In earlier releases, the server would refuse to start (but not display an error) when this setting was changed. This fix cleans up the error handling for unsupported values of this configuration option. (Bug #15907954, Bug #67670)
  • InnoDB: An error at the filesystem level, such as too many open files, could cause an unhandled error during an ALTER TABLE operation. The error could be accompanied by Valgrind warnings, and by this assertion message:
  • Assertion `! is_set()' failed.
  • mysqld got signal 6 ;
  • InnoDB: The INNODB_SYNC_ARRAY_SIZE variable was incorrectly allowed to be configured at runtime. As documented, INNODB_SYNC_ARRAY_SIZE must be configured when the MySQL instance is starting up, and cannot be changed afterward. This fix changes INNODB_SYNC_ARRAY_SIZE to a non-dynamic variable, as intended. (Bug #14629979)
  • InnoDB: The server could exit during an attempt by InnoDB to reorganize or compress a compressed secondary index page. (Bug #14606334)
  • InnoDB: A RENAME TABLE statement could stall for several minutes before timing out. This issue could occurred for a table using compression, with change buffering enabled. (Bug #14556349)
  • InnoDB: A DML operation performed while a RENAME TABLE operation waits for pending I/O operations on the tablespace to complete would result in a deadlock. (Bug #14556349)
  • InnoDB: If the server was started with the skip-innodb option, or InnoDB otherwise failed to start, query any of these Information Schema tables would cause a severe error:
  • INNODB_BUFFER_PAGE
  • INNODB_BUFFER_PAGE_LRU
  • INNODB_BUFFER_POOL_STATS
  • InnoDB: Online DDL had a restriction that prevented renaming a column and adding a foreign key involving that column in a single ALTER TABLE statement. Now, this combination of operations is allowed in a single statement. (Bug #14105491)
  • InnoDB: When printing out long semaphore wait diagnostics, sync_array_cell_print() ran into a segmentation violation (SEGV) caused by a race condition. This fix addresses the race condition by allowing the cell to be freed while it is being printed. (Bug #13997024)
  • InnoDB: The value of the innodb_version variable was not updated consistently for all server releases for the InnoDB Plugin in MySQL 5.1, and the integrated InnoDB component in MySQL 5.5, 5.6, and higher. Since InnoDB and MySQL Server development cycles are fully integrated and synchronized, now the value returned by the innodb_version variable is the same as for the version variable. (Bug #13463493, Bug #63435)
  • InnoDB: Killing a query caused an InnoDB assertion failure when the same table (cursor) instance was used again. This is the result of a regression error introduced by the fix for Bug#14704286. The fix introduced a check to handle kill signals for long running queries but the cursor was not restored to the proper state. (Bug #68051, Bug #16088883)
  • InnoDB: On startup, InnoDB reported a message on 64-bit Linux and 64-bit Windows systems stating that the CPU does not support crc32 instructions. On Windows, InnoDB does not use crc32 instructions even if supported by the CPU. This fix revises the wording of the message and implements a check for availability of crc32 instructions. (Bug #68035, Bug #16075806)
  • InnoDB: The length of internally generated foreign key names was not checked. If internally generated foreign key names were over the 64 character limit, this resulted in invalid DDL from SHOW CREATE TABLE. This fix checks the length of internally generated foreign key names and reports an error message if the limit is exceeded. (Bug #44541, Bug #11753153)
  • InnoDB: This fix removes left-over prototype code for srv_parse_log_group_home_dirs, and related header comments. (Bug #68133, Bug #16198764)
  • InnoDB: Attempting to replace the default InnoDB FTS stopword list by creating an InnoDB table with the same structure as INFORMATION_SCHEMA.innodb_ft_default_stopword would result in an error. SHOW CREATE TABLE revealed that the new InnoDB table was created with CHARSET=utf8. The InnoDB FTS stopword table validity check only supported latin1. This fix extends the validity check for all supported character sets. (Bug #68450, Bug #16373868)
  • Partitioning: ALGORITHM = INPLACE, which was disallowed in MySQL 5.6.10 for DDL statements operating on partitioned tables, can once again be used with such statements. (Bug #16216513)
  • Partitioning: A query on a table partitioned by range and using TO_DAYS() as a partitioing function always included the first partition of the table when pruning. This happened regardless of the range employed in the BETWEEN clause of such a query. (Bug #15843818, Bug #49754)
  • Partitioning: Execution of ALTER TABLE ... DROP PARTITION against a view caused the server to crash, rather than fail with an error as expected. (Bug #14653504)
  • Partitioning: A query result was not sorted if both DISTINCT and ORDER BY were used and the underlying table was partitioned. (Bug #14058167)
  • Partitioning: Inserting any number of rows into an ARCHIVE table that used more than 1000 partitions and then attempting to drop the table caused the MySQL Server to fail. (Bug #13819630, Bug #64580)
  • Replication: When using GTIDs and binary log auto-positioning, the master had to scan all binary logs whenever the slave reconnected (due to reasons such as I/O thread failure or a change of master) before it could send any events to slave. Now, the master starts from the oldest binary log that contains any GTID not found on the slave. (Bug #16340322, Bug #68386)
  • Replication: When the server version of the master was greater than or equal to 10, replication to a slave having a lower server version failed. (Bug #16237051, Bug #68187)
  • Replication: When replicating to a MySQL 5.6 master to an older slave, Error 1193 (ER_UNKNOWN_SYSTEM_VARIABLE) was logged with a message such as Unknown system variable 'SERVER_UUID' on master, maybe it is a *VERY OLD MASTER*. This message has been improved to include more information, similar to this one: Unknown system variable 'SERVER_UUID' on master. A probable cause is that the variable is not supported on the master (version: 5.5.31), even though it is on the slave (version: 5.6.11). (Bug #16216404, Bug #68164)
  • Replication: A zero-length name for a user variable (such as @``) was incorrectly considered to be a sign of data or network corruption when reading from the binary log. (Bug #16200555, Bug #68135)
  • Replication: When MTS is on and transactions are being applied, the slave coordinator would hang when encountering a checksum error on a transaction event. This was due to a deadlock situation in which the coordinator assumed a normal stop while a worker waited for the coordinator to dispatch more events. For debug builds, the problem appeared as an assertion failure, which was due to the coordinator not setting thd->is_error() when encountering an error. (Bug #16210351)
  • Replication: mysqlbinlog can connect to a remote server and read its binary logs. In MySQL 5.6 and later, this tool can also wait for the server to generate and send additional events, in practice behaving like a slave connecting to a master. In cases where the server sent a heartbeat, mysqlbinlog was unable to handle it properly. As a consequence, mysqlbinlog failed at this point, without reading any more events from the server. To fix this problem, mysqlbinlog now ignores any binary log events of type HEARTBEAT_LOG_EVENT that it receives. (Bug #16104206)
  • Replication: STOP SLAVE could cause a deadlock when issued concurrently with a statement such as SHOW STATUS that retrieved the values for one or more of the status variables Slave_retried_transactions, Slave_heartbeat_period, Slave_received_heartbeats, Slave_last_heartbeat, or Slave_running. (Bug #16088188, Bug #67545)
  • Replication: Using the --replicate-* options (see Replication Slave Options and Variables) could in some cases lead to a memory leak on the slave. (Bug #16056813, Bug #67983)
  • Replication: Backtick (`) characters were not always handled correctly in internally generated SQL statements, which could sometimes lead to errors on the slave. (Bug #16084594, Bug #68045)
  • References: This bug is a regression of Bug #14548159, Bug #66550.
  • Replication: The session-level value for gtid_next was incorrectly reset on the slave for all rollbacks, which meant that GTIDs could be lost for multi-statement transactions, causing the slave to stop with an ER_GTID_NEXT_TYPE_UNDEFINED_GROUP error. Now this is done only when a complete transaction is being rolled back, or when autocommit is enabled. (Bug #16084206)
  • Replication: In order to provision or to restore a server using GTIDs, it is possible to set gtid_purged to a given GTID set listing the transactions that were imported. This operation requires that the global gtid_executed and gtid_purged server system variables are empty. (This is done in order to avoid the possibility of overriding server-generated GTIDs.)
  • The error message GTID_PURGED can only be set when GTID_EXECUTED is empty that was raised when this requirement was not met could be confusing or misleading because it did not specify the scope of the affected variables. To prevent this from happening, error messages that refer to variables relating to GTIDs now specify the scope of any such variables when they do so. (Bug #16084426, Bug #68038)
  • Replication: In certain cases, the dump thread could send a heartbeat out of synchronisation with format description events. One of the effects of this issue what that, after provisioning a new server from a backup data directory and setting --gtid-mode=ON and enabling autopositioning (see CHANGE MASTER TO Syntax), replication failed to start, with the error Read invalid event from master.... The same problem could also cause GTID-based replication to fail due to skipped events following a unplanned shutdown of the master. (Bug #16051857)
  • Replication: In some cases, when the slave could not recognize the server version of the master, this could cause the slave to fail. (Bug #16056365)
  • Replication: Table IDs used in replication were defined as type ulong on the master and uint on the slave. In addition, the maximum value for table IDs in binary log events is 6 bytes (281474976710655). This combination of factors led to the following issues:
  • Data could be lost on the slave when a table was assigned an ID greater than uint.
  • Table IDs greater than 281474976710655 were written to the binary log as 281474976710655.
  • This led to a stopped slave when the slave encountered two tables having the same table ID.
  • To fix these problems, IDs are now defined by both master and slave as type ulonglong but constrained to a range of 0 to 281474976710655, restarting from 0 when it exceeds this value. (Bug #14801955, Bug #67352)
  • Replication: Internal objects used for relay log information were only partially deleted before freeing their memory. (Bug #14677824)
  • Replication: It was possible in certain cases—immediately after detecting an EOF in the dump thread read event loop, and before deciding whether to change to a new binary log file—for new events to be written to the binary log before this decision was made. If log rotation occurred at this time, any events that occurred following EOF detection were dropped, resulting in loss of data. Now in such cases, steps are taken to make sure that all events are processed before allowing the log rotation to take place. (Bug #13545447, Bug #67929)
  • Replication: If the disk becomes full while writing to the binary log, the server hangs until space is freed up manually. It was possible after this was done for the MySQL server to fail, due to an internal status value being set when not needed. Now in such cases, rather than trying to set this status, a warning is written in the error log instead. (Bug #11753923, Bug #45449)
  • Microsoft Windows: In Shared Memory mode, the MySQL Server could crash when receiving requests from multiple threads. (Bug #13934876)
  • Failure to handle a full-text search wildcard properly could cause the server to exit. (Bug #16446108)
  • InnoDB now reports row and table locks to the thread pool plugin. Deadlocks within a thread group could occur otherwise. (Bug #16448639)
  • SHOW ENGINE PERFORMANCE_SCHEMA STATUS could report incorrect memory-allocation values when the correct values exceeded 4GB. (Bug #16414644)
  • Performance Schema statement tokenization overhead was reduced. (Bug #16382260)
  • A long database name in a GRANT statement could cause the server to exit. (Bug #16372927)
  • The server could exit if a prepared statement attempted to create a table using the name of an existing view while an SQL handler was opened. (Bug #16385711)
  • For debug builds, checking of password constraints could raise an assertion for statements that updated passwords. (Bug #16289303)
  • The BUILD-CMAKE file in MySQL distributions was updated with the correct URL for CMake information. (Bug #16328024)
  • A Valgrind failure could occur if a CREATE USER statement was logged to the general query log and the old_passwords system variable was set to 2. (Bug #16300620)
  • The optimizer's attempt to remove redundant subquery clauses raised an assertion when executing a prepared statement with a subquery in the ON clause of a join in a subquery. (Bug #16318585)
  • References: This bug is a regression of Bug #15875919.
  • Very small join_buffer_size values could cause an assertion to be raised. (Bug #16328373)
  • Some aggregate queries attempted to allocate excessive memory. (Bug #16343992)
  • Incorrect results were returned if a query contained a subquery in an IN clause which contained an XOR operation in the WHERE clause. (Bug #16311231)
  • For debug builds, an assertion could be raised if a statement failed with autocommit enabled just before an XA START statement was issued. (Bug #16341673)
  • Conversion of numeric values to BIT could yield unexpected results. (Bug #16271540)
  • Certain legal HAVING clauses were rejected as invalid. (Bug #16221433)
  • Fixed warnings when compiling with XCode 4.6. Fixed warnings when compiling when the _XOPEN_SOURCE or isoctal macro was already defined in the environment. (Bug #16265300, Bug #60911, Bug #12407384)
  • Queries using range predicates that were evaluated using the LooseScan semi-join strategy could return duplicate rows. (Bug #16221623)
  • References: This bug is a regression of Bug #14728469.
  • For upgrade operations, RPM packages produced unnecessary errors about being unable to access .err files. (Bug #16235828)
  • In the range optimizer, an index merge failure could cause a server exit. (Bug #16241773)
  • A full-text query using Boolean mode could return zero results in some cases where the search term was a quoted phrase:
  • If the quoted phrase was preceded by a + sign. For example, this combination of a Boolean + operator and a phrase would return zero results:
  • where match(content) against('+"required term due to plus sign"' in boolean mode)
  • If the quoted phrase contained any stopwords. For example, the stopword "the" inside the phrase caused the query to return zero results:
  • where match(content) against('"stopword inside the phrase"' in boolean mode)
  • For debug builds, the server could exit due to incorrect calculation of applicable indexes for a join that involved const tables. (Bug #16165832)
  • A bug in range optimization sometimes led to incorrect condition calculation for index merge union. This could lead to missing rows. (Bug #16164031, Bug #68194, Bug #16229746)
  • The Performance Schema could return incorrect values for the PROCESSLIST_INFO column of the threads table. (Bug #16215165)
  • Invocation of the range optimizer for a NULL select caused the server to exit. (Bug #16192219)
  • mysql_config --libs displayed incorrect output. (Bug #16200717)
  • For a CREATE TABLE (... col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP ...) ... SELECT statement for which the SELECT did not provide a value for the TIMESTAMP column, that column was set to '0000-00-00 00:00:00', not the current timestamp. (Bug #16163936)
  • yaSSL did not perform proper padding checks, but instead examined only the last byte of plaintext and used it to determine how many bytes to remove. (Bug #16218104)
  • Using GROUP BY WITH ROLLUP in a prepared statement could cause the server to exit. (Bug #16163596)
  • If, in a SELECT, the HAVING clause contained a function call which itself contained an alias to a selected expression, the server could sometimes exit. (Bug #16165981)
  • Setting the slave_rows_search_algorithms system variable to an inappropriate value could cause the server to exit. (Bug #16074161)
  • Directory name manipulation could result in stack overflow on Mac OS X and Windows. (Bug #16066243)
  • With statement-based binary logging, dropping a TEMPORARY InnoDB table could cause a segmentation fault. (Bug #16076275)
  • For debug builds, if the server was started with binary logging disabled, executing SHOW RELAYLOG EVENTS from within a stored procedure raised an assertion. (Bug #16043173)
  • The query parser leaked memory for some syntax errors. (Bug #16040022)
  • With the thread pool plugin enabled, large numbers of connections could lead to a Valgrind panic or failure of clients to be able to connect. (Bug #16088658, Bug #16196591)
  • The server executed EXPLAIN FORMAT=JSON for some malformed queries improperly. (Bug #16078557)
  • Performance Schema instrumentation was missing for slave worker threads. (Bug #16083949)
  • The initial test database contained a dummy.bak file that prevented DROP DATABASE from working. This file is no longer included. Also, a db.opt file is now included that contains these lines:
  • default-character-set=latin1
  • default-collation=latin1_swedish_ci
  • Setting a system variable to DEFAULT could cause the server to exit. (Bug #16044655)
  • SET PASSWORD and GRANT ... IDENTIFIED BY have no effect on the password of a user who is authenticated using an authentication plugin that accesses passwords stored externally to the mysql.user table. But attempts to change the password of such a user produced no warning, leading to the impression that the password had been changed when it was not. Now MySQL issues an ER_SET_PASSWORD_AUTH_PLUGIN warning to indicate that the attempt was ignored. (Bug #16072004)
  • For debug builds, creating an InnoDB table in strict SQL mode that violated the maximum key length limit caused the server to exit. (Bug #16035659)
  • Issuing a PREPARE statement using certain combinations of stored functions and user variables caused the server to exit. (Bug #16056537)
  • Joins of exactly 32 tables and containing a HAVING clause returned an empty result. (Bug #15972635)
  • A mysys library string-formatting routine could mishandle width specifiers. (Bug #15960005)
  • The --character-set-server option could set connection character set system variables to values such as ucs2 that are not permitted. (Bug #15985752)
  • During shutdown, the server could attempt to lock an uninitialized mutex. (Bug #16016493)
  • The --default-authentication-plugin option permitted invalid plugin values, and did not always set the old_passwords system variable to a value appropriate for the named plugin. (Bug #16014394)
  • Under some circumstances, mysql --secure-auth permitted passwords to be sent to the server using the old (pre-4.1) hashing format. (Bug #15977433)
  • With index condition pushdown enabled, queries for which the pushed-down condition contained no columns in the used index could be slow. (Bug #15896009)
  • Table creation operations added entries to the Performance Schema file_instances table, but these were not always removed for table drop operations. (Bug #15927620)
  • In special cases, the optimizer did not consider indexes that were applicable to query processing, resulting in potentially suboptimal execution and incorrect EXPLAIN output. (Bug #15849135, Bug #16094171)
  • A query with an EXISTS/IN/ALL/ANY subquery with an ORDER BY clause ordering by an outer column of type BLOB that is not in the select list caused an assertion to fire. (Bug #15875919)
  • Creating an InnoDB table with a FULLTEXT index could encounter a serious error if the table name contained nonalphanumeric characters. (Bug #14835178, Bug #16036699)
  • Enabling the query cache during high client contention could cause the server to exit. (Bug #14727815)
  • The server sometimes failed to respect MAX_CONNECTIONS_PER_HOUR limits on user connections. (Bug #14627287)
  • The optimizer could return incorrect results after transforming an IN subquery with aggregate functions to an EXISTS subquery. (Bug #14586710)
  • When a client program loses the connection to the MySQL server or if the server begins a shutdown after the client has executed mysql_stmt_prepare(), the next mysql_stmt_prepare() returns an error (as expected) but subsequent mysql_stmt_execute() calls crash the client. (Bug #14553380)
  • Previously, if multiple --login-path options were given, mysql_config_editor ignored all but the last one. Now multiple --login-path options result in an error. (Bug #14551712)
  • SET PASSWORD for anonymous users did not work correctly. (Bug #14561102)
  • SHOW COLUMNS on a view defined as a UNION of Geometry columns could cause the server to exit. (Bug #14362617)
  • The sha256_password_private_key_path and sha256_password_public_key_path system variables indicate key files for the sha256_password authentication plugin, but the server failed to properly check whether the key files were valid. Now in the event that either key file is invalid, the server logs an error and exits. (Bug #14360513)
  • SET var_name = VALUES(col_name) could cause the server to exit. This syntax is now prohibited because in SET context there is no column name and the statement returns ER_BAD_FIELD_ERROR. (Bug #14211565)
  • The COM_CHANGE_USER command in the client/server protocol did not properly use the character set number in the command packet, leading to incorrect character set conversion of other values in the packet. (Bug #14163155)
  • Invoking the FORMAT() function with a locale and a very large number could cause the server to exit. (Bug #14040155)
  • yaSSL rejected some valid server SSL certificates. (Bug #13777928)
  • Certain plugin-related conditions can make a user account unusable:
  • The account requires an authentication plugin that is not loaded.
  • The account requires the sha256_password authentication plugin but the server was started with neither SSL nor RSA enabled as required by this plugin.
  • The server now checks those conditions by default and produces warnings for unusable accounts. This checking slows down server initialization and FLUSH PRIVILEGES, so it is made optional by means of the new validate_user_plugins system variable. This variable is enabled by default, but if you do not require the additional checking, you can disable it at startup to avoid the performance decrement. (Bug #13010061, Bug #14506305)
  • Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug #12347040)
  • The obsolete linuxthreads.txt and glibc-2.2.5.patch files in the Docs directory of MySQL distributions have been removed. (Bug #11766326)
  • mysql_install_db did not escape '_' in the host name for statements written to the grant tables. (Bug #11746817)
  • mysqld_safe used the nonportable -e test construct. (Bug #67976, Bug #16046140)
  • An out-of-memory condition could occur while handling an out-of-memory error, leading to recursion in error handling. (Bug #49514, Bug #11757464)
  • The optimizer used loose index scan for some queries for which this access method is inapplicable. (Bug #42785, Bug #11751794)
  • If a dump file contained a view with one character set and collation defined on a view with a different character set and collation, attempts to restore the dump file failed with an “illegal mix of collations” error. (Bug #65382, Bug #14117025)
  • The REPLACE() function produced incorrect results when a user variable was supplied as an argument and the operation was performed on multiple rows. (Bug #49271, Bug #11757250)
  • UNION type conversion could incorrectly turn unsigned values into signed values. (Bug #49003, Bug #11757005)
  • UNION ALL on BLOB columns could produce incorrect results. (Bug #50136, Bug #11758009)
  • View access in low memory conditions could raise a debugging assertion. (Bug #39307, Bug #11749556)
  • Queries with many values in a IN() clause were slow due to inclusion of debugging code in non-debugging builds. (Bug #68046, Bug #16078212)
  • Setting max_connections to a value less than the current number of open connections caused the server to exit. (Bug #44100, Bug #11752803)
  • Some table I/O performed by the server when calling a storage engine were missing from the statistics collected by the Performance Schema. (Bug #68180, Bug #16222630)
  • For debug builds, some queries with SELECT ... FROM DUAL nested subqueries raised an assertion. (Bug #60305, Bug #11827369)
  • Nonspatial indexes only support exact-match lookups for spatial columns, but the optimizer incorrectly used range access in some cases, leading to incorrect results. (Bug #67889, Bug #15993693)
  • If mysql is built with the bundled libedit library, the library is built as static code, to avoid linking to a different dynamic version at runtime. Dynamic linking could result in use of a different, incompatible version and a segmentation fault. (Bug #68231, Bug #16296509)
  • The --log-slow-admin-statements and --log-slow-slave-statements command options now are exposed at runtime as the log_slow_admin_statements and log_slow_slave_statements system variables. Their values can be examined using SHOW VARIABLES. The variables are dynamic, so their values can can be set at runtime. (The options were actually replaced by the system variables, but as system variables can be set at server startup, no option functionality is lost.) (Bug #59860, Bug #11766693)
  • For arguments with fractional seconds greater than six decimals, SEC_TO_TIME() truncated, rather than rounding as it should have. (Bug #68061, Bug #16093024)
  • MySQL failed to build if configured with WITH_LIBWRAP enabled. (Bug #67018, Bug #16342793)
  • If the server was started without a --datadir option, SHOW VARIABLES could show an empty value for the datadir system variable. (Bug #60995, Bug #12546953)
  • Configuring with -DWITH_SSL=/path/to/openssl resulted in link errors due to selection of the incorrect libcrypto. (Bug #68277, Bug #16284051)
  • ALTER TABLE tbl_name ADD COLUMN col_name TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP inserted 0000-00-00 00:00:00 rather than the current timestamp if the alteration was done in place rather than by making a table copy. (Bug #68040, Bug #16076089)
  • If the server was started with --skip-grant-tables, ALTER USER ... PASSWORD EXPIRE caused the server to exit. (Bug #68300, Bug #16295905)
  • CMake did not check whether the system zlib had certain functions required for MySQL, resulting in build errors. Now it checks and falls back to the bundled zlib if the functions are missing. (Bug #65856, Bug #14300733)
  • mysql_install_db did not work in Solaris 10 sparse root zones. (Bug #68117, Bug #16197860)
  • For EXPLAIN DELETE and EXPLAIN UPDATE the possible_keys column listed all indexes, not just the applicable indexes. (Bug #67830, Bug #15972078)
  • The Perl version of mysql_install_db mishandled some error messages. (Bug #68118, Bug #16197542)
  • Handling of SQL_CALC_FOUND_ROWS in combination with ORDER BY and LIMIT could lead to incorrect results for FOUND_ROWS(). (Bug #68458, Bug #16383173)
  • Adding an ORDER BY clause following an IN subquery could cause duplicate rows to be returned. (Bug #68330, Bug #16308085)
  • If INET6_NTOA() or INET6_ATON() returned NULL for a row in a result set, following rows also returned NULL. (Bug #68454, Bug #16373973)
  • A statement with an aggregated, nongrouped outer query and an aggregated, nongrouped subquery in the SELECT list could return incorrect results. (Bug #68372, Bug #16325175)
  • With explicit_defaults_for_timestamp enabled, inserting NULL into a TIMESTAMP NOT NULL column now produces an error (as it already did for other NOT NULL data types), instead of inserting the current timestamp. (Bug #68472, Bug #16394472)

New in MySQL 5.5.30 (Feb 1, 2013)

  • Functionality Added or Changed:
  • InnoDB: The innodb_print_all_deadlocks configuration option from MySQL 5.6 was backported to MySQL 5.5. This option records each deadlock condition in the MySQL error log, allowing easier troubleshooting if frequent deadlocks point to application coding issues. (Bug #14515889)
  • In RPM packages built for Unbreakable Linux Network, libmysqld.so now has a version number. (Bug #15972480)
  • Bugs Fixed:
  • InnoDB; Performance: Some data structures related to undo logging could be initialized unnecessarily during a query, although they were only needed under specific conditions. (Bug #14676084)
  • InnoDB; Performance: Optimized read operations for compressed tables by skipping redundant tests. The check for whether any related changes needed to be merged from the insert buffer was being called more often than necessary. (Bug #14329288, Bug #65886)
  • InnoDB; Performance: Immediately after a table was created, queries against it would not use loose index scans. The issue went away following an ALTER TABLE on the table. The fix improves the accuracy of the index statistics gathered when the table is first created, and prevents the query plan from being changed by the ALTER TABLE statement. (Bug #14200010)
  • InnoDB; Partitioning: Previously, when attempting to optimize one or more partitions of a partitioned table that used a storage engine that does not support partition-level OPTIMIZE, such as InnoDB, MySQL reported Table does not support optimize, doing recreate + analyze instead, then re-created the entire table, but did not actually analyze it. Now in such cases, the warning message is, Table does not support optimize on partitions. All partitions will be rebuilt and analyzed. In addition, the entire table is analyzed after first being rebuilt. (Bug #11751825)
  • InnoDB: On systems that cannot handle unaligned memory access, depending on the stack frame alignment, a SIGBUS error could occur during startup. This issue was observed on Solaris 64-bit systems. (Bug #16021177)
  • InnoDB: The status variable Innodb_buffer_pool_read_ahead_evicted could show an inaccurate value, higher than expected, because some pages in the buffer pool were incorrectly considered as being brought in by read-ahead requests. (Bug #15859402, Bug #67476)
  • InnoDB: Creating an index on a CHAR column could fail for a table with a character set with varying length, such as UTF-8, if the table was created with the ROW_FORMAT=REDUNDANT clause. (Bug #15874001)
  • InnoDB: The server could halt with an assertion error while creating an index: InnoDB: Assertion failure in thread thread_num in file row0merge.cc line 465
  • InnoDB: If the server crashed at a precise moment during an ALTER TABLE operation that rebuilt the clustered index for an InnoDB table, the original table could be inaccessible afterward. An example of such an operation is ALTER TABLE ... ADD PRIMARY KEY The fix preserves the original table if the server halts during this operation. You might still need to rename the .ibd file manually to restore the original table contents: in MySQL 5.6 and higher, rename from #sql-ib$new_table_id.ibd to table_name.ibd within the database directory; prior to MySQL 5.6, the temporary file to rename is table_name#1 or #2. (Bug #14669848)
  • InnoDB: An error at the filesystem level, such as too many open files, could cause an unhandled error during an ALTER TABLE operation.
  • InnoDB: A RENAME TABLE statement could stall for several minutes before timing out. This issue could occurred for a table using compression, with change buffering enabled. (Bug #14556349)
  • InnoDB: During shutdown, with the innodb_purge_threads configuration option set greater than 1, the server could halt prematurely with this error: mysqld got signal 11
  • InnoDB: If the value of innodb_force_recovery was less than 6, opening a corrupted table might loop forever if a corrupted page was read when calculating statistics for the table. Information about the corrupted page was written repeatedly to the error log, possibly causing a disk space issue. The fix causes the server to halt after a fixed number of failed attempts to read the page. To troubleshoot such a corruption issue, set innodb_force_recovery=6 and restart. (Bug #14147491, Bug #65469)
  • InnoDB: The value of the innodb_version variable was not updated consistently for all server releases for the InnoDB Plugin in MySQL 5.1, and the integrated InnoDB component in MySQL 5.5, 5.6, and higher. Since InnoDB and MySQL Server development cycles are fully integrated and synchronized, now the value returned by the innodb_version variable is the same as for the version variable. (Bug #13463493, Bug #63435)
  • Partitioning: Concurrent ALTER TABLE ... REBUILD PARTITION operations could interfere with one another, even when not running against the same table, because they both used global memory for storage. Now each partition rebuild operation stores intermediate data in memory that is local to that process. (Bug #14589559, Bug #66645)
  • Partitioning: Inserting any number of rows into an ARCHIVE table that used more than 1000 partitions and then attempting to drop the table caused the MySQL Server to fail. (Bug #13819630, Bug #64580)
  • Replication: After dropping a column from the slave's version of a table, then altering the same column of this table on the master (so that a type conversion would have been required had the column not been droppped on the slave), inserts into this table caused replication to fail. (Bug #15888454)
  • Replication: When a binary log is replayed on a server (for example, by executing a command like mysqlbinlog binlog.000001 | mysql), it sets a pseudo-slave mode on the client connection used, so that the server can read binlog and apply binary log events correctly. However, the pseudo-slave mode was not disabled after the binary log dump was read, which caused unexpected filtering rules to be applied to SQL statements subsequently executed on the same connection. (Bug #15891524)
  • Replication: When using statement-based replication, and where the master and the slave used table schemas having different AUTO_INCREMENT columns, inserts generating AUTO_INCREMENT values logged for a given table on the master could be applied to the wrong table on the slave. (Bug #12669186)
  • Replication: Repeated execution of CHANGE MASTER TO statements using invalid MASTER_LOG_POS values could lead to errors and possibly a crash on the slave. Now in such cases, the statement fails with a clear error message. (Bug #11764602, Bug #57454)
  • Replication: If the disk becomes full while writing to the binary log, the server hangs until space is freed up manually. It was possible after this was done for the MySQL server to fail, due to an internal status value being set when not needed. Now in such cases, rather than trying to set this status, a warning is written in the error log instead. (Bug #11753923, Bug #45449)
  • Microsoft Windows: Dynamic file names (with colons) are no longer allowed. Static file names using the Alternate Data Stream (ADS) NTFS functionality of Microsoft Windows may continue to be used. (Bug #11761752)
  • Directory name manipulation could result in stack overflow on Mac OS X and Windows. (Bug #16066243)
  • Joins of exactly 32 tables and containing a HAVING clause returned an empty result. (Bug #15972635)
  • A buffer-handling problem in yaSSL was fixed. (Bug #15965288)
  • A mysys library string-formatting routine could mishandle width specifiers. (Bug #15960005)
  • In certain cases, UpdateXML() could return NULL incorrectly. (Bug #15948580)
  • References: See also Bug #13007062.
  • Metadata locking and table definition cache routines did not always check length of names passed to them. (Bug #15954872)
  • XA START had a race condition that could cause a server crash. (Bug #14729757)
  • Enabling the query cache during high client contention could cause the server to exit. (Bug #14727815)
  • There was a performance regression for queries using SELECT ... INTO user variables and a WHERE condition on one or more of the variables in the INTO list. (Bug #14664077)
  • References: This bug was introduced by Bug #12408412.
  • The server sometimes failed to respect MAX_CONNECTIONS_PER_HOUR limits on user connections. (Bug #14627287)
  • Output generated with mysqldump --routines could produce syntax errors when reloaded. (Bug #14463669)
  • With the thread pool plugin installed, a workload consisting of concurrent KILL statements and ping queries caused the server to exit. (Bug #14458232, Bug #14458002)
  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556107, Bug #13556000)
  • Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug #12347040)
  • For dumps of the mysql database, mysqldump skipped the event table unless the --events option was given. To skip this table if that is desired, use the --ignore-table option instead (Bug #55587, Bug #11762933)
  • For MEMORY tables with HASH indexes, DELETE sometimes failed to delete all applicable rows. (Bug #51763, Bug #11759445)
  • The mysql client could mishandle the delimiter command if it occurred on a line during which mysql was looking for the end of a quoted string. (Bug #64135, Bug #13639125)
  • mysqld_safe used the nonportable -e test construct. (Bug #67976, Bug #16046140)
  • Configuring the server with performance_schema_events_waits_history_size=0 and performance_schema_events_waits_history_long_size=0 could cause a Performance Schema segmentation fault. (Bug #68008, Bug #16060864)
  • DECIMAL multiplication operations could produce significant inaccuracy. (Bug #45860, Bug #11754279)
  • For subqueries executing using a filesort, the optimizer could produce an incorrect result containing wrong rows. (Bug #66845, Bug #14636211)
  • References: See also Bug #12667154.
  • UNION type conversion could incorrectly turn unsigned values into signed values. (Bug #49003, Bug #11757005)
  • During the startup process, mysqld could incorrectly remove the PID file of an already running mysqld. (Bug #23790, Bug #11746142)

New in MySQL 5.5.29 (Dec 21, 2012)

  • Functionality Added or Changed:
  • The SHOW AUTHORS and SHOW CONTRIBUTORS statements are now deprecated in MySQL 5.5 and have been removed in MySQL 5.6.
  • Bugs Fixed:
  • Performance: InnoDB: The timing values for low-level InnoDB read operations were adjusted for better performance with fast storage devices, such as SSD. This enhancement primarily affects read operations for BLOB columns in compressed tables. (Bug #13702112, Bug #64258)
  • Important Change: InnoDB: A DML statement using the index merge access method could lock many rows from the table, even when those rows were not part of the final result set. This fix reduces the excessive locking by releasing the locks of unmatched rows. This optimization affects only transactions with isolation level equal to or less strict than READ COMMITTED; it does not apply to transactions using REPEATABLE READ or SERIALIZABLE isolation level. (Bug #14226171)
  • InnoDB: An online DDL operation for an InnoDB table incorrectly reported an empty value ('') instead of the correct key value when it reported a duplicate key error for a unique index using an index prefix. (Bug #14729221)
  • InnoDB: If a CREATE TABLE statement failed due to a disk full error, some memory allocated during the operation was not freed properly. (Bug #14708715)
  • InnoDB: With the innodb_file_per_table setting enabled, a DROP TABLE operation could cause a crash, due to a race condition that depended on the timing of pending I/O requests. (Bug #14594600, Bug #66718)
  • InnoDB: If the server crashed at the specific point when a change buffer entry was being merged into a buffer pool page, the transaction log and the change buffer were left in an inconsistent state. After a restart, MySQL could crash after reading the corresponding secondary index page. The problem was more likely to occur in MySQL 5.5 or later, where the original insert buffering mechanism was generalized to cover other operations. (Bug #14636528, Bug #66819, Bug #58571, Bug #61104, Bug #65443)
  • InnoDB: Inserting data of varying record lengths into an InnoDB table that used compression could cause the server to halt with an error. (Bug #14554000, Bug #13523839, Bug #63815, Bug #12845774, Bug #61456, Bug #12595091, Bug #61208)
  • InnoDB: If a table was defined with an index key length very close to the upper length limit of 3072, a query against that table could cause a serious error. (Bug #14500557, Bug #66413)
  • InnoDB: When an auto-increment column used a FLOAT or DOUBLE data type, if the auto-increment value became very large (larger than the maximum unsigned long long value), subsequent inserts could fail or cause the server to halt. (Bug #14145950, Bug #55071)
  • InnoDB: If a transaction was started with a consistent snapshot, then new indexes were added to the table while the transaction was in progress, a subsequent UPDATE statement could incorrectly encounter the error:
  • HA_ERR_TABLE_DEF_CHANGED: insufficient history for indexThis issue could cause an assertion error in debug builds. (Bug #14036214)
  • InnoDB: The error message was improved for the case where an UPDATE failed because the row included several BLOB values greater than 768 bytes each, causing the size of a row to exceed half the page size. The old message, was misleading; it suggested using BLOBs, when the 768-byte prefix for each BLOB column was the cause of the limit error:
  • Error Code 1118: Row size too large. The maximum row size for the used table
  • type, not counting BLOBs, is 8126. You have to change some columns to TEXT or
  • BLOBsA workaround for the problem was to create the table with the ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED clause, which is now suggested in the message. (Bug #13453036, Bug #63507)
  • InnoDB: In rare circumstances, MySQL could apply InnoDB undo records out of order during a ROLLBACK of an operation that modified a BLOB column. This issue could cause an assertion error in debug builds:
  • !bpage->file_page_was_freed (Bug #13249921)
  • Replication: Updates writing user variables whose values were never set on a slave while using --replicate-ignore-table could cause the slave to fail. (Bug #14597605)
  • References: This bug was introduced by Bug #14275000.
  • Replication: Backtick (`) characters were not always handled correctly in internally generated SQL statements, which could sometimes lead to errors on the slave. (Bug #14548159)
  • Replication: Following an insert into a nontransactional table that failed due to insufficient disk space, the server did not properly clean up all pending events, leading to an assert or possibly to other errors. (Bug #11750014)
  • Very long database names in queries could cause the server to exit. (Bug #15912213)
  • Within a stored procedure, executing a multiple-table DELETE statement that used a very long table alias could cause the server to exit. (Bug #15954896)
  • Very long table aliases in queries could cause the server to exit. (Bug #15948123)
  • Attempting to create an auto-increment column in an InnoDB table with a NULL type attribute could cause a serious error. (Bug #14758479)
  • A DELETE statement for an InnoDB table could write incorrect transaction metadata into a record, causing the server to halt with an error. To work around this issue, reduce the specified length of the primary key to less than 1K bytes. (Bug #14731482)
  • Repeated execution of a query containing a subquery that used MAX() could result in increasing memory consumption. (Bug #14683676)
  • USE dbname could fail with Unknown database when dbname contained multiple backtick (`) characters. (Bug #14645196)
  • The configure.pl script that converts GNU configure options to CMake equivalents generated erroneous output for the --with-client-ldflags and --with-mysqld-ldflags options. It now ignores those options. (Bug #14593123)
  • SHOW PROFILE could be used to cause excessive server memory consumption. (Bug #14629232)
  • The thread cache implementation worked in LIFO rather than FIFO fashion and could result in a thread being denied service (although this was a remote possibility). (Bug #14621627)
  • Within a stored program, memory allocated to hold condition information was not released until program exit, leading to excessive memory use. (Bug #14640599)
  • Improper memory cleanup could cause the server to exit. (Bug #14536113)
  • Granting or revoking the PROXY privilege caused the server to exit if the server was started with --skip-name-resolve. (Bug #14211140)
  • CREATE USER and DROP USER could fail to flush the privileges, requiring FLUSH PRIVILEGES to be used explicitly. (Bug #13864642)
  • Access to INFORMATION_SCHEMA tables through a view could leak memory. (Bug #13734987)
  • A memory leak could occur for queries containing a subquery that used GROUP BY on an outer column. (Bug #13724099)
  • On Microsoft Windows with CMake 2.6, the build process would not stop if the create_initial_db step failed. (Bug #13713525)
  • The test in mysqld_safe for the presence of the --plugin_dir option and assignment of a default value to it were performed before the actual argument parsing took place. (Bug #13548161)
  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556441)
  • Improper memory cleanup could cause the server to exit. (Bug #13340270)
  • A memory leak occurred due to failure to clean up after QUICK_INDEX_MERGE_SELECT/Unique. (Bug #12694872, Bug #14542543)
  • The number of connection errors from a given host as counted by the server was periodically reset, with the result that max_connect_errors was never reached and invalid hosts were never blocked from trying to connect. (Bug #11753779)
  • References: See also Bug #38247, Bug #43006, Bug #45584, Bug #45606.
  • During optimization, ZEROFILL values may be converted to string constants. However, CASE expressions did not handle switching data types after the planning stage, leading to CASE finding a null pointer instead of its argument. (Bug #57135, Bug #11764313)
  • In debug builds, an InnoDB assertion was overly aggressive about prohibiting an open range. (Bug #66513, Bug #14547952)
  • On Windows, the Perl version of mysql_install_db created system tables in the mysql database that were not populated properly. (Bug #65584, Bug #14181049)
  • mysqld_safe ignored the value of the UMASK environment variable, leading to behavior different from mysqld with respect to the access mode of created files. Now mysqld_safe (and mysqld_multi) attempt to approximate the same behavior as mysqld. (Bug #57406, Bug #11764559)
  • LAST_INSERT_ID(expr) did not work for expr values greater than the largest signed BIGINT value. (Bug #20964, Bug #11745891)

New in MySQL 5.6.9 RC (Dec 14, 2012)

  • Functionality Added or Changed:
  • Incompatible Change: Replication: A number of variable and other names relating to GTID-based replication have been changed, with a view to making these names more appropriate and meaningful. The old names are no longer supported.
  • The features so renamed are shown in the following list:
  • The --disable-gtid-unsafe-statements server option has been renamed --enforce-gtid-consistency; the disable_gtid_unsafe_statements system variable has been renamed enforce_gtid_consistency.
  • The gtid_done server system variable has been renamed gtid_executed.
  • The gtid_lost server system variable has been renamed gtid_purged; in addition, this variable is no longer read-only.
  • The SQL_THREAD_WAIT_AFTER_GTIDS() function has been renamed WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS().
  • For more information, see Section 16.1.3, “Replication with Global Transaction Identifiers”, and Section 16.1.4.5, “Global Transaction ID Options and Variables”. (Bug #14775984)
  • mysqld now writes dates to the error log in ISO (YYYY-MM-DD hh:mm:ss) format. It also includes its process ID following the date. Thanks to Davi Arnaut for the patch. (Bug #56240, Bug #11763523)
  • Windows Vista, Windows Server 2008, and newer support native symlinking using the mklink command. This makes the MySQL Server implementation of database symbolic links using .sym files redundant, so that mechanism is now deprecated and will be removed in a future MySQL release. See Section 8.11.3.1.3, “Using Symbolic Links for Databases on Windows”.
  • Bugs Fixed:
  • Performance: InnoDB: The timing values for low-level InnoDB read operations were adjusted for better performance with fast storage devices, such as SSD. This enhancement primarily affects read operations for BLOB columns in compressed tables. (Bug #13702112, Bug #64258)
  • Incompatible Change: The THREAD_ID column in Performance Schema tables was widened from INT to BIGINT to accommodate 64-bit values.
  • If you upgrade to this release of MySQL from an earlier version, you must run mysql_upgrade (and restart the server) to incorporate this change to the performance_schema database. (Bug #14664453)
  • Incompatible Change: Connection ID (thread ID) values greater than 32 bits can occur on some systems (such as busy or long-running 64-bit systems), causing these problems:
  • Connection IDs written to the general query log and slow query log were incorrect. This was true for logging to both files and tables.
  • The CONNECTION_ID() function could return a value with a data type too small for values larger than 32 bits.
  • The mysql_thread_id() and mysql_kill() C API functions did not handle ID values larger than 32 bits. This could result in killing the wrong thread; for example, if you invoked mysql_kill(mysql_thread_id()).
  • Connection IDs now are permitted to be 64-bit values when the server supports them (when built with 64-bit data types), which has these effects:
  • Connection IDs are logged correctly to the general query log and slow query log.Note
  • This change involves a modification to the log tables, so after upgrading to this release, you must run mysql_upgrade and restart the server.
  • CONNECTION_ID() returns a data type appropriate for values larger than 32 bits.
  • mysql_thread_id() is unchanged; the client/server protocal has only 4 bytes for the ID value. This function returns an incorrect (truncated) value for connection IDs larger than 32 bits and should be avoided.
  • mysql_kill() still cannot handle values larger than 32 bits, but to guard against killing the wrong thread now returns an error in these cases:
  • If given an ID larger than 32 bits, mysql_kill() returns a CR_INVALID_CONN_HANDLE error.
  • After the server's internal thread ID counter reaches a value larger than 32 bits, it returns an ER_DATA_OUT_OF_RANGE error for any mysql_kill() invocation and mysql_kill() fails.
  • To avoid problems with mysql_thread_id() and mysql_kill(), do not use them. To get the connection ID, execute a SELECT CONNECTION_ID() query and retrieve the result. To kill a thread, execute a KILL statement.
  • (Bug #19806, Bug #11745768, Bug #65715, Bug #14236124, Bug #44728, Bug #11753308)
  • Important Change: InnoDB: A DML statement using the index merge access method could lock many rows from the table, even when those rows were not part of the final result set. This fix reduces the excessive locking by releasing the locks of unmatched rows. This optimization affects only transactions with isolation level equal to or less strict than READ COMMITTED; it does not apply to transactions using REPEATABLE READ or SERIALIZABLE isolation level. (Bug #14226171)
  • Important Change: Replication: Because running the server with GTIDs enabled prevented changes to nontransactional tables, programs such as mysql_upgrade and mysql_install_db were unable to operate on system tables that used the MyISAM storage engine and therefore could not function correctly. Now, when running with --enforce-gtid-consistency (required whenever --gtid-mode=ON), the server allows single statements on nontransactional tables. (Bug #14722659)
  • Important Change: Replication: Formerly, the value of the Seconds_Behind_Master column in the output of SHOW SLAVE STATUS was always set to NULL whenever the SQL thread or the I/O thread was stopped. Now, this column is set to NULL only if the SQL thread is not running, or if the I/O thread is not running following a check to determine whether or not the SQL thread has processed all of the relay log. (If the SQL thread has finished processing and the I/O thread is running, Seconds_Behind_Master is 0.) (Bug #12946333)
  • Partitioning: InnoDB: Previously, when attempting to optimize one or more partitions of a partitioned table that used a storage engine that does not support partition-level OPTIMIZE, such as InnoDB, MySQL reported Table does not support optimize, doing recreate + analyze instead, then re-created the entire table, but did not actually analyze it. Now in such cases, the warning message is, Table does not support optimize on partitions. All partitions will be rebuilt and analyzed. In addition, the entire table is analyzed after first being rebuilt. (Bug #11751825)
  • InnoDB: If the server crashed while rows were inserted into a table with a FULLTEXT index but before the transaction was committed, an error could occur during the next startup:
  • InnoDB: Assertion failure in thread thread_num in file dict0dict.cc line 1019
  • (Bug #14826779)
  • InnoDB: The server could halt with an error when accessing an InnoDB table containing a FULLTEXT index through the HANDLER statement. (Bug #14788710)
  • InnoDB: The server could halt with an error when two kinds of operations happened simultaneously:
  • A ROLLBACK of an inserted row that contained off-page columns.
  • An online online DDL operation involving a table of ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED (that is, using the Barracuda file format) that rebuilt the table. For example, ADD/DROP COLUMN, ADD PRIMARY KEY, change ROW_FORMAT.
  • (Bug #14842014)
  • InnoDB: The server could halt with an assertion error for an ANALYZE TABLE operation, depending on the structure of the table and its indexes:
  • InnoDB: Assertion failure in thread thread_num in file dict0dict.ic line 447InnoDB: Failing assertion: pos n_def
  • (Bug #14755452)
  • InnoDB: A timeout error could occur on Windows systems when doing ALTER TABLE statements with the DISCARD TABLESPACE or IMPORT TABLESPACE clauses, due to a temporary tablespace file remaining in the file system. (Bug #14776799)
  • InnoDB: An online DDL operation for an InnoDB table incorrectly reported an empty value ('') instead of the correct key value when it reported a duplicate key error for a unique index using an index prefix. (Bug #14729221)
  • InnoDB: InnoDB tables with FULLTEXT indexes could allocate memory for thread handles that was never released, possibly leading to resource issues on Windows systems. (Bug #14759163)
  • InnoDB: During an online DDL operation that copies the table, the secondary index of the table could become corrupted. (Bug #14753701)
  • InnoDB: If the server crashed after an online DDL CREATE INDEX operation, an error could occur while rolling back incomplete transactions on the next startup:
  • InnoDB: error in sec index entry del undo in...InnoDB: Assertion failure in thread thread_num in file row0umod.cc line 559
  • (Bug #14707452)
  • InnoDB: If the server crashed at a precise moment during an ALTER TABLE operation that rebuilt the clustered index for an InnoDB table, the original table could be inaccessible afterward. An example of such an operation is ALTER TABLE ... ADD PRIMARY KEY The fix preserves the original table if the server halts during this operation. You might still need to rename the .ibd file manually to restore the original table contents: in MySQL 5.6 and higher, rename from #sql-ib$new_table_id.ibd to table_name.ibd within the database directory; prior to MySQL 5.6, the temporary file to rename is table_name#1 or #2. (Bug #14669848)
  • InnoDB: This fix improves the error handling when an ALTER TABLE operation adds a column beyond the maximum number allowed for an InnoDB table. It also raises the maximum number of columns for an InnoDB table from 1000 to 1020. (Bug #14705287)
  • InnoDB: During an online DDL operation that rebuilt the table, a CHECK TABLE statement could report a count mismatch for all secondary indexes. (Bug #14606472)
  • InnoDB: If an ALTER TABLE statement failed while attempting to create a FULLTEXT index for an InnoDB table, the server could halt with an assertion error while dropping the incomplete index. (Bug #14504174)
  • InnoDB: During shutdown, with the innodb_purge_threads configuration option set greater than 1, the server could halt prematurely with this error:
  • mysqld got signal 11
  • A workaround was to increase innodb_log_file_size and set innodb_purge_threads=1. The fix was backported to MySQL 5.5 and 5.1, although those versions do not have the innodb_purge_threads configuration option so the error was unlikely to occur. (Bug #14234028)
  • InnoDB: The server could halt with an error under some combinations of concurrent operations:
  • InnoDB: unknown error code 20
  • This issue originated during the 5.6 development cycle. It affected only transactions using the READ COMMITTED andREAD UNCOMMITTED isolation levels. (Bug #13641662, Bug #12424846)
  • Replication: If a table to be replicated had a FULLTEXT index, this index was not ruled out when selecting the type of scan to be used in finding the next row, even though it cannot be used to find the correct one. The row applier subsequently tried unsuccessfully to employ an index scan, causing replication to fail. Now in such cases, indexes which do not provide for sequential access (such as FULLTEXT) are not considered when determining whether to use a table, index, or hash scan for this purpose. (Bug #14843764)
  • Replication: When using the GTID-aware master-slave protocol, the slave I/O thread used the wrong position. When using GTIDs, the position is not normally used, but as a special case, the position was used in addition to the GTID when the slave reconnected to the same master (even though this was not necessary). This problem is fixed by making the GTID-aware master-slave protocol not use positions at all any longer. (Bug #14828028)
  • Replication: Given a stored routine R in which the GTID_SUBTRACT() function was invoked: Once GTID_SUBTRACT() returned NULL when called inside R, it continued to return NULL every time it was called within R, for the remainder of the client session. (Bug #14838575)
  • Replication: MySQL Enterprise Backup, mysqldump, and mysqlhotcopy could not be used with a GTID-enabled MySQL Server, because they were unable to restore the server's GTID state and so could not restore from any point in the binary log other than the very beginning.
  • As part of the fix for this problem, the gtid_purged system variable (formerly named gtid_lost) is no longer read-only; now it is possible to add GTIDs to it when gtid_executed (formerly gtid_done) is empty. (Bug #14787808)
  • Replication: Restarting replication after the first binary log file was purged resulted in the error Got fatal error 1236 from master when reading data from binary log: 'The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.' This led GTID-based replication to fail. (Bug #14756691)
  • mysql_install_db failed to honor the --user option. (Bug #15866735)
  • Creating an InnoDB table with a FULLTEXT index could encounter a serious error if the table name contained non-alphanumeric characters. (Bug #14835178)
  • Invalid memory reads could occur for queries that selected from a zero-length table name. (Bug #14780820)
  • With LOCK TABLES in effect, CREATE TABLE IF NOT EXISTS ... LIKE could raise an assertion. (Bug #14788976)
  • The automatic key generation part of derived table handling did not handle properly columns specified as part of the VALUES() clause and caused an assertion to be raised. (Bug #14786324)
  • Attempting to read a utf16 file with LOAD DATA INFILE raised an assertion. (Bug #14786470)
  • init_io_cache() used memset() to clear a mutex but passed the wrong mutex size. (Bug #14838882)
  • The optimizer could raise an assertion when evaluating a range test against an IS NOT NULL condition. (Bug #14843705)
  • An assertion could be raised executing INSERT, UPDATE, or DELETE after implicitly starting a READ ONLY transaction in LOCK TABLES mode. (Bug #14788540)
  • Attempting to create an auto-increment column in an InnoDB table with a NULL type attribute could cause a serious error. (Bug #14758479)
  • An assertion was raised if ALTER TABLE was used to rename a column to same name as an existing column while also reordering the renamed column using AFTER or FIRST. (Bug #14756089)
  • An assertion could be raised if semi-join materialization was used to evaluate a NOT IN subquery. (Bug #14751858)
  • For some continuation handler nestings, continuation could occur at the wrong location. (Bug #14724836)
  • SHOW PROCESSLIST output was not sorted in Id order. (Bug #14771006)
  • For some SELECT statements, EXPLAIN could cause the server to exit. (Bug #14761894)
  • A memory leak occurred for attempts to use ALTER TABLE to set a default value for a tiny, medium, or long BLOB or TEXT column. (Bug #14756206)
  • Installation using Solaris packages ran mysql_install_db during upgrade operations (this should occur only for new installations). (Bug #14747671)
  • For UPDATE statements, EXPLAIN showed the total key length in the key_len column rather than the length of the used key parts. (Bug #14682438)
  • Starting the server with --bind-address and then setting host_cache_size to 0 could result in the server stopping for certain kinds of client connections. (Bug #14689561)
  • With index condition pushdown enabled, the optimizer could produce incorrect results for derived tables. (Bug #14640176)
  • The optimizer could incorrectly use a nonspatial index to optimize spatial operations, causing an assertion to be raised. (Bug #14600994)
  • mysql_config_editor produced no error message for write errors to the configuration file. (Bug #14545989)
  • Query rewriting to scrub passwords for logging was done even if none of the associated logs were enabled. Also, CREATE SERVER and ALTER SERVER are now rewritten as necessary. (Bug #14073554)
  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556441)
  • CHECK TABLE and REPAIR TABLE could crash if a MyISAM table had a corrupt key (.MYI) file. Now the server produces an error. (Bug #13556107, Bug #13556000)
  • For dumps of the mysql database, mysqldump skipped the event table unless the --events option was given. To skip this table if that is desired, use the --ignore-table option instead (Bug #55587, Bug #11762933)
  • mysqld_safe ignored the value of the UMASK environment variable, leading to behavior different from mysqld with respect to the access mode of created files. Now mysqld_safe (and mysqld_multi) attempt to approximate the same behavior as mysqld. (Bug #57406, Bug #11764559)
  • On Mac OS X, reinitializing the query cache could cause the server to exit. Thanks to Davi Arnaut for the patch. (Bug #67156, Bug #14741880)
  • For MEMORY tables with HASH indexes, DELETE sometimes failed to delete all applicable rows. (Bug #51763, Bug #11759445)
  • The server failed to use the query cache for queries in which a database or table name contained special characters and the table storage engine was InnoDB. (Bug #64821, Bug #13919851)
  • On Mac OS X, KILL could sometimes be unreliable. (Bug #37780, Bug #11748945)
  • LAST_INSERT_ID(expr) did not work for expr values greater than the largest signed BIGINT value. (Bug #20964, Bug #11745891)

New in MySQL 5.1.66 (Oct 1, 2012)

  • Bugs Fixed:
  • InnoDB: Certain information_schema tables originally introduced in MySQL 5.6 are now also available in MySQL 5.5 and MySQL 5.1: INNODB_BUFFER_PAGE, INNODB_BUFFER_PAGE_LRU, and INNODB_BUFFER_POOL_STATS. (Bug #13113026)
  • InnoDB: When a SELECT ... FOR UPDATE, UPDATE, or other SQL statement scanned rows in an InnoDB table using a < or

New in MySQL 5.5.28 (Sep 29, 2012)

  • Audit Log Plugin Notes:
  • MySQL Enterprise Edition subscriptions now include MySQL Enterprise Audit, implemented using a server plugin named audit_log. MySQL Enterprise Audit uses the open MySQL Audit API to enable standard, policy-based monitoring and logging of connection and query activity executed on specific MySQL servers. Designed to meet the Oracle audit specification, MySQL Enterprise Audit provides an out of box, easy to use auditing and compliance solution for applications that are governed by both internal and external regulatory guidelines.
  • When installed, the audit_log plugin enables MySQL Server to produce a log file containing an audit record of server activity. The log contents include when clients connect and disconnect, and what actions they perform while connected, such as which databases and tables they access.
  • Functionality Added or Changed:
  • The internal interface of the Thread Pool plugin has changed. Old versions of the plugin will work with current versions of the server, but versions of the server older than 5.5.28 will not work with current versions of the plugin.
  • Bugs Fixed:
  • InnoDB: Certain information_schema tables originally introduced in MySQL 5.6 are now also available in MySQL 5.5 and MySQL 5.1: INNODB_BUFFER_PAGE, INNODB_BUFFER_PAGE_LRU, and INNODB_BUFFER_POOL_STATS. (Bug #13113026)
  • InnoDB: When a SELECT ... FOR UPDATE, UPDATE, or other SQL statement scanned rows in an InnoDB table using an operator in a WHERE clause, the next row after the affected range could also be locked. This issue could cause a lock wait timeout for a row that was not expected to be locked. The issue occurred under various isolation levels, such as READ COMMITTED and REPEATABLE READ. (Bug #11765218)
  • Partitioning: For tables using PARTITION BY HASH or PARTITION BY KEY, when the partition pruning mechanism encountered a multi-range list or inequality using a column from the partitioning key, it continued with the next partitioning column and tried to use it for pruning, even if the previous column could not be used. This caused partitions which possibly matched one or more of the previous partitioning columns to be pruned away, leaving partitions that matched only the last column of the partitioning key.
  • This issue was triggered when both of the following conditions were met:
  • The columns making up the table's partitioning key were used in the same order as in the partitioning key definition by a SELECT statement's WHERE clause as in the column definitions;
  • The WHERE condition used with the last column of the partitioning key was satisfied only by a single value, while the condition testing some previous column from the partitioning key was satisfied by a range of values.
  • This issue is resolved by ensuring that partition pruning skips any remaining partitioning key columns once a partition key column that cannot be used in pruning is encountered. (Bug #14342883)
  • Partitioning: The buffer for the row currently read from each partition used for sorted reads was allocated on open and freed only when the partitioning handler was closed or destroyed. For SELECT statements on tables with many partitions and large rows, this could cause the server to use excessive amounts of memory.
  • This issue has been addressed by allocating buffers for reads from partitioned tables only when they are needed and freeing them immediately once they are no longer needed. As part of this fix, memory is now allocated for reading from rows only in partitions that have not been pruned (see Section 18.4, “Partition Pruning”). (Bug #13025132)
  • References: See also Bug #11764622, Bug #14537277.
  • Replication: On 64-bit Windows platforms, values greater than 4G for the max_binlog_cache_size and max_binlog_stmt_cache_size system variables were truncated to 4G. This caused LOAD DATA INFILE to fail when trying to load a file larger than 4G in size, even when max_binlog_cache_size was set to a value greater than this. (Bug #13961678)
  • Replication: In master-master replication with --log-slave-updates enabled, setting a user variable and then performing inserts using this variable caused the Exec_master_log_position column in the output of SHOW SLAVE STATUS not to be updated. (Bug #13596613)
  • The RPM spec file now also runs the test suite on the new binaries, before packaging them. (Bug #14318456)
  • The libmysqlclient_r client library exported symbols from yaSSL that conflict with OpenSSL. If a program linked against that library and libcurl, it could crash with a segmentation fault. (Bug #14068244)
  • The argument for LIMIT must be an integer, but if the argument was given by a placeholder in a prepared statement, the server did not reject noninteger values such as '5'. (Bug #13868860)
  • The Thread Pool plugin did not respect the wait_timeout timeout for client sessions. (Bug #13699303)
  • CHECK TABLE and REPAIR TABLE could crash if a key definition differed in the .frm and .MYI files of a MyISAM table. Now the server produces an error. (Bug #13555854)
  • A query for a FEDERATED table could return incorrect results when the underlying table had a compound index on two columns and the query included an AND condition on the columns. (Bug #12876932)
  • mysqlhotcopy failed for databases containing views. (Bug #62472, Bug #13006947, Bug #12992993)
  • The argument to the --ssl-key option was not verified to exist and be a valid key. The resulting connection used SSL, but the key was not used. (Bug #62743, Bug #13115401)
  • Adding a LIMIT clause to a query containing GROUP BY and ORDER BY could cause the optimizer to choose an incorrect index for processing the query, and return more rows than required. (Bug #54599, Bug #11762052)
  • mysqlbinlog did not accept input on the standard input when the standard input was a pipe. (Bug #49336, Bug #11757312)

New in MySQL 5.5.27 (Aug 4, 2012)

  • Important Change: The YEAR(2) data type is now deprecated because it is problematic. Support for YEAR(2) will be removed in a future release of MySQL. For more information, see Section 11.3.4, “YEAR(2) Limitations and Migrating to YEAR(4)”.

New in MySQL 5.5.25a (Jul 6, 2012)

  • Bugs Fixed:
  • A regression bug in the optimizer could cause excessive disk usage for UPDATE statements.

New in MySQL 5.5.25 (May 31, 2012)

  • Functionality Added or Changed:
  • The --safe-mode server option now is deprecated and will be removed in MySQL 5.6.
  • Bugs Fixed:
  • Performance: InnoDB: Improved the algorithm related to adaptive flushing. This fix increases the rate of flushing in cases where compression is used and the data set is larger than the buffer pool, leading to eviction.
  • InnoDB: In a transaction using the REPEATABLE READ isolation level, an UPDATE or DELETE statement for an InnoDB table could sometimes overlook rows recently committed by other transactions. As explained in Section 14.3.9.2, “Consistent Nonlocking Reads”, DML statements within a REPEATABLE READ transaction apply to rows committed by other transactions, even if a query could not see those rows.
  • InnoDB: The Innodb_buffer_pool_pages_flushed status variable was incorrectly set to twice the value it should be. Its value should never exceed the value of Innodb_pages_written.
  • InnoDB: The error handling and message was improved for attempting to create a foreign key with a column referencing itself. The message suggested a potential problem with the data dictionary, when no such problem existed.
  • InnoDB: The CHECK TABLE statement could fail for a large InnoDB table due to a timeout value of 2 hours. For typical storage devices, the issue could occur for tables that exceeded approximately 200 or 350 GB, depending on I/O speed. The fix relaxes the locking performed on the table being checked, which makes the timeout less likely. It also makes InnoDB recognize the syntax CHECK TABLE QUICK, which avoids the possibility of the timeout entirely.
  • Replication: It was theoretically possible for concurrent execution of more than one instance of SHOW BINLOG EVENTS to crash the MySQL Server.
  • Replication: Statements using AUTO_INCREMENT, LAST_INSERT_ID(), RAND(), or user variables could be applied in the wrong context on the slave when using statement-based replication and replication filtering server options
  • Replication: An INSERT into a table that has a composite primary key that includes an AUTO_INCREMENT column that is not the first column of this composite key is not safe for statement-based binary logging or replication. Such statements are now marked as unsafe and fail with an error when using the STATEMENT binary logging format.
  • SHOW TABLES was very slow unless the required information was already in the disk cache.

New in MySQL 5.5.24 (May 31, 2012)

  • Functionality Added or Changed
  • Important Change: Replication: INSERT ON DUPLICATE KEY UPDATE is now marked as unsafe for statement-based replication if the target table has more than one primary or unique key. For more information, see Section 16.1.2.3, “Determination of Safe and Unsafe Statements in Binary Logging”.
  • Bugs Fixed:
  • Security Fix: Bug #64884 was fixed.
  • InnoDB: Replication: When binary log statements were replayed on the slave, the Com_insert, Com_update, and Com_delete counters were incremented by BEGIN statements initiating transactions affecting InnoDB tables but not by COMMIT statements ending such transactions. This affected these statements whether they were replicated or they were run using mysqlbinlog.
  • InnoDB: Running concurrent bulk inserts on a server with auto_increment_offset=1, auto_increment_increment greater than 1, and innodb_autoinc_lock_mode=1 could result in intermittent errors like the following, even with the primary key set to auto_increment and omitted from the INSERT statement -
  • Duplicate entry 'value' for key 'PRIMARY'
  • The workaround was to set auto_increment_offset=1 or innodb_autoinc_lock_mode=0 (“traditional”).
  • If the --bind-address option was given a host name value and the host name resolved to more than one IP address, the server failed to start. For example, with --bind-address=localhost, if localhost resolved to both 127.0.0.1 and ::1, startup failed. Now the server prefers the IPv4 address in such cases.
  • mysql_store_result() and mysql_use_result() are not for use with prepared statements and are not intended to be called following mysql_stmt_execute(), but failed to return an error when invoked that way in libmysqld.
  • On Windows, mysqlslap crashed for attempts to connect using shared memory.

New in MySQL 5.5.23 (May 9, 2012)

  • The MySQL-shared-compat RPM package enables users of Red Hat-privided mysql-*-5.1 RPM packages to migrate to Oracle-provided MySQL-*-5.5 packages. MySQL-shared-compat now replaces the Red Hat mysql-libs package by replacing libmysqlclient.so files of the latter package, thus satisfying dependencies of other packages on mysql-libs. This change affects only users of Red Hat (or Red Hat-compatible) RPM packages. Nothing is different for users of Oracle RPM packages. (Bug #13867506)
  • Bugs Fixed:
  • Security Fix: Bug #59533 was fixed.
  • Performance: Partitioning: InnoDB: The statistics used by the optimizer for queries against partitioned InnoDB tables were based only on the first partition of each such table, leading to use of the wrong execution plan. (Bug #13694811)
  • References: This bug was introduced by Bug #11756867.
  • Performance: InnoDB: Improved the performance of the DROP TABLE statement for InnoDB tables, especially on systems with a large buffer pool. The fix speeds up the processing for freeing entries in the adaptive hash index. (Bug #13704145, Bug #64284)
  • InnoDB: Deleting a huge amount of data from InnoDB tables within a short time could cause the purge operation that flushes data from the buffer pool to stall. If this issue occurs, restart the server to work around it. This issue is only likely to occur on 32-bit platforms. (Bug #13847885)
  • InnoDB: If the server crashed during a TRUNCATE TABLE or CREATE INDEX statement for an InnoDB table, or a DROP DATABASE statement for a database containing InnoDB tables, an index could be corrupted, causing an error message when accessing the table after restart:
  • InnoDB: Error: trying to load index index_name for table table_name
  • InnoDB: but the index tree has been freed!
  • In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #12861864, Bug #11766019)
  • InnoDB: When data was removed from an InnoDB table, newly inserted data might not reuse the freed disk blocks, leading to an unexpected size increase for the system tablespace or .ibd file (depending on the setting of innodb_file_per_table. The OPTIMIZE TABLE could compact a .ibd file in some cases but not others. The freed disk blocks would eventually be reused as additional data was inserted. (Bug #11766634, Bug #59783)
  • InnoDB: When shutting down the MySQL server, the cleanup operations of the InnoDB shutdown could take a long time with no output, making the server appear to be hung.
  • Note] mysqld: Normal shutdown
  • InnoDB: Starting shutdown...
  • InnoDB: Shutdown completed; log sequence number ...
  • Now additional progress messages are displayed between the “starting” and “completed” messages:
  • InnoDB: Waiting for srv_monitor_thread (srv_lock_timeout_thread/ srv_error_monitor_thread) to exit
  • InnoDB: Waiting for %lu active transactions to exit
  • InnoDB: Waiting for master thread (worker threads) to be suspended
  • InnoDB: Pending checkpoint_writes: %lu
  • InnoDB: Pending log flush writes: %lu
  • InnoDB: Waiting for %lu buffer page I/Os to complete
  • InnoDB: Waiting for dirty buffer pages to be flushed
  • For both fast shutdown and slow shutdown, a progress messages is printed every 60 seconds:
  • InnoDB: Waiting for %lu tables to be dropped
  • During a slow shutdown, two additional messages are printed if certain phases take longer than normal:
  • InnoDB: Waiting for %lu undo logs to be purged
  • InnoDB: number of pages just purged: %lu
  • InnoDB: Waiting for change buffer merge to complete\n
  • InnoDB: number of bytes of change buffer just merged: %lu
  • Bug #11755873, Bug #47707)
  • Partitioning: After updating a row of a partitioned table and selecting that row within the same transaction with the query cache enabled, then performing a ROLLBACK, the same result was returned by an identical SELECT issued in a new transaction. (Bug #11761296, Bug #53775)
  • Replication: Formerly, the default value shown for the Port column in the output of SHOW SLAVE HOSTS was 3306 whether the port had been set incorrectly or not set at all. Now, when the slave port is not set, 0 is used as the default. This change also affects the default used for the --report-port server option. (Bug #13333431)
  • Replication: The --relay-log-space-limit option was sometimes ignored.
  • More specifically, when the SQL thread went to sleep, it allowed the I/O thread to queue additional events in such a way that the relay log space limit was bypassed, and the number of events in the queue could grow well past the point where the relay logs needed to be rotated. Now in such cases, the SQL thread checks to see whether the I/O thread should rotate and provide the SQL thread a chance to purge the logs (thus freeing space).
  • Note that, when the SQL thread is in the middle of a transaction, it cannot purge the logs; it can only ask for more events until the transaction is complete. Once the transaction is finished, the SQL thread can immediately instruct the I/O thread to rotate. (Bug #12400313, Bug #64503)
  • References: See also Bug #13806492.
  • An infinite thread loop could develop within Performance Schema, causing the server to become unresponsive. (Bug #13898343)
  • Incorrect stored program caching could cause statements within a stored program that included a GROUP BY clause to return different results across multiple program invocations. (Bug #13805127)
  • Mishandling of NO_BACKSLASH_ESCAPES SQL mode within stored procedures on slave servers could cause replication failures. (Bug #12601974)
  • SAVEPOINT statements were incorrectly disallowed within XA transactions. (Bug #64374, Bug #13737343)
  • References: See also Bug #11766752.
  • The Performance Schema incorrectly displayed some backslashes in Windows file names (by doubling them). (Bug #63339, Bug #13417446)
  • SHOW statements treated stored procedure, stored function, and event names as case sensitive. (Bug #56224, Bug #11763507)

New in MySQL 5.1.62 (Apr 9, 2012)

  • Functionality Added or Changed:
  • New utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations have been added that preserve the behavior of utf8_general_ci and ucs2_general_ci from versions of MySQL previous to 5.1.24.
  • Bug #27877 corrected an error in the original collations but introduced an incompatibility for columns that contain German 'ß' LATIN SMALL LETTER SHARP S. (As a result of the fix, that character compares equal to characters with which it previously compared different.)
  • yaSSL was upgraded from version 1.7.2 to 2.2.0.
  • Bugs Fixed:
  • Security Fix: Bug #13510739 and Bug #63775 were fixed.
  • Incompatible Change: An earlier change (in MySQL 5.1.59 and 5.5.16) was found to modify date-handling behavior in General Availability-status series (MySQL 5.1 and 5.5). This change has been reverted.
  • Important Change: InnoDB Storage Engine: When a row grew in size due to an UPDATE operation, other (non-updated) columns could be moved to off-page storage so that information about the row still fit within the constraints of the InnoDB page size. The pointer to the new allocated off-page data was not set up until the pages were allocated and written, potentially leading to lost data if the system crashed while the column was being moved out of the page. The fix corrects the order of operations for moving the column data off the original page and replacing it with a pointer. Now if a crash occurs at the precise moment when the column data is being transferred, the transfer will not be re-run during crash recovery. In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13721257, Bug #12612184, Bug #12704861)
  • InnoDB Storage Engine: An erroneous assertion could occur, in debug builds only, when creating an index on a column containing zero-length values (that is, ''). (Bug #13654923)
  • InnoDB Storage Engine: A DDL operation such as ALTER TABLE ... ADD COLUMN could stall, eventually timing out with an Error 1005: Can't create table message referring to fil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)
  • InnoDB Storage Engine: References to C preprocessor symbols and macros HAVE_purify, UNIV_INIT_MEM_TO_ZERO, and UNIV_SET_MEM_TO_ZERO were removed from the InnoDB source code. They were only used in debug builds instrumented for Valgrind. They are replaced by calls to the UNIV_MEM_INVALID() macro. (Bug #13418934)
  • InnoDB Storage Engine: A DDL operation for an InnoDB table could cause a busy MySQL server to halt with an assertion error: InnoDB: Failing assertion: trx->error_state == DB_SUCCESS (Bug #12739098, Bug #62401)
  • InnoDB Storage Engine: With 1024 concurrent InnoDB transactions running concurrently and the innodb_file_per_table setting enabled, a CREATE TABLE operation for an InnoDB table could fail. The .ibd file from the failed CREATE TABLE was left behind, preventing the table from being created later, after the load had dropped. The fix adds error handling to delete the erroneous .ibd file. This error was less likely to occur in MySQL 5.5 and 5.6, because raising the number of InnoDB undo slots increased the number of simultaneous transactions needed to trigger the bug, from 1K to 128K. (Bug #12400341)
  • InnoDB Storage Engine: When copying a partitioned InnoDB table from a Linux system to a Windows system, you could encounter this error:
  • 101115 14:19:53 [ERROR] Table .\test\d has no primary key in InnoDB data
  • dictionary, but has one in MySQL! Normally, the solution to copy InnoDB tables from Linux to Windows is to create the tables on Linux with the lower_case_table_names option enabled. Partitioned tables, with #P# appended to the filename, were not covered by that solution. (Bug #11765438, Bug #58406)
  • InnoDB Storage Engine: Server startup could produce an error for temporary tables using the InnoDB storage engine, if the path in the $TMPDIR variable ended with a / character. The workaround for the problem was to create a similar temporary table again, copy its .frm file to tmpdir under the name mentioned in the error message (for example, #sql123.frm) and restart mysqld with tmpdir set to its normal value without a trailing slash, for example /var/tmp. On startup, MySQL would see the .frm file and issue DROP TABLE for the orphaned temporary table. (Bug #11754376, Bug #45976)
  • A query that used an index on a CHAR column referenced in a BETWEEN clause could return invalid results. (Bug #13463488, Bug #63437)
  • When the optimizer performed conversion of DECIMAL values while evaluating range conditions, it could produce incorrect results. (Bug #13453382)
  • When used with the --xml option, mysqldump --routines failed to dump any stored routines, triggers, or events. (Bug #11760384, Bug #52792)
  • It was possible on replication slaves where FEDERATED tables were in use to get timeouts on long-running operations, such as Error 1160 Got an error writing communication packets. The FEDERATED tables did not need to be replicated for the issue to occur. (Bug #11758931, Bug #51196)
  • If an attempt to initiate a statement failed, the issue could not be reported to the client because it was not prepared to receive any error messages prior to the execution of any statement. Since the user could not execute any queries, they were simply disconnected without providing a clear error. After the fix for this issue, the client is prepared for an error as soon as it attempts to initiate a statement, so that the error can be reported prior to disconnecting the user. (Bug #11755281, Bug #47032)
  • Using myisamchk with the sort recover method to repair a table having fixed-width row format could cause the row pointer size to be reduced, effectively resulting in a smaller maximum data file size. (Bug #48848, Bug #11756869)
  • Due to improper locking, concurrent inserts into an ARCHIVE table at the same time as repair and check operations on the table resulted in table corruption. (Bug #37280, Bug #11748748)
  • Under some circumstances, the result of SUBSTRING_INDEX() incorrectly depended on the contents of the previous row. (Bug #42404, Bug #11751514)

New in MySQL 5.5.22 (Apr 6, 2012)

  • Bugs Fixed:
  • Security Fix: Bug #13510739 and Bug #63775 were fixed.
  • Important Change: InnoDB Storage Engine: When a row grew in size due to an UPDATE operation, other (non-updated) columns could be moved to off-page storage so that information about the row still fit within the constraints of the InnoDB page size. The pointer to the new allocated off-page data was not set up until the pages were allocated and written, potentially leading to lost data if the system crashed while the column was being moved out of the page. The problem was more common with tables using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED along with the Barracuda file format, particularly with the innodb_file_per_table setting enabled, because page allocation operations are more common as the .ibd tablespace files are extended. Still, the problem could occur with any combination of InnoDB version, file format, and row format.
  • A related issue was that during such an UPDATE operation, or an INSERT operation that reused a delete-marked record, other transactions could see invalid data for the affected column, regardless of isolation level.
  • The fix corrects the order of operations for moving the column data off the original page and replacing it with a pointer. Now if a crash occurs at the precise moment when the column data is being transferred, the transfer will not be re-run during crash recovery.
  • In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13721257, Bug #12612184, Bug #12704861)
  • InnoDB Storage Engine: An erroneous assertion could occur, in debug builds only, when creating an index on a column containing zero-length values (that is, ''). (Bug #13654923)
  • InnoDB Storage Engine: A DDL operation such as ALTER TABLE ... ADD COLUMN could stall, eventually timing out with an Error 1005: Can't create table message referring to fil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)
  • InnoDB Storage Engine: A DDL operation for an InnoDB table could cause a busy MySQL server to halt with an assertion error:
  • InnoDB Storage Engine: Server startup could produce an error for temporary tables using the InnoDB storage engine, if the path in the $TMPDIR variable ended with a / character.
  • Replication: Statements that wrote to tables with AUTO_INCREMENT columns based on an unordered SELECT from another table could lead to the master and the slave going out of sync, as the order in which the rows are retrieved from the table may differ between them. Such statements include any INSERT ... SELECT, REPLACE ... SELECT, or CREATE TABLE ... SELECT statement. Such statements are now marked as unsafe for statement-based replication, which causes the execution of one to throw a warning, and forces the statement to be logged using the row-based format if the logging format is MIXED. (Bug #11758263, Bug #50440)
  • After using an ALTER TABLE statement to change the KEY_BLOCK_SIZE property for an InnoDB table, for example when switching from an uncompressed to a compressed table, subsequent server restarts could fail with a message like:
  • InnoDB: Error: data file path/ibdata2 uses page size 1024,
  • InnoDB: but the only supported page size in this release is=16384
  • This issue is a regression introduced in MySQL 5.5.20. (Bug #13698765, Bug #64160)
  • The contents of the shared and shared-compat RPM packages had been changed in versions 5.5.6 and 5.6.1 to avoid the overlap which they traditionally had (and still have in MySQL 5.0 and 5.1). However, the RPM meta information had not been changed in accordance, and so RPM still assumed a conflict between shared and shared-compat RPM packages. This has been fixed. (Bug #60855, Bug #12368215)
  • References: See also Bug #56150.
  • myisam_sort_buffer_size could not be set larger than 4GB on 64-bit systems. (Bug #45702, Bug #11754145)
  • Due to improper locking, concurrent inserts into an ARCHIVE table at the same time as repair and check operations on the table resulted in table corruption. (Bug #37280, Bug #11748748)

New in MySQL 5.5.20 (Jan 13, 2012)

  • Functionality Added or Changed:
  • A new server option, --slow-start-timeout, controls the Windows service control manager's service start timeout. The value is the maximum number of milliseconds that the service control manager waits before trying to kill the MySQL service during startup. The default value is 15000 (15 seconds). If the MySQL service takes too long to start, you may need to increase this value. A value of 0 means there is no timeout.
  • Bugs Fixed:
  • Important Change: Replication: Setting an empty user in a CHANGE MASTER TO statement caused an invalid internal result and is no longer permitted. Trying to use MASTER_USER='' or setting MASTER_PASSWORD while leaving MASTER_USER unset causes the statement to fail with an error.
  • Important Change: Replication: Moving the binary log file, relay log file, or both files to a new location, then restarting the server with a new value for --log-bin, --relay-log, or both, caused the server to abort on start. This was because the entries in the index file overrode the new location. In addition, paths were calculated relative to datadir (rather than to the --log-bin or --relay-log values).
  • The fix for this problem means that, when the server reads an entry from the index file, it now checks whether the entry contains a relative path. If it does, the relative part of the path is replaced with the absolute path set using the --log-bin or --relay-log option. An absolute path remains unchanged; in such a case, the index must be edited manually to enable the new path or paths to be used.
  • InnoDB Storage Engine: When doing a live downgrade from MySQL 5.6.4 or later, with innodb_page_size set to a value other than 16384, now the earlier MySQL version reports that the page size is incompatible with the older version, rather than crashing or displaying a “corruption” error.
  • InnoDB Storage Engine: Issuing INSERT...ON DUPLICATE KEY statements for InnoDB tables from concurrent threads could cause a deadlock, particularly with the INSERT...ON DUPLICATE KEY UPDATE form. The fix avoids deadlocks caused by the same row being accessed by more than one transaction. Deadlocks could still occur when multiple rows are inserted and updated simultaneously by different transactions in inconsistent order; those types of deadlocks require the standard error handling on the application side, of re-trying the transaction.
  • An incorrect InnoDB assertion could cause the server to halt. This issue only affected debug builds. The assertion referenced the source file btr0pcur.ic and the variable cursor->pos_state.
  • Locale information for FORMAT() function instances was lost in view definitions.
  • The handle_segfault() signal-handler code in mysqld could itself crash due to calling unsafe functions.
  • Enabling myisam_use_mmap could cause the server to crash.
  • Concurrent access to ARCHIVE tables could cause corruption.

New in MySQL 5.5.19 (Dec 8, 2011)

  • Functionality Added or Changed:
  • Performance of metadata locking operations on Windows XP systems was improved by instituting a cache for metadata lock objects. This permits the server to avoid expensive operations for creation and destruction of synchronization objects on XP. A new system variable, metadata_locks_cache_size, permits control over the size of the cache. The default size is 1024.
  • Replication: Previously, replication slaves could connect to the master server through master accounts that use nonnative authentication, except Windows native authentication. This is now also true for Windows native authentication.
  • Bugs Fixed:
  • InnoDB Storage Engine: An incorrect deadlock could occur on a server doing a substantial amount of change buffering for DML operations, particularly DELETE statements.
  • Rounding DBL_MAX returned DBL_MAX, not 'inf'.
  • mysql_upgrade did not upgrade the system tables or create the mysql_upgrade_info file when run with the --write-binlog or --skip-write-binlog option.
  • If a plugin was uninstalled, thread local variables for plugin variables of string type with wth PLUGIN_VAR_MEMALLOC flag were not freed.
  • Deadlock could occur when these four things happened at the same time: 1) An old dump thread was waiting for the binary log to grow. 2) The slave server that replicates from the old dump thread tried to reconnect. During reconnection, the new dump thread tried to kill the old dump thread. 3) A KILL statement tried to kill the old dump thread. 4) An INSERT statement caused a binary log rotation.

New in MySQL 5.5.18 (Dec 8, 2011)

  • Functionality Added or Changed:
  • Upgrading from an Advanced GPL RPM package to an Advanced RPM package did not work. Now on Linux it is possible to use rpm -U to replace any installed MySQL product by any other of the same release family. It is not necessary to remove the old produce with rpm -e first.
  • Bugs Fixed:
  • Incompatible Change: Replication: The statements in the following list are now marked as unsafe for statement-based replication. This is due to the fact that each of these statements depends on the results of a SELECT statement whose order cannot always be determined. When using STATEMENT logging mode, a warning is issued in the binary log for any of these statements; when using MIXED logging mode, the statement is logged using the row-based format.
  • I/O thread. In addition, the error text that the master sends to the slave when an incomplete event is found now states that the incomplete event may have been caused by running out of disk space on the master, and provides coordinates of the first and the last event bytes read.
  • During the table-opening process, memory was allocated and later freed that was needed view loading, even for statements that did not use views. These unnecessary allocation and free operations are no longer done.
  • mysql_plugin mishandled the --plugin-ini, --mysqld, and --my-print-defaults options under some circumstances.
  • mysql_plugin returned the wrong error code from failed server bootstrap execution.
  • Several improvements were made to the libedit library bundled with MySQL distributions, and that is available for all platforms that MySQL supports except Windows.
  • Navigation keys did not work for UTF-8 input.
  • Word navigation and delete operations did not work for UTF-8 input with Cyrillic characters.
  • Nonlatin characters were corrupted in overwrite mode for UTF-8 input.
  • Long queries caused the statement history file to become corrupted.
  • The Alt key caused history operations to fail.
  • ARCHIVE tables with NULL columns could cause server crashes or become corrupt under concurrent load.
  • OPTIMIZE TABLE could corrupt MyISAM tables if myisam_use_mmap was enabled.
  • A query that selected a GROUP_CONCAT() function result could return different values depending on whether an ORDER BY of the function result was present.
  • For FEDERATED tables, loss of connection to the remote table during some insert operations could cause a server crash.

New in MySQL 5.1.60 (Nov 18, 2011)

  • Upgrading from an Advanced GPL RPM package to an Advanced RPM package did not work. Now on Linux it is possible to use rpm -U to replace any installed MySQL product by any other of the same release family. It is not necessary to remove the old produce with rpm -e first. (Bug #11886309)
  • MEMORY table creation time is now available in the CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table and the Create_time column of SHOW TABLE STATUS output. (Bug #51655, Bug #11759349)
  • Bugs Fixed:
  • InnoDB Storage Engine: This fix improves the performance of instrumentation code for InnoDB buffer pool operations. (Bug #12950803, Bug #62294)
  • InnoDB Storage Engine: Data from BLOB columns could be lost if the server crashed at a precise moment when other columns were being updated in an InnoDB table. (Bug #12704861)
  • InnoDB Storage Engine: Lookups using secondary indexes could give incorrect matches under a specific set of conditions. The conditions involve an index defined on a column prefix, for a BLOB or other long column stored outside the index page, with a table using the Barracuda file format. (Bug #12601439)
  • InnoDB Storage Engine: This fix corrects cases where the MySQL server could hang or abort with a long semaphore wait message. (This is a different issue than when these symptoms occurred during a CHECK TABLE statement.) (Bug #11766591, Bug #59733)
  • Replication: Issuing the following statements, in the order shown, could cause a deadlock between the user thread and I/O thread:
  • START SLAVE;
  • STOP SLAVE SQL_THREAD;
  • START SLAVE;
  • Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)
  • Valgrind warnings generated by filesort operations were fixed. (Bug #12856915)
  • Several improvements were made to the libedit library bundled with MySQL distributions, and that is available for all platforms that MySQL supports except Windows.
  • Navigation keys did not work for UTF-8 input.
  • Word navigation and delete operations did not work for UTF-8 input with Cyrillic characters.
  • Nonlatin characters were corrupted in overwrite mode for UTF-8 input.
  • Long queries caused the statement history file to become corrupted.
  • The Alt key caused history operations to fail.
  • The help message for mysql_install_db did not indicate that it supports the --defaults-file, --defaults-extra-file and --no-defaults options. (Bug #58898, Bug #11765888)
  • An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)
  • myisampack could create corrupt FULLTEXT indexes when compressing tables. (Bug #53646, Bug #11761180)
  • OPTIMIZE TABLE could corrupt MyISAM tables if myisam_use_mmap was enabled. (Bug #49030, Bug #11757032)
  • If MySQL was configured with --without-plugin-innobase and --with-plugin-innodb_plugin, to suppress building the built-in InnoDB storage engine and build the InnoDB Plugin instead, the innochecksum utility was not built. (Bug #47337, Bug #11755544)
  • A linking problem prevented the FEDERATED storage engine plugin from loading. (Bug #40942, Bug #11750417)
  • For FEDERATED tables, loss of connection to the remote table during some insert operations could cause a server crash. (Bug #34660, Bug #11747970)

New in MySQL 5.5.17 (Oct 22, 2011)

  • Functionality Added or Changed:
  • Replication: Previously, replication slaves could connect to the master server only through master accounts that use native authentication. Now replication slaves can also connect through master accounts that use nonnative authentication (except Windows native authentication) if the required client-side plugin is installed on the slave side in the directory named by the slave plugin_dir system variable. (Bug #12897501)
  • MEMORY table creation time is now available in the CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table and the Create_time column of SHOW TABLE STATUS output. (Bug #51655, Bug #11759349)
  • Bugs Fixed:
  • InnoDB Storage Engine: This fix improves the performance of instrumentation code for InnoDB buffer pool operations. (Bug #12950803, Bug #62294)
  • InnoDB Storage Engine: Data from BLOB columns could be lost if the server crashed at a precise moment when other columns were being updated in an InnoDB table. (Bug #12704861)
  • InnoDB Storage Engine: Lookups using secondary indexes could give incorrect matches under a specific set of conditions. The conditions involve an index defined on a column prefix, for a BLOB or other long column stored outside the index page, with a table using the Barracuda file format. (Bug #12601439)
  • InnoDB Storage Engine: This fix corrects cases where the MySQL server could hang or abort with a long semaphore wait message. (This is a different issue than when these symptoms occurred during a CHECK TABLE statement.) (Bug #11766591, Bug #59733)
  • Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)
  • Valgrind warnings generated by filesort operations were fixed. (Bug #12856915)
  • mysqld_safe did not properly check for an already running instance of mysqld. (Bug #11878394)
  • The help message for mysql_install_db did not indicate that it supports the --defaults-file, --defaults-extra-file and --no-defaults options. (Bug #58898, Bug #11765888)
  • An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)
  • myisampack could create corrupt FULLTEXT indexes when compressing tables. (Bug #53646, Bug #11761180)
  • A linking problem prevented the FEDERATED storage engine plugin from loading. (Bug #40942, Bug #11750417)

New in MySQL 5.1.59 (Sep 17, 2011)

  • Functionality Added or Changed:
  • If the --with-ndbcluster option is given to the configure script, it now produces a warning that the version of MySQL Cluster included in 5.1 is no longer maintained. (The separate MySQL Cluster distribution should be used instead.) (Bug #49093, Bug #11757091)
  • Bugs Fixed:
  • InnoDB Storage Engine: The “random read-ahead” feature that was removed from the InnoDB Plugin is now available again. Because it is only helpful for certain workloads, it is turned off by default. To turn it on, enable the innodb_random_read_ahead configuration option. Because this feature can improve performance in some cases and reduce performance in others, before relying on this setting, benchmark both with and without the setting enabled. (Bug #12356373)
  • Partitioning: Auto-increment columns of partitioned tables were checked even when they were not being written to. In debug builds, this could lead to a server crash. (Bug #11765667, Bug #58655)
  • The option-parsing code for empty strings leaked memory. (Bug #12589928)
  • Replication: Processing of corrupted table map events could cause the server to crash. This was especially likely if the events mapped different tables to the same identifier, such as could happen due to Bug#56226.
  • Now, before applying a table map event, the server checks whether the table has already been mapped with different settings, and if so, an error is raised and the slave SQL thread stops. If it has been mapped with the same settings, or if the table is set to be ignored by filtering rules, there is no change in behavior: the event is skipped and IDs are not checked. (Bug #44360, Bug #11753004)
  • ALTER TABLE {MODIFY|CHANGE} ... FIRST did nothing except rename columns if the old and new versions of the table had exactly the same structure with respect to column data types. As a result, the mapping of column name to column data was incorrect. The same thing happened for ALTER TABLE DROP COLUMN ... ADD COLUMN statements intended to produce a new version of the table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)
  • For a lower_case_table_names value of 1 or 2 and a database having a mixed-case name, calling a stored function using a fully qualified name including the database name failed. (Bug #60347, Bug #11840395)
  • Previously, Performance Schema table columns that held byte counts were BIGINT UNSIGNED. These were changed to BIGINT (signed). This makes it easier to perform calculations that compute differences between columns. (Bug #59631, Bug #11766504)
  • For MyISAM tables, attempts to insert incorrect data into an indexed GEOMETRY column could result in table corruption. (Bug #57323, Bug #11764487)
  • A race condition between loading a stored routine using the name qualified by the database name and dropping that database resulted in a spurious error message: The table mysql.proc is missing, corrupt, or contains bad data (Bug #47870, Bug #11756013)
  • Upgrades using an RPM package recreated the test database, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)

New in MySQL 5.5.16 (Sep 17, 2011)

  • The default thread-handling model in MySQL Server executes statements using one thread per client connection. As more clients connect to the server and execute statements, overall performance degrades. Commercial distributions of MySQL now include a thread pool plugin that provides an alternative thread-handling model designed to reduce overhead and improve performance. The plugin implements a thread pool that increases server performance by efficiently managing statement execution threads for large numbers of client connections.
  • The thread pool addresses several problems of the one thread per connection model:
  • Too many thread stacks make CPU caches almost useless in highly parallel execution workloads. The thread pool promotes thread stack reuse to minimize the CPU cache footprint.
  • With too many threads executing in parallel, context switching overhead is high. This also presents a challenging task to the operating system scheduler. The thread pool controls the number of active threads to keep the parallelism within the MySQL server at a level that it can handle and that is appropriate for the server host on which MySQL is executing.
  • Too many transactions executing in parallel increases resource contention. In InnoDB, this increases the time spent holding central mutexes. The thread pool controls when transactions start to ensure that not too many execute in parallel.
  • On Windows, the thread pool plugin requires Windows Vista or newer.
  • Pluggable Authentication Notes:
  • Commercial distributions of MySQL now include two plugins that enable MySQL Server to use external authentication methods to authenticate MySQL users:
  • PAM (Pluggable Authentication Modules) enables a system to access various kinds of authentication methods through a standard interface. A PAM authentication plugin enables MySQL Server to use PAM to authenticate MySQL users.
  • The PAM plugin uses the information passed to it by the MySQL server (such as user name, host name, password, and authentication string), plus whatever is available for PAM lookup (such as Unix passwords or an LDAP directory). The plugin checks the user credentials against PAM and returns success or failure.
  • Distributions of MySQL for Windows include an authentication plugin that enables MySQL Server to use native Windows services to authenticate client connections. Users who have logged in to Windows can connect from MySQL client programs to the server based on the information in their environment without specifying an additional password.
  • The client and server exchange data packets in the authentication handshake. As a result of this exchange, the server creates a security context object that represents the identity of the client in the Windows OS. This identity includes the name of the client account. The Windows authentication plugin uses the identity of the client to check whether it is a given account or a member of a group. By default, negotiation uses Kerberos to authenticate, then NTLM if Kerberos is unavailable.
  • The Windows authentication plugin should work on Windows 2000 Professional
  • These authentication plugins enable MySQL Server to accept connections from users defined outside the MySQL grant tables. They also support the MySQL proxy-user capability. Each plugin can return to MySQL a user name different from the login user, which means that the plugin can return the MySQL user that defines the privileges the externally authenticated user should have. For example, an external user named joe can connect and have the privileges of the MySQL user named developer.
  • The server-side PAM and Windows authentication plugins are included only in commercial distributions. They are not included in MySQL community distributions. The client-side plugins with which they communicate are included in all distributions, including community distributions. This permits clients from any release to connect to a server that has the server-side plugin loaded.
  • Functionality Added or Changed:
  • Important Change: Replication: The RESET SLAVE statement has been extended with an ALL keyword. In addition to deleting the master.info, relay-log.info, and all relay log files, RESET SLAVE ALL also clears all connection information otherwise held in memory following execution of RESET SLAVE. (Bug #11809016)
  • A new utility, mysql_plugin, enables MySQL administrators to manage which plugins a MySQL server loads. It provides an alternative to manually specifying the --plugin-load option at server startup or using the INSTALL PLUGIN and UNINSTALL PLUGIN statements at runtime. See Section 4.4.5, “mysql_plugin — Configure MySQL Server Plugins”.
  • Bugs Fixed:
  • InnoDB Storage Engine: The “random read-ahead” feature that was removed from the InnoDB Plugin is now available again. Because it is only helpful for certain workloads, it is turned off by default. To turn it on, enable the innodb_random_read_ahead configuration option. Because this feature can improve performance in some cases and reduce performance in others, before relying on this setting, benchmark both with and without the setting enabled. (Bug #12356373)
  • The metadata locking subsystem added too much overhead for INFORMATION_SCHEMA queries that were processed by opening only .frm or .TRG files and had to scan many tables. For example, SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS was affected. (Bug #12828477)
  • With profiling disabled or not compiled in, set_thd_proc_info() unnecessarily checked file name lengths. (Bug #12756017)
  • A DBUG_ASSERT added by Bug #11792200 was overly aggressive in raising assertions. (Bug #12537160)
  • CHECK TABLE and REPAIR TABLE failed to find problems with MERGE tables that had underlying tables missing or with the wrong storage engine. Issues were reported only for the first underlying table. (Bug #11754210)
  • Replication: Processing of corrupted table map events could cause the server to crash. This was especially likely if the events mapped different tables to the same identifier, such as could happen due to Bug#56226.
  • Now, before applying a table map event, the server checks whether the table has already been mapped with different settings, and if so, an error is raised and the slave SQL thread stops. If it has been mapped with the same settings, or if the table is set to be ignored by filtering rules, there is no change in behavior: the event is skipped and IDs are not checked. (Bug #44360, Bug #11753004)
  • For a lower_case_table_names value of 1 or 2 and a database having a mixed-case name, calling a stored function using a fully qualified name including the database name failed. (Bug #60347, Bug #11840395)
  • Previously, Performance Schema table columns that held byte counts were BIGINT UNSIGNED. These were changed to BIGINT (signed). This makes it easier to perform calculations that compute differences between columns. (Bug #59631, Bug #11766504)
  • The embedded server crashed when argc = 0. (Bug #57931, Bug #12561297)
  • The mysql_affected_rows() C API function returned 3 (instead of 2) for INSERT ... ON DUPLICATE KEY UPDATE statements where there was a duplicated key value. (Bug #46675, Bug #11754979)
  • Upgrades using an RPM package recreated the test database, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)

New in MySQL 5.5.15 (Jul 28, 2011)

  • Functionality Added or Changed:
  • The undocumented --all option for perror is deprecated and will be removed in MySQL 5.6.
  • Bugs Fixed:
  • InnoDB Storage Engine: A failed CREATE INDEX operation for an InnoDB table could result in some memory being allocated and not freed. This memory leak could affect tables created with the ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED settings. (Bug #12699505)
  • Partitioning: Auto-increment columns of partitioned tables were checked even when they were not being written to. In debug builds, this could lead to a crash of the server. (Bug #11765667, Bug #58655)
  • Partitioning: The UNIX_TIMESTAMP() function was not treated as a monotonic function for purposes of partition pruning. (Bug #11746819, Bug #28928)
  • Replication: If a LOAD DATA INFILE statement—replicated using statement-based replication—featured a SET clause, the name-value pairs were regenerated using a method (Item::print()) intended primarily for generating output for statements such as EXPLAIN EXTENDED, and which cannot be relied on to return valid SQL. This could in certain cases lead to a crash on the slave.
  • To fix this problem, we now name each value in its original, user-supplied form, and use that to create LOAD DATA INFILE statements for statement-based replication. (Bug #11902767, Bug #60580)
  • Previously, an inappropriate error message was produced if a multiple-table update for an InnoDB table with a clustered primary key would update a table through multiple aliases, and perform an update that may physically move the row in at least one of these aliases. Now the error message is: Primary key/partition key update is not allowed since the table is updated both as 'tbl_name1' and 'tbl_name2' (Bug #11882110)
  • ALTER TABLE {MODIFY|CHANGE} ... FIRST did nothing except rename columns if the old and new versions of the table had exactly the same structure with respect to column data types. As a result, the mapping of column name to column data was incorrect. The same thing happened for ALTER TABLE DROP COLUMN, ADD COLUMN statements intended to produce a new version of table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)
  • Incorrect handling of metadata locking for FLUSH TABLES WITH READ LOCK for statements requiring prelocking caused two problems:
  • Execution of any data-changing statement that required prelocking (that is, involved a stored function or trigger) as part of transaction slowed down somewhat all subsequent statements in the transaction. Performance in a transaction that periodically involved such statements gradually degraded over time.
  • Execution of any data-changing statement that required prelocking as part of transaction prevented a concurrent FLUSH TABLES WITH READ LOCK from proceeding until the end of transaction rather than at the end of the particular statement.
  • The fractional part of the “Queries per second” value in MySQL status output could be displayed incorrectly. (Bug #61205, Bug #12565712)
  • LOAD DATA INFILE incorrectly parsed relative data file path names that ascended more than three levels in the file system and as a consequence was unable to find the file. (Bug #60987, Bug #12403662)
  • For MyISAM tables, attempts to insert incorrect data into an indexed GEOMETRY column could result in table corruption. (Bug #57323, Bug #11764487)
  • In debug builds, Field_new_decimal::store_value() was subject to buffer overflows. (Bug #55436, Bug #11762799)
  • A race condition between loading a stored routine using the name qualified by the database name and dropping that database resulted in a spurious error message: The table mysql.proc is missing, corrupt, or contains bad data (Bug #47870, Bug #11756013)

New in MySQL 5.5.14 (Jul 6, 2011)

  • Functionality added or changed:
  • CMake configuration support on Linux now provides a boolean ENABLE_GCOV option to control whether to include support for gcov. (Bug #12549572)
  • InnoDB now permits concurrent reads while creating a secondary index. (Bug #11853126)
  • Client programs now display more information for SSL errors to aid in diagnosis and debugging of connection problems. (Bug #21287, Bug #11745920)
  • In the audit plugin interface, the event_class member was removed from the mysql_event_general structure and the calling sequence for the notification function changed. Originally, the second argument was a pointer to the event structure. The function now receives this information as two arguments: an event class number and a pointer to the event. Corresponding to these changes, MYSQL_AUDIT_INTERFACE_VERSION was increased to 0x0300.
  • The plugin_audit.h header file, and the NULL_AUDIT example plugin in the plugin/audit_null directory have been modified per these changes. See Section 21.2.4.7, “Writing Audit Plugins”.
  • Bugs fixed:
  • Replication: A mistake in thread cleanup could cause a replication master to crash. (Bug #12578441)
  • Replication: When using row-based replication and attribute promotion or demotion (see Section 15.4.1.6.2, “Replication of Columns Having Different Data Types”), memory allocated internally for conversion of BLOB columns was not freed afterwards. (Bug #12558519)
  • Adding support for Windows authentication to libmysql introduced a link dependency on the system Secur32 library. The Microsoft Visual C++ link information was modified to pull in this library automatically. (Bug #12612143)
  • In some cases, memory allocated for Query_tables_list::sroutines() was not freed properly. (Bug #12429877)
  • After the fix for Bug#11889186, MAKEDATE() arguments with a year part greater than 9999 raised an assertion. (Bug #12403504)
  • An assertion could be raised due to a missing NULL value check in Item_func_round::fix_length_and_dec(). (Bug #12392636)
  • An assertion could be raised during two-phase commits if the binary log was used as the transaction coordinator log. (Bug #12346411)
  • A problem introduced in 5.5.11 caused very old (MySQL 4.0) clients to be unable to connect to the server. (Bug #61222, Bug #12563279)
  • Using CREATE EVENT IF NOT EXISTS for an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)
  • An embedded client would abort rather than issue an error message if it issued a TEE command (\T file_name) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)
  • On some platforms, the Incorrect value: xxx for column yyy at row zzz error produced by LOAD DATA INFILE could have an incorrect value of zzz. (Bug #46895, Bug #11755168)
  • An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)
  • On FreeBSD 64-built builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)

New in MySQL 5.1.58 (Jul 6, 2011)

  • Bugs fixed:
  • InnoDB Storage Engine: If the server crashed while an XA transaction was prepared but not yet committed, the transaction could remain in the system after restart, and cause a subsequent shutdown to hang. (Bug #11766513, Bug #59641)
  • Partitioning: When executing a row-ordered retrieval index merge, the partitioning handler used memory from that allocated for the table, rather than that allocated to the query, causing table object memory not to be freed until the table was closed. (Bug #11766249, Bug #59316)
  • Replication: When mysqlbinlog was invoked using --base64-output=decode-row and --start-position=pos, (where pos is a point in the binary log past the format description log event), a spurious error of the type shown here was generated:
  • malformed binlog: it does not contain any Format_description_log_event...
  • However, since there is nothing unsafe about not printing the format description log event, the error has been removed for this case. (Bug #12354268)
  • Replication: Typographical errors appeared in the text of several replication error messages. (The word “position” was misspelled as “postion”.) (Bug #11762616, Bug #55229)
  • After the fix for Bug#11889186, MAKEDATE() arguments with a year part greater than 9999 raised an assertion. (Bug #12403504)
  • An assertion could be raised due to a missing NULL value check in Item_func_round::fix_length_and_dec(). (Bug #12392636)
  • In debug builds on Solaris, an assertion was raised if a reverse IP lookup with gethostbyaddr_r() failed. (Bug #12377872)
  • MySQL did not build if configured with both --with-debug and --with-libedit. (Bug #12329909)
  • A problem introduced in 5.1.57 caused very old (MySQL 4.0) clients to be unable to connect to the server. (Bug #61222, Bug #12563279)
  • Using CREATE EVENT IF NOT EXISTS for an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)
  • The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. (Bug #59343, Bug #11766270)
  • In Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)
  • In ROUND() calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)
  • Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)
  • LOAD DATA INFILE errors could leak I/O cache memory. (Bug #58072, Bug #11765141)
  • For LOAD DATA INFILE, multibyte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)
  • An embedded client would abort rather than issue an error message if it issued a TEE command (\T file_name) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)
  • In debug builds, Field_new_decimal::store_value() was subject to buffer overflows. (Bug #55436, Bug #11762799)
  • The optimizer sometimes incorrectly processed HAVING clauses for queries that did not also have an ORDER BY clause. (Bug #48916, Bug #11756928)
  • PROCEDURE ANALYZE() could leak memory for NULL results, and could return incorrect results if used with a LIMIT clause. (Bug #48137, Bug #11756242)
  • On some platforms, the Incorrect value: xxx for column yyy at row zzz error produced by LOAD DATA INFILE could have an incorrect value of zzz. (Bug #46895, Bug #11755168)
  • In MySQL 5.1 and up, if a table had triggers that used syntax supported in 5.0 but not 5.1, the table became unavailable. Now the table is marked as having broken triggers. (Bug #45235, Bug #11753738)
  • An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)
  • On FreeBSD 64-built builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)

New in MySQL 5.5.13 (Jun 2, 2011)

  • Bugs fixed:
  • InnoDB Storage Engine: If the server crashed while an XA transaction was prepared but not yet committed, the transaction could remain in the system after restart, and cause a subsequent shutdown to hang. (Bug #11766513, Bug #59641)
  • InnoDB Storage Engine: Similar problem to the foreign key error in bug #11831040 / 60196 / 60909, but with a different root cause and occurring on Mac OS X. With the setting lower_case_table_names=2, inserts into InnoDB tables covered by foreign key constraints could fail after a server restart.
  • Partitioning: The internal get_partition_set() function did not take into account the possibility that a key specification could be NULL in some cases. (Bug #12380149)
  • Partitioning: When executing a row-ordered retrieval index merge, the partitioning handler used memory from from that allocated for the table, rather than that allocated to the query, causing table object memory not to be freed until the table was closed. (Bug #11766249, Bug #59316)
  • Replication: A spurious error malformed binlog: it does not contain any Format_description_log_event... was generated when mysqlbinlog was invoked using --base64-output=decode-row and --start-position=pos, where pos is a point in the binary log past the format description log event. However, there is nothing unsafe about not printing the format description log event, so the error has been removed for this case. (Bug #12354268)
  • Replication: Typographical errors appeared in the text of several replication error messages. (The word “position” was misspelled as “postion”.) (Bug #11762616, Bug #55229)
  • Assignments to NEW.var_name within triggers, where var_name had a BLOB or TEXT type, were not properly handled and produced incorrect results. (Bug #12362125)
  • XA COMMIT could fail to clean up the error state if it discovered that the current XA transaction had to be rolled back. Consequently, the next XA transaction could raise an assertion when it checked for proper cleanup of the previous transaction. (Bug #12352846)
  • An internal client macro reference was removed from the client_plugin.h header file. This reference made the file unusable. (Bug #60746, Bug #12325444)
  • The server consumed memory for repeated invocation of some stored procedures, which was not released until the connection terminated. (Bug #60025, Bug #11848763)
  • The server did not check for certain invalid out of order sequences of XA statements, and these sequences raised an assertion. (Bug #59936, Bug #11766752, Bug #12348348)
  • With the conversion from GNU autotools to CMake for configuring MySQL, the USE_SYMDIR preprocessor symbol was omitted. This caused failure of symbolic links (described at Section 7.11.3.1, “Using Symbolic Links”). (Bug #59408, Bug #11766320)
  • The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. (Bug #59343, Bug #11766270)
  • In Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)
  • In ROUND() calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)
  • Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)
  • LOAD DATA INFILE errors could leak I/O cache memory. (Bug #58072, Bug #11765141)
  • For LOAD DATA INFILE, multibyte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)
  • Internal Performance Schema header files were unnecessarily installed publicly. (Bug #53281)
  • On Linux, the mysql client built using the bundled libedit did not read ~/.editrc. (Bug #49967, Bug #11757855)
  • The optimizer sometimes incorrectly processed HAVING clauses for queries that did not also have an ORDER BY clause. (Bug #48916, Bug #11756928)
  • PROCEDURE ANALYZE() could leak memory for NULL results, and could return incorrect results if used with a LIMIT clause. (Bug #48137, Bug #11756242)
  • With DISTINCT CONCAT(col,...) returned incorrect results when the arguments to CONCAT() were columns with an integer data type declared with a display width narrower than the values in the column. (For example, if an INT(1) column contain 1111.) (Bug #4082)

New in MySQL 5.5.12 (May 7, 2011)

  • Functionality added or changed:
  • When invoked with the --auto-generate-sql option, mysqlslap dropped the schema specified with the --create-schema option at the end of the test run, which may have been unexpected by the user. mysqlslap no longer drops the schema, but has a new --create-and-drop-schema schema that both creates and drops a schema. (Bug #58090, Bug #11765157)
  • Bugs fixed:
  • InnoDB Storage Engine: Replication: Trying to update a column, previously set to NULL, of an InnoDB table with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)
  • InnoDB Storage Engine: The server could halt if InnoDB interpreted a very heavy I/O load for 15 minutes or more as an indication that the server was hung. This change fixes the logic that measures how long InnoDB threads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)
  • InnoDB Storage Engine: With the setting lower_case_table_names=2, inserts into InnoDB tables covered by foreign key constraints could fail after a server restart. (Bug #11831040, Bug #60196, Bug #60909)
  • Replication: Using the --server-id option with mysqlbinlog could cause format description log events to be filtered out of the binary log, leaving mysqlbinlog unable to read the remainder of the log. Now such events are always read without regard to the value of this option.
  • As part of the the fix for this problem, mysqlbinlog now also reads rotate log events without regard to the value of --server-id. (Bug #11766427, Bug #59530)
  • On Windows, the server rejected client connections if no DNS server was available. (Bug #12325375)
  • mysql_upgrade did not properly upgrade the authentication_string column of the mysql.user table. (Bug #11936829)
  • InnoDB invoked some zlib functions without proper initialization. (Bug #11849231)
  • Comparison of a DATETIME stored program variable and NOW() led to an “Illegal mix of collations error” when character_set_connection was set to utf8. (Bug #60625, Bug #11926811)
  • Selecting from a view for which the definition included a HAVING clause failed with an error:
  • 1356: View '...' references invalid table(s) or column(s)
  • or function(s) or definer/invoker of view lack rights to use them
  • (Bug #60295, Bug #11829681)
  • CREATE TABLE syntax permits specification of a STORAGE {DEFAULT|DISK|MEMORY} option. However, this value was not written to the .frm file, so that a subsequent CREATE TABLE ... LIKE for the table did not include that option.
  • Also, ALTER TABLE of a table that had a tablespace incorrectly destroyed the tablespace. (Bug #60111, Bug #11766883, Bug #34047, Bug #11747789)
  • The server permitted max_allowed_packet to be set lower than net_buffer_length, which does not make sense because max_allowed_packet is the upper limit on net_buffer_length values. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)
  • A missing variable initialization for Item_func_set_user_var objects could cause an assertion to be raised. (Bug #59527, Bug #11766424)
  • When the server was started with the --skip-innodb option, it initialized the have_innodb system variable to YES rather than DISABLED. (Bug #59393, Bug #11766306)
  • In Item_func_month::val_str(), a Valgrind warning for a too-late NULL value check was corrected. (Bug #59166, Bug #11766126)
  • In Item::get_date, a Valgrind warning for a missing NULL value check was corrected. (Bug #59164, Bug #11766124)
  • In extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)
  • In string context, the MIN() and MAX() functions did not take into account the unsignedness of a BIGINT UNSIGNED argument. (Bug #59132, Bug #11766094)
  • In Item_func::val_decimal, a Valgrind warning for a missing NULL value check was corrected. (Bug #59125, Bug #11766087)
  • In Item_func_str_to_date::val_str, a Valgrind warning for an uninitialized variable was corrected. (Bug #58154, Bug #11765216)
  • An assertion could be raised in Item_func_int_val::fix_num_length_and_dec() due to overflow for geometry functions. (Bug #57900, Bug #11764994)
  • With prepared statements, the server could attempt to send result set metadata after the table had been closed. (Bug #56115, Bug #11763413)
  • With lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)
  • SHOW EVENTS did not always show events from the correct database. (Bug #41907, Bug #11751148)

New in MySQL 5.1.57 (May 7, 2011)

  • Functionality added or changed:
  • When invoked with the --auto-generate-sql option, mysqlslap dropped the schema specified with the --create-schema option at the end of the test run, which may have been unexpected by the user. mysqlslap no longer drops the schema, but has a new --create-and-drop schema that both creates and drops a schema. (Bug #58090, Bug #11765157)
  • A new system variable, max_long_data_size, now controls the maximum size of parameter values that can be sent with the mysql_stmt_send_long_data() C API function. If not set at server startup, the default is the value of the max_allowed_packet system variable. This variable is deprecated. In MySQL 5.6, it is removed and the maximum parameter size is controlled by max_allowed_packet.
  • Bugs fixed:
  • InnoDB Storage Engine: Replication: Trying to update a column, previously set to NULL, of an InnoDB table with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)
  • InnoDB Storage Engine: The server could halt if InnoDB interpreted a very heavy I/O load for 15 minutes or more as an indication that the server was hung. This change fixes the logic that measures how long InnoDB threads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)
  • Replication: Using the --server-id option with mysqlbinlog could cause format description log events to be filtered out of the binary log, leaving mysqlbinlog unable to read the remainder of the log. Now such events are always read without regard to the value of this option.
  • As part of the the fix for this problem, mysqlbinlog now also reads rotate log events without regard to the value of --server-id. (Bug #11766427, Bug #59530)
  • Partitioning: A problem with a previous fix for poor performance of INSERT ON DUPLICATE KEY UPDATE statements on tables having many partitions caused the handler function for reading a row from a specific index to fail to store the ID of the partition last used. This caused some statements to fail with Can't find record errors. (Bug #59297, Bug #11766232)
  • InnoDB invoked some zlib functions without proper initialization. (Bug #11849231)
  • Selecting from a view for which the definition included a HAVING clause failed with an error:
  • 1356: View '...' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
  • The server permitted max_allowed_packet to be set lower than net_buffer_length, which does not make sense because max_allowed_packet is the upper limit on net_buffer_length values. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)
  • The server read one byte too many when trying to process an XML string lacking a closing quote (') or double quote (") character used as an argument for UpdateXML() or ExtractValue(). (Bug #59901, Bug #11766725)
  • Attempting to create a spatial index on a CHAR column longer than 31 bytes led to an assertion failure if the server was compiled with safemutex support. (Bug #59888, Bug #11766714)
  • Aggregation followed by a subquery could produce an incorrect result.
  • An incorrect character set pointer passed to my_strtoll10_mb2() caused an assertion to be raised. (Bug #59648, Bug #11766519)
  • A missing variable initialization for Item_func_set_user_var objects could cause an assertion to be raised. (Bug #59527, Bug #11766424)
  • mysqldump did not quote database names in ALTER DATABASE statements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)
  • In Item_func_month::val_str(), a Valgrind warning for a too-late NULL value check was corrected. (Bug #59166, Bug #11766126)
  • In Item::get_date, a Valgrind warning for a missing NULL value check was corrected. (Bug #59164, Bug #11766124)
  • In extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)
  • In string context, the MIN() and MAX() functions did not take into account the unsignedness of a BIGINT UNSIGNED argument. (Bug #59132, Bug #11766094)
  • In Item_func::val_decimal, a Valgrind warning for a missing NULL value check was corrected. (Bug #59125, Bug #11766087)
  • In Item_func_str_to_date::val_str, a Valgrind warning for an uninitialized variable was corrected. (Bug #58154, Bug #11765216)
  • The code for PROCEDURE ANALYSE() had a missing DBUG_RETURN statement, which could cause a server crash in debug builds. (Bug #58140, Bug #11765202)
  • An assertion could be raised in Item_func_int_val::fix_num_length_and_dec() due to overflow for geometry functions. (Bug #57900, Bug #11764994)
  • An assertion could be raised if a statement that required a name lock on a table (for example, DROP TRIGGER) executed concurrently with an INFORMATION_SCHEMA query that also used the table. (Bug #56541, Bug #11763784)
  • For a client connected using SSL, the Ssl_cipher_list status variable was empty and did not show the possible cipher types. (Bug #52596, Bug #11760210)
  • With lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)
  • A potential invalid memory access discovered by Valgrind was fixed. (Bug #48053, Bug #11756169)
  • Bitmap functions used in one thread could change bitmaps used by other threads, causing an assertion to be raised. (Bug #43152, Bug #11752069)
  • SHOW EVENTS did not always show events from the correct database. (Bug #41907, Bug #11751148)

New in MySQL 5.5.11 (Apr 5, 2011)

  • Functionality added or changed:
  • The undocumented SHOW NEW MASTER statement has been removed.
  • Bugs fixed:
  • Partitioning: A problem with a previous fix for poor performance of INSERT ON DUPLICATE KEY UPDATE statements on tables having many partitions caused the handler function for reading a row from a specific index to fail to store the ID of the partition last used. This caused some statements to fail with Can't find record errors. (Bug #59297, Bug #11766232)
  • On some systems, debug builds of comp_err.c could fail due to an uninitialized variable. (Bug #59906, Bug #11766729)
  • The server read one byte too many when trying to process an XML string lacking a closing quote (') or double quote (") character used as an argument for UpdateXML() or ExtractValue(). (Bug #59901, Bug #11766725)
  • See also Bug #44332.
  • Aggregation followed by a subquery could produce an incorrect result. (Bug #59839, Bug #11766675)
  • mysqldump did not quote database names in ALTER DATABASE statements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)
  • If a multiple-table update updated a row through two aliases and the first update physically moved the row, the second update failed to locate the row. This resulted in different errors depending on storage engine, although these errors did not accurately describe the problem:
  • MyISAM: Got error 134 from storage engine
  • InnoDB: Can't find record in 'tbl'
  • For MyISAM, which is nontransactional, the update executed first was performed but the second was not. In addition, for two equal multiple-table update statements, one could succeed and the other fail depending on whether the record actually moved, which is inconsistent.
  • Now such an update returns an error if it will update a table through multiple aliases, and perform an update that may physically more the row in at least one of these aliases. (Bug #57373, Bug #11764529, Bug #55385, Bug #11762751)
  • SHOW WARNINGS output following EXPLAIN EXTENDED could include unprintable characters. (Bug #57341, Bug #11764503)

New in MySQL 5.5.10 (Mar 16, 2011)

  • Functionality added or changed:
  • MySQL distributions now include auth_socket, a server-side authentication plugin that authenticates clients that connect from the local host through the Unix socket file. The plugin uses the SO_PEERCRED socket option to obtain information about the user running the client program (and thus can be built only on systems that support this option. For a connection to succeed, the plugin requires a match between the login name of the connecting client user and the MySQL user name presented by the client program. For more information, see Section 5.5.6.1.4, “The Socket Peer-Credential Authentication Plugin”.
  • The mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow, and mysqlslap clients now have --default-auth and --plugin-dir options for specifying which authentication plugin and plugin directory to use.
  • Boolean system variables can be enabled at run time by setting them to the value ON or OFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them to ON or TRUE, or disabled by setting them to OFF or FALSE. Any other nonnumeric variable is invalid.
  • Previously, for queries that were aborted due to sort problem, the server wrote the message Sort aborted to the error log. Now the server writes more information to provide a more specific message, such as:
  • [ERROR] mysqld: Sort aborted: Out of memory (Needed 24 bytes)
  • [ERROR] mysqld: Out of sort memory,
  • consider increasing server sort buffer size
  • [ERROR] mysqld: Sort aborted: Out of sort memory,
  • consider increasing server sort buffer size
  • [ERROR] mysqld: Sort aborted: Incorrect number of arguments for
  • FUNCTION test.f1; expected 0, got 1
  • In addition, if the server was started with --log-warnings=2, the server write information about the host, user, and query.
  • mysqldump --xml now displays comments from column definitions.
  • MySQL distributions now include mysql_clear_password, a client-side authentication plugin that sends the password to the server without hashing or encryption. Although this is insecure, and thus apprpropriate precautions should be taken such as using an SSL connection, the plugin is useful in conjunction with server-side plugins that must have access to the original password in clear text. For more information, see Section 5.5.6.1.3, “The Clear Text Client-Side Authentication Plugin”.
  • Bugs fixed:
  • InnoDB Storage Engine: Raised the number of I/O requests that each AIO helper thread could process, from 32 to 256. The new limit applies to Linux and Unix platforms; the limit on Windows remains 32.
  • InnoDB Storage Engine: InnoDB returned values for “rows examined” in the query plan that were higher than expected. NULL values were treated in an inconsistent way. The inaccurate statistics could trigger “false positives” in combination with the MAX_JOIN_SIZE setting, because the queries did not really examine as many rows as reported.
  • Replication: When using the statement-based logging format, INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE statements affecting transactional tables that did not fail were not written to the binary log if they did not insert any rows. (With statement-based logging, all successful statements should be logged, whether they do or do not cause any rows to be changed.)
  • Replication: Formerly, STOP SLAVE stopped the slave I/O thread first and then stopped the slave SQL thread; thus, it was possible for the I/O thread to stop after replicating only part of a transaction which the SQL thread was executing, in which case—if the transaction could not be rolled back safely—the SQL thread could hang.
  • Now, STOP SLAVE stops the slave SQL thread first and then stops the I/O thread; this guarantees that the I/O thread can fetch any remaining events in the transaction that the SQL thread is executing, so that the SQL thread can finish the transaction if it cannot be rolled back safely.
  • DES_DECRYPT() could crash if the argument was not produced by DES_ENCRYPT().
  • The server and client did not always properly negotiate authentication plugin names.
  • --autocommit=ON did not work (it set the global autocommit value to 0, not 1).
  • A query of the following form returned an incorrect result, where the values for col_name in the result set were entirely replaced with NULL values:
  • SELECT DISTINCT col_name ... ORDER BY col_name DESC;
  • SHOW PRIVILEGES did not display a row for the PROXY privilege.
  • SHOW PROFILE could truncate source file names or fail to show function names.
  • DELETE or UPDATE statements could fail if they used DATE or DATETIME values with a year, month, or day part of zero.
  • The ESCAPE clause for the LIKE operator allows only expressions that evaluate to a constant at execution time, but aggregate functions were not being rejected.
  • Memory leaks detected, some of which could cause incorrect query results, were corrected.
  • The DEFAULT_CHARSET and DEFAULT_COLLATION CMake options did not work.
  • An OUTER JOIN query using WHERE column IS NULL could return an incorrect result.
  • Starting the server with the --defaults-file=file_name option, where the file name had no extension, caused a server crash.
  • Outer joins with an empty table could produce incorrect results.
  • In debug builds, SUBSTRING_INDEX(FORMAT(...), FORMAT(...)) could cause a server crash.
  • When mysqladmin was run with the --sleep and --count options, it went into an infinite loop executing the specified command.
  • Some string manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function SUBSTRING_INDEX() to return an empty string when one argument was of the wrong datatype. If the string object was then modified by the SQL function INSERT(), undefined behavior ensued.
  • Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash.
  • The fix for Bug#25192 caused load_defaults() to add an argument separator to distinguish options loaded from configure files from those provided on the command line, whether or not the application needed it.
  • The mysql client went into an infinite loop if the standard input was a directory.
  • Outer joins on a unique key could return incorrect results.
  • The expression const1 BETWEEN const2 AND field was optimized incorrectly and produced incorrect results.
  • Some RPM installation scripts used a hardcoded value for the data directory, which could result in a failed installation for users who have a nonstandard data directory location. The same was true for other configuration values such as the PID file name
  • On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected.
  • Sorting using ORDER BY AVG(DISTINCT decimal_col) caused a server crash or incorrect results.
  • When using ExtractValue() or UpdateXML(), if the XML to be read contained an incomplete XML comment, MySQL read beyond the end of the XML string when processing, leading to a crash of the server.
  • DATE_ADD() and DATE_SUB() return a string if the first argument is a string, but incorrectly returned a binary string. Now they return a character string with a collation of connection_collation.

New in MySQL 5.1.56 (Mar 8, 2011)

  • Functionality added or changed:
  • mysqldump --xml now displays comments from column definitions.
  • Bugs fixed:
  • InnoDB Storage Engine: InnoDB returned values for “rows examined” in the query plan that were higher than expected. NULL values were treated in an inconsistent way. The inaccurate statistics could trigger “false positives” in combination with the MAX_JOIN_SIZE setting, because the queries did not really examine as many rows as reported. (Bug #30423)
  • Partitioning: Trying to use the same column more than once in the partitioning key when partitioning a table by KEY caused mysqld to crash. Such duplication of key columns is now expressly disallowed, and fails with an appropriate error. (Bug #53354, Bug #57924)
  • Replication: When using the statement-based logging format, INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE statements affecting transactional tables that did not fail were not written to the binary log if they did not insert any rows. (With statement-based logging, all successful statements should be logged, whether they do or do not cause any rows to be changed.) (Bug #59338)
  • Replication: Formerly, STOP SLAVE stopped the slave I/O thread first and then stopped the slave SQL thread; thus, it was possible for the I/O thread to stop after replicating only part of a transaction which the SQL thread was executing, in wich case—if the transaction could not be rolled back safely—the SQL thread could hang.
  • Now, STOP SLAVE stops the slave SQL thread first and then stops the I/O thread; this guarantees that the I/O thread can fetch any remaining events in the transaction that the SQL thread is executing, so that the SQL thread can finish the transaction if it cannot be rolled back safely. (Bug #58546)
  • A query of the following form returned an incorrect result, where the values for col_name in the result set were entirely replaced with NULL values:
  • SELECT DISTINCT col_name ... ORDER BY col_name DESC;
  • DELETE or UPDATE statements could fail if they used DATE or DATETIME values with a year, month, or day part of zero. (Bug #59173)
  • The ESCAPE clause for the LIKE operator allows only expressions that evaluate to a constant at execution time, but aggregrate functions were not being rejected. (Bug #59149)
  • Memory leaks detected by Valgrind, some of which could cause incorrect query results, were corrected. (Bug #59110, Bug #11766075)
  • mysqlslap failed to check for a NULL return from mysql_store_result() and crashed trying to process the result set. (Bug #59109)
  • In debug builds, SUBSTRING_INDEX(FORMAT(...), FORMAT(...)) could cause a server crash. (Bug #58371)
  • When mysqldadmin was run with the --sleep and --count options, it went into an infinite loop executing the specified command. (Bug #58221)
  • Some string manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function SUBSTRING_INDEX() to return an empty string when one argument was of the wrong datatype. If the string object was then modified by the SQL function INSERT(), undefined behavior ensued. (Bug #58165, Bug #11765225)
  • Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash. (Bug #58026, Bug #11765099)
  • The mysql client went into an infinite loop if the standard input was a directory. (Bug #57450)
  • The expression const1 BETWEEN const2 AND field was optimized incorrectly and produced incorrect results. (Bug #57030, Bug #11764215)
  • Some RPM installation scripts used a hardcoded value for the data directory, which could result in a failed installation for users who have a nonstandard data directory location. The same was true for other configuration values such as the PID file name. (Bug #56581, Bug #11763817)
  • On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected. (Bug #55755, Bug #11763089)
  • When using ExtractValue() or UpdateXML(), if the XML to be read contained an incomplete XML comment, MySQL read beyond the end of the XML string when processing, leading to a crash of the server. (Bug #44332)

New in MySQL 5.5.9 (Feb 8, 2011)

  • Functionality added or changed:
  • The mysqladmin and mysqldump clients now have --default-auth and --plugin-dir options for specifying which authentication plugin and plugin directory to use.
  • sql_priv.h now includes an OPTION_ALLOW_BATCH flag for the transaction_allow_batching feature of MySQL Cluster.
  • Boolean system variables can be enabled at run time by setting them to the value ON or OFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them to ON or TRUE. Any other nonnumeric variable is interpreted as OFF. (Bug#46393 improves on this such that ON, TRUE, OFF, and FALSE are recognized, and other values are invalid.)
  • Bugs fixed:
  • Incompatible Change: When auto_increment_increment is greater than one, values generated by a bulk insert that reaches the maximum column value could wrap around rather producing an overflow error.
  • As a consequence of the fix, it is no longer possible for an auto-generated value to be equal to the maximum BIGINT UNSIGNED value. It is still possible to store that value manually, if the column can accept it.
  • Important Change: Partitioning: Date and time functions used as partitioning functions now have the types of their operands checked; use of a value of the wrong type is now disallowed in such cases. In addition, EXTRACT(WEEK FROM col), where col is a DATE or DATETIME column, is now disallowed altogether because its return value depends on the value of the default_week_format system variable.
  • Partitioning: InnoDB Storage Engine: The partitioning handler did not pass locking information to a table's storage engine handler. This caused high contention and thus slower performance when working with partitioned InnoDB tables.
  • InnoDB Storage Engine: When multiple InnoDB buffer pools were enabled, SHOW ENGINE INNODB commands displayed information about each one, but not summary information combining statistics for the entire buffer pool subsystem. Now, the aggregated information is displayed in the BUFFER POOL AND MEMORY section, and information about individual buffer pool instances is displayed in a new INDIVIDUAL BUFFER POOL INFO section.
  • InnoDB Storage Engine: The command to create a debug build (cmake -DWITH_DEBUG ...) now automatically sets the InnoDB debugging flag UNIV_DEBUG on all platforms. Formerly, the UNIV_DEBUG flag might not be set for Windows platforms with Visual Studio and not on OS X with Xcode.
  • InnoDB Storage Engine: In InnoDB status output, the value for I/O sum[] could be incorrect, displayed as a very large number.
  • InnoDB Storage Engine: It was not possible to query the information_schema.innodb_trx table while other connections were running queries involving BLOB types.
  • InnoDB Storage Engine: When the lowercase_system_names variable was set to 2, InnoDB could fail to restore a mysqldump dump of a table with foreign key constraints involving case-sensitive names.
  • InnoDB Storage Engine: The OPTIMIZE TABLE statement would reset the auto-increment counter for an InnoDB table. Now the auto-increment value is preserved across this operation.
  • Partitioning: A failed ALTER TABLE ... TRUNCATE PARTITION statement was still written to the binary log.
  • Partitioning: Failed ALTER TABLE ... PARTITION statements could cause memory leaks.
  • Replication: While an INSERT DELAYED statement with a single inserted value does not return any visible warnings, such a warning could be still written into the error log.
  • Replication: When closing a session that used temporary tables, binary logging could sometimes fail with a spurious Failed to write the DROP statement for temporary tables to binary log.
  • Replication: Due to changes made in MySQL 5.5.3, settings made in the binlog_cache_size and max_binlog_cache_size server system variables affected both the binary log statement cache (also introduced in that version) and the binary log transactional cache (formerly known simply as the binary log cache). This meant that the resources used as a result of setting either or both of these variables were double the amount expected. To rectify this problem, these variables now affect only the transactional cache. The fix for this issue also introduces two new system variables binlog_stmt_cache_size and max_binlog_stmt_cache_size, which affect only the binary log statement cache.
  • In addition, the Binlog_cache_use status variable was incremented whenever either cache was used, and Binlog_cache_disk_use was incremented whenever the disk space from either cache was used, which caused problems with performance tuning of the statement and transactional caches, because it was not possible to determine which of these was being exceeded when attempting to troubleshoot excessive disk seeks and related problems. This issue is solved by changing the behavior of these two status variables such that they are incremented only in response to usage of the binary log transactional cache, as well as by introducing two new status variables Binlog_stmt_cache_use and Binlog_stmt_cache_disk_use, which are incremented only by usage of the binary log statement cache.
  • For more information, see System variables used with the binary log, and Section 5.1.6, “Server Status Variables”.
  • Replication: By default, a value is generated for an AUTO_INCREMENT column by inserting either NULL or 0 into the column. Setting the NO_AUTO_VALUE_ON_ZERO server SQL mode suppresses this behavior for 0, so that it occurs only when NULL is inserted into the column.
  • This behavior is also followed on a replication slave (by the slave SQL thread) when applying events that have been logged on the master using the statement-based format. However, when applying events that had been logged using the row-based format, NO_AUTO_VALUE_ON_ZERO was ignored, which could lead to an assertion.
  • To fix this issue, the value of an AUTO_INCREMENT column is no longer generated when applying an event that was logged using the row-based row format, as this value is already contained in the changes applied on the slave.
  • Replication: The Binlog_cache_use and Binlog_cache_disk_use status variables were incremented twice by a change to a table using a transactional storage engine.
  • Replication: The BINLOG statement modified the values of session variables, which could lead to problems with operations such a point-in-time recovery. One such case occurred when replaying a row-based binary log which relied on setting foreign_key_checks = OFF on the session level in order to create and populate a set of InnoDB tables having foreign key constraints.
  • Replication: mysqlbinlog printed USE statements to its output only when the default database changed between events. To illustrate how this could cause problems, suppose that a user issued the following sequence of statements:
  • CREATE DATABASE mydb;
  • USE mydb;
  • CREATE TABLE mytable (column_definitions);
  • DROP DATABASE mydb;
  • CREATE DATABASE mydb;
  • USE mydb;
  • CREATE TABLE mytable (column_definitions);
  • When played back using mysqlbinlog, the second CREATE TABLE statement failed with Error: No Database Selected because the second USE statement was not played back, due to the fact that a database other than mydb was never selected.
  • This fix insures that mysqlbinlog outputs a USE statement whenever it reads one from the binary log.
  • Replication: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing:
  • The error message for the master error code
  • The master error code
  • The error message for the slaves error code
  • The slave error code
  • However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this:
  • Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
  • Now the slave displays this:
  • Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
  • Replication: When an error occurred in the generation of the name for a new binary log file, the error was logged but not shown to the user.
  • Comparisons of aggregate values with TIMESTAMP values were incorrect.
  • For DIV expressions, assignment of the result to multiple variables could cause a server crash.
  • MIN(year_col) could return an incorrect result in some cases.
  • mysqlslap failed to check for a NULL return from mysql_store_result() and crashed trying to process the result set.
  • In a subquery, a UNION with no referenced tables (or only a reference to the virtual table dual) did not allow an ORDER BY clause.
  • Configuring MySQL with -DWITHOUT_PERFSCHEMA_STORAGE_ENGINE=1 caused build failures.
  • Several Valgrind warnings were fixed.
  • OPTIMIZE TABLE for an InnoDB table could raise an assertion if the operation failed because it had been killed.
  • If max_allowed_packet was set larger than 16MB, the server failed to reject too-large packets with “Packet too large” errors.
  • A NOT IN predicate with a subquery containing a HAVING clause could retrieve too many rows, when the subquery itself returned NULL.
  • EXPLAIN could crash for queries that accessed two derived tables.
  • On Solaris, the MySQL build failed if it was configured with debugging enabled.
  • Issuing EXPLAIN EXTENDED for a query that would use condition pushdown could cause mysqld to crash.
  • An assertion could be raised for queries for which the optimizer could choose between Index Merge range access or const ref access methods.
  • If MySQL was built with Visual Studio Express, the project wixca was not built.
  • EXPLAIN could crash for queries that used GROUP_CONCAT().
  • CMake polluted the source tree by writing installation-related temporary files there.
  • Security context references in sp_head.cc were rewritten for improved DTrace compatibility.
  • The ucs2 character set does not support characters outside the Basic Multilingual Plane (BMP), but converting a string containing such characters did not produce a conversion-failure warning.
  • A Valgrind failure occurred in fn_format when called from archive_discover.
  • CMake did not add LINK_LIBRARIES for MYSQL_ADD_PLUGIN for libmysqld.
  • An assertion could be raised if the server was closing a session at the same time the session was being killed by another thread.
  • Condition pushdown optimization could push down conditions with incorrect column references.
  • Configuration with maintainer mode enabled resulted in errors when compiling with icc.
  • An ORDER BY clause was bound to the incorrect substatement when used in UNION context.
  • The BIT_AND() function could return incorrect results when a join returned no matching rows.
  • If the set of values aggregated with AVG(DISTINCT) contained a NULL value, the function result could be incorrect.
  • In rare cases, LIKE expressions failed for an indexed column that used a collation containing contractions.
  • Unnecessary subquery evaluation in contexts such as statement preparation or view creation could cause a server crash.
  • View creation could produce Valgrind warnings.
  • NULL geometry values could cause a crash in Item_func_spatial_collection::fix_length_and_dec.
  • It was possible to compile mysqld with Performance Schema support but with a dummy atomic-operations implementation, which caused a server crash. This problem does not affect binary distributions. It is helpful as a safety measure for users who build MySQL from source.
  • The cp1251 character set did not properly support the Euro sign (0x88). For example, converting a string containing this character to utf8 resulted in '?' rather than the utf8 Euro sign.
  • Some unsigned system variables could be displayed with negative values.
  • CREATE DATABASE and DROP DATABASE caused mysql --one-database to lose track of the statement-filtering context.
  • An assertion could be raised during concurrent execution of DROP DATABASE and REPAIR TABLE if the drop deleted a table's .TMD file at the same time the repair tried to read details from the old file that was just removed.
  • A problem could also occur when DROP TABLE tried to remove all files belonging to a table at the same time REPAIR TABLE had just deleted the table's .TMD file.
  • After compilation from source, all header files were installed in the same directory, even those that should be installed into subdirectories of the installation include directory.
  • When mysqld printed crash dump information, it incorrectly indicated that some valid pointers were invalid.
  • On Mac OS X, a configuration error caused the preference pane to fail.
  • On FreeBSD, if mysqld was killed with a SIGHUP signal, it could corrupt InnoDB .ibd files.
  • An assertion could be raised if –1 was inserted into an AUTO_INCREMENT column by a statement writing more than one row.
  • If a client supplied a user name longer than the maximum 16 characters allowed for names stored in the MySQL grant tables, all characters were being considered significant. Historically, only the first 16 characters were used to check for a match; this behavior was restored.
  • The my_seek() and my_tell() functions ignored the MY_WME flag when they returned an error, which could cause client programs to hang.
  • During assignment of values to system variables, legality checks on the value range occurred too late, preventing proper error checking.
  • On Solaris, time-related functions such as NOW() or SYSDATE() could return a constant value.
  • If the remote server for a FEDERATED table could not be accessed, queries for the INFORMATION_SCHEMA.TABLES table failed.

New in MySQL 5.1.55 (Feb 8, 2011)

  • Functionality added or changed:
  • The time zone tables available at http://dev.mysql.com/downloads/timezones.html have been updated. These tables can be used on systems such as Windows or HP-UX that do not include zoneinfo files.
  • Bugs fixed:
  • Incompatible Change: When auto_increment_increment is greater than one, values generated by a bulk insert that reaches the maximum column value could wrap around rather producing an overflow error.
  • As a consequence of the fix, it is no longer possible for an auto-generated value to be equal to the maximum BIGINT UNSIGNED value. It is still possible to store that value manually, if the column can accept it.
  • Important Change: Partitioning: Date and time functions used as partitioning functions now have the types of their operands checked; use of a value of the wrong type is now disallowed in such cases. In addition, EXTRACT(WEEK FROM col), where col is a DATE or DATETIME column, is now disallowed altogether because its return value depends on the value of the default_week_format system variable.
  • InnoDB Storage Engine: A compilation problem affected the InnoDB source code on NetBSD/sparc64.
  • InnoDB Storage Engine: In InnoDB status output, the value for I/O sum[] could be incorrect, displayed as a very large number.
  • InnoDB Storage Engine: It was not possible to query the information_schema.innodb_trx table while other connections were running queries involving BLOB types.
  • InnoDB Storage Engine: The OPTIMIZE TABLE statement would reset the auto-increment counter for an InnoDB table. Now the auto-increment value is preserved across this operation.
  • Partitioning: Failed ALTER TABLE ... PARTITION statements could cause memory leaks.
  • Replication: When closing a session that used temporary tables, binary logging could sometimes fail with a spurious Failed to write the DROP statement for temporary tables to binary log.
  • Replication: By default, a value is generated for an AUTO_INCREMENT column by inserting either NULL or 0 into the column. Setting the NO_AUTO_VALUE_ON_ZERO server SQL mode suppresses this behavior for 0, so that it occurs only when NULL is inserted into the column.
  • This behavior is also followed on a replication slave (by the slave SQL thread) when applying events that have been logged on the master using the statement-based format. However, when applying events that had been logged using the row-based format, NO_AUTO_VALUE_ON_ZERO was ignored, which could lead to an assertion.
  • To fix this issue, the value of an AUTO_INCREMENT column is no longer generated when applying an event that was logged using the row-based row format, as this value is already contained in the changes applied on the slave.
  • Replication: The BINLOG statement modified the values of session variables, which could lead to problems with operations such a point-in-time recovery. One such case occurred when replaying a row-based binary log which relied on setting foreign_key_checks = OFF on the session level in order to create and populate a set of InnoDB tables having foreign key constraints.
  • Replication: mysqlbinlog printed USE statements to its output only when the default database changed between events. To illustrate how this could cause problems, suppose that a user issued the following sequence of statements:
  • CREATE DATABASE mydb;
  • USE mydb;
  • CREATE TABLE mytable (column_definitions);
  • DROP DATABASE mydb;
  • CREATE DATABASE mydb;
  • USE mydb;
  • CREATE TABLE mytable (column_definitions);
  • When played back using mysqlbinlog, the second CREATE TABLE statement failed with Error: No Database Selected because the second USE statement was not played back, due to the fact that a database other than mydb was never selected.
  • This fix insures that mysqlbinlog outputs a USE statement whenever it reads one from the binary log.
  • Replication: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing:
  • The error message for the master error code
  • The master error code
  • The error message for the slaves error code
  • The slave error code
  • However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this:
  • Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
  • Now the slave displays this:
  • Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
  • Replication: When an error occurred in the generation of the name for a new binary log file, the error was logged but not shown to the user. (Bug#46166)
  • See also Bug#37148, Bug#40611, Bug#43929, Bug#51019.
  • MIN(year_col) could return an incorrect result in some cases.
  • If max_allowed_packet was set larger than 16MB, the server failed to reject too-large packets with “Packet too large” errors.
  • Issuing EXPLAIN EXTENDED for a query that would use condition pushdown could cause mysqld to crash.
  • EXPLAIN could crash for queries that used GROUP_CONCAT().
  • Configuration with maintainer mode enabled resulted in errors when compiling with icc.
  • Unnecessary subquery evaluation in contexts such as statement preparation or view creation could cause a server crash.
  • View creation could produce Valgrind warnings.
  • NULL geometry values could cause a crash in Item_func_spatial_collection::fix_length_and_dec.
  • The cp1251 character set did not properly support the Euro sign (0x88). For example, converting a string containing this character to utf8 resulted in '?' rather than the utf8 Euro sign.
  • Some unsigned system variables could be displayed with negative values.
  • CREATE DATABASE and DROP DATABASE caused mysql --one-database to lose track of the statement-filtering context.
  • An assertion could be raised during concurrent execution of DROP DATABASE and REPAIR TABLE if the drop deleted a table's .TMD file at the same time the repair tried to read details from the old file that was just removed.
  • A problem could also occur when DROP TABLE tried to remove all files belonging to a table at the same time REPAIR TABLE had just deleted the table's .TMD file.
  • When mysqld printed crash dump information, it incorrectly indicated that some valid pointers were invalid.
  • On FreeBSD, if mysqld was killed with a SIGHUP signal, it could corrupt InnoDB .ibd files.
  • An assertion could be raised if –1 was inserted into an AUTO_INCREMENT column by a statement writing more than one row.
  • If a client supplied a user name longer than the maximum 16 characters allowed for names stored in the MySQL grant tables, all characters were being considered significant. Historically, only the first 16 characters were used to check for a match; this behavior was restored.
  • The my_seek() and my_tell() functions ignored the MY_WME flag when they returned an error, which could cause client programs to hang.
  • During assignment of values to system variables, legality checks on the value range occurred too late, preventing proper error checking.
  • On Solaris, time-related functions such as NOW() or SYSDATE() could return a constant value.
  • If the remote server for a FEDERATED table could not be accessed, queries for the INFORMATION_SCHEMA.TABLES table failed.

New in MySQL 5.5.8 (Dec 16, 2010)

  • Configuration Notes:
  • MySQL releases are now built on all platforms using CMake rather than the GNU autotools, so autotools support has been removed. For instructions on building MySQL with CMake, see Section 2.11, “Installing MySQL from Source”. Third-party tools that need to extract the MySQL version number formerly found in configure.in can use the VERSION file. See Section 2.11.6, “MySQL Configuration and Third-Party Tools”.
  • Functionality added or changed:
  • Support for the IBMDB2I storage engine has been removed. (Bug#58079)
  • A --bind-address option has been added to a number of MySQL client programs: mysql, mysqldump, mysqladmin, mysqlbinlog, mysqlcheck, mysqlimport, and mysqlshow. This is for use on a computer having multiple network interfaces, and enables you to choose which interface is used to connect to the MySQL server.
  • Bugs fixed:
  • Performance: InnoDB Storage Engine: Improved concurrency when several ANALYZE TABLE or SHOW TABLE STATUS statements are run simultaneously for InnoDB tables. (Bug#53046)
  • Incompatible Change: Previously, tables in the performance_schema database had uppercase names. This was incompatible with the lower_case_table_names system variable, and caused issues when the variable value was changed after installing or upgrading.
  • Now performance_schema table names are lowercase, so they appear in uniform lettercase regardless of the lower_case_table_names setting. References to these tables in SQL statements should be given in lowercase. This is an incompatible change, but provides compatible behavior across different values of lower_case_table_names.
  • If you upgrade to MySQL 5.5.8 from an earlier version of MySQL 5.5, be sure to run mysql_upgrade (and restart the server) to change the names of existing performance_schema tables from uppercase to lowercase. (Bug#57609)
  • Incompatible Change: The following changes were made to the performance_schema.threads table for conformance with the implementation in MySQL 5.6:
  • ID column: Renamed to PROCESSLIST_ID, removed NOT NULL from definition.
  • NAME column: Changed from VARCHAR(64) to VARCHAR(128).
  • Incompatible Change: Deadlock occurred when a connection that had some table open through a HANDLER statement tried to update data through a DML statement while another connection tried to execute FLUSH TABLES WITH READ LOCK concurrently. Starvation of FLUSH TABLES WITH READ LOCK statements occurred when there was a constant load of concurrent DML statements in two or more connections.
  • These problems resulted from the global read lock implementation, which was reimplemented with the following consequences:
  • To solve deadlock in event-handling code that was exposed by this patch, the LOCK_event_metadata mutex was replaced with metadata locks on events. As a result, DDL operations on events are now prohibited under LOCK TABLES. This is an incompatible change.
  • The global read lock (FLUSH TABLES WITH READ LOCK) no longer blocks DML and DDL on temporary tables. Before this patch, server behavior was not consistent in this respect: In some cases, DML/DDL statements on temporary tables were blocked; in others, they were not. Since the main use cases for FLUSH TABLES WITH READ LOCK are various forms of backups and temporary tables are not preserved during backups, the server now consistently allows DML/DDL on temporary tables under the global read lock.
  • Thread state names are now either Waiting for global read lock or Waiting for commit lock, depending on which stage FLUSH TABLES WITH READ LOCK is in.
  • (Bug#57006, Bug#54673)
  • InnoDB Storage Engine: Values could be truncated in certain INFORMATION_SCHEMA columns, such as REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME and KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME. (Bug#57960)
  • InnoDB Storage Engine: For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#57799)
  • InnoDB Storage Engine: The server could stop with an assertion error on Windows Vista and Windows 7 systems. (Bug#57720)
  • InnoDB Storage Engine: A followup fix to Bug#54678. TRUNCATE TABLE could still cause a crash (assertion error) in the debug version of the server. (Bug#57700)
  • InnoDB Storage Engine: The InnoDB system tablespace could grow continually for a server under heavy load. (Bug#57611)
  • InnoDB Storage Engine: Heavy concurrent updates of a BLOB column in an InnoDB table could cause a hang. (Bug#57579)
  • InnoDB Storage Engine: The innodb_stats_on_metadata option could prevent the ANALYZE TABLE statement from running. (Bug#57252)
  • InnoDB Storage Engine: A query for an InnoDB table could return the wrong value if a column value was changed to a different case, and the column had a case-insensitive index. (Bug#56680)
  • InnoDB Storage Engine: An existing InnoDB could be switched to ROW_FORMAT=COMPRESSED implicitly by a KEY_BLOCK_SIZE clause in an ALTER TABLE statement. Now, the row format is only switched to compressed if there is an explicit ROW_FORMAT=COMPRESSED clause. on the ALTER TABLE statement.
  • Any valid, non-default ROW_FORMAT parameter takes precedence over KEY_BLOCK_SIZE when both are specified. KEY_BLOCK_SIZE only enables ROW_FORMAT=COMPRESSED if ROW_FORMAT is not specified on either the CREATE TABLE or ALTER TABLE statement, or is specified as DEFAULT. In case of a conflict between KEY_BLOCK_SIZE and ROW_FORMAT clauses, the KEY_BLOCK_SIZE is ignored if innodb_strict_mode is off, and the statement causes an error if innodb_strict_mode is on. (Bug#56632)
  • InnoDB Storage Engine: The clause KEY_BLOCK_SIZE=0 is now allowed on CREATE TABLE and ALTER TABLE statements for InnoDB tables, regardless of the setting of innodb_strict_mode. The zero value has the effect of resetting the KEY_BLOCK_SIZE table parameter to its default value, depending on the ROW_FORMAT parameter, as if it had not been specified. That default is 8 if ROW_FORMAT=COMPRESSED. Otherwise, KEY_BLOCK_SIZE is not used or stored with the table parameters.
  • As a consequence of this fix, ROW_FORMAT=FIXED is not allowed when the innodb_strict_mode is enabled. (Bug#56628)
  • InnoDB Storage Engine: A large number of foreign key declarations could cause the output of the SHOW CREATE STATEMENT statement to be truncated. (Bug#56143)
  • InnoDB Storage Engine: A compilation problem affected the InnoDB source code on NetBSD/sparc64. (Bug#53916)
  • InnoDB Storage Engine: Clarified the message when a CREATE TABLE statement fails because a foreign key constraint does not have the required indexes. (Bug#16290)
  • Partitioning: “Fast” ALTER TABLE operations (that do not involve a table copy) on a partitioned table could leave the table in an unusable state. (Bug#57985)
  • Partitioning: An INSERT ... ON DUPLICATE KEY UPDATE column = 0 statement on an AUTO_INCREMENT column caused the debug server to crash. (Bug#57890)
  • Replication: Concurrent statements using a stored function and a DROP DATABASE statement that caused the same stored function to be dropped could cause statement-based replication to fail. This problem is resolved by making sure that DROP DATABASE takes an exclusive metadata lock on all stored functions and stored procedures that it causes to be dropped. (Bug#57663)
  • See also Bug#30977.
  • Replication: When STOP SLAVE is issued, the slave SQL thread rolls back the current transaction and stops immediately if the transaction updates only tables which use transactional storage engines are updated. Previously, this occurred even when the transaction contained CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, although these statements cannot be rolled back. Because temporary tables persist for the lifetime of a user session (in the case, the replication user), they remain until the slave is stopped or reset. When the transaction is restarted following a subsequent START SLAVE statement, the SQL thread aborts with an error that a temporary table to be created (or dropped) already exists (or does not exist, in the latter case).
  • Following this fix, if an ongoing transaction contains CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug#56118)
  • Replication: If there exist both a temporary table and a non-temporary table having the same, updates normally apply only to the temporary table, with the exception of a CREATE TABLE ... SELECT statement that creates a non-temporary table having the same name as an existing temporary table. When such a statement was replicated using the MIXED logging format, and the statement was unsafe for row-based logging, updates were misapplied to the temporary table.
  • Updates were also applied wrongly when a temporary table that used a transactional storage engine was dropped inside a transaction, followed by updates within the same transaction to a non-temporary table having the same name. (Bug#55478)
  • See also Bug#47899, Bug#55709.
  • Replication: When making changes to relay log settings using CHANGE MASTER TO, the I/O cache was not cleared. This could result in replication failure when the slave attempted to read stale data from the cache and then stopped with an assertion. (Bug#55263)
  • Replication: Replication of SET and ENUM columns represented using more than 1 byte (that is, SET columns with more than 8 members and ENUM columns with more than 256 constants) between platforms using different endianness failed when using the row-based format. This was because columns of these types are represented internally using integers, but the internal functions used by MySQL to handle them treated them as strings. (Bug#52131)
  • See also Bug#53528.
  • Replication: Trying to read from a binary log containing a log event of an invalid type caused the slave to crash. (Bug#38718)
  • Replication: When replicating the mysql.tables_priv table, the Grantor column was not replicated, and was thus left empty on the slave. (Bug#27606)
  • Setting the read_only system variable at server startup did not work. (Bug#58669)
  • mysql_upgrade failed after an upgrade from MySQL 5.1. (Bug#58514)
  • When configuring the build with -DBUILD_CONFIG=mysql_release and building with Visual Studio Express, the build failed if signtool.exe was not present. (Bug#58313)
  • When configuring the build with -DBUILD_CONFIG=mysql_release on Linux, libaio is required, but the error message if it was missing was uninformative. (Bug#58227)
  • Use of NAME_CONST() in a HAVING clause caused a server crash. (Bug#58199)
  • BETWEEN did not use indexes for DATE or DATETIME columns. (Bug#58190)
  • Memory was allocated in fn_expand() for storing path names, but not freed anywhere. (Bug#58173)
  • In debug builds, inserting a FLOAT value into a CHAR(0) column could crash the server. (Bug#58137)
  • Failure to create a thread to handle a user connection could result in a server crash. (Bug#58080)
  • During configuration, ADD_VERSION_INFO in cmake/mysql_version.cmake failed if LINK_FLAGS was modified. (Bug#58074)
  • Performance Schema did not account for I/O for the binary log file (no I/O was counted). (Bug#58052)
  • Several compilation problems were fixed. (Bug#57992, Bug#57993, Bug#57994, Bug#57995, Bug#57996, Bug#57997, Bug#58057)
  • After creating a table with two foreign key constraints, the INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS table displayed only one of them. (Bug#57904)
  • Incorrect error handling raised an assertion if character set conversion wrapped an item that failed. (Bug#57882)
  • In debug builds, a missing DBUG_RETURN macro in sql/client.c caused mysql to be unable to connect to the server. (Bug#57744)
  • Clients using a client library older than MySQL 5.5.7 suffered loss of connection after executing mysql_change_user() while connected to a 5.5.7 server. (Bug#57689)
  • The MySQL-shared RPM package failed to provide the lowercase virtual identifier 'mysql-shared' in the RPM 'Provides' tags (usually used for backward compatibility). (Bug#57596)
  • For an upgrade to MySQL 5.5.7 from a previous release, the server exited if the mysql.proxies_priv table did not exist, making upgrades inconvenient. Now the server treats a missing proxies_priv table as equivalent to an empty table. However, after starting the server, you should still run mysql_upgrade to create the table. (Bug#57551)
  • SHOW PROCESSLIST displayed non-ASCII characters improperly. (Bug#57306)
  • Passing a string that was not null-terminated to UpdateXML() or ExtractValue() caused the server to fail with an assertion. (Bug#57279)
  • SET GLOBAL debug could cause a crash on Solaris if the server failed to open the trace file. (Bug#57274)
  • In debug builds, an assertion could be raised during conversion of strings to floating-point values. (Bug#57203)
  • A user with no privileges on a stored routine or the mysql.proc table could discover the routine's existence. (Bug#57061)
  • Queries executed using the Index Merge access method and a temporary file could return incorrect results. (Bug#56862)
  • The server could crash as a result of accessing freed memory when populating INFORMATION_SCHEMA.VIEWS if a view could not be opened properly. (Bug#56540)
  • Valgrind warnings about overlapping memory when double-assigning the same variable were corrected. (Bug#56138)
  • If a STOP SLAVE statement was issued while the slave SQL thread was executing a statement that invoked the SLEEP() function, both statements hung. (Bug#56096)
  • OPTIMIZE TABLE for InnoDB tables could raise an assertion. (Bug#55930)
  • Warnings raised by a trigger were not cleared upon successful completion. Now warnings are cleared if the trigger completes successfully, per the SQL standard. (Bug#55850)
  • For CMake builds, some parts of the source were unnecessarily compiled twice if the embedded server was built. (Bug#55647)
  • Boolean command options caused an error if given with an option value and the loose- option prefix. (Bug#54569)
  • An error in a stored procedure could leave the session in a different default database. (Bug#54375)
  • The CMake “wrapper” for configure (configure.pl) did not handle the --with-comment option properly. (Bug#52275)
  • Grouping by a TIME_TO_SEC() function result could cause a server crash or incorrect results. Grouping by a function returning a BLOB could cause an unexpected “Duplicate entry” error and incorrect result. (Bug#52160)
  • The find_files() function used by SHOW statements performed redundant and unnecessary memory allocation. (Bug#51208)
  • The Windows sample option files contained values more appropriate for Linux. (Bug#50021)
  • A failed RENAME TABLE operation could prevent a FLUSH TABLES WITH READ LOCK from completing. (Bug#47924)
  • Error messages for several delegate-related initialization error conditions that should not occur were changed to help identify the area of failure and to instruct the user to file a bug report if they do occur. A delegate is a set of internal data structures and algorithms. (Bug#47027)
  • On file systems with case insensitive file names, and lower_case_table_names=2, the server could crash due to a table definition cache inconsistency. (Bug#46941)
  • Handling of host name lettercase in GRANT statements was inconsistent. (Bug#36742)
  • SET NAMES utf8 COLLATE utf8_sinhala_ci did not work. (Bug#26474)
  • The utf16_bin collation uses code-point order, not byte-by-byte order, as described at Section 9.1.14.1, “Unicode Character Sets”. (The order was byte-by-byte in MySQL 5.5.7.)

New in MySQL 5.1.54 (Dec 16, 2010)

  • Functionality added or changed:
  • Support for the IBMDB2I storage engine has been removed. (Bug#58079)
  • The pstack library was nonfunctional and has been removed, along with the --with-pstack option for configure. The --enable-pstack option for mysqld is deprecated and will be removed in MySQL 5.5. (Bug#57210)
  • Bugs fixed:
  • Performance: InnoDB Storage Engine: Improved concurrency when several ANALYZE TABLE or SHOW TABLE STATUS statements are run simultaneously for InnoDB tables. (Bug#53046)
  • InnoDB Storage Engine: For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#57799)
  • Partitioning: An INSERT ... ON DUPLICATE KEY UPDATE column = 0 statement on an AUTO_INCREMENT column caused the debug server to crash. (Bug#57890)
  • Several compilation problems were fixed. (Bug#57992, Bug#57993, Bug#57994, Bug#57995, Bug#57996, Bug#57997, Bug#58057)
  • Passing a string that was not null-terminated to UpdateXML() or ExtractValue() caused the server to fail with an assertion. (Bug#57279)
  • Queries executed using the Index Merge access method and a temporary file could return incorrect results. (Bug#56862)
  • The find_files() function used by SHOW statements performed redundant and unnecessary memory allocation

New in MySQL 5.1.53 (Nov 19, 2010)

  • Bugs fixed:
  • Replication: SET PASSWORD caused row-based replication to fail between a MySQL 5.1 master and a MySQL 5.5 slave.
  • This fix makes it possible to replicate SET PASSWORD correctly, using row-based replication between a master running MySQL 5.1.53 or a later MySQL 5.1 release to a slave running MySQL 5.5.7 or a later MySQL 5.5 release. (Bug#57098)
  • See also Bug#55452, Bug#57357.
  • Replication: An ALTER TABLE statement against a MyISAM table that altered a column without setting its size caused the binary log to become corrupted, leading to replication failure. (Bug#56226)
  • Replication: When STOP SLAVE is issued, the slave SQL thread rolls back the current transaction and stops immediately if the transaction updates only tables which use transactional storage engines are updated. Previously, this occurred even when the transaction contained CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, although these statements cannot be rolled back. Because temporary tables persist for the lifetime of a user session (in the case, the replication user), they remain until the slave is stopped or reset. When the transaction is restarted following a subsequent START SLAVE statement, the SQL thread aborts with an error that a temporary table to be created (or dropped) already exists (or does not exist, in the latter case).
  • Following this fix, if an ongoing transaction contains CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug#56118)
  • Replication: If there exist both a temporary table and a non-temporary table having the same, updates normally apply only to the temporary table, with the exception of a CREATE TABLE ... SELECT statement that creates a non-temporary table having the same name as an existing temporary table. When such a statement was replicated using the MIXED logging format, and the statement was unsafe for row-based logging, updates were misapplied to the temporary table. (Bug#55478)
  • See also Bug#47899, Bug#55709.
  • Replication: When a slave tried to execute a transaction larger than the slave's value for max_binlog_cache_size, it crashed. This was caused by an assertion that the server should roll back only the statement but not the entire transaction when the error ER_TRANS_CACHE_FULL occurred. However, the slave SQL thread always rolled back the entire transaction whenever any error occurred, regardless of the type of error. (Bug#55375)
  • Replication: When making changes to relay log settings using CHANGE MASTER TO, the I/O cache was not cleared. This could result in replication failure when the slave attempted to read stale data from the cache and then stopped with an assertion. (Bug#55263)
  • Replication: Trying to read from a binary log containing a log event of an invalid type caused the slave to crash. (Bug#38718)
  • Replication: When replicating the mysql.tables_priv table, the Grantor column was not replicated, and was thus left empty on the slave. (Bug#27606)
  • Handling of host name lettercase in GRANT statements was inconsistent. (Bug#36742)

New in MySQL 5.1.52 (Nov 2, 2010)

  • Bugs fixed:
  • InnoDB Storage Engine: InnoDB incorrectly reported an error when a cascading foreign key constraint deleted more than 250 rows. (Bug#57255)
  • InnoDB Storage Engine: A SELECT ... FOR UPDATE statement affecting a range of rows in an InnoDB table could cause a crash in the debug version of the server. (Bug#56716)
  • InnoDB Storage Engine: Improved the performance of UPDATE operations on InnoDB tables, when only non-indexed columns are changed. (Bug#56340)
  • InnoDB Storage Engine: The server could crash on shutdown, if started with --innodb-use-system-malloc=0. (Bug#55627)
  • InnoDB Storage Engine: Setting the PACK_KEYS=0 table option for an InnoDB table prevented new indexes from being added to the table. (Bug#54606)
  • InnoDB Storage Engine: Changed the locking mechanism for the InnoDB data dictionary during ROLLBACK operations, to improve concurrency for REPLACE statements. (Bug#54538)
  • InnoDB Storage Engine: InnoDB transactions could be incorrectly committed during recovery, rather than rolled back, if the server crashed and was restarted after performing ALTER TABLE...ADD PRIMARY KEY on an InnoDB table, or some other operation that involves copying the entire table. (Bug#53756)
  • Partitioning: Replication: Attempting to execute LOAD DATA on a partitioned MyISAM table while using statement-based logging mode caused the master to hang or crash. (Bug#51851)
  • Partitioning: Multi-table UPDATE statements involving a partitioned MyISAM table could cause this table to become corrupted. Not all tables affected by the UPDATE needed to be partitioned for this issue to be observed. (Bug#55458)
  • Partitioning: EXPLAIN PARTITIONS returned bad estimates for range queries on partitioned MyISAM tables. In addition, values in the rows column of EXPLAIN PARTITIONS output did not take partition pruning into account. (Bug#53806, Bug#46754)
  • Replication: Backticks used to enclose idenitfiers for savepoints were not preserved in the binary log, which could lead to replication failure when the identifier, stripped of backticks, could be misinterpreted, causing a syntax or other error.
  • This could cause problems with MySQL application programs making use of generated savepoint IDs. If, for instance, java.sql.Connection.setSavepoint() is called without any parameters, Connector/J automatically generates a savepoint identifier consisting of a string of hexadecimal digits 0-F encased in backtick (`) characters. If such an ID took the form `NeN` (where N represents a string of the decimal digits 0-9, and e is a literal uppercase or lowercase “E” character). Removing the backticks when writing the identifier into the binary log left behind a substring which the slave MySQL server tried to interpret as a floating point number, rather than as an identifier. The resulting syntax error caused loss of replication. (Bug#55961)
  • See also Bug#55962.
  • If a query specified a DATE or DATETIME value in a format different from 'YYYY-MM-DD HH:MM:SS', a greater-than-or-equal (>=) condition matched only greater-than values in an indexed TIMESTAMP column. (Bug#55779)
  • If there was an active SELECT statement, an error arising during trigger execution could cause a server crash. (Bug#55421)
  • With an UPDATE IGNORE statement including a subquery that was evaluated using a temporary table, an error transferring the data from the temporary was ignored, causing an assertion to be raised. (Bug#54543)
  • Row subqueries producing no rows were not handled as UNKNOWN values in row comparison expressions. (Bug#54190)
  • The max_length metadata value of MEDIUMBLOB types was reported as 1 byte greater than the correct value. (Bug#53296)
  • In some cases, when the left part of a NOT IN subquery predicate was a row and contained NULL values, the query result was incorrect. (Bug#51070)
  • For some queries, the optimizer produced incorrect results using the Index Merge access method with InnoDB tables. (Bug#50402)
  • EXPLAIN produced an incorrect rows value for queries evaluated using an index scan and that included LIMIT, GROUP BY, and ORDER BY on a computed column. (Bug#50394)
  • mysql_store_result() and mysql_use_result() are not for use with prepared statements and are not intended to be called following mysql_stmt_execute(), but failed to return an error when invoked that way. (Bug#47485)
  • A malformed packet sent by the server when the query cache was in use resulted in lost-connection errors. (Bug#42503)
  • CREATE TABLE failed if a column referred to in an index definition and foreign key definition was in different lettercases in the two definitions. (Bug#39932)

New in MySQL 5.1.51 (Sep 26, 2010)

  • InnoDB Notes:
  • InnoDB Plugin has been upgraded to version 1.0.12. This version is considered of General Availability (GA) quality.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), generic Linux RPM packages, and any builds produced with the icc compiler. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Bugs fixed:
  • Incompatible Change: Replication: As of MySQL 5.5.6, handling of CREATE TABLE IF NOT EXISTS ... SELECT statements has been changed for the case that the destination table already exists:
  • Previously, for CREATE TABLE IF NOT EXISTS ... SELECT, MySQL produced a warning that the table exists, but inserted the rows and wrote the statement to the binary log anyway. By contrast, CREATE TABLE ... SELECT (without IF NOT EXISTS) failed with an error, but MySQL inserted no rows and did not write the statement to the binary log.
  • MySQL now handles both statements the same way when the destination table exists, in that neither statement inserts rows or is written to the binary log. The difference between them is that MySQL produces a warning when IF NOT EXISTS is present and an error when it is not.
  • This change in handling of IF NOT EXISTS results in an incompatibility for statement-based replication from a MySQL 5.1 master with the original behavior and a MySQL 5.5 slave with the new behavior. Suppose that CREATE TABLE IF NOT EXISTS ... SELECT is executed on the master and the destination table exists. The result is that rows are inserted on the master but not on the slave. (Row-based replication does not have this problem.)
  • To address this issue, statement-based binary logging for CREATE TABLE IF NOT EXISTS ... SELECT is changed in MySQL 5.1 as of 5.1.51:
  • If the destination table does not exist, there is no change: The statement is logged as is.
  • If the destination table does exist, the statement is logged as the equivalent pair of CREATE TABLE IF NOT EXISTS and INSERT ... SELECT statements. (If the SELECT in the original statement is preceded by IGNORE or REPLACE, the INSERT becomes INSERT IGNORE or REPLACE, respectively.)
  • This change provides forward compatibility for statement-based replication from MySQL 5.1 to 5.5 because when the destination table exists, the rows will be inserted on both the master and slave. To take advantage of this compatibility measure, the 5.1 server must be at least 5.1.51 and the 5.5 server must be at least 5.5.6.
  • To upgrade an existing 5.1-to-5.5 replication scenario, upgrade the master first to 5.1.51 or higher. Note that this differs from the usual replication upgrade advice of upgrading the slave first.
  • A workaround for applications that wish to achieve the original effect (rows inserted regardless of whether the destination table exists) is to use CREATE TABLE IF NOT EXISTS and INSERT ... SELECT statements rather than CREATE TABLE IF NOT EXISTS ... SELECT statements.
  • Along with the change just described, the following related change was made: Previously, if an existing view was named as the destination table for CREATE TABLE IF NOT EXISTS ... SELECT, rows were inserted into the underlying base table and the statement was written to the binary log. As of MySQL 5.1.51 and 5.5.6, nothing is inserted or logged. (Bug#47442, Bug#47132, Bug#48814, Bug#49494)
  • Incompatible Change: Previously, if you flushed the logs using FLUSH LOGS or mysqladmin flush-logs and mysqld was writing the error log to a file (for example, if it was started with the --log-error option), it renamed the current log file with the suffix -old, then created a new empty log file. This had the problem that a second log-flushing operation thus caused the original error log file to be lost unless you saved it under a different name. For example, you could use the following commands to save the file:
  • shell> mysqladmin flush-logs
  • shell> mv host_name.err-old backup-directory
  • To avoid the preceding file-loss problem, renaming no longer occurs. The server merely closes and reopens the log file. To rename the file, you can do so manually before flushing. Then flushing the logs reopens a new file with the original file name. For example, you can rename the file and create a new one using the following commands:
  • shell> mv host_name.err host_name.err-old
  • shell> mysqladmin flush-logs
  • shell> mv host_name.err-old backup-directory
  • (Bug#29751)
  • Partitioning: When the storage engine used to create a partitioned table was disabled, attempting to drop the table caused the server to crash. (Bug#46086)
  • If a view was named as the destination table for CREATE TABLE ... SELECT, the server produced a warning whether or not IF NOT EXISTS was used. Now it produces a warning only when IF NOT EXISTS is used, and an error otherwise. (Bug#55777)
  • The CHECK TABLE command could cause a time-consuming verification of the InnoDB adaptive hash index memory structure. Now this extra checking is only performed in binaries built for debugging. (Bug#55716)
  • After the fix for Bug#39653, the shortest available secondary index was used for full table scans. The primary clustered key was used only if no secondary index could be used. However, when the chosen secondary index includes all columns of the table being scanned, it is better to use the primary index because the amount of data to scan is the same but the primary index is clustered. This is now taken into account. (Bug#55656)
  • (Bug#55627)
  • The server was not checking for errors generated during the execution of Item::val_xxx() methods when copying data to a group, order, or distinct temp table's row. (Bug#55580)
  • ORDER BY clauses that included user variable expressions could cause a debug assertion to be raised. (Bug#55565)
  • Queries involving predicates of the form const NOT BETWEEN not_indexed_column AND indexed_column could return incorrect data due to incorrect handling by the range optimizer. (Bug#54802)
  • MIN() or MAX() with a subquery argument could raise a debug assertion for debug builds or return incorrect data for nondebug builds. (Bug#54465)
  • INFORMATION_SCHEMA plugins with no deinit() method resulted in a memory leak. (Bug#54253)
  • INSERT IGNORE INTO ... SELECT statements could cause a debug assertion to be raised. (Bug#54106)
  • The fix for Bug#30234 caused the server to reject the DELETE tbl_name.* ... Access compatibility syntax for multiple-table DELETE statements. (Bug#53034)
  • Enumeration plugin variables were subject to a type casting error, causing inconsistent results between different platforms. (Bug#42144)
  • A PKG install on Solaris put some files in incorrect locations. (Bug#31058)

New in MySQL 5.1.50 (Aug 19, 2010)

  • InnoDB Plugin has been upgraded to version 1.0.11. This version is considered of General Availability (GA) quality.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), generic Linux RPM packages, and any builds produced with the icc compiler. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Bugs fixed:
  • Important Change: Replication: The LOAD DATA INFILE statement is now considered unsafe for statement-based replication. When using statement-based logging mode, the statement now produces a warning; when using mixed-format logging, the statement is made using the row-based format. (Bug#34283)
  • Partitioning: UPDATE and INSERT statements affecting partitioned tables performed poorly when using row-based replication. (Bug#52517)
  • Partitioning: INSERT ON DUPLICATE KEY UPDATE statements performed poorly on tables having many partitions. This was because the handler function for reading a row from a specific index was not optimized in the partitioning handler. (Bug#52455)
  • The server could crash on shutdown, if started with --innodb-use-system-malloc=0. (Bug#55581)
  • GROUP BY operations used max_sort_length inconsistently. (Bug#55188)
  • Building MySQL on Solaris 8 x86 failed when using Sun Studio due to gcc inline assembler code. (Bug#55061)
  • In debug builds, an assertion could be raised when the server tried to send an OK packet to the client after having failed to detect errors during processing of the WHERE condition of an UPDATE statement. (Bug#54734)
  • The database server could crash when renaming a table that had active transactions. (This issue only affected the database server when built for debugging.) (Bug#54453)
  • The server could crash during the recovery phase of startup, if it previously crashed while inserting BLOB or other large columns that use off-page storage into an InnoDB table created with ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT. (Bug#54408)
  • For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#54358)
  • A client could supply data in chunks to a prepared statement parameter other than of type TEXT or BLOB using the mysql_stmt_send_long_data() C API function (or COM_STMT_SEND_LONG_DATA command). This led to a crash because other data types are not valid for long data. (Bug#54041)
  • mysql_secure_installation did not properly identify local accounts and could incorrectly remove nonlocal root accounts. (Bug#54004)
  • Transactions could be incorrectly committed during recovery, rather than rolled back, if the server crashed and was restarted after performing ALTER TABLE...ADD PRIMARY KEY on an InnoDB table, or some other operation that involves copying the entire table. (Bug#53756)
  • Portability problems in SHOW STATUS could lead to incorrect results on some platforms. (Bug#53493)
  • Builds of MySQL generated a large number of warnings. (Bug#53445)
  • With lower_case_table_names set to a nonzero value, searches for table or database names in INFORMATION_SCHEMA tables could produce incorrect results. (Bug#53095)
  • The ABI check for MySQL failed to compile with gcc 4.5. (Bug#52514)
  • mysql_secure_installation sometimes failed to locate the mysql client. (Bug#52274)
  • Reading a ucs2 data file with LOAD DATA INFILE was subject to three problems. 1) Incorrect parsing of the file as ucs2 data, resulting in incorrect length of the parsed string. This is fixed by truncating the invalid trailing bytes (incomplete multibyte characters) when reading from the file. 2) Reads from a proper ucs2 file did not recognize newline characters. This is fixed by first checking whether a byte is a newline (or any other special character) before reading it as a part of a multibyte character. 3) When using user variables to hold column data, the character set of the user variable was set incorrectly to the database charset. This is fixed by setting it to the character set specified in the LOAD DATA INFILE statement, if any. (Bug#51876)
  • Searches in INFORMATION_SCHEMA tables for rows matching a nonexistent database produced an error instead of an empty query result. (Bug#49542)
  • On FreeBSD, memory mapping for MERGE tables could fail if underlying tables were empty. (Bug#47139)
  • The my_like_range_xxx() functions returned badly formed maximum strings for Asian character sets, which caused problems for storage engines. (Bug#45012)
  • A debugging assertion could be raised after a write failure to a closed socket. (Bug#42496)
  • An assertion failure occurred within yaSSL for very long keys. (Bug#29784)

New in MySQL 5.5.5 Milestone 3 (Aug 5, 2010)

  • InnoDB Notes:
  • InnoDB has been upgraded to version 1.1.1. This version is considered of “early adopter” quality. Section 13.7.12, “InnoDB Storage Engine Change History”, may contain information in addition to those changes reported here.
  • InnoDB is now the default storage engine, rather than MyISAM, in the regular and enterprise versions of MySQL. This change has the following consequences:
  • Existing tables are not affected by this change, only new tables that are created.
  • Some of the InnoDB option settings also change, so that the default configuration represents the best practices for InnoDB functionality, reliability, and file management: innodb_file_format=Barracuda rather than Antelope, innodb_strict_mode=ON rather than OFF, and innodb_file_per_table=ON rather than OFF.
  • The system tables remain in MyISAM format.
  • MyISAM remains the default storage engine for the embedded version of MySQL.
  • Follow these steps to ensure a smooth transition:
  • Familiarize yourself with the new default setting for the InnoDB file-per-table option, which creates a separate .ibd file for each user table. Adapt any backup procedure to include these files. For details, see Section 13.6.2, “Using Per-Table Tablespaces”.
  • Test the installation and operation for any applications that you run on the database server, to determine if they use any features specific to MyISAM that cause problems during installation (when the tables are created) or at runtime (when MyISAM-specific features might fail, or reliance on MyISAM settings for performance might become apparent). The InnoDB “strict” mode might also alert you to problems while setting up tables for an application.
  • As a preliminary test for individual tables rather than an entire application, you can use the statement ALTER TABLE table_name ENGINE=INNODB; to convert an existing table to use the InnoDB storage engine, and then run compatibility and performance tests.
  • Where necessary, add ENGINE=MYISAM clauses to CREATE TABLE statements, for tables that use features specific to MyISAM, such as full-text search.
  • Benchmark the most important queries, to check whether you need to make changes to the table indexes.
  • Measure the performance of applications under typical load, to check whether you need to change any additional InnoDB configuration settings.
  • As a last resort, if a database server is devoted entirely to applications that can only run with MyISAM tables, you could add a default-storage-engine line in the configuration file, or a --default-storage-engine option in the database server startup command, to re-enable MyISAM as the default storage engine for that server. For details about setting the default storage engine, see Section 13.3, “Setting the Storage Engine”.
  • Functionality added or changed:
  • InnoDB stores redo log records in a hash table during recovery. On 64-bit systems, this hash table was 1/8 of the buffer pool size. To reduce memory usage, the dimension of the hash table was reduced to 1/64 of the buffer pool size (or 1/128 on 32-bit systems). (Bug#53122)
  • Previously, the innodb_file_format_check system variable served a dual purpose. Setting it at server startup would keep InnoDB from starting if any tables used a more recent file format than supported by the current level of InnoDB. If InnoDB could start, the same system variable was set to the “highest” file format value used by any InnoDB table in the database. Thus, its value could change from the value you specified.
  • Now, checking and recording the file format tag are handled using separate variables. innodb_file_format_check can be set to 1 or 0 at server startup to enable or disable whether InnoDB checks the file format tag in the system tablespace. If the tag is checked and is higher than that supported by the current version of InnoDB, an error occurs and InnoDB does not start. If the tag is not higher, InnoDB sets the value of innodb_file_format_max to the file format tag.
  • For background information about InnoDB file-format management, see Section 13.7.4, “InnoDB File Format Management”. (Bug#49792, Bug#53654)
  • The Rows_examined value in slow query log rows now is nonzero for UPDATE and DELETE statements that modify rows. (Bug#49756)
  • The deprecated mysql_fix_privilege_tables script has been removed. (Bug#42589)
  • There is a new system variable, skip_name_resolve, that is set from the value of the --skip-name-resolve server option. This provides a way to determine at runtime whether the server uses name resolution for client connections. (Bug#37168)
  • Added the SHA2() function, which calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). (Contributed by Bill Karwin) (Bug#13174)
  • All numeric operators and functions on integer, floating point and DECIMAL values now throw an “out of range” error (ER_DATA_OUT_OF_RANGE) rather than returning an incorrect value or NULL, when the result is out of the supported range for the corresponding data type. (Bug#8433)
  • Bugs fixed:
  • Performance: Deadlock detection could be a bottleneck in InnoDB processing, if many transactions attempted to update the same row simultaneously. The algorithm has been improved to enhance performance and scalability. (Bug#49047)
  • Performance: While looking for the shortest index for a covering index scan, the optimizer did not consider the full row length for a clustered primary key, as in InnoDB. Secondary covering indexes will now be preferred, making full table scans less likely. (Bug#39653)
  • Security Fix: The server failed to check the table name argument of a COM_FIELD_LIST command packet for validity and compliance to acceptable table name standards. This could be exploited to bypass almost all forms of checks for privileges and table-level grants by providing a specially crafted table name argument to COM_FIELD_LIST.
  • In MySQL 5.0 and above, this permitted an authenticated user with SELECT privileges on one table to obtain the field definitions of any table in all other databases and potentially of other MySQL instances accessible from the server's file system.
  • Additionally, for MySQL version 5.1 and above, an authenticated user with DELETE or SELECT privileges on one table could delete or read content from any other table in all databases on this server, and potentially of other MySQL instances accessible from the server's file system. (Bug#53371, CVE-2010-1848)
  • Security Fix: The server was susceptible to a buffer-overflow attack due to a failure to perform bounds checking on the table name argument of a COM_FIELD_LIST command packet. By sending long data for the table name, a buffer is overflown, which could be exploited by an authenticated user to inject malicious code. (Bug#53237, CVE-2010-1850)
  • Security Fix: Privilege checking for UNINSTALL PLUGIN was incorrect. (Bug#51770, CVE-2010-1621)
  • Security Fix: The server could be tricked into reading packets indefinitely if it received a packet larger than the maximum size of one packet. (Bug#50974, CVE-2010-1849)
  • Incompatible Change: TRUNCATE TABLE did not take an exclusive lock on a table if truncation was done by deleting all rows in the table. For InnoDB tables, this could break proper isolation because InnoDB ended up aborting some granted locks when truncating a table. Now an exclusive metadata lock is taken before TRUNCATE TABLE can proceed. This guarantees that no other transaction is using the table.
  • Incompatible change: Truncation using delete no longer fails if sql_safe_updates is enabled (this was an undocumented side effect). (Bug#42643)
  • Incompatible Change: After SET TRANSACTION ISOLATION LEVEL to set the isolation level for the next transaction, the session value of the tx_isolation system variable could appear to change after completion of statements within the transaction to the transaction isolation level. Now the current transaction isolation level is now established at transaction start. If there was a SET TRANSACTION ISOLATION LEVEL statement, the value is taken from it. Otherwise, the session tx_isolation value is used. A change in the session value while a transaction is active is still allowed, but no longer affects the current transaction isolation level. This is an incompatible change. A change in the session isolation level made while there is no active transaction overrides a SET TRANSACTION ISOLATION LEVEL statement, if there was any. (Bug#20837)
  • Important Change: Replication: It was possible to set sql_log_bin with session scope inside a transaction or subquery. (Bug#53437)
  • Important Change: Replication: When changing binlog_format or binlog_direct_non_transactional_updates, permissions were not checked prior to checking the scope and context of the variable being changed.
  • As a result of this fix, an error is no longer reported when—in the context of a transaction or a stored function—you try to set a value for a session variable that is the same as its previous value, or for a variable whose scope is global only. (Bug#51277)
  • Important Change: Replication: When invoked, CHANGE MASTER TO and SET GLOBAL sql_slave_skip_counter now cause information to be written to the error log about the slave's state prior to execution of the statement. For CHANGE MASTER TO, this information includes the previous values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and MASTER_LOG_POS. For SET GLOBAL sql_slave_skip_counter, this information includes the previous values of sql_slave_skip_counter, the group relay log name, and the group relay log position. (Bug#43406, Bug#43407)
  • Important Change: When using fast ALTER TABLE, different internal ordering of indexes in the MySQL optimizer and the InnoDB storage engine could cause error messages about possibly mixed up .frm files and incorrect index use. (Bug#47622)
  • Partitioning: Replication: Attempting to execute LOAD DATA on a partitioned MyISAM table while using statement-based logging mode caused the master to hang or crash. (Bug#51851)
  • Partitioning: Replication: The NO_DIR_IN_CREATE server SQL mode was not enforced when defining subpartitions. In certain cases, this could lead to failures on replication slaves. (Bug#42954)
  • Partitioning: Rows inserted into a table created using a PARTITION BY LIST COLUMNS option referencing multiple columns could be inserted into the wrong partition. (Bug#52815)
  • Partitioning: Partition pruning on RANGE partitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not using MAXVALUE). Now the last partition is not included if the partitioning function value is not within the range. (Bug#51830)
  • Partitioning: Attempting to partition a table using a DECIMAL column caused the server to crash; this not supported and is now specifically not permitted. (Bug#51347)
  • Partitioning: ALTER TABLE statements that cause table partitions to be renamed or dropped (such as ALTER TABLE ... ADD PARTITION, ALTER TABLE ... DROP PARTITION, and ALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against the INFORMATION_SCHEMA.PARTITIONS table — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that the INFORMATION_SCHEMA database ignored the name lock imposed by the ALTER TABLE statement on the partitions affected. In particular, this led to problems with InnoDB tables, because InnoDB would accept the rename operation, but put it in a background queue, so that subsequent rename operations failed when InnoDB was unable to find the correct partition. Now, INFORMATION_SCHEMA honors name locks imposed by ongoing ALTER TABLE statements that cause partitions to be renamed or dropped. (Bug#50561)
  • See also Bug#47343, Bug#45808.
  • Partitioning: The insert_id server system variable was not reset following an insert that failed on a partitioned MyISAM table having an AUTO_INCREMENT column. (Bug#50392)
  • Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible via an ALTER TABLE statement to set a foreign key on a partitioned table; it was also possible to partition a table with a single foreign key. (Bug#50104)
  • Partitioning: When attempting to perform DDL on a partitioned table and the table's .par file could not be found, the server returned the inaccurate error message Out of memory; restart server and try again (needed 2 bytes). Now in such cases, the server returns the error Failed to initialize partitions from .par file. (Bug#49161)
  • Partitioning: GROUP BY queries performed poorly for some partitioned tables. This was due to the block size not being set for partitioned tables, thus the keys per block was not correct, which could cause such queries to be optimized incorrectly. (Bug#48229)
  • See also Bug#37252.
  • Partitioning: REPAIR TABLE failed for partitioned ARCHIVE tables. (Bug#46565)
  • Replication: When using unique keys on NULL columns in row-based replication, the slave sometimes chose the wrong row when performing an update. This happened because a table having a unique key on such a column could have multiple rows containing NULL for the column used by the unique key, and the slave merely picked the first row containing NULL in that column. (Bug#53893)
  • Replication: When a CREATE TEMPORARY TABLE ... SELECT statement was executed within a transaction that updated only transactional engines and was later rolled back (for example, due to a deadlock) the changes—including the creation of the temporary table—were not written to the binary log, which caused subsequent updates to this table to fail on the slave. (Bug#53421)
  • Replication: When using the statement-based logging format, statements that used CONNECTION_ID() were always kept in the transaction cache; consequently, nontransactional changes that should have been flushed before the transaction were kept in the transaction cache. (Bug#53075)
  • This regression was introduced by Bug#51894.
  • Replication: In some cases, attempting to update a column with a value of an incompatible type resulted in a mismatch between master and slave because the column value was set to its implicit default value on the master (as expected), but the same column on the slave was set to NULL. (Bug#52868)
  • Replication: ACK packets in semisynchronous replication were not checked for length and malformed packets could cause a server crash. (Bug#52748)
  • Replication: When temporary tables were in use, switching the binary logging format from STATEMENT to ROW did not take effect until all temporary tables were dropped. (The existence of temporary tables should prevent switching the format only from ROW to STATEMENT from taking effect, not the reverse.) (Bug#52616)
  • Replication: A buffer overrun in the handling of DATE column values could cause mysqlbinlog to fail when reading back logs containing certain combinations of DML on a table having a DATE column followed by dropping the table. (Bug#52202)
  • Replication: The failure of a REVOKE statement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. (Bug#51987)
  • Replication: Issuing any DML on a temporary table temp followed by DROP TEMPORARY TABLE temp, both within the same transaction, caused replication to fail.
  • The fix introduces a change to statement-based binary logging with respect to temporary tables. Within a transaction, changes to temporary tables are saved to the transaction cache and written to the binary log when the transaction commits. Otherwise, out-of-order logging of events could occur. This means that temporary tables are treated similar to transactional tables for purposes of caching and logging. This affects assessment of statements as safe or unsafe and the associated error message was changed from:
  • Unsafe statement written to the binary log using statement format
  • since BINLOG_FORMAT = STATEMENT. Statements that read from both
  • transactional and non-transactional tables and write to any of them
  • are unsafe.
  • To:
  • Unsafe statement written to the binary log using statement format
  • since BINLOG_FORMAT = STATEMENT. Statements that read from both
  • transactional (or a temporary table of any engine type) and
  • non-transactional tables and write to any of them are unsafe.
  • (Bug#51894)
  • See also Bug#51291, Bug#53075.
  • This regression was introduced by Bug#46364.
  • Replication: The flag stating whether a user value was signed or unsigned (unsigned_flag) could sometimes change between the time that the user value was recorded for logging purposes and the time that the value was actually written to the binary log, which could lead to inconsistency. Now unsigned_flag is copied when the user variable value is copied, and the copy of unsigned_flag is then used for logging. (Bug#51426)
  • See also Bug#49562.
  • Replication: Enabling binlog_direct_non_transactional_updates causes nontransactional changes to be written to the binary log upon committing the statement. However, even when not enabled, the addition of this variable introduced a number of undesired changes in behavior:
  • When using ROW or MIXED logging mode: Nontransactional changes executed within a transaction prior to any transactional changes were written to the statement cache, but those following any transactional changes were written to the transactional cache instead, causing these (later) nontransactional changes to be lost.
  • When using ROW or MIXED logging mode: When rolling back a transaction, any nontransactional changes that might be in the transaction cache were disregarded and truncated along with the transactional changes.
  • When using STATEMENT logging mode: A statement that combined transactional and nontransactional changes prior to any other transactional changes within the transaction, but failed, was kept in the transactional cache until the transaction ended, rather than being written to the binary log at the instant of failure (and not deferred to the end of the transaction).
  • These problems have been handled as follows:
  • The setting for binlog_direct_non_transactional_updates no longer has any effect when the value of binlog_format is either ROW or MIXED. This addresses the first two issues previously listed.
  • When using statement-based logging with binlog_direct_non_transactional_updates set to ON, any statement combining transactional and nontransactional changes within the same transaction is now stored in the transaction cache, whether it succeeds or not, and regardless of its order of execution among any transactional statements within that transaction. This means that such a statement is now written to the binary log only on transaction commit or rollback.
  • (Bug#51291)
  • This regression was introduced by Bug#46364.
  • Replication: TRUNCATE TABLE performed on a temporary table using the InnoDB storage engine was logged even when using row-based mode. (Bug#51251)
  • Replication: When using temporary tables the binary log needs to insert a pseudo-thread ID for threads that are using temporary tables, each time a switch happens between two threads, both of which are using temporary tables. However, if a thread issued a failing statement before exit, its ID was not recorded in the binary log, and this in turn caused the ID for the next thread that tried to do something with a temporary table not to be logged as well. Subsequent replays of the binary log failed with the error Table ... doesn't exist. (Bug#51226)
  • Replication: If the master was using sql_mode='TRADITIONAL', duplicate key errors were not sent to the slave, which received 0 rather than the expected error code. This caused replication to fail even when such an error was expected. (Bug#51055)
  • Replication: DDL statements that lock tables (such as ALTER TABLE, CREATE INDEX, and CREATE TRIGGER) caused spurious ER_BINLOG_ROW_MODE_AND_STMT_ENGINE or ER_BINLOG_STMT_MODE_AND_ROW_ENGINE errors, even though they did not insert rows into any tables.
  • Note
  • The error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE is generated when binlog_format=ROW and a statement modifies a table restricted to statement-based logging; ER_BINLOG_STMT_MODE_AND_ROW_ENGINE is generated when binlog_format=STATEMENT and a statement modifies a table restricted to row-based logging.
  • (Bug#50479)
  • This regression was introduced by Bug#39934.
  • Replication: When run with the --database option, mysqlbinlog printed ROLLBACK statements but did not print any corresponding SAVEPOINT statements. (Bug#50407)
  • Replication: When a CREATE EVENT statement was followed by an additional statement and the statements were executed together as a single statement, the CREATE EVENT statement was padded with “garbage” characters when written to the binary log, which led to a syntax error when trying to read back from the log. (Bug#50095)
  • Replication: When using a non-transactional table on the master with autocommit disabled, no COMMIT was recorded in the binary log following a statement affecting this table. If the slave's copy of the table used a transactional storage engine, the result on the slave was as though a transaction had been started, but never completed. (Bug#49522)
  • See also Bug#29288.
  • Replication: Reading from a table that used a self-logging storage engine and updating a table that used a transactional engine (such as InnoDB) generated changes that were written to the binary log using statement format which could make slaves diverge. However, when using mixed logging format, such changes should be written to the binary log using row format. (This issue did not occur when reading from tables using a self-logging engine and updating MyISAM tables, as this was already handled by checking for combinations of non-transactional and transactional engines.) Now such statements are classified as unsafe, and in mixed mode, cause a switch to row-based logging. (Bug#49019)
  • The make_binary_distribution target to make could fail on some platforms because the lines generated were too long for the shell. (Bug#54590)
  • The server could crash during shutdown, if started with the option --innodb_use_sys_malloc=0. (Bug#54453)
  • Inconsistent checking of the relationship between SHOW statements and INFORMATION_SCHEMA queries caused such queries to fail sometimes. (Bug#54422)
  • A crash occurred if a table that was locked with LOCK TABLES was listed twice in a DROP TABLE statement. (Bug#54282)
  • ALTER TABLE for views is not legal but did not produce an error. (If you need to rename a view, use RENAME TABLE.) (Bug#53976)
  • The server could crash with a message InnoDB: Assertion failure in thread nnnn, typically during shutdown on a Windows system. (Bug#53947)
  • Valgrind warnings resulting from passing incomplete DATETIME values to the TIMESTAMP() function were corrected. (Bug#53942)
  • Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908, Bug#53912)
  • The definition of the MY_INIT macro in my_sys.h included an extraneous semicolon, which could cause compilation failure. (Bug#53906)
  • Queries that used MIN() or MAX() on indexed columns could be optimized incorrectly. (Bug#53859)
  • UPDATE on an InnoDB table modifying the same index that was used to satisfy the WHERE condition could trigger a debug assertion under some circumstances. (Bug#53830)
  • MySQL incorrectly processed ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME where was ., .., or a sequence starting with ./ or ../. It used the server data directory (that contains other regular databases) as the database directory. (Bug#53804, CVE-2010-2008)
  • OPTIMIZE TABLE could be run on a table in use by a transaction in a different session, causing repeatable read to break. (Bug#53798)
  • Some combinations of SELECT and SELECT FOR UPDATE statements could fail with errors about locks, or incorrectly release a row lock during a semi-consistent read operation. (Bug#53674)
  • InnoDB mistakenly considered the sequence /*/ to be an open/close comment sequence. (Bug#53644)
  • InnoDB crashed when replacing duplicates in a table after a fast ALTER TABLE added a unique index. (Bug#53592)
  • For InnoDB tables, the error handler for a fast CREATE INDEX did not reset the error state of the transaction before attempting to undo a failed operation, resulting in a crash. (Bug#53591)
  • For single-table DELETE statements that used quick select and index scan simultaneously caused a server crash or assertion failure. (Bug#53450)
  • Certain path names passed to LOAD_FILE() could cause a server crash. (Bug#53417)
  • If the completion_type session variable was changed after a stored procedure or prepared statement had been cached, the change had no effect on subsequent executions of the procedure or statement. (Bug#53346)
  • The AND CHAIN option for COMMIT and ROLLBACK failed to preserve the current transaction isolation level. Setting completion_type to 1 also failed to do so. (Bug#53343)
  • Incorrect results could be returned for LEFT JOIN of InnoDB tables with an impossible WHERE condition. (Bug#53334)
  • Adding a unique key on multiple columns, where one of the columns is null, could mistakenly report duplicate key errors. (Bug#53290)
  • When reporting a foreign key constraint violation during INSERT, InnoDB could display uninitialized data for the DB_TRX_ID and DB_ROLL_PTR system columns. (Bug#53202)
  • The Lock_time value in the slow query log was negative for stored routines. (Bug#53191)
  • Setting the innodb_change_buffering system variable to DEFAULT produced an incorrect result. (Bug#53165)
  • mysqldump and SELECT ... INTO OUTFILE truncated long BLOB and TEXT values to 766 bytes. (Bug#53088)
  • The values of innodb_buffer_pool_pages_total and innodb_buffer_pool_pages_misc in the information_schema.global_status table could be computed incorrectly. (Bug#52983)
  • InnoDB page splitting could enter an infinite loop for compressed tables. (Bug#52964)
  • On some systems, such as Mac OS X, the sockaddr_in and sockaddr_in6 structures contain a non-standard field (sin_len / sin6_len) that must be set but was not. This resulted in hostname lookup failure. (Bug#52923)
  • In the debug version of the server, the FreeState() function could in some circumstances be called twice, leading to an assertion failure. (Bug#52884)
  • Concurrent SHOW COLUMNS statements could cause a server crash. (Bug#52856)
  • With a non-latin1 ASCII-based current character set, the server inappropriately converted DATETIME values to strings. This resulted in the optimizer not using indexes on such columns. (Bug#52849)
  • An overly strict assertion could fail during the purge of delete-marked records in DYNAMIC or COMPRESSED InnoDB tables that contain column prefix indexes. (Bug#52746)
  • InnoDB attempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, in DYNAMIC and COMPRESSED formats, InnoDB stores locally any non-BLOB columns having a maximum length not exceeding 256 bytes. This is because there is no room for the “external storage” flag when the maximum length is 255 bytes or less. This restriction trivially holds in REDUNDANT and COMPACT formats, because there InnoDB always stores locally columns having a length up to local_len = 788 bytes. (Bug#52745)
  • mysqld_safe set plugin_dir using a default path name rather than a path depending on basedir. (Bug#52737)
  • Semi-consistent read was implemented for InnoDB to address Bug#3300. Semi-consistent reads do not block when a nonmatching record is already locked by some other transaction. If the record is not locked, a lock is acquired, but is released if the record does not match the WHERE condition. However, semi-consistent read was attempted even for UPDATE statements having a WHERE condition of the form pk_col1=constant1, ..., pk_colN=constantN. Some code that was designed with the assumption that semi-consistent read would be only attempted on table scans, failed. (Bug#52663)
  • Setting @@GLOBAL.debug to an empty string failed to clear the current debug settings. (Bug#52629)
  • SHOW CREATE TABLE was blocked if the table was write locked by another session. (Bug#52593)
  • The length and max_length metadata values were incorrect for columns with the TEXT family of data types that used multibyte character sets This bug was introduced in MySQL 5.5.3. (Bug#52520)
  • mysql_upgrade attempted to work with stored routines before they were available. (Bug#52444)
  • The check_table_is_closed() debugging function did not protect access to the MyISAM open tables list, with the result that server crashes could occur during table drop or rename operations. (Bug#52432)
  • Spurious duplicate-key errors occurred for multiple-column indexes on columns with the BINARY data type. (Bug#52430)
  • EXPLAIN EXTENDED crashed trying to resolve references to freed temporary table columns for GROUP_CONCAT() ORDER BY arguments. (Bug#52397)
  • Two sessions trying to set the global event_scheduler system variable to OFF resulted in one of them hanging waiting for the event scheduler to stop. (Bug#52367)
  • There was a race condition between flags used for signaling that a query was killed, which led to error-reporting and lock-acquisition problems. (Bug#52356)
  • For a concurrent load of 16 or more connections containing many LOCK TABLES WRITE statements for the same table, server throughput was significantly lower for MySQL 5.5.3 and 5.5.4 than for earlier versions (10%–40% lower depending on concurrency). (Bug#52289)
  • Operations on geometry data types failed on some systems for builds compiled with Sun Studio. (Bug#52208)
  • The optimizer could attempt to evaluate the WHERE clause before any rows had been read, resulting in a server crash. (Bug#52177)
  • Cast operations on NULL DECIMAL values could cause server crashes or Valgrind warnings. (Bug#52168)
  • An assertion was raised as a result of a NULL string being passed to the dtoa code. (Bug#52165)
  • A memory leak occurred due to missing deallocation of the comparators array (a member of the Arg_comparator class). (Bug#52124)
  • For debug builds, creating a view containing a subquery that might require collation adjustment caused an assertion to be raised. For example, this could occur if some items had different collations but the result collation could be adjusted to the one of them. (Bug#52120)
  • Aggregate functions could incorrectly return NULL in outer join queries. (Bug#52051)
  • For outer joins, the optimizer could fail to properly calculate table dependencies. (Bug#52005)
  • A COUNT(DISTINCT) query on a view could cause a server crash. (Bug#51980)
  • For LDML-defined collations, some data structures were not initialized properly to enable UPPER() and LOWER() to work correctly. (Bug#51976)
  • Connections waiting for an InnoDB row lock ignored KILL until the row lock wait ended. Now, KILL during lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. The corresponding transaction is rolled back. (Bug#51920)
  • On Windows, LOAD_FILE() could cause a crash for some pathnames. (Bug#51893)
  • Invalid memory reads occurred for HANDLER ... READ NEXT after a failed HANDLER ... READ FIRST. (Bug#51877)
  • After TRUNCATE TABLE of a MyISAM table, subsequent queries could crash the server if myisam_use_mmap was enabled. (Bug#51868)
  • If myisam_sort_buffer_size was set to a small value, table repair for MyISAM tables with FULLTEXT indexes could crash the server. (Bug#51866)
  • Stored routine DDL statements were written to the binary log using statement-based format regardless of the current logging format. (Bug#51839)
  • A problem with equality propagation optimization for prepared statements and stored procedures caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#51650)
  • See also Bug#8115, Bug#8849.
  • The optimizer performed an incorrect join type when COALESCE() appeared within an IN() operation. (Bug#51598)
  • Locking involving the LOCK_plugin, LOCK_global_system_variables, and LOCK_status mutexes could deadlock. (Bug#51591)
  • Executing a LOAD XML INFILE statement could sometimes lead to a crash of the MySQL Server. (Bug#51571)
  • The server crashed when the optimizer attempted to determine constant tables but a table storage engine did not support exact record count. (Bug#51494)
  • The server could crash populating the INFORMATION_SCHEMA.PROCESSLIST table due to lack of mutex protection. (Bug#51377)
  • Use of HANDLER statements with tables that had spatial indexes caused a server crash. (Bug#51357)
  • With an XA transaction active, SET autocommit = 1 could cause side effects such as memory corruption or a server crash. (Bug#51342)
  • Corrupt MyISAM tables were automatically repaired even when myisam_recover_options was set to OFF. (Bug#51327)
  • Following a bulk insert into a MyISAM table, if MyISAM failed to build indexes using repair by sort, data file corruption could occur. (Bug#51307)
  • CHECKSUM TABLE could compute the checksum for BIT columns incorrectly. (Bug#51304)
  • ALTER TABLE on InnoDB tables (including partitioned tables) acquired exclusive locks on rows of the table being altered. If there was a concurrent transaction that did locking reads from this table, this sometimes led to a deadlock that was not detected by the metadata lock subsystem or by InnoDB (and was reported only after exceeding innodb_lock_wait_timeout). (Bug#51263)
  • A HAVING clause on a joined table in some cases failed to eliminate rows which should have been excluded from the result set. (Bug#51242)
  • Two sessions trying to set the global event_scheduler system variable to different values could deadlock. (Bug#51160)
  • InnoDB fast index creation could incorrectly use a table copy in some cases. (Bug#50946)
  • The Loose Index Scan optimization method assumed that it could depend on the partitioning engine to maintain interval endpoint information, as if it were a storage engine. (Bug#50939)
  • The type inference used for view columns caused some columns in views to be handled as the wrong type, as compared to the same columns in base tables. DATE columns in base tables were treated as TIME columns in views, and base table TIME columns as view DATETIME columns. (Bug#50918)
  • A syntactically invalid trigger could cause the server to crash when trying to list triggers. (Bug#50755)
  • Previously, the server held a global mutex while performing file operations such as deleting an .frm or data file, or reading table metadata from an .frm file or index statistics from a data file. Now the mutex is not held for these operations. Instead, the server uses metadata locks. (Bug#50589, Bug#51557, Bug#49463)
  • User-defined variables of type REAL that contained NULL were handled improperly when assigned to a column of another type. (Bug#50511)
  • InnoDB checks to see whether a row could possibly exceed the maximum size if all columns are fully used. This produced Row size too large errors for some tables that could be created with the built-in InnoDB from older MySQL versions. Now the check is only done when innodb_strict_mode is enabled or if the table is dynamic or compressed. (Bug#50495)
  • Setting --secure-file-priv to the empty string left the value unaffected. (Bug#50373)
  • Calculation of intervals for Event Scheduler events was not portable. (Bug#50087)
  • The YEAR values 2000 and 0000 could be treated as equal. (Bug#49910)
  • Performing a single in-place ALTER TABLE containing ADD INDEX and DROP INDEX options that used the same index name could result in a corrupt table definition file. Now such ALTER TABLE statements are no longer performed in place. (Bug#49838)
  • mysql_upgrade did not detect when CSV log tables incorrectly contained columns that could be NULL. Now these columns are altered to be NOT NULL. (Bug#49823)
  • Selecting from INFORMATION_SCHEMA.ROUTINES or INFORMATION_SCHEMA.PARAMETERS resulted in a memory leak. (Bug#48729)
  • In MySQL 5.1, READ COMMITTED was changed to use less locking due to the availability of row based binary logging (see the Note under READ COMMITTED at Section 12.3.6, “SET TRANSACTION Syntax”). However, READ UNCOMMITTED did not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so that READ UNCOMMITTED now also uses the lesser amount of locking and has the same restrictions for binary logging. (Bug#48607)
  • On Intel x86 machines, the optimizer could choose different execution plans for a query depending on the compiler version and optimization flags used to build the server binary. (Bug#48537)
  • A trigger could change the behavior of assigning NULL to a NOT NULL column. (Bug#48525)
  • The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic ON clauses such as the ones containing the RAND() function, a user-defined function, or a NOT DETERMINISTIC stored function. (Bug#48483)
  • EXPLAIN could cause a server crash for some queries with subqueries. (Bug#48419)
  • The MERGE engine failed to open a child table from a different database if the child table or database name contained characters that were the subject of table name to filename encoding.
  • Further, the MERGE engine did not properly open a child table from the same database if the child table name contained characters such as '/', '#'. (Bug#48265)
  • On Windows, the server failed to find a description for Event ID 100. (Bug#48042)
  • Multi-statement execution could fail with an error about foreign key constraints. This problem could affect calls to mysql_query() and mysql_real_query(), and CALL statements that invoke stored procedures. (Bug#48024)
  • A query that read from a derived table (of the form SELECT ... FROM (SELECT ...)) produced incorrect results when the following conditions were present:
  • The table subquery contained a derived query ((SELECT ... ) AS column).
  • The derived query could potentially produce zero rows or a single NULL (that is, no rows matched, or the query used an aggregate function such as SUM() running over zero rows).
  • The table subquery joined at least two tables.
  • The join condition involved an index.
  • (Bug#47904)
  • The optimization to read MIN() or MAX() values from an index did not properly handle comparisons with NULL values. This could produce incorrect results for MIN() or MAX()when the WHERE clause tested a NOT NULL column for NULL. (Bug#47762)
  • Killing a query during the optimization phase of a subquery could cause a server crash. (Bug#47761)
  • Using REPLACE to update a previously inserted negative value in an AUTO_INCREMENT coumn in an InnoDB table caused the table auto-increment value to be updated to 2147483647. (Bug#47720)
  • The query shown by EXPLAIN EXTENDED plus SHOW WARNINGS could produce results different from the original query. (Bug#47669)
  • MyISAM could write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug#47598)
  • OPTIMIZE TABLE for an InnoDB table could raise an assertion if another session issued a concurrent DROP TABLE. (Bug#47459)
  • For updates to InnoDB tables, TIMESTAMP columns could be updated even when no values actually changed. (Bug#47453)
  • Setting myisam_repair_threads larger than 1 could result in the cardinality for all indexes of a MyISAM table being set to 1 after parallel index repair. (Bug#47444)
  • mysqld_safe did not always pass --open-files-limit through to mysqld. mysqld_safe did not treat dashes and underscores as equivalent in option names. (Bug#47095)
  • For events of MYSQL_AUDIT_GENERAL_CLASS, the event subclass was not passed to audit plugins even though the server passed the subclass to the plugin handler. The subclass is now available through the following changes:
  • The struct mysql_event_general structure has a new event_subclass member.
  • The new member changes the interface, so the audit plugin interface version, MYSQL_AUDIT_INTERFACE_VERSION, has been incremented from 0x0100 to 0x0200. Plugins that require access to the new member must be recompiled to use version 0x0200 or higher.
  • The example plugin in the plugin/audit_null directory has been modified to count events of each subclass, based on the event_subclass value. See Section 22.2.5.2, “Writing Audit Plugins”. (Bug#47059)
  • When the transaction isolation level was REPEATABLE READ and binary logging used statement or mixed format, SELECT statements with subqueries referencing InnoDB tables unnecessarily acquired shared locks on rows in these tables. (Bug#46947)
  • In debug builds, if the listed columns in the view definition of the table used in an INSERT ... SELECT statement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug#46615)
  • For the COMMIT and ROLLBACK statements, the AND CHAIN and RELEASE modifiers should be mutually exclusive, but the parser allowed both to be specified. (Bug#46527)
  • If the server is started with --skip-grant-tables, plugin loading and unloading should be prohibited, but the server failed to reject INSTALL PLUGIN and UNINSTALL PLUGIN statements. (Bug#46261)
  • gcc 4.4.0 could fail to compile dtoa.c. (Bug#45882)
  • ALTER TABLE ... ADD COLUMN for a table with multiple foreign keys caused a server crash. (Bug#45052)
  • A mismatch between index information maintained within the .frm files and the corresponding information in the InnoDB system tablespace could produce this error: [ERROR] Index index of table has n columns unique inside InnoDB, but MySQL is asking statistics for m columns. Have you mixed up .frm files from different installations? (Bug#44571)
  • Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) that generated multiple result sets (such as a stored procedure or a multi-statement command) left the connection unusable. (Bug#42373)
  • The server could crash with an out of memory error when trying to parse a query that was too long to fit in memory. Now the parser rejects such queries with an ER_OUT_OF_RESOURCES error. (Bug#42064)
  • InnoDB could fail to create a unique index on NULL columns. (Bug#41904)
  • For a query that selected from a view and used an alias for the view, the metadata used the alias name rather than the view name in the MYSQL_FIELD.table member. (Bug#41788)
  • mysql_upgrade did not create temporary files properly. (Bug#41057)
  • It was possible for DROP TABLE of one MyISAM table to remove the data and index files of a different MyISAM table. (Bug#40980)
  • If the arguments to a CONCAT() call included a local routine variable, selecting the return value into a user variable could produce an incorrect result. (Bug#40625)
  • Column names displayed from the PARTITION_EXPRESSION column of the INFORMATION_SCHEMA.PARTITIONS table did not include escape characters as necessary. (Bug#39338)
  • When SET TRANSACTION ISOLATION LEVEL was used to set the isolation level for the next transaction, the level could persist for subsequent transactions. (Bug#39170)
  • When using UNINSTALL PLUGIN to remove a loaded plugin, open tables and connections caused mysqld to hang until the open connections had been closed. (Bug#39053)
  • Valgrind warnings in the InnoDB compare_record() function were corrected. (Bug#38999)
  • The optimizer sometimes used filesort for ORDER BY when it should have used an index. (Bug#38745)
  • Setting the session value of the debug system variable also set the global value. (Bug#38054)
  • Accessing a MERGE table with an empty underlying table list incorrectly resulted in a “wrong index” error message rather than “end of file.” (Bug#35274)
  • The test for readline during configuration failed when trying to build MySQL in a directory other than the source tree root. (Bug#35250)
  • mysqld could fail during execution when using SSL. (Bug#34236)
  • A query on a FEDERATED table in which the data was ordered by a TEXT column returned incorrect results. For example, a query such as the following would result in incorrect results if column column1 was a TEXT column:
  • SELECT * FROM table1 ORDER BY column1;
  • (Bug#32426)
  • MySQL Makefiles relied on GNU extensions. (Bug#30708)
  • The parser allocated too much memory for a query containing multiple statements. (Bug#27863)
  • The behavior of the RPM installation for both new installations and upgrade installations has changed.
  • During a new installation, the server boot scripts are installed, but the MySQL server is not started at the end of the installation, since the status of the system during an unattended installation is not known.
  • During an upgrade installation using the RPM packages, if the server is running when the upgrade occurs, the server is stopped, the upgrade occurs, and server is restarted. If the server is not already running when the RPM upgrade occurs, the server is not started at the end of the installation.
  • The boot scripts for MySQL are installed in the appropriate directories in /etc, so the MySQL server will be restarted automatically at the next machine reboot. (Bug#27072)
  • ROW_COUNT() returned a meaningful value only for some DML statements. Now it returns a value as follows:
  • DDL statements: 0. This applies to statements such as CREATE TABLE or DROP TABLE.
  • DML statements other than SELECT: The number of affected rows. This applies to statements such as UPDATE, INSERT, or DELETE (as before), but now also to statements such as ALTER TABLE and LOAD DATA INFILE.
  • SELECT: -1 if the statement returns a result set, or the number of rows “affected” if it does not. For example, for SELECT * FROM t1, ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE 'file_name', ROW_COUNT() returns the number of rows written to the file.
  • SIGNAL statements: 0.

New in MySQL 5.1.49 (Jul 26, 2010)

  • InnoDB Notes:
  • InnoDB Plugin has been upgraded to version 1.0.10. This version is considered of General Availability (GA) quality.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Bugs fixed:
  • Replication: When using unique keys on NULL columns in row-based replication, the slave sometimes chose the wrong row when performing an update. This happened because a table having a unique key on such a column could have multiple rows containing NULL for the column used by the unique key, and the slave merely picked the first row containing NULL in that column. (Bug#53893)
  • Replication: FLUSH LOGS could in some circumstances crash the server. This occurred because the I/O thread could concurrently access the relay log I/O cache while another thread was performing the FLUSH LOGS, which closes and reopens the relay log and, while doing so, initializes (or re-initializes) its I/O cache. This could cause problems if some other thread (in this case, the I/O thread) is accessing it at the same time.
  • Now the thread performing the FLUSH LOGS takes a lock on the relay log before actually flushing it. (Bug#53657)
  • See also Bug#50364.
  • Replication: Two related issues involving temporary tables and transactions were introduced by a fix made in MySQL 5.1.37:
  • When a temporary table was created or dropped within a transaction, any failed statement that following the CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statement triggered a rollback, which caused the slave diverge from the master.
  • When a CREATE TEMPORARY TABLE ... SELECT * FROM ... statement was executed within a transaction in which only tables using transactional storage engines were used and the transaction was rolled back at the end, the changes—including the creation of the temporary table—were not written to the binary log.
  • The current fix restores the correct behavior in both of these cases. (Bug#53560)
  • This regression was introduced by Bug#43929.
  • Replication: When CURRENT_USER() or CURRENT_USER was used to supply the name and host of the affected user or of the definer in any of the statements DROP USER, RENAME USER, GRANT, REVOKE, and ALTER EVENT, the reference to CURRENT_USER() or CURRENT_USER was not expanded when written to the binary log. This resulted in CURRENT_USER() or CURRENT_USER being expanded to the user and host of the slave SQL thread on the slave, thus breaking replication. Now CURRENT_USER() and CURRENT_USER are expanded prior to being written to the binary log in such cases, so that the correct user and host are referenced on both the master and the slave. (Bug#48321)
  • An ALTER TABLE statement could convert an InnoDB compressed table (with row_format=compressed) back to an uncompressed table (with row_format=compact). (Bug#54679)
  • A signal-handler redefinition for SIGUSR1 was removed. The redefinition could cause the server to encounter a kernel deadlock on Solaris when there are many active threads. Other POSIX platforms might also be affected. (Bug#54667)
  • InnoDB could issue an incorrect message on startup, if tables were created under the setting innodb_file_per_table=ON and the server was restarted under the setting innodb_file_per_table=OFF. The message was of the form InnoDB: Warning: allocated tablespace n, old maximum was 0. (Bug#54658)
  • The make_binary_distribution target to make could fail on some platforms because the lines generated were too long for the shell. (Bug#54590)
  • The server failed to disregard sort order for some zero-length tuples, leading to an assertion failure. (Bug#54459)
  • The default value of myisam_max_extra_sort_file_size could be higher than the maximum accepted value, leading to warnings upon the server start. (Bug#54457)
  • If a session tried to drop a database containing a table opened with HANDLER in another session, any DATABASE statement (CREATE, DROP, ALTER) executed by that session produced a deadlock. (Bug#54360)
  • Fast index creation could fail, leaving the new secondary index corrupted. (Bug#54330)
  • A client could supply data in chunks to a prepared statement parameter other than of type TEXT or BLOB using the mysql_stmt_send_long_data() C API function (or COM_STMT_SEND_LONG_DATA command). This led to a crash because other data types are not valid for long data. (Bug#54041)
  • Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908, Bug#53912)
  • The definition of the MY_INIT macro in my_sys.h included an extraneous semicolon, which could cause compilation failure. (Bug#53906)
  • A client with automatic reconnection enabled saw the error message Lost connection to MySQL server during query if the connection was lost between the mysql_stmt_prepare() and mysql_stmt_execute() C API functions. However, mysql_stmt_errno() returned 0, not the corresponding error number 2013. (Bug#53899)
  • Queries that used MIN() or MAX() on indexed columns could be optimized incorrectly. (Bug#53859)
  • The Lock_time value in the slow query log was negative for stored routines. (Bug#53191)
  • The results of some ORDER BY ... DESC queries were sorted incorrectly. (Bug#51431)
  • Index Merge between three indexes could return incorrect results. (Bug#50389)
  • Performing large numbers of RENAME TABLE statements caused excessive memory use. (Bug#47991)
  • The server could crash with an out of memory error when trying to parse a query that was too long to fit in memory. Now the parser rejects such queries with an ER_OUT_OF_RESOURCES error. (Bug#42064)
  • Sort-index_merge for join tables other than the first table used excessive memory. (Bug#41660)
  • Valgrind warnings in the InnoDB compare_record() function were corrected. (Bug#38999)
  • mysqld could fail during execution when using SSL. (Bug#34236)
  • The behavior of the RPM upgrade installation has changed. During an upgrade installation using the RPM packages, if the MySQL server is running when the upgrade occurs, the server is stopped, the upgrade occurs, and server is restarted. If the server is not already running when the RPM upgrade occurs, the server is not started at the end of the upgrade. The boot scripts for MySQL are installed in the appropriate directories in /etc, so the MySQL server will be restarted automatically at the next machine reboot.

New in MySQL 5.1.48 (Jun 17, 2010)

  • Functionality added or changed:
  • The Rows_examined value in slow query log rows now is nonzero for UPDATE and DELETE statements that modify rows. (Bug#49756)
  • Bugs fixed:
  • Important Change: Replication: MyISAM transactions replicated to a transactional slave left the slave in an unstable condition. This was due to the fact that, when replicating from a nontransactional storage engine to a transactional engine with autocommit turned off, no BEGIN and COMMIT statements were written to the binary log; thus, on the slave, a never-ending transaction was started.
  • The fix for this issue includes enforcing autocommit mode on the slave by replicating all autocommit=1 statements from the master. (Bug#29288)
  • Partitioning: ALTER TABLE statements that cause table partitions to be renamed or dropped (such as ALTER TABLE ... ADD PARTITION, ALTER TABLE ... DROP PARTITION, and ALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against the INFORMATION_SCHEMA.PARTITIONS table — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that the INFORMATION_SCHEMA database ignored the name lock imposed by the ALTER TABLE statement on the partitions affected. In particular, this led to problems with InnoDB tables, because InnoDB would accept the rename operation, but put it in a background queue, so that subsequent rename operations failed when InnoDB was unable to find the correct partition. Now, INFORMATION_SCHEMA honors name locks imposed by ongoing ALTER TABLE statements that cause partitions to be renamed or dropped. (Bug#50561)
  • See also Bug#47343, Bug#45808.
  • Partitioning: It was possible to execute a CREATE TEMPORARY TABLE tmp LIKE pt statement, where pt is a partitioned table, even though partitioned temporary tables are not permitted, which caused the server to crash. Now a check is performed to prevent such statements from being executed. (Bug#49477)
  • Partitioning: When attempting to perform DDL on a partitioned table and the table's .par file could not be found, the server returned the inaccurate error message Out of memory; restart server and try again (needed 2 bytes). Now in such cases, the server returns the error Failed to initialize partitions from .par file. (Bug#49161)
  • Replication: In some cases, attempting to update a column with a value of an incompatible type resulted in a mismatch between master and slave because the column value was set to its implicit default value on the master (as expected), but the same column on the slave was set to NULL. (Bug#52868)
  • Replication: When using a non-transactional table on the master with autocommit disabled, no COMMIT was recorded in the binary log following a statement affecting this table. If the slave's copy of the table used a transactional storage engine, the result on the slave was as though a transaction had been started, but never completed. (Bug#49522)
  • See also Bug#29288.
  • Replication: Reading from a table that used a self-logging storage engine and updating a table that used a transactional engine (such as InnoDB) generated changes that were written to the binary log using statement format which could make slaves diverge. However, when using mixed logging format, such changes should be written to the binary log using row format. (This issue did not occur when reading from tables using a self-logging engine and updating MyISAM tables, as this was already handled by checking for combinations of non-transactional and transactional engines.) Now such statements are classified as unsafe, and in mixed mode, cause a switch to row-based logging. (Bug#49019)
  • Valgrind warnings resulting from passing incomplete DATETIME values to the TIMESTAMP() function were corrected. (Bug#53942)
  • Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908)
  • UPDATE on an InnoDB table modifying the same index that was used to satisfy the WHERE condition could trigger a debug assertion under some circumstances. (Bug#53830)
  • For single-table DELETE statements that used quick select and index scan simultaneously caused a server crash or assertion failure. (Bug#53450)
  • Incorrect results could be returned for LEFT JOIN of InnoDB tables with an impossible WHERE condition. (Bug#53334)
  • Fixed a checksum error reported for compressed tables when the --innodb_checksums option is enabled. (Bug#53248)
  • Corrected the handling of the setting innodb_change_buffering=default. (The appropriate default value is different between MySQL 5.1 and 5.5.) (Bug#53165)
  • mysqldump and SELECT ... INTO OUTFILE truncated long BLOB and TEXT values to 766 bytes. (Bug#53088)
  • DBUG code could in some cirsumstances call FreeState() twice, leading to a server crash or failure. (Bug#52884)
  • Aggregate functions could incorrectly return NULL in outer join queries. (Bug#52051)
  • The Loose Index Scan optimization method assumed that it could on the storage engine to maintain interval endpoint information, which was not true for the partitioning engine. (Bug#50939)
  • Calculation of intervals for Event Scheduler events was not portable. (Bug#50087)
  • Selecting from INFORMATION_SCHEMA.ROUTINES or INFORMATION_SCHEMA.PARAMETERS resulted in a memory leak. (Bug#48729)
  • When the transaction isolation level was REPEATABLE READ and binary logging used statement or mixed format, SELECT statements with subqueries referencing InnoDB tables unnecessarily acquired shared locks on rows in these tables. (Bug#46947)
  • Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) that generated multiple result sets (such as a stored procedure or a multi-statement command) left the connection unusable. (Bug#42373)
  • If a crash occurs while creating an index using the InnoDB “Fast Index Creation” mechanism, the partially created index is dropped during the crash recovery processing when the database is restarted.

New in MySQL 5.1.47 (May 21, 2010)

  • InnoDB Plugin Notes:
  • InnoDB Plugin has been upgraded to version 1.0.8. This version is considered of General Availability (GA) quality. InnoDB Plugin Change History, may contain information in addition to those changes reported here.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Functionality added or changed:
  • InnoDB stores redo log records in a hash table during recovery. On 64-bit systems, this hash table was 1/8 of the buffer pool size. To reduce memory usage, the dimension of the hash table was reduced to 1/64 of the buffer pool size (or 1/128 on 32-bit systems). (Bug#53122)
  • Bugs fixed:
  • Security Fix: The server failed to check the table name argument of a COM_FIELD_LIST command packet for validity and compliance to acceptable table name standards. This could be exploited to bypass almost all forms of checks for privileges and table-level grants by providing a specially crafted table name argument to COM_FIELD_LIST.
  • In MySQL 5.0 and above, this allowed an authenticated user with SELECT privileges on one table to obtain the field definitions of any table in all other databases and potentially of other MySQL instances accessible from the server's file system.
  • Additionally, for MySQL version 5.1 and above, an authenticated user with DELETE or SELECT privileges on one table could delete or read content from any other table in all databases on this server, and potentially of other MySQL instances accessible from the server's file system. (Bug#53371, CVE-2010-1848)
  • Security Fix: The server was susceptible to a buffer-overflow attack due to a failure to perform bounds checking on the table name argument of a COM_FIELD_LIST command packet. By sending long data for the table name, a buffer is overflown, which could be exploited by an authenticated user to inject malicious code. (Bug#53237, CVE-2010-1850)
  • Security Fix: The server could be tricked into reading packets indefinitely if it received a packet larger than the maximum size of one packet. (Bug#50974, CVE-2010-1849)
  • Important Change: Replication: When invoked, CHANGE MASTER TO and SET GLOBAL sql_slave_skip_counter now cause information to be written to the error log about the slave's state prior to execution of the statement. For CHANGE MASTER TO, this information includes the previous values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and MASTER_LOG_POS. For SET GLOBAL SQL_SLAVE_SKIP_COUNTER, this information includes the previous values of sql_slave_skip_counter, the group relay log name, and the group relay log position. (Bug#43406, Bug#43407)
  • Replication: The failure of a REVOKE statement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. (Bug#51987)
  • Certain path names passed to LOAD_FILE() could cause a server crash. (Bug#53417)
  • When reporting a foreign key constraint violation during INSERT, InnoDB could display uninitialized data for the DB_TRX_ID and DB_ROLL_PTR system columns. (Bug#53202)
  • InnoDB page splitting could enter an infinite loop for compressed tables. (Bug#52964)
  • An overly strict assertion could fail during the purge of delete-marked records in DYNAMIC or COMPRESSED InnoDB tables that contain column prefix indexes. (Bug#52746)
  • InnoDB attempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, in DYNAMIC and COMPRESSED formats, InnoDB stores locally any non-BLOB columns having a maximum length not exceeding 256 bytes. This is because there is no room for the “external storage” flag when the maximum length is 255 bytes or less. This restriction trivially holds in REDUNDANT and COMPACT formats, because there InnoDB always stores locally columns having a length up to local_len = 788 bytes. (Bug#52745)
  • Semi-consistent read was implemented for InnoDB to address Bug#3300. Semi-consistent reads do not block when a nonmatching record is already locked by some other transaction. If the record is not locked, a lock is acquired, but is released if the record does not match the WHERE condition. However, semi-consistent read was attempted even for UPDATE statements having a WHERE condition of the form pk_col1=constant1, ..., pk_colN=constantN. Some code that was designed with the assumption that semi-consistent read would be only attempted on table scans, failed. (Bug#52663)
  • Setting @@GLOBAL.debug to an empty string failed to clear the current debug settings. (Bug#52629)
  • A memory leak occurred due to missing deallocation of the comparators array (a member of the Arg_comparator class). (Bug#52124)
  • For debug builds, creating a view containing a subquery that might require collation adjustment caused an assertion to be raised. For example, this could occur if some items had different collations but the result collation could be adjusted to the one of them. (Bug#52120)
  • Connections waiting for an InnoDB row lock ignored KILL until the row lock wait ended. Now, KILL during lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. (Bug#51920)
  • Locking involving the LOCK_plugin, LOCK_global_system_variables, and LOCK_status mutexes could deadlock. (Bug#51591)
  • InnoDB fast index creation could incorrectly use a table copy in some cases. (Bug#50946)
  • A syntactically invalid trigger could cause the server to crash when trying to list triggers. (Bug#50755)
  • InnoDB Plugin checks to see whether a row could possibly exceed the maximum size if all columns are fully used. This produced Row size too large errors for some tables that could be created with the built-in InnoDB. Now the check is only done when innodb_strict_mode is enabled or if the table is dynamic or compressed. (Bug#50495)
  • In MySQL 5.1, READ COMMITTED was changed to use less locking due to the availability of row based binary logging (see the Note under READ COMMITTED at Section 12.3.6, “SET TRANSACTION Syntax”). However, READ UNCOMMITTED did not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so that READ UNCOMMITTED now also uses the lesser amount of locking and has the same restrictions for binary logging. (Bug#48607)
  • EXPLAIN could cause a server crash for some queries with subqueries. (Bug#48419)
  • On Windows, the server failed to find a description for Event ID 100. (Bug#48042)
  • For updates to InnoDB tables, TIMESTAMP columns could be updated even when no values actually changed. (Bug#47453)
  • If the server is started with --skip-grant-tables, plugin loading and unloading should be disallowed, but the server failed to reject INSTALL PLUGIN and UNINSTALL PLUGIN statements. (Bug#46261)
  • Storage engine plugins on Windows could've been built with a definition of time_t which was different from the server expectations. The difference could cause affected plugins to crash. In addition, the use of the time_t type in the storage engine API layer has been enforced. (Bug#39802, Bug#40092)
  • When using UNINSTALL PLUGIN to remove a loaded plugin, open tables and connections caused mysqld to hang until the open connections had been closed. (Bug#39053)
  • 1) In rare cases, if a thread was interrupted during a FLUSH PRIVILEGES operation, a debug assertion occurred later due to improper diagnostic area setup. 2) A KILL operation could cause a console error message referring to a diagnostic area state without first ensuring that the state existed. (Bug#33982)

New in MySQL 5.1.46 (Apr 23, 2010)

  • InnoDB Plugin Notes:
  • InnoDB Plugin has been upgraded to version 1.0.7. This version is considered of General Availability (GA) quality. The InnoDB Plugin Change History may contain information in addition to those changes reported here.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic
  • Functionality added or changed:
  • There is a new system variable, skip_name_resolve, that is set from the value of the --skip-name-resolve server option. This provides a way to determine at runtime whether the server uses name resolution for client connections. (Bug#37168)
  • Bugs fixed:
  • Security Fix: Privilege checking for UNINSTALL PLUGIN was incorrect. (Bug#51770)
  • Partitioning: Partition pruning on RANGE partitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not using MAXVALUE). Now the last partition is not included if the partitioning function value is not within the range. (Bug#51830)
  • Partitioning: The insert_id server system variable was not reset following an insert that failed on a partitioned MyISAM table having an AUTO_INCREMENT column. (Bug#50392)
  • Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible via an ALTER TABLE statement to set a foreign key on a partitioned table; it was also possible to partition a table with a single foreign key. (Bug#50104)
  • Partitioning: GROUP BY queries performed poorly for some partitioned tables. This was due to the block size not being set for partitioned tables, thus the keys per block was not correct, which could cause such queries to be optimized incorrectly. (Bug#48229)
  • See also Bug#37252.
  • Partitioning: REPAIR TABLE failed for partitioned ARCHIVE tables. (Bug#46565)
  • Replication: TRUNCATE TABLE performed on a temporary table using the InnoDB storage engine was logged even when using row-based mode. (Bug#51251)
  • Replication: When using temporary tables the binary log needs to insert a pseudo-thread ID for threads that are using temporary tables, each time a switch happens between two threads, both of which are using temporary tables. However, if a thread issued a failing statement before exit, its ID was not recorded in the binary log, and this in turn caused the ID for the next thread that tried to do something with a temporary table not to be logged as well. Subsequent replays of the binary log failed with the error Table ... doesn't exist. (Bug#51226)
  • Replication: If the master was using sql_mode='TRADITIONAL', duplicate key errors were not sent to the slave, which received 0 rather than the expected error code. This caused replication to fail even when such an error was expected. (Bug#51055)
  • Replication: When run with the --database option, mysqlbinlog printed ROLLBACK statements but did not print any corresponding SAVEPOINT statements. (Bug#50407)
  • Replication: CREATE EVENT statements were padded with “garbage” characters when written to the binary log, which caused a syntax error when trying to read back from the log. (Bug#50095)
  • Replication: Column length information generated by InnoDB did not match that generated by MyISAM, which caused invalid metadata to be written to the binary log when trying to replicate BIT columns. (Bug#49618)
  • Replication: The value of Slave_IO_running in the output of SHOW SLAVE STATUS did not distinguish between all 3 possible states of the slave I/O thread (not running; running but not connected; connected). Now the value Connecting (rather than No) is shown when the slave I/O thread is running but the slave is not connected to a replication master.
  • The server system variable Slave_running also reflects this change, and is now consistent with what is shown for Slave_IO_running. (Bug#30703, Bug#41613, Bug#51089)
  • EXPLAIN EXTENDED crashed trying to resolve references to freed temporary table columns for GROUP_CONCAT() ORDER BY arguments. (Bug#52397)
  • For InnoDB Plugin, bit fields were causing problems with concurrency on SMP systems because of word-packing issues. (Bug#52360)
  • The optimizer could attempt to evaluate the WHERE clause before any rows had been read, resulting in a server crash. (Bug#52177)
  • For LDML-defined collations, some data structures were not initialized properly to enable UPPER() and LOWER() to work correctly. (Bug#51976)
  • On Windows, LOAD_FILE() could cause a crash for some pathnames. (Bug#51893)
  • Invalid memory reads occurred for HANDLER ... READ NEXT after a failed HANDLER ... READ FIRST. (Bug#51877)
  • After TRUNCATE TABLE of a MyISAM table, subsequent queries could crash the server if myisam_use_mmap was enabled. (Bug#51868)
  • If myisam_sort_buffer_size was set to a small value, table repair for MyISAM tables with FULLTEXT indexes could crash the server. (Bug#51866)
  • In LOAD DATA INFILE, using a SET clause to set a column equal to itself caused a server crash. (Bug#51850)
  • A problem with equality propagation optimization for prepared statements and stored procedures caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#51650)
  • See also Bug#8115, Bug#8849.
  • The optimizer performed an incorrect join type when COALESCE() appeared within an IN() operation. (Bug#51598)
  • The server crashed when the optimizer attempted to determine constant tables but a table storage engine did not support exact record count. (Bug#51494)
  • The server could crash populating the INFORMATION_SCHEMA.PROCESSLIST table due to lack of mutex protection. (Bug#51377)
  • Use of HANDLER statements with tables that had spatial indexes caused a server crash. (Bug#51357)
  • With an XA transaction active, SET autocommit = 1 could cause side effects such as memory corruption or a server crash. (Bug#51342)
  • Following a bulk insert into a MyISAM table, if MyISAM failed to build indexes using repair by sort, data file corruption could occur. (Bug#51307)
  • CHECKSUM TABLE could compute the checksum for BIT columns incorrectly. (Bug#51304)
  • A HAVING clause on a joined table in some cases failed to eliminate rows which should have been excluded from the result set. (Bug#51242)
  • The type inference used for view columns caused some columns in views to be handled as the wrong type, as compared to the same columns in base tables. DATE columns in base tables were treated as TIME columns in views, and base table TIME columns as view DATETIME columns. (Bug#50918)
  • The YEAR values 2000 and 0000 could be treated as equal. (Bug#49910)
  • Performing a single in-place ALTER TABLE containing ADD INDEX and DROP INDEX options that used the same index name could result in a corrupt table definition file. Now such ALTER TABLE statements are no longer performed in place. (Bug#49838)
  • mysql_upgrade did not detect when CSV log tables incorrectly contained columns that could be NULL. Now these columns are altered to be NOT NULL. (Bug#49823)
  • If a stored function contained a RETURN statement with an ENUM value in the ucs2 character set, SHOW CREATE FUNCTION and SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES returned incorrect values. (Bug#48766)
  • The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic ON clauses such as the ones containing the RAND() function, a user-defined function, or a NOT DETERMINISTIC stored function. (Bug#48483)
  • A query that read from a derived table (of the form SELECT ... FROM (SELECT ...)) produced incorrect results when the following conditions were present:
  • The table subquery contained a derived query ((SELECT ... ) AS column).
  • The derived query could potentially produce zero rows or a single NULL (that is, no rows matched, or the query used an aggregate function such as SUM() running over zero rows).
  • The table subquery joined at least two tables.
  • The join condition involved an index.
  • Bug#47904)
  • The optimization to read MIN() or MAX() values from an index did not properly handle comparisons with NULL values. This could produce incorrect results for MIN() or MAX()when the WHERE clause tested a NOT NULL column for NULL. (Bug#47762)
  • Killing a query during the optimization phase of a subquery could cause a server crash. (Bug#47761)
  • The query shown by EXPLAIN EXTENDED plus SHOW WARNINGS could produce results different from the original query. (Bug#47669)
  • Renaming a column of an InnoDB table caused the server to go out of sync with the InnoDB data dictionary. (Bug#47621)
  • MyISAM could write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug#47598)
  • Setting myisam_repair_threads larger than 1 could result in the cardinality for all indexes of a MyISAM table being set to 1 after parallel index repair. (Bug#47444)
  • In debug builds, if the listed columns in the view definition of the table used in an INSERT ... SELECT statement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug#46615)
  • For a query that selected from a view and used an alias for the view, the metadata used the alias name rather than the view name in the MYSQL_FIELD.table member. (Bug#41788)
  • mysql_upgrade did not create temporary files properly. (Bug#41057)
  • It was possible for DROP TABLE of one MyISAM table to remove the data and index files of a different MyISAM table. (Bug#40980)
  • If the arguments to a CONCAT() call included a local routine variable, selecting the return value into a user variable could produce an incorrect result. (Bug#40625)
  • SHOW CREATE VIEW returned invalid SQL if the definition contained a SELECT 'string' statement where the string was longer than the maximum length of a column name, due to the fact that this text was also used as an alias (in the AS clause).
  • Because not all names retrieved from arbitrary SELECT statements can be used as view column names due to length and format restrictions, the server now checks the conformity of automatically generated column names and rewrites according to a predefined format any names that are not acceptable as view column names before storing the final view definition on disk.
  • In such cases, the name is now rewritten as Name_exp_pos, where pos is the position of the column. To avoid this conversion scheme, define explicit, valid names for view columns using the column_list clause of the CREATE VIEW statement.
  • As part of this fix, aliases are now generated only for top-level statements. (Bug#40277)
  • While looking for the shortest index for a covering index scan, the optimizer ignored that a clustered primary key read the entire table. (Bug#39653)
  • mysqlbinlog had a memory leak in its option-processing code. (Bug#38468)
  • The test for readline during configuration failed when trying to build MySQL in a directory other than the source tree root. (Bug#35250)

New in MySQL 5.1.45 (Mar 17, 2010)

  • This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Functionality added or changed:
  • mysqltest has a new --max-connections option to set a higher number of maximum allowed server connections than the default 128. This option can also be passed via mysql-test-run.pl. (Bug#51135)
  • mysql-test-run.pl has a new --portbase option and a corresponding MTR_PORT_BASE environment variable for setting the port range, as an alternative to the existing --build-thread option. (Bug#50182)
  • mysql-test-run.pl has a new --gprof option that runs the server through the gprof profiler, much the same way the currently supported --gcov option runs it through gcov. (Bug#49345)
  • mysqltest has a new lowercase_result command that converts the output of the next statement to lowercase. This is useful for test cases where the lettercase may vary between platforms. (Bug#48863)
  • mysqltest has a new remove_files_wildcard command that removes files matching a pattern from a directory. (Bug#39774)
  • Bugs fixed:
  • Partitioning: Attempting to drop a partitioned table from one connection while waiting for the completion of an ALTER TABLE that had been issued from a different connection, and that changed the storage engine used by the table, could cause the server to crash. (Bug#42438)
  • Replication: Adding an index to a table on the master caused the slave to stop logging slow queries to the slow query log. (Bug#50620)
  • Replication: Queries which were written to the slow query log on the master were not written to the slow query log on the slave. (Bug#23300)
  • See also Bug#48632.
  • mysqld_multi failed due to a syntax error in the script. (Bug#51468)
  • Referring to a subquery result in a HAVING clause could produce incorrect results. (Bug#50995)
  • Use of filesort plus the join cache normally is preferred to a full index scan. But it was used even if the index is clustered, in which case, the clustered index scan can be faster. (Bug#50843)
  • For debug builds, SHOW BINARY LOGS caused an assertion to be raised if binary logging was not enabled. (Bug#50780)
  • Incorrect handling of BIT columns in temporary tables could lead to spurious duplicate-key errors. (Bug#50591)
  • Full-text queries that used the truncation operator (*) could enter an infinite loop. (Bug#50351)
  • mysqltest no longer lets you execute an SQL statement on a connection after doing a send command, unless you do a reap first. This was previously accepted but could produce unpredictable results. (Bug#49269)
  • For debug builds on Windows, warnings about incorrect use of debugging directives were written to the error log. The directives were rewritten to eliminate these messages. (Bug#49025)
  • Building MySQL on Fedora Core 12 64-bit failed, due to errors in comp_err. (Bug#48864)
  • An ARZ file missing from the database directory caused the server to crash. (Bug#48757)
  • Slow CALL statements were not always logged to the slow query log because execution time for multiple-statement stored procedures was assessed incorrectly. (Bug#47905)
  • Failure to open a view with a nonexistent DEFINER was improperly handled and the server would crash later attempting to lock the view. (Bug#47734)
  • If EXPLAIN encountered an error in the query, a memory leak occurred. (Bug#45989)
  • Grouping by a subquery in a query with a DISTINCT aggregate function led to incorrect and unordered grouping values. (Bug#45640)
  • Propagation of a large unsigned numeric constant in WHERE expressions could lead to incorrect results. This also affected EXPLAIN EXTENDED, which printed incorrect numeric constants in such transformed WHERE expressions. (Bug#45360)
  • Valgrind warnings about uninitialized variables in optimizer code were silenced. (Bug#45195)
  • flush_cache_records() did not correctly check for errors that should cause statement execution to stop, leading to a server crash. (Bug#39022)
  • When building MySQL when using a different target directory (for example using the VPATH environment variable), the build of the embedded readline component would fail. (Bug#35250)
  • INSERT INTO ... VALUES(DEFAULT) failed to insert the correct value for ENUM columns. For MyISAM tables, an empty value was inserted. For CSV tables, the table became corrupt. (Bug#33717)

New in MySQL 5.1.44 (Feb 19, 2010)

  • This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.
  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
  • Functionality added or changed:
  • Replication: Introduced the --binlog-direct-non-transactional-updates server option. This option causes updates using the statement-based logging format to tables using non-transactional engines to be written directly to the binary log, rather than to the transaction cache.
  • Before using this option, be certain that you have no dependencies between transactional and non-transactional tables. A statement that both selects from an InnoDB table and inserts into a MyISAM table is an example of such a dependency. For more information, see Section 16.1.3.4, “Binary Log Options and Variables”. (Bug#46364)
  • See also Bug#28976, Bug#40116.
  • Bugs fixed:
  • Partitioning: When an ALTER TABLE ... REORGANIZE PARTITION statement on an InnoDB table failed due to innodb_lock_wait_timeout expiring while waiting for a lock, InnoDB did not clean up any temporary files or tables which it had created. Attempting to reissue the ALTER TABLE statement following the timeout could lead to storage engine errors, or possibly a crash of the server. (Bug#47343)
  • Replication: In some cases, inserting into a table with many columns could cause the binary log to become corrupted. (Bug#50018)
  • See also Bug#42749.
  • Replication: When using row-based replication, setting a BIT or CHAR column of a MyISAM table to NULL, then trying to delete from the table, caused the slave to fail with the error Can't find record in table. (Bug#49481, Bug#49482)
  • Replication: When logging in row-based mode, DDL statements are actually logged as statements; however, statements that affected temporary tables and followed DDL statements failed to reset the binary log format to ROW, with the result that these statements were logged using the statement-based format. Now the state of binlog_format is restored after a DDL statement has been written to the binary log. (Bug#49132)
  • Replication: When using row-based logging, the statement CREATE TABLE t IF NOT EXIST ... SELECT was logged as CREATE TEMPORARY TABLE t IF NOT EXIST ... SELECT when t already existed as a temporary table. This was caused by the fact that the temporary table was opened and the results of the SELECT were inserted into it when a temporary table existed and had the same name.
  • Now, when this statement is executed, t is created as a base table, the results of the SELECT are inserted into it — even if there already exists a temporary table having the same name — and the statement is logged correctly. (Bug#47418)
  • See also Bug#47442.
  • Replication: Due to a change in the size of event representations in the binary log, when replicating from a MySQL 4.1 master to a slave running MySQL 5.0.60 or later, the START SLAVE UNTIL statement did not function correctly, stopping at the wrong position in the log. Now the slave detects that the master is using the older version of the binary log format, and corrects for the difference in event size, so that the slave stops in the correct position. (Bug#47142)
  • The SSL certificates in the test suite were about to expire. They have been updated with expiration dates in the year 2015. (Bug#50642)
  • The printstack function does not exist on Solaris 8 or earlier, which would lead to a compilation failure. (Bug#50409)
  • A user could see tables in INFORMATION_SCHEMA.TABLES without appropriate privileges for them. (Bug#50276)
  • Debug output for join structures was garbled. (Bug#50271)
  • The filesort sorting method applied to a CHAR(0) column could lead to a server crash. (Bug#49897)
  • sql_buffer_result had an effect on non-SELECT statements, contrary to the documentation. (Bug#49552)
  • In some cases a subquery need not be evaluated because it returns only aggregate values that can be calculated from table metadata. This sometimes was not handled by the enclosing subquery, resulting in a server crash. (Bug#49512)
  • The method for comparing INFORMATION_SCHEMA names and database names was nonoptimal and an improvement was made: When the database name length is already known, a length check is made first and content comparison skipped if the lengths are unequal. (Bug#49501)
  • The MD5() and SHA1() functions had excessive overhead for short strings. (Bug#49491)
  • Mixing full-text searches and row expressions caused a crash. (Bug#49445)
  • Creating or dropping a table with 1023 transactions active caused an assertion failure. (Bug#49238)
  • mysql-test-run.pl now recognizes the MTR_TESTCASE_TIMEOUT, MTR_SUITE_TIMEOUT, MTR_SHUTDOWN_TIMEOUT, and MTR_START_TIMEOUT environment variables. If they are set, their values are used to set the --testcase-timeout, --suite-timeout, --shutdown-timeout, and --start-timeout options, respectively. (Bug#49210)

New in MySQL 5.1.43 (Feb 1, 2010)

  • Bugs fixed:
  • Security Fix: For servers built with yaSSL, a preauthorization buffer overflow could cause memory corruption or a server crash. We thank Evgeny Legerov from Intevydis for providing us with a proof-of-concept script that allowed us to reproduce this bug. (Bug#50227, CVE-2009-4484)
  • Important Change: Replication: The RAND() function is now marked as unsafe for statement-based replication. Using this function now generates a warning when binlog_format=STATEMENT and causes the the format to switch to row-based logging when binlog_format=MIXED.
  • This change is being introduced because, when RAND() was logged in statement mode, the seed was also written to the binary log, so the replication slave generated the same sequence of random numbers as was generated on the master. While this could make replication work in some cases, the order of affected rows was still not guaranteed when this function was used in statements that could update multiple rows, such as UPDATE or INSERT ... SELECT; if the master and the slave retrieved rows in different order, they began to diverge. (Bug#49222)
  • Partitioning: When used on partitioned tables, the records_in_range handler call checked all partitions, rather than the unpruned partitions only. (Bug#48846)
  • See also Bug#37252, Bug#47261.
  • Partitioning: A query that searched on a ucs2 column failed if the table was partitioned. (Bug#48737)
  • Replication: A LOAD DATA INFILE statement that loaded data into a table having a column name that must be escaped (such as `key` INT), caused replication to fail when logging in mixed or statement mode. In such cases, the master wrote the LOAD DATA event to the binary log without escaping the field names. (Bug#49473)
  • See also Bug#47927.
  • Replication: Spatial data types cause row-based replication to crash. (Bug#48776)
  • Replication: A flaw in the implementation of the purging of binary logs could result in orphaned files being left behind in the following circumstances:
  • If the server failed or was killed while purging binary logs.
  • If the server failed or was killed after creating of a new binary log when the new log file was opened for the first time.
  • In addition, if the slave was not connected during the purge operation, it was possible for a log file that was in use to be removed; this could lead data loss and possible inconsistencies between the master and slave. (Bug#45292)
  • Replication: When using the STATEMENT or MIXED logging format, the statements LOAD DATA CONCURRENT LOCAL INFILE and LOAD DATA CONCURRENT INFILE were logged as LOAD DATA LOCAL INFILE and LOAD DATA LOCAL INFILE, respectively (in other words, the CONCURRENT keyword was omitted). As a result, when using replication with either of these logging modes, queries on the slaves were blocked by the replication SQL thread while trying to execute the affected statements. (Bug#34628)
  • Replication: Manually removing entries from the binary log index file on a replication master could cause the server to repeatedly send the same binary log file to slaves. (Bug#28421)
  • Cluster Replication: When expire_logs_days was set, the thread performing the purge of the log files could deadlock, causing all binary log operations to stop. (Bug#49536)
  • Within a stored routine, selecting the result of CONCAT_WS() with a routine parameter argument into a user variable could return incorrect results. (Bug#50096)
  • The IBMDB2I storage engine was missing from the i5os 64-bit distribution of MySQL 5.1.42. It is now included again. (Bug#50059)
  • EXPLAIN EXTENDED UNION ... ORDER BY caused a crash when the ORDER BY referred to a nonconstant or full-text function or a subquery. (Bug#49734)
  • The push_warning_printf() function was being called with an invalid error level MYSQL_ERROR::WARN_LEVEL_ERROR, causing an assertion failure. To fix the problem, MYSQL_ERROR::WARN_LEVEL_ERROR has been replaced by MYSQL_ERROR::WARN_LEVEL_WARN. (Bug#49638)
  • Some prepared statements could raise an assertion when re-executed. (Bug#49570)
  • A Valgrind error in make_cond_for_table_from_pred() was corrected. Thanks to Sergey Petrunya for the patch to fix this bug. (Bug#49506)
  • When compiling on Windows, an error in the CMake definitions for InnoDB would cause the engine to be built incorrectly. (Bug#49502)
  • Valgrind warnings for CHECKSUM TABLE were corrected. (Bug#49465)
  • Specifying an index algorithm (such as BTREE) for SPATIAL or FULLTEXT indexes caused a server crash. These index types do not support algorithm specification, and it is now disallowed to do so. (Bug#49250)
  • The optimizer sometimes incorrectly handled conditions of the form WHERE col_name='const1' AND col_name='const2'. (Bug#49199)
  • Execution of DECODE() and ENCODE() could be inefficient because multiple executions within a single statement reinitialized the random generator multiple times even with constant parameters. (Bug#49141)
  • MySQL 5.1 does not support 2-byte collation numbers, but did not check the number and crashed for out-of-range values. (Bug#49134)
  • With binary logging enabled, REVOKE ... ON {PROCEDURE|FUNCTION} FROM ... could cause a crash. (Bug#49119)
  • The LIKE operator did not work correctly when using an index for a ucs2 column. (Bug#49028)
  • check_key_in_view() was missing a DBUG_RETURN in one code branch, causing a crash in debug builds. (Bug#48995)
  • Several strmake() calls had an incorrect length argument (too large by one). (Bug#48983)
  • On Fedora 12, strmov() did not guarantee correct operation for overlapping source and destination buffer. Calls were fixed to use an overlap-safe version instead. (Bug#48866)
  • Incomplete reset of internal TABLE structures could cause a crash with eq_ref table access in subqueries. (Bug#48709)
  • Re-execution of a prepared statement could cause a server crash. (Bug#48508)
  • The error message for ER_UPDATE_INFO was subject to buffer overflow or truncation. (Bug#48500)
  • SHOW BINLOG EVENTS could fail with a error: Wrong offset or I/O error. (Bug#48357)
  • Valgrind warnings related to binary logging of LOAD DATA INFILE statements were corrected. (Bug#48340)
  • An aliasing violation in the C API could lead to a crash. (Bug#48284)
  • With one thread waiting for a lock on a table, if another thread dropped the table and created a new table with the same name and structure, the first thread would not notice that the table had been re-created and would try to used cached metadata that belonged to the old table but had been freed. (Bug#48157)
  • The InnoDB Monitor could fail to print diagnostic information after a long lock wait. (Bug#47814)
  • Queries containing GROUP BY ... WITH ROLLUP that did not use indexes could return incorrect results. (Bug#47650)
  • If an invocation of a stored procedure failed in the table-open stage, subsequent invocations that did not fail in that stage could cause a crash. (Bug#47649)
  • On Solaris, no stack trace was printed to the error log after a crash. (Bug#47391)
  • The first execution of STOP SLAVE UNTIL stopped too early. (Bug#47210)
  • When the mysql client was invoked with the --vertical option, it ignored the --skip-column-names option. (Bug#47147)
  • It was possible for init_available_charsets() not to initialize correctly. (Bug#45058)
  • Comparison with NULL values sometimes did not produce a correct result. (Bug#42760)
  • Crash recovery did not work for InnoDB temporary tables. (Bug#41609)
  • The mysql_upgrade command would create three additional fields to the mysql.proc table (character_set_client, collation_connection, and db_collation), but did not populate the fields with correct values. This would lead to error messages reported during stored procedure execution. (Bug#41569)
  • When compressed MyISAM files were opened, they were always memory mapped, sometimes causing memory-swapping problems. To deal with this, a new system variable, myisam_mmap_size, was added to limit the amount of memory used for memory mapping of MyISAM files. (Bug#37408)
  • A race condition on the privilege hash tables allowed one thread to try to delete elements that had already been deleted by another thread. A consequence was that SET PASSWORD or FLUSH PRIVILEGES could cause a crash. (Bug#35589, Bug#35591)
  • ALTER TABLE with both DROP COLUMN and ADD COLUMN clauses could crash or lock up the server. (Bug#31145)

New in MySQL 5.5.0 Milestone 2 (Jan 6, 2010)

  • Incompatible Change: Several changes have been made regarding the language and character set of error messages:
  • The --language option for specifying the directory for the error message file is now deprecated. The new --lc-messages-dir and --lc-messages options should be used instead, and --language is handled as an alias for --lc-messages-dir.
  • The language system variable has been removed and replaced with the new lc_messages_dir and lc_messages system variables. lc_messages_dir has only a global value and is read only. lc_messages has global and session values and can be modified at runtime, so the error message language can be changed while the server is running, and individual clients each can have a different error message language by changing their session lc_messages value to a different locale name.
  • Error messages previously were constructed in a mix of character sets. This issue is resolved by constructing error messages internally within the server using UTF-8 and returning them to the client in the character set specified by the character_set_results system variable. The content of error messages therefore may in some cases differ from the messags returned previously.
  • Partitioning: New PARTITION BY RANGE COLUMNS(column_list) and PARTITION BY LIST COLUMNS(column_list) options are added for the CREATE TABLE and ALTER TABLE statements.
  • A major benefit of RANGE COLUMNS and LIST COLUMNS partitioning is that they make it possible to define ranges or lists based on column values that use string, date, or datetime values.
  • These new extensions also broaden the scope of partition pruning to provide better coverage for queries using comparisons on multiple columns in the WHERE clause, some examples being WHERE a = 1 AND b < 10 and WHERE a = 1 AND b = 10 AND c < 10.
  • For more information, see Section 17.2.1, “RANGE Partitioning”, Section 17.2.2, “LIST Partitioning”, and Section 17.4, “Partition Pruning”.
  • Partitioning: A new ALTER TABLE option, TRUNCATE PARTITION, makes it possible to delete rows from one or more selected partitions only. Unlike the case with ALTER TABLE ... DROP PARTITION, ALTER TABLE ... TRUNCATE PARTITION merely deletes all rows from the specified partition or partitions, and does not change the definition of the table.
  • Partitioning: It is now possible to assign indexes on partitioned MyISAM tables to key caches using the CACHE INDEX and to preload such indexes into the cache using LOAD INDEX INTO CACHE statements. Cache assignment and preloading of indexes for such tables can be performed for one, several, or all partitions of the table.
  • This functionality is supported for only those partitioned tables that employ the MyISAM storage engine.
  • Cluster Replication: Replication: A replication heartbeat mechanism has been added to facilitate monitoring. This provides an alternative to checking log files, making it possible to detect in real time when a slave has failed.
  • Configuration of heartbeats is done via a new MASTER_HEARTBEAT_PERIOD = interval clause for the CHANGE MASTER TO statement (see Section 12.6.2.1, “CHANGE MASTER TO Syntax”); monitoring can be done by checking the values of the status variables Slave_heartbeat_period and Slave_received_heartbeats (see Section 5.1.7, “Server Status Variables”).
  • The addition of replication heartbeats addresses a number of issues:
  • Relay logs were rotated every slave_net_timeout seconds even if no statements were being replicated.
  • SHOW SLAVE STATUS displayed an incorrect value for Seconds_Behind_Master following a FLUSH LOGS statement.
  • Replication master-slave connections used slave_net_timeout for connection timeouts.
  • (Bug#20435, Bug#29309, Bug#30932)
  • Replication: The global server variable sync_relay_log is introduced for use on replication slaves. Setting this variable to a nonzero integer value N causes the slave to synchronize the relay log to disk after every N events. Setting its value to 0 allows the operating system to handle synchronization of the file. The action of this variable, when enabled, is analogous to how the sync_binlog variable works with regard to binary logs on a replication master.
  • The global server variables sync_master_info and sync_relay_log_info are introduced for use on replication slaves to control synchronization of, respectively, the master.info and relay.info files.
  • In each case, setting the variable to a nonzero integer value N causes the slave to synchronize the corresponding file to disk after every N events. Setting its value to 0 allows the operating system to handle synchronization of the file instead.
  • The actions of these variables, when enabled, are analogous to how the sync_binlog variable works with regard to binary logs on a replication master.
  • An additional system variable relay_log_recovery is also now available. When enabled, this variable causes a replication slave to discard relay log files obtained from the replication master following a crash.
  • These variables can also be set in my.cnf, or by using the --sync-relay-log, --sync-master-info, --sync-relay-log-info, and --relay-log-recovery server options.
  • For more information, see Section 16.1.3.3, “Replication Slave Options and Variables”. (Bug#31665, Bug#35542, Bug#40337)
  • Replication: Because SHOW BINLOG EVENTS cannot be used to read events from relay log files, a new SHOW RELAYLOG EVENTS statement has been added for this purpose. (Bug#28777)
  • Replication: In circular replication, it was sometimes possible for an event to propagate such that it would be reapplied on all servers. This could occur when the originating server was removed from the replication circle and so could no longer act as the terminator of its own events, as normally happens in circular replication.
  • In order to prevent this from occurring, a new IGNORE_SERVER_IDS option is introduced for the CHANGE MASTER TO statement. This option takes a list of replication server IDs; events having a server ID which appears in this list are ignored and not applied. For more information, see Section 12.6.2.1, “CHANGE MASTER TO Syntax”.
  • In conjunction with the introduction of IGNORE_SERVER_IDS, SHOW SLAVE STATUS has a new field Replicate_Ignore_Server_Ids that displays information about ignored servers. (Bug#25998)
  • See also Bug#27808.
  • Replication: MySQL now supports an interface for semisynchronous replication: A commit performed on the master side blocks before returning to the session that performed the transaction until at least one slave acknowledges that it has received and logged the events for the transaction. Semisynchronous replication is implemented through an optional plugin component. See Section 16.2.8, “Semisynchronous Replication”.
  • The InnoDB buffer pool is divided into two sublists: A new sublist containing blocks that are heavily used by queries, and an old sublist containing less-used blocks and from which candidates for eviction are taken. In the default operation of the buffer pool, a block when read in is loaded at the midpoint and then moved immediately to the head of the new sublist as soon as an access occurs. In the case of a table scan (such as performed for a mysqldump operation), each block read by the scan ends up moving to the head of the new sublist because multiple rows are accessed from each block. This occurs even for a one-time scan, where the blocks are not otherwise used by other queries. Blocks may also be loaded by the read-ahead background thread and then moved to the head of the new sublist by a single access. These effects can be disadvantageous because they push blocks that are in heavy use by other queries out of the new sublist to the old sublist where they become subject to eviction.
  • InnoDB Plugin now provides two system variables that enable LRU algorithm tuning:
  • innodb_old_blocks_pct
  • Specifies the approximate percentage of the buffer pool used for the old block sublist. The range of values is 5 to 95. The default value is 37 (that is, 3/8 of the pool).
  • innodb_old_blocks_time
  • Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before it can be moved to the new sublist. The default value is 0: A block inserted into the old sublist moves immediately to the new sublist the first time it is accessed, no matter how soon after insertion the access occurs. If the value is greater than 0, blocks remain in the old sublist until an access occurs at least that many ms after the first access. For example, a value of 1000 causes blocks to stay in the old sublist for 1 second after the first access before they become eligible to move to the new sublist. See Section 7.4.6, “The InnoDB Buffer Pool”
  • For additional information, see Section 7.4.6, “The InnoDB Buffer Pool”. (Bug#45015)
  • Two status variables have been added to SHOW STATUS output. Innodb_buffer_pool_read_ahead and Innodb_buffer_pool_read_ahead_evicted indicate the number of pages read in by the InnoDB read-ahead background thread, and the number of such pages evicted without ever being accessed, respectively. Also, the status variables Innodb_buffer_pool_read_ahead_rnd and Innodb_buffer_pool_read_ahead_seq status variables have been removed. (Bug#42885)
  • Columns that provide a catalog value in INFORMATION_SCHEMA tables (for example, TABLES.TABLE_CATALOG) now have a value of def rather than NULL. (Bug#35427)
  • The deprecated --default-table-type server option has been removed. (Bug#34818)
  • Previously, mysqldump would not dump the INFORMATION_SCHEMA database and ignored it if it was named on the command line. Now, mysqldump will dump INFORMATION_SCHEMA if it is named on the command line. Currently, this requires that the --skip-lock-tables (or --skip-opt) option be given. (Bug#33762)
  • Several undocumented C API functions were removed: mysql_manager_close(), mysql_manager_command(), mysql_manager_connect(), mysql_manager_fetch_line(), mysql_manager_init(), mysql_disable_reads_from_master(), mysql_disable_rpl_parse(), mysql_enable_reads_from_master(), mysql_enable_rpl_parse(), mysql_master_query(), mysql_master_send_query(), mysql_reads_from_master_enabled(), mysql_rpl_parse_enabled(), mysql_rpl_probe(), mysql_rpl_query_type(), mysql_set_master(), mysql_slave_query(), and mysql_slave_send_query(). (Bug#31952, Bug#31954)
  • Sinhala collations utf8_sinhala_ci and ucs2_sinhala_ci were added for the utf8 and ucs2 character sets. (Bug#26474)
  • If the value of the --log-warnings option is greater than 1, the server now writes access-denied errors for new connection attempts to the error log (for example, if a client user name or password is incorrect). (Bug#25822)
  • On WIndows, use of POSIX I/O interfaces in mysys was replaced with Win32 API calls (CreateFile(), WriteFile(), and so forth) and the default maximum number of open files has been increased to 16384. The maximum can be increased further by using the --open-files-limit=N option at server startup. (Bug#24509)
  • The TRADITIONAL SQL mode now includes NO_ENGINE_SUBSTITUTION. (Bug#21099)
  • MySQL now implements the SQL standard SIGNAL and RESIGNAL statements. See Section 12.8.8, “SIGNAL and RESIGNAL”. (Bug#11661)
  • The undocumented, deprecated, and not useful SHOW COLUMN TYPES statement has been removed. (Bug#5299)
  • Dynamic plugins now need to be linked with the libmysqlservices.a library. For an example showing what Makefile.am should look like, see Section 21.2.3.3, “Creating a Plugin Library”.
  • The FORMAT() function now supports an optional third parameter that enables a locale to be specified to be used for the result number's decimal point, thousands separator, and grouping between separators. Allowable locale values are the same as the legal values for the lc_time_names system variable (see Section 9.8, “MySQL Server Locale Support”). For example, the result from FORMAT(1234567.89,2,'de_DE') is 1.234.567,89. If no locale is specified, the default is 'en_US'.
  • The Greek locale 'el_GR' is now an allowable value for the lc_time_names system variable.
  • Previously, in the absence of other information, the MySQL client programs mysql, mysqladmin, mysqlcheck, mysqlimport, and mysqlshow used the compiled-in default character set, usually latin1.
  • Now these clients can autodetect which character set to use based on the operating system setting, such as the value of the LANG or LC_ALL locale environment language on Unix system or the code page setting on Windows systems. For systems on which the locale is available from the OS, the client uses it to set the default character set rather than using the compiled-in default. Thus, users can configure the locale in their environment for use by MySQL clients. For example, setting LANG to ru_RU.KOI8-R causes the koi8r character set to be used. The OS character set is mapped to the closest MySQL character set if there is no exact match. If the client does not support the matching character set, it uses the compiled-in default. (For example, ucs2 is not supported as a connection character set.)
  • Third-party applications that wish to use character set autodetection based on the OS setting can use the following mysql_options() call before connecting to the server:
  • mysql_options(mysql,
  • MYSQL_SET_CHARSET_NAME,
  • MYSQL_AUTODETECT_CHARSET_NAME);
  • See Section 9.1.4, “Connection Character Sets and Collations”.
  • mysql_upgrade now has an --upgrade-system-tables option that causes only the system tables to be upgraded. With this option, data upgrades are not performed.
  • The CREATE TABLESPACE privilege has been introduced. This privilege exists at the global (superuser) level and enables you to create, alter, and drop tablespaces and logfile groups.
  • The server now supports a Debug Sync facility for thread synchronization during testing and debugging. To compile in this facility, configure MySQL with the --enable-debug-sync option. The debug_sync system variable provides the user interface Debug Sync. mysqld and mysql-test-run.pl support a --debug-sync-timeout option to enable the facility and set the default synchronization point timeout.
  • Added the TO_SECONDS() function, which converts a date or datetime value to a number of seconds since the year 0.
  • Parser performance was improved for identifier scanning and conversion of ASCII string literals.
  • The LOAD XML INFILE statement was added. This statement makes it possible to read data directly from XML files into database tables. For more information, see Section 12.2.7, “LOAD XML Syntax”.
  • Bugs fixed:
  • Performance: The server unnecessarily acquired a query cache mutex even with the query cache disabled, resulting in a small performance decrement which could show up as threads often in state “invalidating query cache entries (table)”, particularly on a replication slave with row-based replication. Now if the server is started with query_cache_type set to 0, it does not acquire the query cache mutex. This has the implication that the query cache cannot be enabled at runtime. (Bug#38551)
  • Important Change: Security Fix: It was possible to circumvent privileges through the creation of MyISAM tables employing the DATA DIRECTORY and INDEX DIRECTORY options to overwrite existing table files in the MySQL data directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX DIRECTORY is now disallowed. This is now also true of these options when used with partitioned tables and individual partitions of such tables. (Bug#32167, CVE-2008-2079)
  • See also Bug#39277.
  • Security Fix: MySQL clients linked against OpenSSL can be tricked not to check server certificates. (Bug#47320, CVE-2009-4028)
  • Incompatible Change: For system variables that take values of ON or OFF, OF was accepted as a legal variable. Now system variables that take “enumeration” values must be assigned the full value. This affects some other variables that previously could be assigned using unambiguous prefixes of allowable values, such as tx_isolation. (Bug#34828)
  • Incompatible Change: In binary installations of MySQL, the supplied binary-configure script would start and configure MySQL, even when command help was requested with the --help command-line option. The --help, if provided, will no longer start and install the server. (Bug#30954)
  • Incompatible Change: Access privileges for several statements are more accurately checked:
  • CHECK TABLE requires some privilege for the table.
  • CHECKSUM TABLE requires SELECT for the table.
  • CREATE TABLE ... LIKE requires SELECT for the source table and CREATE for the destination table.
  • SHOW COLUMNS displays information only for those columns you have some privilege for.
  • SHOW CREATE TABLE requires some privilege for the table (previously required SELECT).
  • SHOW CREATE VIEW requires SHOW VIEW and SELECT for the view.
  • SHOW INDEX requires some privilege for any column.
  • SHOW OPEN TABLES displays only tables for which you have some privilege on any table column.
  • (Bug#27145)
  • Important Change: Replication: MyISAM transactions replicated to a transactional slave left the slave in an unstable condition. This was due to the fact that, when replicating from a nontransactional storage engine to a transactional engine with autocommit turned off, no BEGIN and COMMIT statements were written to the binary log; thus, on the slave, a never-ending transaction was started.
  • The fix for this issue includes enforcing autocommit mode on the slave by replicating all autocommit=1 statements from the master. (Bug#29288)
  • Important Change: Replication: The CHANGE MASTER TO statement required the value for RELAY_LOG_FILE to be an absolute path, while the MASTER_LOG_FILE path could be relative.
  • The inconsistent behavior is resolved by allowing relative paths for RELAY_LOG_FILE, and by using the same basename for RELAY_LOG_FILE as for MASTER_LOG_FILE. For more information, see Section 12.6.2.1, “CHANGE MASTER TO Syntax”. (Bug#12190)
  • Important Change: An option that requires a value, when specified in an option file without a value, was assigned the text of the next line in the file as the value. Now, if you fail to specify a required value in an option file, the server aborts with an error.
  • This change does not effect how options are handled by the server when they are used on the command line. For example, starting the server using mysqld_safe --relay-log --relay-log-index & causes the server to create relay log files named --relay-log-index.000001, --relay-log-index.000002, and so on, because the --relay-log option expects an argument. (Bug#25192)
  • Partitioning: An ALTER TABLE ... ADD PARTITION statement that caused open_files_limit to be exceeded led to a crash of the MySQL server. (Bug#46922)
  • See also Bug#47343.
  • Partitioning: When performing an INSERT ... SELECT into a partitioned table, read_buffer_size bytes of memory were allocated for every partition in the target table, resulting in consumption of large amounts of memory when the table had many partitions (more than 100).
  • This fix changes the method used to estimate the buffer size required for each partition and limits the total buffer size to a maximum of approximately 10 times read_buffer_size. (Bug#45840)
  • Partitioning: The cardinality of indexes on partitioned tables was calculated using the first partition in the table, which could result in suboptimal query execution plans being chosen. Now the partition having the most records is used instead, which should result in better use of indexes and thus improved performance of queries against partitioned tables in many if not most cases. (Bug#44059)
  • Partitioning: Truncating a partitioned MyISAM table did not reset the AUTO_INCREMENT value. (Bug#35111)
  • Partitioning: For partitioned tables with more than ten partitions, a full table scan was used in some cases when only a subset of the partitions were needed. (Bug#33730)
  • Replication: When using statement-based or mixed-format replication, the database name was not written to the binary log when executing a LOAD DATA statement. This caused problems when the table being loaded belonged to a database other than the current database; data could be loaded into the wrong table (if a table having the same name existed in the current database) or replication could fail (if no table having that name existed in the current database). Now a table referenced in a LOAD DATA statement is always logged using its fully qualified name when the database to which it belongs is not the current database. (Bug#48297)
  • Replication: When a session was closed on the master, temporary tables belonging to that session were logged with the wrong database names when either of the following conditions was true:
  • The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.
  • The current database was not set.
  • (Bug#48216)
  • See also Bug#46861, Bug#48297.
  • Replication: When using row-based replication, changes to non-transactional tables that occurred early in a transaction were not immediately flushed upon committing a statement. This behavior could break consistency since changes made to non-transactional tables become immediately visible to other connections. (Bug#47678)
  • See also Bug#47287, Bug#46864, Bug#43929, Bug#46129.
  • Replication: When mysqlbinlog --verbose was used to read a binary log that had been recorded using the row-based format, the output for events that updated some but not all columns of tables was not correct. (Bug#47323)
  • Replication: Performing ALTER TABLE ... DISABLE KEYS on a slave table caused row-based replication to fail. (Bug#47312)
  • Replication: When using the row-based format to replicate a transaction involving both transactional and non-transactional engines, which contained a DML statement affecting multiple rows, the statement failed; if this transaction was followed by a COMMIT, the master and the slave could diverge, because the statement was correctly rolled back on the master, but was applied on the slave. (Bug#47287)
  • See also Bug#46864.
  • Replication: BEGIN statements were not included in the output of mysqlbinlog. (Bug#46998)
  • Replication: A problem with the BINLOG statement in the output of mysqlbinlog could break replication; statements could be logged with the server ID stored within events by the BINLOG statement rather than the ID of the running server. With this fix, the server ID of the server executing the statements can no longer be overridden by the server ID stored in the binary log's format description statement. (Bug#46640)
  • This regression was introduced by Bug#32407.
  • Replication: When using row-based replication, DROP TEMPORARY TABLE IF EXISTS was written to the binary log if the table named in the statement did not exist, even though a DROP TEMPORARY TABLE statement should never be logged in row-based logging mode, whether the table exists or not. (Bug#46572)
  • Replication: Concurrent transactions that inserted rows into a table with an AUTO_INCREMENT column could break statement-based or mixed-format replication error 1062 Duplicate entry '...' for key 'PRIMARY' on the slave. This was especially likely to happen when one of the transactions activated a trigger that inserted rows into the table with the AUTO_INCREMENT column, although other conditions could also cause the issue to manifest. (Bug#45677)
  • Replication: Replicating TEXT or VARCHAR columns declared as NULL on the master but NOT NULL on the slave caused the slave to crash. (Bug#43789)
  • See also Bug#38850, Bug#43783, Bug#43785, Bug#47741, Bug#48091.
  • Replication: By default, all statements executed by the mysql_upgrade program on the master are written to the binary log, then replicated to the slave. In some cases, this can result in problems; for example, it attempted to alter log tables on replicated databases (this failed due to logging being enabled).
  • As part of this fix, a mysql_upgrade option, --write-binlog, is added. Its inverse, --skip-write-binlog, can be used to disable binary logging while the upgrade is in progress. (Bug#43579)
  • Replication: This fix handles 2 issues encountered on replication slaves during startup:
  • A failure while allocating the master info structure caused the slave to crash.
  • A failure during recovery caused the relay log file not to be properly initialized which led to a crash on the slave.
  • (Bug#43075)
  • Replication: When the logging format was set without binary logging being enabled, the server failed to start. Now in such cases, the server starts successfully, binlog_format is set, and a warning is logged instead of an error. (Bug#42928)
  • Replication: On the master, if a binary log event is larger than max_allowed_packet, the error message ER_MASTER_FATAL_ERROR_READING_BINLOG is sent to a slave when it requests a dump from the master, thus leading the I/O thread to stop. On a slave, the I/O thread stops when receiving a packet larger than max_allowed_packet.
  • In both cases, however, there was no Last_IO_Error reported, which made it difficult to determine why the slave had stopped in such cases. Now, Last_IO_Error is reported when max_allowed_packet is exceeded, and provides the reason for which the slave I/O thread stopped. (Bug#42914)
  • See also Bug#14068, Bug#47200, Bug#47303.
  • Replication: When using statement-based replication and the transaction isolation level was set to READ COMMITTED or a less strict level, InnoDB returned an error even if the statement in question was filtered out according to the --binlog-do-db or --binlog-ignore-db rules in effect at the time. (Bug#42829)
  • Replication: When using row-based format, replication failed with the error Could not execute Write_rows event on table ...; Field '...' doesn't have a default value when an INSERT was made on the master without specifying a value for a column having no default, even if strict server SQL mode was not in use and the statement would otherwise have succeeded on the master. Now the SQL mode is checked, and the statement is replicated unless strict mode is in effect. For more information, see Section 5.1.8, “Server SQL Modes”. (Bug#38173)
  • See also Bug#38262, Bug#43992.
  • Replication: When autocommit was set equal to 1 after starting a transaction, the binary log did not commit the outstanding transaction. The reason this happened was that the binary log commit function saw only the values of the new settings, and decided that there was nothing to commit.
  • This issue was first observed when using the Falcon storage engine, but it is possible that it affected other storage engines as well. (Bug#37221)
  • Replication: FLUSH LOGS did not actually close and reopen the binary log index file. (Bug#34582)
  • Replication: The --base64-output option for mysqlbinlog was not honored for all types of events. This interfered in some cases with performing point-in-time recovery. (Bug#32407)
  • See also Bug#46640, Bug#34777.
  • Replication: The value of Slave_IO_running in the output of SHOW SLAVE STATUS did not distinguish between all 3 possible states of the slave I/O thread (not running; running but not connected; connected). Now the value Connecting (rather than No) is shown when the slave I/O thread is running but the slave is not connected to a replication master.
  • The server system variable Slave_running also reflects this change, and is now consistent with what is shown for Slave_IO_running. (Bug#30703, Bug#41613)
  • Replication: Queries which were written to the slow query log on the master were not written to the slow query log on the slave. (Bug#23300)
  • See also Bug#46832.
  • Replication: Valgrind revealed an issue with mysqld that as corrected: memory corruption in replication slaves when switching databases. (Bug#19022)
  • API: The fix for Bug#24507 could lead in some cases to client application failures due to a race condition. Now the server waits for the “dummy” thread to return before exiting, thus making sure that only one thread can initialize the POSIX threads library. (Bug#42850)
  • Following a literal, the COLLATE clause was mishandled such that different results can be produced depending whether an index is used. (Bug#48447)
  • SUM() artificially increased the precision of a DECIMAL argument, which was truncated when a temporary table was created to hold the results. (Bug#48370)
  • See also Bug#45261.
  • If an outer query was invalid, a subquery might not even be set up. EXPLAIN EXTENDED did not expect this and caused a crash by trying to dereference improperly set up information. (Bug#48295)
  • A query containing a view using temporary tables and multiple tables in the FROM clause and PROCEDURE ANALYSE() caused a server crash.
  • As a result of this bug fix, PROCEDURE ANALYSE() is legal only in a top-level SELECT. (Bug#48293)
  • See also Bug#46184.
  • Error handling was missing for SELECT statements containing subqueries in the WHERE clause and that assigned a SELECT result to a user variable. The server could crash as a result. (Bug#48291)
  • An assertion could fail if the optimizer used a SPATIAL index. (Bug#48258, Bug#47019)
  • Memory-allocation failures were handled incorrectly in the InnoDB os_mem_alloc_large() function. (Bug#48237)
  • WHERE clauses with outer_value_list NOT IN subquery were handled incorrectly if the outer value list contained multiple items at least one of which could be NULL. (Bug#48177)
  • Searches using a non-default collation could return different results for a table when partitioning was and was not used. (Bug#48161)
  • A combination of GROUP BY WITH ROLLUP, DISTINCT and the const join type in a query caused a server crash when the optimizer chose to employ a temporary table to resolve DISTINCT. (Bug#48131)
  • The subquery optimizer had a memory leak. (Bug#48060)
  • Server shutdown failed on Windows. (Bug#48047)
  • In some cases, using a null microsecond part in a WHERE condition (for example, WHERE date_time_field = condition matching only the greatest value in an indexed column, the result was empty if an index range scan was employed. (Bug#47925)
  • mysys/mf_keycache.c requires threading, but no test was made for thread support. (Bug#47923)
  • For debug builds, an assertion could fail during the next statement executed for a temporary table after a multiple-table UPDATE involving that table and modified an AUTO_INCREMENT column with a user-supplied value. (Bug#47919)
  • The mysys/mf_strip.c file, which defines the strip_sp() function, has been removed from the MySQL source. The function was no longer used within the main build, and the supplied function was causing symbol errors on Windows builds. (Bug#47857)
  • When building storage engines on Windows it was not possible to specify additional libraries within the CMake file required for the build. An ${engine}_LIBS macro has been added to the files to support these additional storage-engine specific libraries. (Bug#47797)
  • When building a pluggable storage engine on Windows, the engine name could be based on the directory name where the engine was located, rather than the configured storage engine name. (Bug#47795)
  • During cleanup of a stored procedure's internal structures, the flag to ignore the errors for INSERT IGNORE or UPDATE IGNORE was not cleaned up, which could result in a server crash. (Bug#47788)
  • If the first argument to GeomFromWKB() function was a geometry value, the function just returned its value. However, it failed to preserve the argument's null_value flag, which caused an unexpected NULL value to be returned to the caller, resulting in a server crash. (Bug#47780)
  • InnoDB could crash when updating spatial values. (Bug#47777)
  • The pthread_cond_wait() implementations for Windows could deadlock in some rare circumstances. (Bug#47768)
  • The encoding of values for SET system_variable = identifier statements was incorrect, resulting in incorrect error messages. (Bug#47597)
  • On WIndows, when an idle named pipe connection was forcibly closed with a KILL statement or because the server was being shut down, the thread that was closing the connection would hang infinitely. (Bug#47571, Bug#31621)
  • On Mac OS X or Windows, sending a SIGHUP signal to the server or an asynchronous flush (triggered by flush_time) caused the server to crash. (Bug#47525)
  • Debug builds could not be compiled with the Sun Studio compiler. (Bug#47474)
  • Queries of the form SELECT SUM(DISTINCT varchar_key) FROM tbl_name caused a server crash. (Bug#47421)
  • A function call could end without throwing an error or setting the return value. For example, this could happen when an error occurred while calculating the return value. This is fixed by setting the value to NULL when an error occurs during evaluation of an expression. (Bug#47412)
  • A simple SELECT with implicit grouping could return many rows rather than a single row if the query was ordered by the aggregated column in the select list. (Bug#47280)
  • An assertion could be raised for CREATE TABLE if there was a pending INSERT DELAYED or REPLACE DELAYED for the same table. (Bug#47274)
  • InnoDB raised errors in some cases in a manner not compatible with SIGNAL and RESIGNAL. (Bug#47233)
  • A multiple-table UPDATE involving a natural join and a mergeable view raised an assertion. (Bug#47150)
  • On FreeBSD, memory mapping for MERGE tables could fail if underlying tables were empty. (Bug#47139)
  • Solaris binary packages now are compiled with -g0 rather than -g. (Bug#47137)
  • If an InnoDB table was created with the AUTO_INCREMENT table option to specify an initial auto-increment value, and an index was added in a separate operation later, the auto-increment value was lost (subsequent inserts began at 1 rather than the specified value). (Bug#47125)
  • Incorrect handling of predicates involving NULL by the range optimizer could lead to an infinite loop during query execution. (Bug#47123)
  • EXPLAIN caused a server crash for certain valid queries. (Bug#47106)
  • Repair by sort or parallel repair of MyISAM tables could fail to fail over to repair with key cache. (Bug#47073)
  • InnoDB Plugin did not compile on some Solaris systems. (Bug#47058)
  • On WIndows, when a failed I/O operation occurred with return code of ERROR_WORKING_SET_QUOTA, InnoDB intentionally crashed the server. Now InnoDB sleeps for 100ms and retries the failed operation. (Bug#47055)
  • The mysql_config script contained a reference to @innodb_system_libs@ that was not replaced with the corresponding library flags during the build process and ended up in the output of mysql_config --libs. (Bug#47007)
  • The configure option --without-server did not work. (Bug#46980)
  • Failed multiple-table DELETE statements could raise an assertion. (Bug#46958)
  • When MySQL crashed (or a snapshot was taken that simulates a crash), it was possible that internal XA transactions (used to synchronize the binary log and InnoDB) could be left in a PREPARED state, whereas they should be rolled back. This occurred when the server_id value changed before the restart, because that value was used to construct XID values.
  • Now the restriction is relaxed that the server_id value be consistent for XID values to be considered valid. The rollback phase should then be able to clean up all pending XA transactions. (Bug#46944)
  • When creating a new instance on Windows using mysqld-nt and the --install parameter, the value of the service would be set incorrectly, resulting in a failure to start the configured service. (Bug#46917)
  • The test suite was missing from RPM packages. (Bug#46834)
  • For InnoDB tables, an unnecessary table rebuild for ALTER TABLE could sometimes occur for metadata-only changes. (Bug#46760)
  • The server could crash for queries with the following elements: 1. An “impossible where” in the outermost SELECT; 2. An aggregate in the outermost SELECT; 3. A correlated subquery with a WHERE clause that includes an outer field reference as a top-level WHERE sargable predicate; (Bug#46749)
  • InnoDB Plugin did not compile using gcc 4.1 on PPC systems. (Bug#46718)
  • If InnoDB Plugin reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#46672)
  • See also Bug#18828.
  • Concurrent INSERT INTO ... SELECT statements for an InnoDB table could cause an AUTO_INCREMENT assertion failure. (Bug#46650)
  • The Serbian locale name 'sr_YU' is obsolete. It is still recognized for backward compatibility, but 'sr_RS' now should be used instead. (Bug#46633)
  • On Solaris and HP-UX systems with the environment set to the default C locale, MySQL client programs issued an Unknown OS character set error. (Bug#46619)
  • SHOW CREATE TRIGGER for a MERGE table trigger caused an assertion failure. (Bug#46614)
  • If a transaction was rolled back inside InnoDB due to a deadlock or lock wait timeout, and a statement in the transaction had an IGNORE clause, the server could crash at the end of the statement or on shutdown. (Bug#46539)
  • TRUNCATE TABLE for a table that was opened with HANDLER did not close the handler and left it in an inconsistent state that could lead to a server crash. Now TRUNCATE TABLE for a table closes all open handlers for the table. (Bug#46456)
  • Trailing spaces were not ignored for user-defined collations that mapped spaces to a character other than 0x20. (Bug#46448)
  • See also Bug#29468.
  • The server crashed if a shutdown occurred while a connection was idle. This happened because of a NULL pointer dereference while logging to the error log. (Bug#46267)
  • Dropping an InnoDB table that used an unknown collation (created on a different server, for example) caused a server crash. (Bug#46256)
  • The GPL and commercial license headers had different sizes, so that error log, backtrace, core dump, and cluster trace file line numbers could be off by one if they were not checked against the version of the source used for the build. (For example, checking a GPL build backtrace against commercial sources.) (Bug#46216)
  • A query containing a subquery in the FROM clause and PROCEDURE ANALYSE() caused a server crash. (Bug#46184)
  • See also Bug#48293.
  • InnoDB did not disallow creation of an index with the name GEN_CLUST_INDEX, which is used internally. (Bug#46000)
  • CREATE TABLE ... SELECT could cause a server crash if no default database was selected. (Bug#45998)
  • Configuring MySQL for DTrace support resulted in a build failure on Solaris if the directory for the dtrace executable was not in PATH. (Bug#45810)
  • During the build of the Red Hat IA64 MySQL server RPM, the system library link order was incorrect. This made the resulting Red Hat IA64 RPM depend on "libc.so.6.1(GLIBC_PRIVATE)(64bit)", thus preventing installation of the package. (Bug#45706)
  • The caseinfo member of the CHARSET_INFO structure was not initialized for user-defined Unicode collations, leading to a server crash. (Bug#45645)
  • Appending values to an ENUM or SET definition is a metadata change for which ALTER TABLE need not rebuild the table, but it was being rebuilt anyway. (Bug#45567)
  • The socket system variable was unavailable on Windows. (Bug#45498)
  • The combination of MIN() or MAX() in the select list with WHERE and GROUP BY clauses could lead to incorrect results. (Bug#45386)
  • Truncation of DECIMAL values could lead to assertion failures; for example, when deducing the type of a table column from a literal DECIMAL value. (Bug#45261)
  • See also Bug#48370.
  • Client flags were incorrectly initialized for the embedded server, causing several tests in the jp test suite to fail. (Bug#45159)
  • Concurrent execution of statements requiring a table-level lock and statements requiring a non-table-level write lock for a table could deadlock. (Bug#45143)
  • For settings of lower_case_table_names greater than 0, some queries for INFORMATION_SCHEMA tables left entries with incorrect lettercase in the table definition cache. (Bug#44738)
  • The have_community_features system variable was renamed to have_profiling.
  • Previously, to enable profiling, it was necessary to run configure with the --enable-community-features and --enable-profiling options. Now only --enable-profiling is needed. (Bug#44651)
  • With InnoDB Plugin, renaming a table column and then creating an index on the renamed column caused a server crash to the .frm file and the InnoDB data directory going out of sync. Now InnoDB Plugin 1.0.5 returns an error instead: ERROR 1034 (HY000): Incorrect key file for table 'tbl_name'; try to repair it. To work around the problem, create another table with the same structure and copy the original table to it. (Bug#44571)
  • For debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug#44521)
  • Using mysql_stmt_execute() to call a stored procedure could cause a server crash. (Bug#44495)
  • InnoDB did not always disallow creating tables containing columns with names that match the names of internal columns, such as DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR, and DB_MIX_ID. (Bug#44369)
  • An InnoDB error message incorrectly referred to the nonexistent innodb_max_files_open variable rather than to innodb_open_files. (Bug#44338)
  • SELECT ... WHERE ... IN (NULL, ...) was executed using a full table scan, even if the same query without the NULL used an efficient range scan. (Bug#44139)
  • See also Bug#18360.
  • InnoDB use of SELECT MAX(autoinc_column) could cause a crash when MySQL data dictionaries went out of sync. (Bug#44030)
  • LOAD DATA INFILE statements were written to the binary log in such a way that parsing problems could occur when re-executing the statement from the log. (Bug#43746)
  • Selecting from the process list in the embedded server caused a crash. (Bug#43733)
  • See also Bug#47304.
  • Attempts to enable large_pages with a shared memory segment larger than 4GB caused a server crash. (Bug#43606)
  • For ALTER TABLE, renaming a DATETIME or TIMESTAMP column unnecessarily caused a table copy operation. (Bug#43508)
  • The weekday names for the Romanian lc_time_names locale 'ro_RO' were incorrect. Thanks to Andrei Boros for the patch to fix this bug. (Bug#43207)
  • XA START could cause an assertion failure or server crash when it is called after a unilateral rollback issued by the Resource Manager (both in a regular transaction and after an XA transaction). (Bug#43171)
  • Redefining a trigger could cause an assertion failure. (Bug#43054)
  • The FORCE INDEX FOR ORDER BY index hint was ignored when join buffering was used. (Bug#43029)
  • DROP DATABASE did not clear the message list. (Bug#43012, Bug#43138)
  • The NUM_FLAG bit of the MYSQL_FIELD.flags member now is set for columns of type MYSQL_TYPE_NEWDECIMAL. (Bug#42980)
  • Incorrect handling of range predicates combined with OR operators could yield incorrect results. (Bug#42846)
  • Failure to treat BIT values as unsigned could lead to unpredictable results. (Bug#42803)
  • For the embedded server on Windows, InnoDB crashed when innodb_file_per_table was enabled and a table name was in full path format. (Bug#42383)
  • SHOW ERRORS returned an empty result set after an attempt to drop a nonexistent table. (Bug#42364)
  • If the server was started with an option that had a missing or invalid value, a subsequent error that would cause normally the server to shut down could cause it to crash instead. (Bug#42244)
  • Some queries with nested outer joins could lead to crashes or incorrect results because an internal data structure was handled improperly. (Bug#42116)
  • The server used the wrong lock type (always TL_READ instead of TL_READ_NO_INSERT when appropriate) for tables used in subqueries of UPDATE statements. This led in some cases to replication failure because statements were written in the wrong order to the binary log. (Bug#42108)
  • A Valgrind warning in open_tables() was corrected. (Bug#41759)
  • In a replication scenario with innodb_locks_unsafe_for_binlog enabled on the slave, where rows were changed only on the slave (not through replication), in some rare cases, many messages of the following form were written to the slave error log: InnoDB: Error: unlock row could not find a 4 mode lock on the record. (Bug#41756)
  • After renaming a user, granting that user privileges could result in the user having additional privileges other than those granted. (Bug#41597)
  • The mysql-stress-test.pl test script was missing from the noinstall packages on Windows. (Bug#41546)
  • With a nonstandard InnoDB page size, some error messages became inaccurate.
  • Note
  • Changing the page size is not a supported operation and there is no guarantee that InnoDB will function normally with a page size other than 16KB. Problems compiling or running InnoDB may occur. In particular, ROW_FORMAT=COMPRESSED in the InnoDB Plugin assumes that the page size is at most 16KB and uses 14-bit pointers.
  • A version of InnoDB built for one page size cannot use data files or log files from a version built for a different page size.
  • (Bug#41490)
  • In some cases, the server did not recognize lettercase differences between GRANT attributes such as table name or user name. For example, a user was able to perform operations on a table with privileges of another user with the same user name but in a different lettercase.
  • In consequence of this bug fix, the collation for the Routine_name column of the mysql.proc table is changed from utf8_bin to utf8_general_ci. (Bug#41049)
  • See also Bug#48872.
  • When a storage engine plugin failed to initialize before allocating a slot number, it would acidentally unplug the engine in slot 0. (Bug#41013)
  • Optimized builds of mysqld crashed when built with Sun Studio on SPARC platforms. (Bug#40244)
  • CREATE TABLE failed if a column name in a FOREIGN KEY clause was given in a lettercase different from the corresponding index definition. (Bug#39932)
  • The mysql_stmt_close() C API function did not flush all pending data associated with the prepared statement. (Bug#39519)
  • INFORMATION_SCHEMA access optimizations did not work properly in some cases. (Bug#39270)
  • ALTER TABLE neglected to preserve ROW_FORMAT information from the original table, which could cause subsequent ALTER TABLE and OPTIMIZE TABLE statements to lose the row format for InnoDB tables. (Bug#39200)
  • Simultaneous ANALYZE TABLE operations for an InnoDB tables could be subject to a race condition. (Bug#38996)
  • mysqlbinlog had a memory leak in its option-processing code. (Bug#38468)
  • The ALTER ROUTINE privilege incorrectly allowed SHOW CREATE TABLE. (Bug#38347)
  • Setting the general_log_file or slow_query_log_file system variable to a nonconstant expression caused the variable to become unset. (Bug#38124)
  • For certain SELECT statements using ref access, MySQL estimated an incorrect number of rows, which could lead to inefficient query plans. (Bug#38049)
  • A workload consisting of CREATE TABLE ... SELECT and DML operations could cause deadlock. (Bug#37433)
  • The client library mishandled EINPROGRESS errors for connections in nonblocking mode. (Bug#37267)
  • Previously, InnoDB performed REPLACE INTO T SELECT ... FROM S WHERE ... by setting shared next-key locks on rows from S. Now InnoDB selects rows from S with shared locks or as a consistent read, as for INSERT ... SELECT. This reduces lock contention between sessions. (Bug#37232)
  • Some warnings were being reported as errors. (Bug#36777)
  • Privileges for SHOW CREATE VIEW were not being checked correctly. (Bug#35996)
  • Different invocations of CHECKSUM TABLE could return different results for a table containing columns with spatial data types. (Bug#35570)
  • Result set metadata for columns retrieved from INFORMATION_SCHEMA tables did not have the db or org_table members of the MYSQL_FIELD structure set. (Bug#35428)
  • SHOW CREATE EVENT output did not include the DEFINER clause. (Bug#35297)
  • For its warning count, the mysql_info() C API function could print the number of truncated data items rather than the number of warnings. (Bug#34898)
  • Concurrent execution of FLUSH TABLES along with SHOW FUNCTION STATUS or SHOW PROCEDURE STATUS could cause a server crash. (Bug#34895)
  • Executing SHOW MASTER LOGS as a prepared statement without binary logging enabled caused a crash for debug builds. (Bug#34741)
  • There were spurious warnings about "Truncated incorrect DOUBLE value" in queries with MATCH ... AGAINST and > or < with a constant (which was reported as an incorrect DOUBLE value) in the WHERE condition. (Bug#34374)
  • A COMMENT longer than 64 characters caused CREATE PROCEDURE to fail. (Bug#34197)
  • mysql_real_connect() did not check whether the MYSQL connection handler was already connected and connected again even if so. Now an CR_ALREADY_CONNECTED error occurs. (Bug#33831)
  • INSTALL PLUGIN and UNINSTALL PLUGIN did not handle plugin identifiers consistently with respect to lettercase. (Bug#33731)
  • The default values for the general query log and slow query log file are documented to be based on the server host name and located in the data directory. However, they were in fact being based on the basename and location of the process ID (PID) file. The name and location defaults for the PID file are based on the server host name and data directory, so if it was not assigned a different name explicitly, its defaults were used and the general query log and slow query log file defaults were as documented. But if the PID file was assigned a value with the --pid-file option, the defaults for the general query log and slow query log file were incorrect. This has been rectified so that the defaults for all three files are based on the server host name and data directory.
  • A remaining problem is that the binary log and relay log .NNNNNN and .index basename defaults are based on the PID file basename, contrary to the documentation. This issue is to be addressed as Bug#45359. (Bug#33693)
  • The SHOW FUNCTION CODE and SHOW PROCEDURE CODE statements are not present in nondebug builds, but attempting to use them resulted in a “syntax error” message. Now the error message indicates that the statements are disabled and that you must use a debug build. (Bug#33637)
  • The LAST_DAY() and MAKEDATE() functions could return NULL, but the result metadata indicated NOT NULL. Thanks to Hiromichi Watari for the patch to fix this bug. (Bug#33629)
  • Instance Manager (mysqlmanager) has been removed, but a reference to it still appeared in the mysql.server script. (Bug#33472)
  • There was a race condition between the event scheduler and the server shutdown thread. (Bug#32771)
  • When an InnoDB tablespace filled up, an error was logged to the client, but not to the error log. Also, the error message was misleading and did not indicate the real source of the problem. (Bug#31183)
  • ALTER TABLE statements that added a column and added a nonpartial index on the column failed to add the index. (Bug#31031)
  • For const tables that were optimized away EXPLAIN EXTENDED displayed them in the FROM clause. Now they are not displayed. If all tables are optimized away, FROM DUAL is displayed. (Bug#30302)
  • There were cases where string-to-number conversions would produce warnings for CHAR values but not for VARCHAR values. (Bug#28299)
  • In mysql, using Control-C to kill the current query resulted in a ERROR 1053 (08S01): Server shutdown in progress" message if the query was waiting for a lock. (Bug#28141)
  • When building MySQL on Windows from source, the WITH_BERKELEY_STORAGE_ENGINE option would fail to configure BDB support correctly. (Bug#27693)
  • The default database is no longer changed to NULL (“no database”) if DROP DATABASE for that database failed. (Bug#26704)
  • DROP TABLE for INFORMATION_SCHEMA tables produced an Unknown table error rather than the more appropriate Access denied. (Bug#24062)
  • Referring to a stored function qualified with the name of one database and tables in another database caused a “table doesn't exist” error. (Bug#18444)
  • A Table ... doesn't exist error could occur for statements that called a function defined in another database. (Bug#17199)

New in MySQL 5.1.42 (Jan 2, 2010)

  • Bugs fixed:
  • Performance:
  • When the query cache is fragmented, the size of the free block lists in the memory bins grows, which causes query cache invalidation to become slow. There is now a 50ms timeout for a SELECT statement waiting for the query cache lock. If the timeout expires, the statement executes without using the query cache. (Bug#39253)
  • Important Change:
  • Replication - The following functions have been marked unsafe for statement-based replication:
  • GET_LOCK()
  • IS_FREE_LOCK()
  • IS_USED_LOCK()
  • MASTER_POS_WAIT()
  • RELEASE_LOCK()
  • SLEEP()
  • SYSDATE()
  • VERSION()
  • None of the functions just listed are guaranteed to replicate correctly when using the statement-based format, because they can produce different results on the master and the slave. The use of any of these functions while binlog_format is set to STATEMENT is logged with the warning, Statement is not safe to log in statement format. When binlog_format is set to MIXED, the binary logging format is automatically switched to the row-based format whenever one of these functions is used. (Bug#47995)
  • Partitioning: In some cases, it was not possible to add a new column to a table that had subpartitions. (Bug#48276)
  • Partitioning: SELECT COUNT(*) from a partitioned table failed when using the ONLY_FULL_GROUP_BY SQL mode. (Bug#46923)
  • This regression was introduced by Bug#45807.
  • Partitioning: SUBPARTITION BY KEY failed with DEFAULT CHARSET=utf8. (Bug#45904)
  • Replication: When using row-based logging, TRUNCATE TABLE was written to the binary log even if the affected table was temporary, causing replication to fail. (Bug#48350)
  • Replication: Replicating TEXT or VARCHAR columns declared as NULL on the master but NOT NULL on the slave caused the slave to crash. (Bug#43789)
  • See also Bug#38850, Bug#43783, Bug#43785, Bug#47741, Bug#48091.
  • Replication: When using row-based format, replication failed with the error Could not execute Write_rows event on table ...; Field '...' doesn't have a default value when an INSERT was made on the master without specifying a value for a column having no default, even if strict server SQL mode was not in use and the statement would otherwise have succeeded on the master. Now the SQL mode is checked, and the statement is replicated unless strict mode is in effect. (Bug#38173)
  • See also Bug#38262, Bug#43992.
  • The result of comparison between nullable BIGINT and INT columns was inconsistent. (Bug#49517)
  • Incorrect cache initialization prevented storage of converted constant values and could produce incorrect comparison results. (Bug#49489)
  • Comparisons involving YEAR values could produce incorrect results. (Bug#49480)
  • See also Bug#43668.
  • InnoDB did not reset table AUTO_INCREMENT values to the last used values after a server restart. (Bug#49032)
  • If a query involving a table was terminated with KILL, a subsequent SHOW CREATE TABLE for that table caused a server crash. (Bug#48985)
  • Privileges for stored routines were ignored for mixed-case routine names. (Bug#48872)
  • See also Bug#41049.
  • Building MySQL on Fedora Core 12 64-bit would due to errors in comp_err. (Bug#48864)
  • Concurrent ALTER TABLE operations on an InnoDB table could raise an assertion. (Bug#48782)
  • During query execution, ranges could be merged incorrectly for OR operations and return an incorrect result. (Bug#48665)
  • The InnoDB Table Monitor reported the FLOAT and DOUBLE data types incorrectly. (Bug#48526)
  • With row-based binary logging, the server crashed for statements of the form CREATE TABLE IF NOT EXISTS existing_view LIKE temporary_table. This occurred because the server handled the existing view as a table when logging the statement. (Bug#48506)
  • DISTINCT was ignored for queries with GROUP BY WITH ROLLUP and only const tables. (Bug#48475)
  • Loose index scan was inappropriately chosen for some WHERE conditions. (Bug#48472)
  • If the InnoDB tablespace was configured with too small a value, the server could crash and corrupt the tablespace. (Bug#48469)
  • Parts of the range optimizer could be initialized incorrectly, resulting in Valgrind errors. (Bug#48459)
  • A bad typecast could cause query execution to allocate large amounts of memory. (Bug#48458)
  • On Windows, InnoDB could not be built as a statically linked library. (Bug#48317)
  • mysql_secure_installation did not work on Solaris. (Bug#48086)
  • When running mysql_secure_installation, the command would fail if the root password contained multiple spaces, , # or quote characters. (Bug#48031)
  • MATCH IN BOOLEAN MODE searches could return too many results inside a subquery. (Bug#47930)
  • Using REPLACE to update a previously inserted negative value in an AUTO_INCREMENT coumn in an InnoDB table caused the table auto-increment value to be updated to 2147483647. (Bug#47720)
  • If a session held a global read lock acquired with FLUSH TABLES WITH READ LOCK, a lock for one table acquired with LOCK TABLES, and issued an INSERT DELAYED statement for another table, deadlock could occur. (Bug#47682)
  • The mysql client status command displayed an incorrect value for the server character set. (Bug#47671)
  • Connecting to a 4.1.x server from a 5.1.x or higher mysql client resulted in a memory-free error when disconnecting. (Bug#47655)
  • Assignment of a system variable sharing the same base name as a declared stored program variable in the same context could lead to a crash. (Bug#47627)
  • The innodb_file_format_check system variable could not be set at runtime to DEFAULT or to the value of a user-defined variable. (Bug#47167)
  • After a binary upgrade to MySQL 5.1 from a MySQL 5.0 installation that contains ARCHIVE tables, accessing those tables caused the server to crash, even if you had run mysql_upgrade or CHECK TABLE ... FOR UPGRADE.
  • To work around this problem, use mysqldump to dump all ARCHIVE tables before upgrading, and reload them into MySQL 5.1 after upgrading. The same problem occurs for binary downgrades from MySQL 5.1 to 5.0. (Bug#47012)
  • The IGNORE clause on a DELETE statement masked an SQL statement error that occurred during trigger processing. (Bug#46425)
  • On 64-bit systems, --skip-innodb did not skip InnoDB startup. (Bug#46043)
  • Valgrind errors for InnoDB Plugin were corrected. (Bug#45992, Bug#46656)
  • The return value was not checked for some my_hash_insert() calls. (Bug#45613)
  • Truncation of DECIMAL values could lead to assertion failures; for example, when deducing the type of a table column from a literal DECIMAL value. (Bug#45261)
  • See also Bug#48370.
  • For YEAR(2) values, MIN(), MAX(), and comparisons could yield incorrect results. (Bug#43668)
  • The server could crash when attempting to access a non-conformant mysql.proc system table. For example, the server could crash when invoking stored procedure-related statements after an upgrade from MySQL 5.0 to 5.1 without running mysql_upgrade. (Bug#41726)
  • Use of InnoDB monitoring (SHOW ENGINE INNODB STATUS or one of the InnoDB Monitor tables) could cause a server crash due to invalid access to a shared variable in a concurrent environment. This is a further fix for a regression introduced in MySQL 5.1.38 to the original fix in MySQL 5.1.31. (Bug#38883)
  • When running mysql_secure_installation on Windows, the command would fail to load a required module, Term::ReadKey, which was required for correct operation. (Bug#35106)
  • If the --log-bin server option was set to a directory name with a trailing component separator character, the basename of the binary log files was empty so that the created files were named .000001 and .index. The same thing occurred with the --log-bin-index, --relay-log, and --relay-log-index options. Now the server reports and error and exits. (Bug#34739)
  • If a comparison involved a constant value that required type conversion, the converted value might not be cached, resulting in repeated conversion and poorer performance. (Bug#34384)
  • Using the SHOW ENGINE INNODB STATUS statement when using partitions in InnoDB tables caused Invalid (old?) table or database name errors to be logged. (Bug#32430)
  • On some Windows systems, InnoDB could report Operating system error number 995 in a file operation due to transient driver or hardware problems. InnoDB now retries the operation and adds Retry attempt is made to the error message.

New in MySQL 5.1.41 (Nov 18, 2009)

  • The InnoDB buffer pool is divided into two sublists: A new sublist containing blocks that are heavily used by queries, and an old sublist containing less-used blocks and from which candidates for eviction are taken. In the default operation of the buffer pool, a block when read in is loaded at the midpoint and then moved immediately to the head of the new sublist as soon as an access occurs. In the case of a table scan (such as performed for a mysqldump operation), each block read by the scan ends up moving to the head of the new sublist because multiple rows are accessed from each block. This occurs even for a one-time scan, where the blocks are not otherwise used by other queries. Blocks may also be loaded by the read-ahead background thread and then moved to the head of the new sublist by a single access. These effects can be disadvantageous because they push blocks that are in heavy use by other queries out of the new sublist to the old sublist where they become subject to eviction.
  • InnoDB Plugin now provides two system variables that enable LRU algorithm tuning:
  • innodb_old_blocks_pct
  • Specifies the approximate percentage of the buffer pool used for the old block sublist. The range of values is 5 to 95. The default value is 37 (that is, 3/8 of the pool).
  • innodb_old_blocks_time
  • Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before it can be moved to the new sublist. The default value is 0: A block inserted into the old sublist moves immediately to the new sublist the first time it is accessed, no matter how soon after insertion the access occurs. If the value is greater than 0, blocks remain in the old sublist until an access occurs at least that many ms after the first access. For example, a value of 1000 causes blocks to stay in the old sublist for 1 second after the first access before they become eligible to move to the new sublist. See Section 7.4.6, “The InnoDB Buffer Pool”
  • For additional information, see Section 7.4.6, “The InnoDB Buffer Pool”. (Bug#45015)
  • For InnoDB Plugin, two new status variables have been added to SHOW STATUS output. Innodb_buffer_pool_read_ahead and Innodb_buffer_pool_read_ahead_evicted indicate the number of pages read in by the InnoDB read-ahead background thread, and the number of such pages evicted without ever being accessed, respectively. Also, the status variables Innodb_buffer_pool_read_ahead_rnd and Innodb_buffer_pool_read_ahead_seq status variables have been removed.
  • The built-in version of InnoDB is not affected by these changes. (Bug#42885)
  • InnoDB Plugin has been upgraded to version 1.0.5. This version is considered of Release Candidate (RC) quality.
  • The server now supports a Debug Sync facility for thread synchronization during testing and debugging. To compile in this facility, configure MySQL with the --enable-debug-sync option. The debug_sync system variable provides the user interface Debug Sync. mysqld and mysql-test-run.pl support a --debug-sync-timeout option to enable the facility and set the default synchronization point timeout.
  • Bugs fixed:
  • Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.1.24. The original fix did not correctly handle the data directory path name if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later. (Bug#32167, CVE-2008-2079)
  • See also Bug#39277.
  • Security Fix: MySQL clients linked against OpenSSL did not check server certificates presented by a server linked against yaSSL. (Bug#47320)
  • Partitioning: An ALTER TABLE ... ADD PARTITION statement that caused open_files_limit to be exceeded led to a crash of the MySQL server. (Bug#46922)
  • See also Bug#47343.
  • Partitioning: The cardinality of indexes on partitioned tables was calculated using the first partition in the table, which could result in suboptimal query execution plans being chosen. Now the partition having the most records is used instead, which should result in better use of indexes and thus improved performance of queries against partitioned tables in many if not most cases. (Bug#44059)
  • Replication: This issue occurred in MySQL 5.1.40 only. (Bug#48297)
  • Replication: When a session was closed on the master, temporary tables belonging to that session were logged with the wrong database names when either of the following conditions was true:
  • The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.
  • The current database was not set.
  • (Bug#48216)
  • See also Bug#46861, Bug#48297.
  • Replication: When using row-based replication, changes to non-transactional tables that occurred early in a transaction were not immediately flushed upon committing a statement. This behavior could break consistency since changes made to non-transactional tables become immediately visible to other connections. (Bug#47678)
  • See also Bug#47287, Bug#46864, Bug#43929, Bug#46129.
  • Replication: When mysqlbinlog --verbose was used to read a binary log that had been recorded using the row-based format, the output for events that updated some but not all columns of tables was not correct. (Bug#47323)
  • Replication: When using the row-based format to replicate a transaction involving both transactional and non-transactional engines, which contained a DML statement affecting multiple rows, the statement failed; if this transaction was followed by a COMMIT, the master and the slave could diverge, because the statement was correctly rolled back on the master, but was applied on the slave. (Bug#47287)
  • See also Bug#46864.
  • Replication: A problem with the BINLOG statement in the output of mysqlbinlog could break replication; statements could be logged with the server ID stored within events by the BINLOG statement rather than the ID of the running server. With this fix, the server ID of the server executing the statements can no longer be overridden by the server ID stored in the binary log's format description statement. (Bug#46640)
  • This regression was introduced by Bug#32407.
  • Replication: When using statement-based replication and the transaction isolation level was set to READ COMMITTED or a less strict level, InnoDB returned an error even if the statement in question was filtered out according to the --binlog-do-db or --binlog-ignore-db rules in effect at the time. (Bug#42829)
  • Replication: FLUSH LOGS did not actually close and reopen the binary log index file. (Bug#34582)
  • Error handling was missing for SELECT statements containing subqueries in the WHERE clause and that assigned a SELECT result to a user variable. The server could crash as a result. (Bug#48291)
  • An assertion could fail if the optimizer used a SPATIAL index. (Bug#48258, Bug#47019)
  • A combination of GROUP BY WITH ROLLUP, DISTINCT and the const join type in a query caused a server crash when the optimizer chose to employ a temporary table to resolve DISTINCT. (Bug#48131)
  • In some cases, using a null microsecond part in a WHERE condition (for example, WHERE date_time_field

New in MySQL 5.1.40 (Oct 21, 2009)

  • Bugs fixed:
  • Incompatible Change: In binary installations of MySQL, the supplied binary-configure script would start and configure MySQL, even when request help on the command with the --help command-line option. The --help, if provided, will no longer start and install the server. (Bug#30954)
  • Partitioning: When reorganizing partitions, not all affected subpartitions were removed prior to renaming. One way in which the issue was visible was that attempting to reorganize two partitions into a single partition having the same name as one of the original partitions could lead to a crash of the server. (Bug#47029)
  • See also Bug#45961, Bug#43729.
  • Partitioning: An online or fast ALTER TABLE of a partitioned table could leave behind temporary files in the database directory. (Bug#46483)
  • Partitioning: When performing an INSERT ... SELECT into a partitioned table, read_buffer_size bytes of memory were allocated for every partition in the target table, resulting in consumption of large amounts of memory when the table had many partitions (more than 100).
  • This fix changes the method used to estimate the buffer size required for each partition and limits the total buffer size to a maximum of approximately 10 times read_buffer_size. (Bug#45840)
  • Partitioning: Inserting negative values into an AUTO_INCREMENT column of a partitioned table could lead to apparently unrelated errors or a crash of the server. (Bug#45823)
  • Partitioning: Unnecessary calls were made in the server code for performing bulk inserts on partitions for which no inserts needed to be made. (Bug#35845)
  • See also Bug#35843.
  • Replication: Performing ALTER TABLE ... DISABLE KEYS on a slave table caused row-based replication to fail. (Bug#47312)
  • Replication: BEGIN statements were not included in the output of mysqlbinlog. (Bug#46998)
  • Replication: When using row-based replication, importing a dump made with mysqldump and replicating a row with an AUTO_INCREMENT column set to 0, with NO_AUTO_VALUE_ON_ZERO active on the master, the row was inserted successfully on the master; however any setting for NO_AUTO_VALUE_ON_ZERO was ignored on the slave. When the AUTO_INCREMENT column was incremented, this caused replication to fail on the slave due to a duplicate key error. In some cases it could also cause the slave to crash. (Bug#45999)
  • Replication: Concurrent transactions that inserted rows into a table with an AUTO_INCREMENT column could break statement-based or mixed-format replication error 1062 Duplicate entry '...' for key 'PRIMARY' on the slave. This was especially likely to happen when one of the transactions activated a trigger that inserted rows into the table with the AUTO_INCREMENT column, although other conditions could also cause the issue to manifest. (Bug#45677)
  • Replication: By default, all statements executed by the mysql_upgrade program on the master are written to the binary log, then replicated to the slave. In some cases, this can result in problems; for example, it attempted to alter log tables on replicated databases (this failed due to logging being enabled).
  • As part of this fix, a new mysql_upgrade option --write-binlog is added. Its inverse, --skip-write-binlog, can be used to disable binary logging while the upgrade is in progress. (Bug#43579)
  • Replication: On the master, if a binary log event is larger than max_allowed_packet, the error message ER_MASTER_FATAL_ERROR_READING_BINLOG is sent to a slave when it requests a dump from the master, thus leading the I/O thread to stop. On a slave, the I/O thread stops when receiving a packet larger than max_allowed_packet.
  • In both cases, however, there was no Last_IO_Error reported, which made it difficult to determine why the slave had stopped in such cases. Now, Last_IO_Error is reported when max_allowed_packet is exceeded, and provides the reason for which the slave I/O thread stopped. (Bug#42914)
  • See also Bug#14068, Bug#47200, Bug#47303.
  • API: The fix for Bug#24507 could lead in some cases to client application failures due to a race condition. Now the server waits for the “dummy” thread to return before exiting, thus making sure that only one thread can initialize the POSIX threads library. (Bug#42850)
  • The pthread_cond_wait() implementations for Windows could deadlock in some rare circumstances. (Bug#47768)
  • On Mac OS X or Windows, sending a SIGHUP signal to the server or an asynchronous flush (triggered by flush_time) caused the server to crash. (Bug#47525)
  • Debug builds could not be compiled with the Sun Studio compiler. (Bug#47474)
  • A multiple-table UPDATE involving a natural join and a mergeable view raised an assertion. (Bug#47150)
  • Solaris binary packages now are compiled with -g0 rather than -g. (Bug#47137)
  • EXPLAIN caused a server crash for certain valid queries. (Bug#47106)
  • The configure option --without-server did not work. (Bug#46980)
  • Failed multiple-table DELETE statements could raise an assertion. (Bug#46958)
  • When creating a new instance on Windows using mysqld-nt and the --install parameter, the value of the service would be set incorrectly, resulting in a failure to start the configured service. (Bug#46917)
  • The server crashed when re-using outer column references in correlated subqueries when the enclosing query used a temp table. (Bug#46791)
  • Assertion failure could result from repeated execution of a stored procedure containing an incorrect query with a subselect. (Bug#46629)
  • The server ignored the setting of sync_frm for CREATE TABLE ... LIKE. (Bug#46591)
  • An attempt to create a table with the same name as an existing view could cause a server crash. (Bug#46384)
  • A parser problem prevented properly stripping backquotes from an argument to a user-defined function (UDF). If the UDF was in an ORDER BY clause, its name would not be properly resolved against an alias with the same name in the select list. (Bug#46259)
  • Dropping an InnoDB table that used an unknown collation (created on a different server, for example) caused a server crash. (Bug#46256)
  • Certain SELECT statements containing DISTINCT, GROUP BY, and HAVING clauses could hang in an infinite loop. (Bug#46159)
  • InnoDB did not disallow creation of an index with the name GEN_CLUST_INDEX, which is used internally. (Bug#46000)
  • CREATE TEMPORARY TABLE failed for InnoDB tables on systems with case-insensitive file systems when lower_case_table_names = 2 and the pathname of the temporary file directory contained uppercase characters. (Bug#45638)
  • Appending values to an ENUM or SET definition is a metadata change for which ALTER TABLE need not rebuild the table, but it was being rebuilt anyway. (Bug#45567)
  • The socket system variable was unavailable on Windows. (Bug#45498)
  • When re-installing MySQL on Windows on a server that has a data directory from a previous MySQL installation, the installer would fail to identify the existence of the installation and the password configured for the root user. (Bug#45200)
  • Client flags were incorrectly initialized for the embedded server, causing several tests in the jp test suite to fail. (Bug#45159)
  • InnoDB did not always disallow creating tables containing columns with names that match the names of internal columns, such as DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR, and DB_MIX_ID. (Bug#44369)
  • SELECT ... WHERE ... IN (NULL, ...) was executed using a full table scan, even if the same query without the NULL used an efficient range scan. (Bug#44139)
  • See also Bug#18360.
  • InnoDB use of SELECT MAX(autoinc_column) could cause a crash when MySQL data dictionaries went out of sync. (Bug#44030)
  • LOAD DATA INFILE statements were written to the binary log in such a way that parsing problems could occur when re-executing the statement from the log. (Bug#43746)
  • Selecting from the process list in the embedded server caused a crash. (Bug#43733)
  • See also Bug#47304.
  • Attempts to enable large_pages with a shared memory segment larger than 4GB caused a server crash. (Bug#43606)
  • A test for stack growth failed on some platforms, leading to server crashes. (Bug#42213)
  • MySQL server used the wrong lock type (always TL_READ instead of TL_READ_NO_INSERT when appropriate) for tables used in subqueries of UPDATE statements. This led in some cases to replication failure because statements were written in the wrong order to the binary log. (Bug#42108)
  • The mysql-stress-test.pl test script was missing from the noinstall packages on Windows. (Bug#41546)
  • Privileges for SHOW CREATE VIEW were not being checked correctly. (Bug#35996)
  • Different invocations of CHECKSUM TABLE could return different results for a table containing columns with spatial data types. (Bug#35570)
  • myisamchk performed parameter value casting at startup that generated unnecessary warning messages. (Bug#33785)
  • When building MySQL on Windows from source, the WITH_BERKELEY_STORAGE_ENGINE option would fail to configure BDB support correctly. (Bug#27693

New in MySQL 5.1.39 (Sep 19, 2009)

  • Partitioning: An INSERT ... SELECT statement on an empty partition of a partitioned table failed with ERROR 1030 (HY000): Got error 124 from storage engine. This issue also caused queries run against a partitioned table while a LOAD DATA CONCURRENT INFILE statement was in progress to fail with the same error. (Bug#46639)
  • See also Bug#35845, Bug#44657, Bug#45840.
  • Partitioning: A partitioned table having a TIMESTAMP column with a default value of CURRENT_TIMESTAMP and this column was not defined using an ON UPDATE option, an ALTER TABLE ... REORGANIZE PARTITION statement on the table caused the TIMESTAMP column value to be set to CURRENT_TIMESTAMP regardless. (Bug#46478)
  • Partitioning: Attempting to access a partitioned table when partitioning support was disabled in a MySQL server binary that had been compiled with partitioning support caused the server to crash. (Bug#39893)
  • Partitioning: The use of TO_DAYS() in the partitioning expression led to selection failures when the column having the date value contained invalid dates. This occurred because the function returns NULL in such cases, and the partition containing NULL values was pruned away. For example, this problem occurred if '2001-02-00' was inserted into a DATE column of such a table, and a subsequent query on this table used WHERE date_col < '2001-02-00' — while '2001-01-01' is less than '2001-02-00', TO_DAYS('2001-02-00') evaluates as NULL, and so the row containing '2001-01-01' was not returned. Now, for tables using RANGE or LIST partitioning and having TO_DAYS() in the partitioning expression, the NULL partition is also scanned instead of being ignored.
  • The fix for this issue also corrects misbehavior such that a query of the form SELECT * FROM table WHERE date_col < date_val on a table partitioned by RANGE or LIST was handled as though the server SQL mode included ALLOW_INVALID_DATES even if this was not actually part of the server SQL mode at the time the query was issued. (Bug#20577)
  • See also Bug#18198, Bug#32021, Bug#46362.
  • Replication: Performing a multi-row update of the AUTO_INCREMENT column of a transactional table could result in an inconsistency between master and slave when there was a trigger on the transactional table that updated a non-transactional table. When such an update failed on the master, no rows were updated on the master, but some rows could (erroneously) be updated on the slave. (Bug#46864)
  • Replication: When using the --replicate-rewrite-db option and the database referenced by this option on the master was the current database when the connection to the slave was closed, any temporary tables existing in this database were not properly dropped. (Bug#46861)
  • Replication: When a statement that changed both transactional and non-transactional tables failed, the transactional changes were automatically rolled back on the master but the slave ignored the error and did not roll them back, thus leading to inconsistencies between master and slave.
  • This issue is fixed by automatically rolling back a statement that fails on the slave; however, the transaction is not rolled back unless a corresponding ROLLBACK statement is found in the relay log file. (Bug#46130)
  • See also Bug#33864.
  • Replication: When slave_transaction_retries is set, a statement that replicates, but is then rolled back due to a deadlock on the slave, should be retried. However, in certain cases, replication was stopped with error 1213 (Deadlock found when trying to get lock; try restarting transaction) instead, even when this variable was set. (Bug#45694)
  • Replication: The binary logging behavior (and thus, the replication behavior) of CREATE DATABASE IF NOT EXISTS, CREATE TABLE IF NOT EXISTS, and CREATE EVENT IF NOT EXISTS was not consistent among these statements, nor with that of DROP DATABASE IF EXISTS, DROP TABLE IF EXISTS, and DROP EVENT IF EXISTS: A DROP ... IF EXISTS statement is always logged even if the database object named in the statement does not exist. However, of the CREATE ... IF NOT EXISTS statements, only the CREATE EVENT IF NOT EXISTS statement was logged when the database object named in the statement already existed.
  • Now, every CREATE ... IF NOT EXISTS statement is written to the binary log (and thus replicated), whether the database object named in the statement exists or not. For more information, see Section 16.3.1.3, “Replication of CREATE ... IF NOT EXISTS Statements”.
  • Exception. Replication and logging of CREATE TABLE IF NOT EXISTS ... SELECT continues to be handled according to existing rules. See Section 16.3.1.4, “Replication of CREATE TABLE ... SELECT Statements”, for more information.
  • (Bug#45574)
  • Replication: When using statement-based replication, database-level character sets were not always honored by the replication SQL thread. This could cause data inserted on the master using LOAD DATA to be replicated using the wrong character set.
  • Note
  • This was not an issue when using row-based replication.
  • (Bug#45516)
  • Replication: In some cases, a STOP SLAVE statement could cause the replication slave to crash. This issue was specific to MySQL on Windows or Macintosh platforms. (Bug#45238, Bug#45242, Bug#45243, Bug#46013, Bug#46014, Bug#46030)
  • Replication: Creating a scheduled event whose DEFINER clause was either set to CURRENT_USER or not set explicitly caused the master and the slave to become inconsistent. This issue stems from the fact that, in both cases, the DEFINER is set to the CURRENT_USER of the current thread. (On the master, the CURRENT_USER is the mysqld user; on the slave, the CURRENT_USER is empty.)
  • This behavior has been modified as follows:
  • If CURRENT_USER is used as the DEFINER, it is replaced with the value of CURRENT_USER before the CREATE EVENT statement is written to the binary log.
  • If the definer is not set explicitly, a DEFINER clause using the value of CURRENT_USER is added to the CREATE EVENT statement before it is written to the binary log.
  • (Bug#44331)
  • See also Bug#42217.
  • Replication: When using the statement-based logging format, the only possible safe combination of transactional and non-transactional statements within the same transaction is to perform any updates on non-transactional tables (such as MyISAM tables) first, before updating any transactional tables (such as those using the InnoDB storage engine). This is due to the fact that, although a modification made to a non-transactional table is immediately visible to other connections, the update is not immediately written to the binary log, which can lead to inconsistencies between master and slave. (Other combinations may hide a causal dependency, thus making it impossible to write statements updating non-transactional tables to the binary log in the correct order.)
  • However, in some cases, this situation was not handled properly, and the determination whether a given statement was safe or not under these conditions was not always correct. In particular, a multi-table update that affected both transactional and non-transactional tables or a statement modifying data in a non-transactional table having a trigger that operated on a transactional table (or the reverse) was not determined to be unsafe when it should have been.
  • With this fix, the following determinations regarding replication safety are made when combining updates to transactional and non-transactional tables within the same transaction in statement-based logging mode:
  • Any statement modifying data in a non-transactional table within a given transaction is considered safe if it is issued prior to any data modification statement accessing a transactional table within the same transaction.
  • A statement that updates transactional tables only is always considered safe.
  • A statement affecting both transactional and non-transactional tables within a transaction is always considered unsafe. It is not necessary that both tables be modified for this to be true; for example, a statement such as INSERT INTO innodb_table SELECT * FROM myisam_table is also considered unsafe.
  • Note
  • The current fix is valid only when using statement-based logging mode; we plan to address similar issues occurring when using the MIXED or ROW format in a future MySQL release.
  • (Bug#28976)
  • Stack overflow checking did not account for the size of the structure stored in the heap. (Bug#46807)
  • In queries for which the loose index scan access method was chosen, using a condition of the form col_name rather than the equivalent col_name 0 caused an assertion failure. (Bug#46607)
  • Killing a query that was performing a sort could result in a memory leak. (Bug#45962)
  • Truncation of DECIMAL values could lead to assertion failures; for example, when deducing the type of a table column from a literal DECIMAL value. (Bug#45261)
  • Bulk insert performance could suffer with large read_buffer_size values. (Bug#44723)
  • A buffer overflow could occur during handling of IS NULL ranges. (Bug#37044)
  • mysqladmin --wait ping crashed on Windows systems. (Bug#35132)

New in MySQL 5.1.38 (Sep 2, 2009)

  • Replication: With statement-based logging (SBL), repeatedly calling statements that are unsafe for SBL caused a warning message to be written to the error log for each statement, and there was no way to disable this behavior. Now the server logs messages about statements that are unsafe for statement-based logging only if the log_warnings variable is greater than 0. (Bug#46265)
  • The undocumented TRANSACTIONAL and PAGE_CHECKSUM keywords were removed from the grammar. (Bug#45829)
  • Previously, SELECT ... INTO OUTFILE dumped column values without character set conversion, which could produce data files that cannot be imported without error if different columns used different character sets. A consequence of this is that mysqldump ignored the --default-character-set option if the --tab option was given (which causes SELECT ... INTO OUTFILE to be used to dump data.)
  • INTO OUTFILE now can be followed by a CHARACTER SET clause indicating the character set to which dumped values should be converted. Also, mysqldump adds a CHARACTER SET clause to the SELECT ... INTO OUTFILE statement used to dump data, so that --default-character-set is no longer ignored if --tab is given.
  • Other changes are that SELECT ... INTO OUTFILE enforces that ENCLOSED BY and ESCAPED BY arguments must be a single character, and SELECT ... INTO OUTFILE and LOAD DATA INFILE produce warnings if non-ASCII field or line separators are specified. (Bug#30946)
  • The MySQL euckr character set now can store extended codes [81...FE][41..5A,61..7A,81..FE], which makes euckr compatible with the Microsoft cp949 character set.
  • Bugs fixed:
  • Partitioning: Attempting to create a table using an invalid or inconsistent subpartition definition caused the server to crash. An example of such a statement is shown here:
  • CREATE TABLE t2 (s1 INT, s2 INT)
  • PARTITION BY LIST (s1) SUBPARTITION BY HASH (s2) SUBPARTITIONS 1
  • PARTITION p1 VALUES IN (1),
  • PARTITION p2 VALUES IN (2) (SUBPARTITION p3)
  • (Bug#46354)
  • Partitioning: When using a debug build of MySQL, if a query against a partitioned table having an index on one or more DOUBLE columns used that index, the server failed with an assertion. (Bug#45816)
  • Partitioning: A failed RENAME TABLE operation on a table with user-defined partitioning left the table in an unusable state, due to only some of the table files having been renamed. (Bug#30102)
  • Replication: When a statement that changes a non-transactional table failed, the transactional cache was flushed, causing a mismatch between the execution and logging histories. Now we avoid flushing the transactional cache unless a COMMIT or ROLLBACK is issued. (Bug#46129)
  • Replication: The internal function get_master_version_and_clock() (defined in sql/slave.cc) ignored errors and passed directly when queries failed, or when queries succeeded but the result retrieved was empty. Now this function tries to reconnect the master if a query fails due to transient network problems, and to fail otherwise. The I/O thread now prints a warning if the some system variables do not exist on master (in the event the master is a very old version of MySQQL, compared to the slave.) (Bug#45214)
  • Replication: When using the MIXED logging format, after creating a temporary table and performing an update that switched the logging format to ROW, the format switch persisted following the update. This prevented any subsequent DDL statements on temporary tables from being written to the binary log until the temporary table was dropped. (Bug#43046)
  • See also Bug#40013.
  • This regression was introduced by Bug#20499.
  • Replication: If the --log-bin-trust-function-creators option is not enabled, CREATE FUNCTION requires one of the modifiers DETERMINISTIC, NO SQL, or READS SQL DATA. When using statement-based mode, the execution of a stored function should follow the same rules; however, only functions defined with DETERMINSTIC could actually be executed. In addition, the wrong error was generated (ER_BINLOG_ROW_RBR_TO_SBR instead of ER_BINLOG_UNSAFE_ROUTINE).
  • Now execution of stored functions is compatible with creation in this regard; when a stored function without one of the modifiers above is executed in STATEMENT mode, the correct error is raised, and functions defined using NO SQL, READS SQL DATA, or both (that is, without using DETERMINSTIC) can be excuted. (Bug#41166)
  • The test suite was missing from RPM packages. (Bug#46834)
  • Incorrect index optimization could lead to incorrect results or server crashes. (Bug#46454)
  • The server printed warnings at startup about adjusting the value of the max_join_size system variable. (These were harmless, but might be seen by users as significant.) (Bug#46385)
  • After an error such as a table-full condition, INSERT IGNORE could cause an assertion failure for debug builds. (Bug#46075)
  • An optimization that moved an item from a subquery to an outer query could cause a server crash. (Bug#46051)
  • Several Valgrind warnings were corrected. (Bug#46003, Bug#46034, Bug#46042)
  • CREATE TABLE ... SELECT could cause a server crash if no default database was selected. (Bug#45998)
  • For problems reading SSL files during SSL initialization, the server wrote error messages to stderr rather than to the error log. (Bug#45770)
  • The vendor name change from MySQL AB to Sun Microsystems, Inc. in RPM packages was not handled gracefully when upgrading MySQL using an RPM package. (Bug#45534)
  • A Windows Installation using the GUI installer would fail with:
  • MySQL Server 5.1 Setup Wizard ended prematurely
  • The wizard was interrupted before MySQL Server 5.1. could be completely installed.
  • Your system has not been modified. To complete installation at another time, please run
  • setup again.
  • Click Finish to exit the wizardThis was due to an step in the MSI installer that could fail to execute correctly on some environments. (Bug#45418)
  • Invalid memory reads could occur using the compressed client/server protocol. (Bug#45031)
  • The mysql_real_connect() C API function only attempted to connect to the first IP address returned for a hostname. This could be a problem if a hostname mapped to multiple IP address and the server was not bound to the first one returned. Now mysql_real_connect() attempts to connect to all IPv4/6 addresses that a domain name maps to. (Bug#45017)
  • Invalid input could cause invalid memory reads by the parser. (Bug#45010)
  • Some files in an AIX tar file distribution unpacked with incorrect permissions. (Bug#44647)
  • For debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug#44521)
  • Using mysql_stmt_execute() to call a stored procedure could cause a server crash. (Bug#44495)
  • Creating a new instance after previously removing an instance would fail to complete the installation properly because the security settings could not be applied correctly. (Bug#44428)
  • mysqlslap ignored the --csv option if it was given without an argument. (Bug#44412)
  • Enabling the event scheduler from within the file specified by --init-file caused a server crash. (Bug#43587)
  • The server did not always check the return value of calls to the hash_init() function. (Bug#43572)
  • The table cache lock (LOCK_open) is now an adaptive mutex, which should improve performance in workloads where this lock is heavily contended. (Bug#43435)
  • mysqladmin --count=X --sleep=Y incorrectly delayed Y seconds after the last iteration before exiting. (Bug#42639)
  • A test for stack growth failed on some platforms, leading to server crashes. (Bug#42213)
  • mysqladmin did not have enough space allocated for tracking all variables when using --vertical or --relative with extended-status. (Bug#40395)
  • Partitioning a log table caused a server crash. (Bug#40281)
  • When using quick access methods to search for rows in UPDATE and DELETE statements, there was no check whether a fatal error had already been sent to the client while evaluating the quick condition. Consequently, a false OK (following the error) was sent to the client, causing the error to be incorrectly transformed into a warning. (Bug#40113)
  • SHOW PROCESSLIST could access freed memory of a stored procedure run in a concurrent session. (Bug#38816)
  • During installation on Windows, the MySQL Instance Configuration Wizard window could be opened at a size too small to be usable. (Bug#38723)
  • make_binary_distribution did not always generate correct distribution names. (Bug#37808)
  • The server crashed when executing a prepared statement containing a duplicated MATCH() function call in the select list and ORDER BY clause; for example, SELECT MATCH(a) AGAINST('test') FROM t1 ORDER BY MATCH(a) AGAINST('test'). (Bug#37740)
  • The output of mysqldump --tab for views included a DROP TABLE statement without the IF EXISTS qualifier. (Bug#37377)
  • mysql_upgrade silently ignored the --basedir and --datadir options, which it accepts for backward compatibility. Now it prints a warning. (Bug#36558)
  • mysqlimport was not always compiled correctly to enable thread support, which is required for the --use-threads option. (Bug#32991)
  • mysqlcheck failed to fix table names when the --fix-table-names and --all-in-1 options were both specified. (Bug#31821)
  • If the MySQL server was killed without the PID file being removed, attempts to stop the server with mysql.server stop waited 900 seconds before giving up. (Bug#31785)
  • When performing an installation on Windows using the GUI installer, the installer would fail to wait long enough during installation for the MySQL service to be installed, which would cause the installation to fail and may cause security settings, such as the root password to not be applied correctly. (Bug#30525)
  • mysql included extra spaces at the end of some result set lines. (Bug#29622)
  • The mysql client inconsistently handled NUL bytes in column data in various output formats. (Bug#28203)
  • mysqlimport did not correctly quote and escape table identifiers and file names. (Bug#28071)
  • When installing the Windows service, using quotes around command-line configuration parameters could cause the quotes to incorrectly placed around the entire command-line option, and not just the value. (Bug#27535)
  • If the mysql client was built with the readline library and the .inputrc file mapped Space to the magic-space function, it became impossible to enter spaces. (Bug#27439)
  • If InnoDB reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#18828)

New in MySQL 5.1.37 (Aug 3, 2009)

  • Important Change: Replication: RESET MASTER and RESET SLAVE now reset the values shown for Last_IO_Error, Last_IO_Errno, Last_SQL_Error, and Last_SQL_Errno in the output of SHOW SLAVE STATUS. (Bug#44270)
  • See also Bug#34654.
  • Bugs fixed:
  • Partitioning: Security Fix: Accessing a table having user-defined partitioning when the server SQL mode included ONLY_FULL_GROUP_BY caused the MySQL server to crash. For example, the following sequence of statements crashed the server:
  • DROP TABLE IF EXISTS t1;
  • SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
  • CREATE TABLE t1 (id INT, KEY(id))
  • PARTITION BY HASH(id) PARTITIONS 2;
  • (Bug#45807)
  • Important Change: Replication: When using STATEMENT or MIXED binary logging format, a statement that changes both non-transactional and transactional tables must be written to the binary log whenever there are changes to non-transactional tables. This means that the statement goes into the binary log even when the changes to the transactional tables fail. In particular, in the event of a failure such statement is annotated with the error number and wrapped inside a pair of BEGIN and ROLLBACK statements.
  • On the slave, while applying the statement, it is expected that the same failure and the rollback prevent the transactional changes from persisting. However, statements that fail due to concurrency issues such as deadlocks and timeouts are logged in the same way, causing the slave to stop since the statements are applied sequentially by the SQL thread.
  • To address this issue, we ignore concurrency failures on the slave. Specifically, the following failures are now ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK, and ER_XA_RBDEADLOCK. (Bug#44581)
  • Partitioning: Truncating a partitioned MyISAM table did not reset the AUTO_INCREMENT value. (Bug#35111)
  • Replication: The SHOW SLAVE STATUS connection thread competed with the slave SQL thread for use of the error message buffer. As a result, the connection thread sometimes received incomplete messages. This issue was uncovered with valgrind when message strings were passed without NULL terminators, causing the error Conditional jump or move depends on uninitialised value(s). (Bug#45511)
  • See also Bug#43076.
  • Replication: Large transactions and statements could corrupt the binary log if the size of the cache (as set by max_binlog_cache_size) was not large enough to store the changes.
  • Now, for transactions that do not fit into the cache, the statement is not logged, and the statement generates an error instead.
  • For non-transactional changes that do not fit into the cache, the statement is also not logged — an incident event is logged after committing or rolling back any pending transaction, and the statement then raises an error.
  • Note
  • If a failure occurs before the incident event is written the binary log, the slave does not stop, and the master does not report any errors.
  • (Bug#43929)
  • See also Bug#37148.
  • Replication: The --database option for mysqlbinlog was ignored when using the row-based logging format. (Bug#42941)
  • Replication: Shutting down the server while executing FLUSH LOGS, CHANGE MASTER TO, or STOP SLAVE could sometimes cause mysqld to crash. (Bug#38240)
  • Replication: When reading a binary log that was in use by a master or that had not been properly closed (possibly due to a crash), the following message was printed: Warning: this binlog was not closed properly. Most probably mysqld crashed writing it. This message did not take into account the possibility that the file was merely in use by the master, which caused some users concern who were not aware that this could happen.
  • To make this clear, the original message has been replaced with Warning: this binlog is either is use or was not closed properly. (Bug#34687)
  • The server crashed if evaluation of GROUP_CONCAT(... ORDER BY) required allocation of a sort buffer but allocation failed. (Bug#46080)
  • When creating tables using the IBMDB2I storage engine with the ibmdb2i_create_index_option option set to 1, creating an IBMDB2I table with a primary key should produce an additional index that uses EBCDIC hexadecimal sorting, but this index was not created. (Bug#45983)
  • With InnoDB tables, MySQL used a less-selective secondary index to avoid a filesort even if a prefix of the primary key was much more selective.
  • The fix for this problem might cause other queries to run more slowly. (Bug#45828)
  • The server crashed for attempts to use REPLACE or INSERT ... ON DUPLICATE KEY UPDATE with a view defined using a join. (Bug#45806)
  • Some collations were causing IBMDB2I to report inaccurate key range estimations to the optimizer for LIKE clauses that select substrings. This can be seen by running EXPLAIN. This problem primarily affects multi-byte and unicode character sets. (Bug#45803)
  • Invalid memory reads and writes were generated when altering merge and base tables. This could lead to a crash or Valgrind errors:
  • ==28038== Invalid write of size 1
  • at: memset (mc_replace_strmem.c:479)
  • by: myrg_attach_children (myrg_open.c:433)
  • by: ha_myisammrg::attach_children() (ha_myisammrg.cc:546)
  • by: ha_myisammrg::extra(ha_extra_function) (ha_myisammrg.cc:944)
  • by: attach_merge_children(TABLE_LIST*) (sql_base.cc:4147)
  • by: open_tables(THD*, TABLE_LIST**, unsigned*, unsigned) (sql_base.cc:4709)
  • by: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool) (sql_base.cc:4977)
  • by: open_n_lock_single_table (mysql_priv.h:1550)
  • by: mysql_alter_table(sql_table.cc:6428)
  • by: mysql_execute_command(THD*) (sql_parse.cc:2860)
  • by: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5933)
  • by: dispatch_command (sql_parse.cc:1213)(Bug#45796)
  • Inserting data into a table using the macce character set with the IBMDB2I storage engine would fail. (Bug#45793)
  • There was a race condition when changing innodb_commit_concurrency at runtime to the value DEFAULT. (Bug#45749)
  • See also Bug#42101.
  • Performing an empty XA transaction caused the server to crash for the next XA transaction. (Bug#45548)
  • For replication of a stored procedure that uses the gbk character set, the result on the master and slave differed. (Bug#45485)
  • SHOW CREATE TRIGGER requires the TRIGGER privilege but was not checking privileges. (Bug#45412)
  • An assertion failure could occur if InnoDB tried to unlock a record when the clustered index record was unknown. (Bug#45357)
  • Bug#19027 caused --enable-plugin_name (for example, --enable-innodb) not to work. (Bug#45336)
  • If autocommit was enabled, InnoDB did not roll back DELETE or UPDATE statements if the statement was killed. (Bug#45309)
  • Use of DECIMAL constants with more than 65 digits in CREATE TABLE ... SELECT statements led to spurious errors or assertion failures. (Bug#45262)
  • The mysql client could misinterpret some character sequences as commands under some circumstances. (Bug#45236)
  • Use of CONVERT() with an empty SET value could cause an assertion failure. (Bug#45168)
  • InnoDB recovery could hang due to redo logging of doublewrite buffer pages. (Bug#45097)
  • when reading binary data, the concatenation function for geometry data collections did not rigorously check for available data, leading to invalid reads and server crashes. (Bug#44684)
  • If an error occurred during the creation of a table (for example, the table already existed) having an AUTO_INCREMENT column and a BEFORE trigger that used the INSERT ... SELECT construct, an internal flag was not reset properly. This led to a crash the next time that the table was opened again. (Bug#44653)
  • For queries with a sufficient number of subqueries in the FROM clause of this form:
  • SELECT * FROM (SELECT 1) AS t1,
  • (SELECT 2) AS t2,
  • (SELECT 3) AS t3, ...
  • The query failed with a Too high level of nesting for select error, as those the query had this form:
  • SELECT * FROM (SELECT 1 FROM (SELECT 2 FROM (SELECT 3 FROM ...
  • (Bug#44156)
  • configure.in contained references to literal instances of nm and libc, rather than to variables parameterized for the proper values on the current platform. (Bug#42721)
  • configure.in did not properly check for the pthread_setschedprio() function. (Bug#42599)
  • A workaround for a Sun Studio bug was instituted. (Bug#41710)
  • Valgrind warnings that occurred for SHOW TABLE STATUS with InnoDB tables were silenced. (Bug#38479)
  • In the mysql client, if the server connection was lost during repeated status commands, the client would fail to detect this and command output would be inconsistent. (Bug#37274)
  • When invoked to start multiple server instances, mysqld_multi sometimes would fail to start them all due to not changing location into the base directory for each instance. (Bug#36654)
  • Renaming a column that appeared in a foreign key definition did not update the foreign key definition with the new column name. (Bug#21704)

New in MySQL 5.1.36 (Jul 2, 2009)

  • Important Change: Replication: Previously, incident log events were represented as comments in the output from mysqlbinlog, making them effectively silent when playing back the binlog
  • An incident log event represents an incident that could cause the contents of the database to change without that event being recorded in the binary log.)
  • This meant that, if the SQL were applied to a server, it could potentially lead to the master and the slave having different data. To make it possible to handle incident log events without breaking applications that expect the previous behavior, the nonsense statement RELOAD DATABASE is added to the SQL output for that incident log event, which causes an error
  • To use this functionality currently requires hand editing of the dump file and handling of each case on an individual basis by a database administrator before applying the output to a server. (Bug#44442)
  • mysql_upgrade now displays a message indicating the connection parameters it uses when invoking mysqlcheck. (Bug#44638)
  • The time zone tables for Windows available at http://dev.mysql.com/downloads/timezones.html have been updated. (Bug#39923)
  • The mysqltest program now has a move_file from_file to_file command for renaming files. This should be used in test cases rather than invoking an external command that might be platform specific. (Bug#39542)
  • Bugs fixed
  • Incompatible Change: The server can load plugins under the control of startup options. For example, many storage engines can be built in pluggable form and loaded when the server starts. In the following descriptions, plugin_name stands for a plugin name such as innodb
  • Previously, plugin options were handled like other boolean options (see Section 4.2.3.2, “Program Option Modifiers”). That is, any of these options enabled the plugin
  • plugin_name
  • plugin_name=1
  • enable-plugin_name
  • And these options disabled the plugin
  • plugin_name=0
  • disable-plugin_name
  • skip-plugin_name
  • However, use of a boolean option for plugin loading did not provide control over what to do if the plugin failed to start properly: Should the server exit, or start with the plugin disabled? The actual behavior has been that the server starts with the plugin disabled, which can be problematic. For example, if InnoDB fails to start, existing InnoDB tables become inaccessible, and attempts to create new InnoDB tables result in tables that use the default storage engine unless the NO_ENGINE_SUBSTITUTION SQL mode has been enabled to cause an error to occur instead
  • Now, there is a change in the options used to control plugin loading, such that they have a tristate format
  • plugin_name=OFF
  • Do not enable the plugin
  • plugin_name[=ON]
  • Enable the plugin. If plugin initialization fails, start the server anyway, but with the plugin disabled. Specifying the option as --plugin_name without a value also enables the plugin
  • plugin_name=FORCE
  • Enable the plugin. If plugin initialization fails, do not start the server. In other words, force the server to run with the plugin or not at all
  • The values OFF, ON, and FORCE are not case sensitive
  • Suppose that CSV and InnoDB have been built as pluggable storage engines and that you want the server to load them at startup, subject to these conditions: The server is allowed to run if CSV initialization fails, but must require that InnoDB initialization succeed. To accomplish that, use these lines in an option file
  • mysqld]
  • csv=ON
  • innodb=FORCE
  • This change is incompatible with the previous implementation if you used options of the form --plugin_name=0 or --plugin_name=1, which should be changed to --plugin_name=OFF or --plugin_name=ON, respectively
  • enable-plugin_name is still supported and is the same as --plugin_name=ON. --disable-plugin_name and --skip-plugin_name are still supported and are the same as --plugin_name=OFF. (Bug#19027)
  • Important Change: Replication: BEGIN, COMMIT, and ROLLBACK statements are no longer affected by --replicate-do-db or --replicate-ignore-db rules. (Bug#43263)
  • Partitioning: Queries using DISTINCT on multiple columns or GROUP BY on multiple columns did not return correct results with partitioned tables. (Bug#44821)
  • See also Bug#41136
  • Replication: When using row-based logging, the length of an event for which the field metadata exceeded 255 bytes in size was incorrectly calculated. This could lead to corruption of the binary log, or cause the server to hang. (Bug#42749)
  • See also Bug#44548, Bug#44672, Bug#44752
  • Replication: The warning Statement is not safe to log in statement format, issued in situations when it cannot be determined that a statement or other database event can be written reliably to the binary log using the statement-based format, has been changed to Statement may not be safe to log in statement format. (Bug#42415)
  • Replication: The Query_log_event used by replication to transfer a query to the slave has been refactored. Query_log_event also stores and sends the error code resulting from the execution since it, in some cases, is necessary to execute the statement on the slave as well, which should result in the same error code. The Query_log_event constructor previously worked out for itself the error code using a complex routine, the result of which was often set aside within the constructor itself. This was also involved with at least 2 known bugs relating to invalid errors, and taken as a clear sign that the constructor was not well-designed and needed to be re-written. (Bug#41948)
  • See also Bug#37145
  • Replication: When stopping and restarting the slave while it was replicating temporary tables, the slave server could crash or raise an assertion failure. This was due to the fact that, although temporary tables were saved between slave thread restarts, the reference to the thread being used (table->in_use) was not being properly updated when restarting, continuing to reference the old thread instead of the new one. This issue affected statement-based replication only. (Bug#41725)
  • Use of ROUND() on a LONGTEXT or LONGBLOB column of a derived table could cause a server crash. (Bug#45152)
  • DROP USER could fail to drop all privileges for an account if the PAD_CHAR_TO_FULL_LENGTH SQL mode was enabled. (Bug#45100)
  • GROUP BY on a constant (single-row) InnoDB table joined to other tables caused a server crash. (Bug#44886)
  • ALTER TABLE on a view crashed the server. (Bug#44860)
  • Index Merge followed by a filesort could result in a server crash if sort_buffer_size was not large enough for all sort keys. (Bug#44810)
  • UNCOMPRESSED_LENGTH() returned a garbage result when passed a string shorter than 5 bytes. Now UNCOMPRESSED_LENGTH() returns NULL and generates a warning. (Bug#44796)
  • Several Valgrind warnings were silenced. (Bug#44774, Bug#44792)
  • Selecting RAND(N) function where N is a column of a constant table (table with a single row) failed with a SIGFPE signal. (Bug#44768)
  • The PASSWORD() and OLD_PASSWORD() functions could read memory outside of an internal buffer when used with BLOB arguments. (Bug#44767)
  • Conversion of a string to a different character set could use the same buffer for input and output, leading to incorrect results or warnings. (Bug#44743, Bug#44766)
  • mysqld_safe could fail to find the logger program. (Bug#44736)
  • Code that optimized a read-only XA transaction failed to reset the XID once the transaction was no longer active. (Bug#44672)
  • A Valgrind warning related to transaction processing was silenced. (Bug#44664)
  • innochecksum could incorrectly determine the input file name from the arguments. (Bug#44484)
  • Incorrect time was reported at the end of mysqldump output. (Bug#44424)
  • Caching of GROUP BY expressions could lead to mismatches between compile-time and runtime calculations and cause a server crash. (Bug#44399)
  • Lettercase conversion in multibyte cp932 or sjis character sequences could produce incorrect results. (Bug#44352)
  • InnoDB was missing DB_ROLL_PTR information in Table Monitor COLUMNS output. (Bug#44320)
  • Assertion failure could occur for duplicate-key errors in INSERT INTO ... SELECT statements. (Bug#44306)
  • On 64-bit Windows systems, myisamchk did not handle key_buffer_size values larger than 4GB. (Bug#43940)
  • For user-defined utf8 collations, attempts to store values too long for a column could cause a server crash. (Bug#43827)
  • Invalidation of query cache entries due to table modifications could cause threads to hang inside the query cache with state “freeing items”. (Bug#43758)
  • EXPLAIN EXTENDED could crash for UNION queries in which the last SELECT was not parenthesized and included an ORDER BY clause. (Bug#43612)
  • Multiple-table updates for InnoDB tables could produce unexpected results. (Bug#43580)
  • For DELETE statements with ORDER BY var, where var was a global system variable with a NULL value, the server could crash. (Bug#42778)
  • Builds linked against OpenSSL had a memory leak in association with use of X509 certificates. (Bug#42158)
  • There was a race condition when changing innodb_commit_concurrency at runtime from zero to nonzero or from nonzero to zero. Now this variable cannot be changed at runtime from zero to nonzero or vice versa. The value can still be changed from one nonzero value to another. (Bug#42101)
  • SELECT ... INTO @var could produce values different from SELECT ... without the INTO clause. (Bug#42009)
  • mysql_zap did not work on Mac OS X. (Bug#41883)
  • Shared-memory connections did not work in Vista if mysqld was started from the command line. (Bug#41190)
  • For views created with a column list clause, column aliases were not substituted when selecting through the view using a HAVING clause. (Bug#40825)
  • A multiple-table DELETE involving a table self-join could cause a server crash. (Bug#39918)
  • Creating an InnoDB table with a comment containing a '#' character caused foreign key constraints to be omitted. (Bug#39793)
  • The mysql option --ignore-spaces was nonfunctional. (Bug#39101)
  • If a query was such as to produce the error 1054 Unknown column '...' in 'field list', using EXPLAIN EXTENDED with the query could cause a server crash. (Bug#37362)
  • In the mysql client, using a default character set of binary caused internal commands such as DELIMITER to become case sensitive. (Bug#37268)
  • If the MYSQL_HISTFILE environment variable was set to /dev/null, the mysql client overwrote the /dev/null device file as a normal file. (Bug#34224)
  • mysqld_safe mishandled certain parameters if they contained spaces. (Bug#33685)
  • mysqladmin kill did not work for thread IDs larger than 32 bits. (Bug#32457)
  • The InnoDB adaptive hash latch is released (if held) for serveral potentially long-running operations. This improves throughput for other queries if the current query is removing a temporary table, changing a temporary table from memory to disk, using CREATE TABLE ... SELECT, or performing a MyISAM repair on a table used within a transaction. (Bug#32149)
  • Several client programs failed to interpret --skip-password as “send no password.” (Bug#28479)
  • Output from mysql --html did not encode the , or & characters. (Bug#27884)
  • mysql_convert_table_format did not prevent converting tables to MEMORY or BLACKHOLE tables, which could result in data loss. (Bug#27149)

New in MySQL 5.1.35 (Jun 5, 2009)

  • The .msi installer does not detect an existing root password on the initial configuration attempt. To work around this, install and configure MySQL as normal, but skip any changes to security. (There is a checkbox that allows this on the security screen of the configuration wizard.) Then check your settings:
  • If the old root password and security settings are okay, you are done and can proceed to use MySQL.
  • Otherwise, reconfigure with the wizard and make any changes on the second configuration attempt. The wizard will properly prompt for the existing root password and allow changes to be made.
  • This issue has been filed as Bug#45200 for correction in a future release.
  • The Windows configuration wizard allows changes to InnoDB settings during a reconfiguration operation. For an upgrade, this may cause difficulties. To work around this, use one of the following alternatives:
  • Do not change InnoDB settings.
  • Copy files from the old InnoDB location to the new one.
  • This issue has been filed as Bug#45201 for correction in a future release.
  • Bugs fixed:
  • Important Change: Replication: The transactional behavior of STOP SLAVE has changed. Formerly, it took effect immediately, even inside a transaction; now, it waits until the current replication event group (if any) has finished executing, or until the user issues a KILL QUERY or KILL CONNECTION statement.
  • This was done in order to solve the problem encountered when replication was stopped while a nontransactional slave was replicating a transaction on the master. (It was impossible to roll back a mixed-engines transaction when one of the engines was nontransactional, which meant that the slave could not safely re-apply any transaction that had been interrupted by STOP SLAVE.) (Bug#319, Bug#38205)
  • See also Bug#43217.
  • Partitioning: When a value was equal to a PARTITION ... VALUES LESS THAN (value) value other than MAXVALUE, the corresponding partition was not pruned. (Bug#42944)
  • Replication: Unrelated errors occurring during the execution of RESET SLAVE could cause the slave to crash. (Bug#44179)
  • Replication: The --slave-skip-errors option had no effect when using row-based logging format. (Bug#39393)
  • Replication: The following erors were not correctly reported:
  • Failures during slave thread initialization
  • Failures while initializing the relay log position (immediately following the starting of the slave thread)
  • Failures while processing queries passed through the --init_slave option.
  • Information about these types of failures can now be found in the output of SHOW SLAVE STATUS. (Bug#38197)
  • Replication: Killing the thread executing a DDL statement, after it had finished its execution but before it had written the binlog event, caused the error code in the binlog event to be set (incorrectly) to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED, which caused replication to fail. (Bug#37145)
  • See also Bug#27571, Bug#22725.
  • Replication: Column alises used inside subqueries were ignored in the binary log. (Bug#35515)
  • Valgrind warnings for the DECODE(), ENCRYPT(), and FIND_IN_SET() functions were corrected. (Bug#44358, Bug#44365, Bug#44367)
  • On Windows, entries for build-vs9.bat and build-vs9_x64.bat were missing in win/Makefile.am. (Bug#44353)
  • Incomplete cleanup of JOIN_TAB::select during the filesort of rows for a GROUP BY clause inside a subquery caused a server crash. (Bug#44290)
  • Not all lock types had proper descriptive strings, resulting in garbage output from mysqladmin debug. (Bug#44164)
  • Use of HANDLER statements with INFORMATION_SCHEMA tables caused a server crash. Now HANDLER is prohibited with such tables. (Bug#44151)
  • Invoking SHOW TABLE STATUS from within a stored procedure could cause a Packets out of order error. (Bug#43962)
  • myisamchk could display a negative Max keyfile length value. (Bug#43950)
  • On 64-bit systems, a key_buffer_size value larger than 4GB could couse MyISAM index corruption. (Bug#43932)
  • mysqld_multi incorrectly passed --no-defaults to mysqld_safe. (Bug#43876)
  • SHOW VARIABLES did not properly display the value of slave_skip_errors. (Bug#43835)
  • On Windows, a server crash occurred for attempts to insert a floating-point value into a CHAR column with a maximum length less than the converted floating-point value length. (Bug#43833)
  • Incorrect initialization of MyISAM table indexes could cause incorrect query results. (Bug#43737)
  • libmysqld crashed when it was reinitialized. (Bug#43706, Bug#44091)
  • InnoDB uses random numbers to generate dives into indexes for calculating index cardinality. However, under certain conditions, the algorithm did not generate random numbers, so ANALYZE TABLE did not update cardinality estimates properly. A new algorithm has been introduced with better randomization properties, together with a system variable, innodb_use_legacy_cardinality_algorithm, that controls which algorithm to use. The default value of the variable is 1 (ON), to use the original algorithm for compatibility with existing applications. The variable can be set to 0 (OFF) to use the new algorithm with improved randomness. (Bug#43660)
  • UNION of floating-point numbers did unnecessary rounding. (Bug#43432)
  • ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME failed when the database contained views. (Bug#43385)
  • Certain statements might open a table and then wait for an impending global read lock without noticing whether they hold a table being waiting for by the global read lock, causing a hang. Affected statements are SELECT ... FOR UPDATE, LOCK TABLES ... WRITE, TRUNCATE TABLE, and LOAD DATA INFILE. (Bug#43230)
  • Using an XML function such as ExtractValue() more than once in a single query could produce erroneous results. (Bug#43183)
  • See also Bug#43937.
  • Full-text prefix searches could hang the connection and cause 100% CPU consumption. (Bug#42907)
  • InnoDB had excessive contention for a character set mutex. (Bug#42649)
  • Incorrect elevation of warning messages to error messages for unsafe statements caused a server crash. (Bug#42640)
  • CHECK TABLE suggested use of REPAIR TABLE for corrupt tables for storage engines not supported by REPAIR TABLE. Now CHECK TABLE suggests that the user dump and reload the table. (Bug#42563)
  • Compressing a table with the myisampack utility caused the server to produce Valgrind warnings when it opened the table. (Bug#41541)
  • For a MyISAM table with DELAY_KEY_WRITE enabled, the index file could be corrupted without the table being marked as crashed if the server was killed. (Bug#41330)
  • Killing an INSERT ... SELECT statement for a MyISAM table could cause table corruption if the table had indexes. (Bug#40827)
  • A multiple-table DELETE IGNORE statement involving a foreign key constraint caused an assertion failure. (Bug#40127)
  • Multiple-table UPDATE statements did not properly activate triggers. (Bug#39953)
  • The mysql_setpermission operation for removing database privileges removed global privileges instead. (Bug#39852)
  • A stored routine contain a C-style comment could not be dumped and reloaded. (Bug#39559)
  • In an UPDATE or DELETE via a secondary index, InnoDB did not store the cursor position. This made InnoDB crash in semi-consistent read while attempting to unlock a nonmatching record. (Bug#39320)
  • The functions listed in Section 11.13.4.2.3, “Creating Geometry Values Using MySQL-Specific Functions”, previously accepted WKB arguments and returned WKB values. They now accept WKB or geometry arguments and return geometry values.
  • The functions listed in Section 11.13.4.2.2, “Creating Geometry Values Using WKB Functions”, previously accepted WKB arguments and returned geometry values. They now accept WKB or geometry arguments and return geometry values. (Bug#38990)
  • On WIndows, running the server with myisam_use_mmap enabled caused MyISAM table corruption. (Bug#38848)
  • CHECK TABLE did not properly check whether MyISAM tables created by servers from MySQL 4.0 or older needed to be upgraded. This could cause problems upgrading to MySQL 5.1 or higher. (Bug#37631)
  • An UPDATE statement that updated a column using the same DES_ENCRYPT() value for each row actually updated different rows with different values. (Bug#35087)
  • For shared-memory connections, the read and write methods did not properly handle asynchronous close events, which could lead to the client locking up waiting for a server response. For example, a call to mysql_real_query() would block forever on the client side if the executed statement was aborted on the server side. Thanks to Armin Schöffmann for the bug report and patch. (Bug#33899)
  • CHECKSUM TABLE was not killable with KILL QUERY. (Bug#33146)
  • myisamchk and myisampack were not being linked with the library that enabled support for * filename pattern expansion. (Bug#29248)
  • For InnoDB tables that have their own .ibd tablespace file, a superfluous ibuf cursor restoration fails! message could be written to the error log. This warning has been suppressed. (Bug#27276)
  • COMMIT did not delete savepoints if there were no changes in the transaction. (Bug#26288)
  • Several memory allocation functions were not being checked for out-of-memory return values. (Bug#25058)

New in MySQL 5.1.34 (Apr 22, 2009)

  • Replication: Important Note: Binary logging with --binlog_format=ROW failed when a change to be logged included more than 251 columns. This issue was not known to occur with mixed-format or statement-based logging. (Bug#42977)
  • See also Bug#42914.
  • Replication: Assigning an invalid directory for the --slave-load-tmpdir caused the replication slave to crash. (Bug#42861)
  • Replication: The mysql.procs_priv system table was not replicated. (Bug#42217)
  • Replication: An INSERT DELAYED into a TIMESTAMP column issued concurrently with a an insert on the same column not using DELAYED, but applied after the other insert, was logged using the same timestamp as generated by the other (non-DELAYED) insert. (Bug#41719)
  • Replication: The MIXED binary logging format did not switch to row-based mode for statements containing the LOAD_FILE() function. (Bug#39701)
  • Replication: When the server SQL mode included IGNORE_SPACE, statement-based replication of LOAD DATA INFILE ... INTO tbl_name failed because the statement was read incorrectly from the binary log; a trailing space was omitted, causing the statement to fail with a syntax error when run on the slave. (Bug#22504)
  • See also Bug#43746.
  • An attempt by a user who did not have the SUPER privilege to kill a system thread could cause a server crash. (Bug#43748)
  • On Windows, incorrectly specified link dependencies in CMakeLists.txt resulted in link errors for mysql_embedded, mysqltest_embedded, and mysql_client_test_embedded. (Bug#43715)
  • mysql crashed if a request for the current database name returned an empty result, such as after the client has executed a preceding SET sql_select_limit=0 statement. (Bug#43254)
  • If the value of the version_comment system variable was too long, the mysql client displayed a truncated startup message. (Bug#43153)
  • Queries of the following form returned an empty result:
  • SELECT ... WHERE ... (col=col AND col=col) OR ... (false expression)
  • (Bug#42957)
  • The strings/CHARSET_INFO.txt file was not included in source distributions. (Bug#42937)
  • A dangling pointer in mysys/my_error.c could lead to client crashes. (Bug#42675)
  • Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug#42502)
  • With more than two arguments, LEAST(), GREATEST(), and CASE could unnecessarily return Illegal mix of collations errors. (Bug#41627)
  • The mysql client could misinterpret its input if a line was longer than an internal buffer. (Bug#41486)
  • In the help command output displayed by mysql, the description for the c (clear) command was misleading. (Bug#41268)
  • The load_defaults(), my_search_option_files() and my_print_default_files() functions in the C client library were subject to a race condition in multi-threaded operation. (Bug#40552)
  • If --basedir was specified, mysqld_safe did not use it when attempting to locate my_print_defaults. (Bug#39326)
  • When MySQL was configured with the --with-max-indexes=128 option, mysqld crashed. (Bug#36751)
  • Setting the join_buffer_size variable to its minimum value produced spurious warnings. (Bug#36446)
  • The use of NAME_CONST() can result in a problem for CREATE TABLE ... SELECT statements when the source column expressions refer to local variables. Converting these references to NAME_CONST() expressions can result in column names that are different on the master and slave servers, or names that are too long to be legal column identifiers. A workaround is to supply aliases for columns that refer to local variables.
  • Now a warning is issued in such cases that indicate possible problems. (Bug#35383)
  • An attempt to check or repair an ARCHIVE table that had been subjected to a server crash returned a 144 internal error. The data appeared to be irrecoverable. (Bug#32880)
  • The Time column for SHOW PROCESSLIST output and the value of the TIME column of the INFORMATION_SCHEMA.PROCESSLIST table now can have negative values. Previously, the column was unsigned and negative values were displayed incorrectly as large positive values. Negative values can occur if a thread alters the time into the future with SET TIMESTAMP = value or the thread is executing on a slave and processing events from a master that has its clock set ahead of the slave. (Bug#22047)
  • Restoring a mysqldump dump file containing FEDERATED tables failed because the file contained the data for the table. Now only the table definition is dumped (because the data is located elsewhere). (Bug#21360)

New in MySQL 5.1.32 (Mar 4, 2009)

  • Important Change:
  • Replication: RESET MASTER and RESET SLAVE now reset the values shown for Last_IO_Error, Last_IO_Errno, Last_SQL_Error, and Last_SQL_Errno in the output of SHOW SLAVE STATUS. (Bug#34654)
  • The libedit library was upgraded to version 2.11. (Bug#42433)
  • Bugs fixed:
  • Security Fix: Using an XPath expression employing a scalar expression as a FilterExpr with ExtractValue() or UpdateXML() caused the server to crash. Such expressions now cause an error instead. (Bug#42495)
  • Incompatible Change: The fix for Bug#33699 introduced a change to the UPDATE statement such that assigning NULL to a NOT NULL column caused an error even when strict SQL mode was not enabled. The original behavior before was that such assignments caused an error only in strict SQL mode, and otherwise set the column to the the implicit default value for the column data type and generated a warning. (For information about implicit default values, see Section 10.1.4, “Data Type Default Values”.)
  • The change caused compatibility problems for applications that relied on the original behavior. It also caused replication problems between servers that had the original behavior and those that did not, for applications that assigned NULL to NOT NULL columns in UPDATE statements without strict SQL mode enabled. This change has been reverted so that UPDATE again had the original behavior. Problems can still occur if you replicate between servers that have the modified UPDATE behavior and those that do not. (Bug#39265)
  • Replication: START SLAVE UNTIL did not work correctly with --replicate-same-server-id enabled; when started with this option, the slave did not perform events recorded in the relay log and that originated from a different master.
  • Log rotation events are automatically generated and written when rotating the binary log or relay log. Such events for relay logs are usually ignored by the slave SQL thread because they have the same server ID as that of the slave. However, when --replicate-same-server-id was enabled, the rotation event for the relay log was treated as if it originated on the master, because the log's name and position were incorrectly updated. This caused the MASTER_POS_WAIT() function always to return NULL and thus to fail. (Bug#38734, Bug#38934)
  • Replication: TRUNCATE statements failed to replicate when statement-based binary logging mode was not available. The issue was observed when using InnoDB with the transaction isolation level set to READ UNCOMMITTED (thus forcing InnoDB not to allow statement-based logging). However, the same behavior could be reproduced using any transactional storage engine supporting only row-based logging, regardless of the isolation level. This was due to two separate problems:
  • An error was printed by InnoDB for TRUNCATE when using statement-based logging mode where the transaction isolation level was set to READ COMMITTED or READ UNCOMMITTED, because InnoDB permits statement-based replication for DML statements. However, TRUNCATE is not transactional; since it is the equivalent of DROP TABLE followed by CREATE TABLE, it is actually DDL, and should therefore be allowed to be replicated as a statement.
  • TRUNCATE was not logged in mixed mode because of the error just described; however, this error was not reported to the client.
  • As a result of this fix, TRUNCATE is now treated as DDL for purposes of binary logging and replication; that is, it is always logged as a statement and so no longer causes an error when replicated using a transactional storage engine such as InnoDB. (Bug#36763)
  • See also Bug#42643.
  • Replication: mysqlbinlog replay of CREATE TEMPORARY TABLE ... LIKE statements and of TRUNCATE statements used on temporary tables failed with Error 1146 (Table ... doesn't exist). (Bug#35583)
  • Replication: In statement mode, mysqlbinlog failed to issue a SET @@autommit statement when the autocommit mode was changed. (Bug#34541)
  • Replication: LOAD DATA INFILE statements did not replicate correctly from a master running MySQL 4.1 to a slave running MySQL 5.1 or later. (Bug#31240)
  • A '%' character in SQL statements could cause the server to crash. (Bug#42634)
  • An optimization introduced for Bug#37553 required an explicit cast to be added for some uses of TIMEDIFF() because automatic casting could produce incorrect results. (It was necessary to use TIME(TIMEDIFF(...)).) (Bug#42525)
  • On the IBM i5 platform, the MySQL configuration process caused the system version of pthread_setschedprio() to be used. This function returns SIGILL on i5 because it is not supported, causing the server to crash. Now the my_pthread_setprio() function in the mysys library is used instead. (Bug#42524)
  • The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)
  • Packages for MySQL Cluster were missing the libndbclient.so and libndbclient.a files. (Bug#42278)
  • User variables within triggers could cause a crash if the mysql_change_user() C API function was invoked. (Bug#42188)
  • Dependent subqueries such as the following caused a memory leak proportional to the number of outer rows:
  • SELECT COUNT(*) FROM t1, t2 WHERE t2.b
  • IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a);
  • (Bug#42037)
  • Some queries using NAME_CONST(.. COLLATE ...) led to a server crash due to a failed type cast. (Bug#42014)
  • On Mac OS X, some of the universal client libraries were not actually universal and were missing code for one or more architectures. (Bug#41940)
  • String reallocation could cause memory overruns. (Bug#41868)
  • Setting innodb_locks_unsafe_for_binlog should be equivalent to setting the transaction isolation level to READ COMMITTED. However, if both of those things were done, non-matching semi-consistently read rows were not unlocked when they should have been. (Bug#41671)
  • REPAIR TABLE crashed for compressed MyISAM tables. (Bug#41574)
  • For a TIMESTAMP NOT NULL DEFAULT ... column, storing NULL as the return value from some functions caused a “cannot be NULL” error. NULL returns now correctly cause the column default value to be stored. (Bug#41370)
  • The server cannot execute INSERT DELAYED statements when statement-based binary logging is enabled, but the error message displayed only the table name, not the entire statement. (Bug#41121)
  • FULLTEXT indexes did not work for Unicode columns that used a custom UCA collation. (Bug#41084)
  • The Windows installer displayed incorrect product names in some images. (Bug#40845)
  • SELECT statements could be blocked by INSERT DELAYED statements that were waiting for a lock, even with low_priority_updates enabled. (Bug#40536)
  • The query cache stored only partial query results if a statement failed while the results were being sent to the client. This could cause other clients to hang when trying to read the cached result. Now if a statement fails, the result is not cached. (Bug#40264)
  • When a MEMORY table became full, the error generated was returned to the client but was not written to the error log. (Bug#39886)
  • The expression ROW(...) IN (SELECT ... FROM DUAL) always returned TRUE. (Bug#39069)
  • The greedy optimizer could cause a server crash due to improper handling of nested outer joins. (Bug#38795)
  • Use of COUNT(DISTINCT) prevented NULL testing in the HAVING clause. (Bug#38637)
  • Enabling the sync_frm system variable had no effect on the handling of .frm files for views. (Bug#38145)
  • Setting myisam_repair_threads greater than 1 caused a server crash for table repair or alteration operations for MyISAM tables with multiple FULLTEXT indexes. (Bug#37756)
  • The mysql client sometimes improperly interpreted string escape sequences in non-string contexts. (Bug#36391)
  • The query cache stored packets containing the server status of the time when the cached statement was run. This might lead to an incorrect transaction status on the client side if a statement was cached during a transaction and later served outside a transaction context (or vice versa). (Bug#36326)
  • If the system time was adjusted backward during query execution, the apparent execution time could be negative. But in some cases these queries would be written to the slow query log, with the negative execution time written as a large unsigned number. Now statements with apparent negative execution time are not written to the slow query log. (Bug#35396)
  • libmysqld was not built with all character sets. (Bug#32831)
  • For mysqld_multi, using the --mysqld=mysqld_safe option caused the --defaults-file and --defaults-extra-file options to behave the same way. (Bug#32136)
  • For Solaris package installation using pkgadd, the postinstall script failed, causing the system tables in the mysql database not to be created. (Bug#31164)
  • If the default database was dropped, the value of character_set_database was not reset to character_set_server as it should have been. (Bug#27208)