Documentation Home
MySQL 8.0 Release Notes
Related Documentation Download these Release Notes
PDF (US Ltr) - 4.2Mb
PDF (A4) - 4.3Mb


MySQL 8.0 Release Notes  /  Changes in MySQL 8.0.2 (2017-07-17, Development Milestone)

Changes in MySQL 8.0.2 (2017-07-17, Development Milestone)

For general information about upgrades, downgrades, platform support, etc., please visit https://dev.mysql.com/doc/relnotes/mysql/8.0/en/.

Note

This is a milestone release, for use at your own risk. Upgrades between milestone releases (or from a milestone release to a GA release) are not supported. Significant development changes take place in milestone releases and you may encounter compatibility issues, such as data format changes that require attention in addition to the usual procedure of running mysql_upgrade. For example, you may find it necessary to dump your data with mysqldump before the upgrade and reload it afterward. (Making a backup before the upgrade is a prudent precaution in any case.)

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 connections. (Bug #25642343)

  • These system variables now are available to define mandatory roles and to enable granted roles to be automatically activated at client connection time:

    • mandatory_roles takes a value listing roles the server should treat as automatically granted to all users.

    • activate_all_roles_on_login enables control over automatic activation of all granted roles when users log in to the server.

    For more information, see Using Roles. (WL #924)

Character Set Support

  • For Unicode data that uses NO PAD collations, sorting of multibyte and variable-length values has been improved:

    • NO PAD collations are those based on UCA 9.0.0 and higher, such as utf8mb4_0900_ai_ci or utf8mb4_ja_0900_as_cs.

    • The performance improvement is greatest for key values with short weight strings; that is, strings where the weight strings do not fill their entire permitted length. For a VARCHAR(10) column that uses the utf8mb4_0900_ai_ci collation, values may take up to 160 bytes. The string 'a' uses only 2 bytes out of a possible 160 and is more sparse than 'abcdefghij'. But even 'abcdefghij' uses only 20 bytes of a possible 160 and is more sparse than a string of, for example, ten copies of U+337F SQUARE CORPORATION (㍿), whose weight string requires the entire 160 bytes available.

    (Bug #25750527, Bug #85546, WL #9554)

  • MySQL now supports a new collation, utf8mb4_0900_as_ci, for the utf8mb4 Unicode character set. This collation is accent sensitive and case insensitive. It is similar to the default utf8mb4 collation (utf8mb4_0900_ai_ci) except that the default collation is accent insensitive.

    MySQL also now supports a new Japanese collation, utf8mb4_ja_0900_as_cs_ks, for the utf8mb4 Unicode character set. This collation is like utf8mb4_ja_0900_as_cs in that it is accent sensitive and case sensitive, but utf8mb4_ja_0900_as_cs_ks is also kana sensitive and distinguishes Katakana characters from Hiragana characters. utf8mb4_ja_0900_as_cs treats Katakana and Hiragana characters as equal for sorting. Applications that require a Japanese collation but not kana sensitivity may use utf8mb4_ja_0900_as_cs for better sort performance. utf8mb4_ja_0900_as_cs uses three weight levels for sorting; utf8mb4_ja_0900_as_cs_ks uses four.

    utf8mb4_ja_0900_as_cs_ks is the first collation to use the _ks collation suffix. Japanese collations without this suffix are not kana sensitive.

    For more information, see Unicode Character Sets. (WL #10480, WL #10818)

  • These character set changes were made to MySQL client support:

    • These clients use a default character set of utf8mb4 rather than latin1: mysql, mysql_upgrade, mysqladmin, mysqlcheck, mysqldump, mysqlimport, mysqlpump, mysqlslap, mysqlshow, and mysqltest. (This change does not affect character set autodetection performed by mysql, mysqladmin, mysqlcheck, mysqlimport, and mysqlshow, as described at Connection Character Sets and Collations).

    • Client connections created using the libmysqlclient library use a default character set of utf8mb4 rather than latin1.

    • The mysqltest program supports a --default-character-set option for specifying the character set explicitly.

    (WL #10353)

Compilation Notes

  • Performance: The strict aliasing optimization for GCC is no longer disabled, which results in a minor improvement for MySQL single-threaded performance. (WL #10344)

  • Linux: MySQL now compiles on Alpine Linux. (Bug #25945568, Bug #80322)

  • Solaris: On Solaris, server builds now use std::atomic, so they must be linked against libstatomic. (Bug #25957991)

  • MySQL now compiles using Visual Studio 2017. (Bug #25788406)

  • The minimum version of the Boost library for server builds is now 1.64.0. (Bug #25772329, Bug #85593)

  • These changes were made with respect to client program development:

    • Client programs should only need to #include the <mysql.h> header file. In particular, <my_config.h> should not be needed, and is no longer installed.

    • The my_init() function is no longer included in the list of symbols exported from libmysqlclient. It need not be called explicitly by client programs because it is called implicitly by other C API initialization functions.

    (Bug #25732787)

  • For the Xcode IDE, header files are added to MySQL project sources so they can be searched. (Bug #25636986)

  • Work was done to clean up the source code base, including: Removing unneeded CMake checks; removing unused macros from source files; reorganizing header files to reduce the number of dependencies and make them more modular, removing function declarations without definitions, replacing locally written functions with equivalent functions from industry-standard libraries.

Component Notes

  • New services are available to enable components to register and unregister system variables (component_sys_variable_register, component_sys_variable_unregister) and to register status variables (status_variable_registration). (WL #8020)

  • Two new services are available to enable components and plugins to register and unregister loadable functions: mysql_service_udf_registration and mysql_service_udf_registration_aggregate provide registration services for scalar and aggregate loadable functions, respectively. These services enable components and plugins to manage loadable functions for themselves, without the need for CREATE FUNCTION and DROP FUNCTION statements.

    Loadable functions registered using either these services or CREATE FUNCTION are listed in the new Performance Schema user_defined_functions table. See The user_defined_functions Table. Such loadable functions are not listed in the mysql.func system table, so the user_defined_functions table is preferable for checking which loadable functions are installed. (WL #8020)

  • The mysql_string string-manipulation service has been converted from a plugin service to a component service: a set of string service APIs for use by components. The password validation component has been updated to use the revised service implementation. (WL #9503)

Configuration Notes

  • Previously, LOCAL capability for LOAD DATA operations was enabled by default in some contexts: The client library in MySQL binary distributions was compiled with client-side LOCAL capability enabled, and the local_infile system variable was enabled on the server side. LOCAL capability is now disabled by default in all contexts. Client programs must be configured explicitly to enable LOCAL, and the server must be run with local_infile enabled. See Security Considerations for LOAD DATA LOCAL. (Bug #24511108)

  • mysqld startup behavior has been modified as follows. In general, these changes enable more consistent or easier server startup when not using mysqld_safe.

    • The server executable determines its own full path name at startup and uses the parent of the directory in which it is located as the default basedir value. This in turn enables the server to use that basedir when searching for server-related information such as the share directory containing error messages.

    • If error log output cannot be redirected to the --log-error option value, error output could be lost. This is now less likely.

    • If the server is started using the --daemonize option and is not connected to a tty device, a default error logging option of --log-error="" is used in the absence of an explicit logging option, to direct error output to the default log file. Previously, an error could occur under these circumstances.

    • The -D and -I options now are synonyms for --daemonize and --initialize, respectively.

    (Bug #20398088, Bug #75343, WL #10441)

  • MySQL now supports a SET PERSIST_ONLY variant of SET statement syntax, for making configuration changes at runtime that also persist across server restarts. Like SET PERSIST, SET PERSIST_ONLY writes the variable setting to an option file named mysqld-auto.cnf in the data directory. However, unlike PERSIST, PERSIST_ONLY does not modify the runtime global system variable value. This makes PERSIST_ONLY suitable for configuring read-only system variables that only be set can at server startup. For more information, see Using Option Files, and SET Syntax for Variable Assignment.

    Use of SET PERSIST_ONLY requires the new PERSIST_RO_VARIABLES_ADMIN privilege, in addition to the SYSTEM_VARIABLES_ADMIN privilege necessary for persisting system variables. (WL #9787)

Data Dictionary Notes

  • The column_stats system table has been removed and replaced by the column_statistics data dictionary table. (WL #8943)

  • The version data dictionary table was renamed to dd_properties.

    Metadata for INFORMATION_SCHEMA tables created by dynamic plugins now is recorded in the data dictionary and visible through the INFORMATION_SCHEMA TABLES table.

    These tables are no longer visible in INFORMATION_SCHEMA: SHOW_STATISTICS, SHOW_STATISTICS_DYNAMIC, STATISTICS_BASE, STATISTICS_DYNAMIC, TABLES_DYNAMIC. User impact is minimal because these tables are for internal use by the server. (WL #9495)

  • The InnoDB storage engine now uses the MySQL data dictionary rather than its own storage engine-specific data dictionary. For information about the data dictionary, see MySQL Data Dictionary.

    The following list briefly describes the main implications of this change:

    • Upgrade and downgrade implications:

      • To upgrade from MySQL 5.7 to MySQL 8.0, you must perform the upgrade procedure described at Upgrading MySQL.

      • Downgrading from MySQL 8.0 to MySQL 5.7 is only supported using the logical downgrade method (a mysqldump downgrade). In-place downgrades are not supported.

    • Metadata updates associated with exporting and importing tablespaces using the transportable tablespace feature are now performed on global data dictionary tables instead of InnoDB data dictionary tables.

    • InnoDB in-memory metadata is now instantiated from global data dictionary objects. This metadata was previously read from InnoDB system tables.

    • Table options that signify tablespace encryption and transparent page compression are now retrieved from the global data dictionary.

    • Data dictionary support was added for InnoDB FULLTEXT indexes. Auxiliary index table names were changed to lowercase.

    • InnoDB metadata created or modified during DDL operations is now written to the global data dictionary.

    (WL #9461, WL #9537, WL #9534, WL #9531, WL #9530, WL #9525, WL #9357)

  • mysql system tables and data dictionary tables are now created in a single InnoDB tablespace file named mysql.ibd in the MySQL data directory. Previously, these tables were created in individual InnoDB tablespace files in the mysql database directory. Associated changes include:

    • The InnoDB data dictionary buffer table, which stores fast changing InnoDB metadata, was renamed to innodb_dynamic_metadata and moved from the InnoDB system tablespace to the data dictionary tablespace.

    • Undo tablespace metadata now resides in the data dictionary tablespace.

    • Temporary tablespace metadata now resides in the data dictionary tablespace.

    • Table definitions for tables created in the mysql tablespace, the InnoDB system tablespace (innodb_system), or general tablespaces now include a TABLESPACE attribute. This change has the following implications:

      • You cannot use CREATE TEMPORY TABLE ... LIKE to create an empty table based on the definition of a table that resides in any of the aforementioned tablespaces, as these tablespaces do not support temporary tables.

      • CREATE TABLE ... LIKE preserves the TABLESPACE attribute of the original table and creates a new table in the defined tablespace regardless of the innodb_file_per_table setting. This is a temporary regression.

      For more information and workarounds, see CREATE TABLE ... LIKE Statement, and CREATE TEMPORARY TABLE Statement.

    (WL #9532)

Deprecation and Removal Notes

  • 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 version. (WL #10944)

  • The explicit_defaults_for_timestamp system variable is now enabled by default (previously disabled by default), and a warning occurs if you disable it. This means that the nonstandard (and deprecated) behaviors for default values and NULL-value handling in TIMESTAMP columns are now disabled by default. (WL #9687)

  • Support for these deprecated syntax constructs for table and column references has been removed and their use now results in an error. Instances of these constructs should be changed to remove the leading period.

    • .col_name

    • .tbl_name

    • .tbl_name.col_name

    (WL #8662)

  • Symbolic link support as described at Using Symbolic Links for MyISAM Tables on Unix, along with the --symbolic-links option that controls it, is now deprecated and will be removed in a future MySQL version. In addition, the option is now disabled by default. The related have_symlink system variable also is deprecated and will be removed in a future MySQL version. (WL #8392)

SQL Function and Operator Notes

  • MySQL now supports window functions that, for each row from a query, perform a calculation using rows related to that row. These include functions such as RANK(), LAG(), and NTILE(). In addition, most existing aggregate functions now can be used as window functions; for example, SUM() and AVG(). For more information, see Window Functions.

    Note

    Each of the following words now is a reserved word and cannot be used as an identifier without identifier quoting: CUME_DIST, DENSE_RANK, FIRST_VALUE, GROUPS, LAG, LAST_VALUE, LEAD, NTH_VALUE, NTILE, OVER, PERCENT_RANK, RANK, ROW_NUMBER, WINDOW.

    (WL #9236, WL #9603, WL #9727)

Logging Notes

  • Incompatible Change: These error-logging changes have been made:

    • The server is more forgiving if it cannot find the configured error-message file (specified using the lc_messages_dir and lc_messages system variables). Previously, the server wrote a message to the error log to indicate the problem, then aborted the startup process and exited. Now the server writes a message, but continues startup and defaults to built-in English messages. This applies to messages the server writes to the error log and sends to clients. See Setting the Error Message Language.

    • Error logging was rewritten to use the MySQL component architecture. Traditional error logging is implemented using built-in components, and logging using the system log is implemented as a loadable component. In addition, a loadable JSON-format log sink is available. To control which log components to enable, use the log_error_services system variable. For more information, see The Error Log.

    • Incompatibility: To enable logging to the system log, you must load the log_sink_syseventlog log component and list it in the log_error_services value (see Error Logging to the System Log). This differs from MySQL 5.7 and earlier, for which logging to the system log is enabled by default on Windows, and on all platforms requires no component loading.

      A consequence of this configuration change is that the log_syslog system variable previously used to control logging to the system log is obsolete and changes to its value have no effect. log_syslog is now deprecated and will be removed in a future MySQL version.

    (WL #9323, WL #9342, WL #9343, WL #9344)

Optimizer Notes

  • MySQL now enables management of histogram statistics for table column values:

    • The ANALYZE TABLE statement supports UPDATE HISTOGRAM and DROP HISTOGRAM clauses for generating and removing column histogram statistics.

    • The server stores histogram information in the column_statistics data dictionary table. Histograms are viewable using the INFORMATION_SCHEMA.COLUMN_STATISTICS table.

    • The histogram_generation_max_mem_size system variable controls the amount of memory available for histogram generation.

    • The Performance Schema has a memory/sql/histograms instrument for monitoring memory allocations performed for histogram generation.

    • mysqldump and mysqlpump have a --column-statistics option to add ANALYZE TABLE statements to the output to generate histogram statistics for dumped tables when the dump file is reloaded.

    For more information, see ANALYZE TABLE Statement, Optimizer Statistics, and The INFORMATION_SCHEMA COLUMN_STATISTICS Table. (WL #8943)

Packaging Notes

  • mysqladmin was added to Docker/Minimal packages because it is needed by InnoDB Cluster. (Bug #25998285)

  • 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)

  • Debian/Ubuntu packages now support multiple MySQL instances with systemd. See Managing MySQL Server with systemd. (Bug #24559588, Bug #82785)

Parser Notes

  • The parser rules for ALTER TABLE were refactored to be context independent and improve maintainability and extensibility. A resulting effect is that some previously accepted undocumented syntax variants are no longer accepted. For example, CREATE TABLE statements were permitted with column names qualified by the table name, or by the current database and table name, as were certain ALTER TABLE statements for which only column names are permitted. Such statements now produce an error. (WL #8657)

Performance Schema Notes

  • The Performance Schema threads table now contains a RESOURCE_GROUP column that indicates resource group labels. (WL #8881)

  • The Performance Schema now supports versioning, and maintains the current definitions for its tables internally. At startup, the server compares its supported Performance Schema version with the Performance Schema version stored in the data dictionary. If the versions differ, the server drops any old Performance Schema tables and recreates them using the current definitions. In consequence of this change:

    • For MySQL upgrades, it is no longer necessary to run mysql_upgrade to incorporate changes to Performance Schema tables because they are recreated automatically as necessary at server startup.

    • The mysql_system_tables.sql support script no longer includes SQL statements for Performance Schema table creation because these table definitions are maintained internally.

    To support dynamic Performance Schema table manipulation, a new component service named pfs_table_service is now available. (WL #7900, WL #8879)

  • The Performance Schema default instrumentation settings have changed:

    (WL #9625, WL #9628, WL #9629)

Plugin Notes

  • Incompatible Change: Plugins such as Group Replication and X Plugin now use the mysql.session account added in this release. If you are upgrading from a previous release 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 run after a server update. User accounts previously used for this purpose, such as mysqlxsys, are no longer created. (Bug #26042764)

    References: See also: Bug #24311527, Bug #25642343, Bug #25750822, Bug #25103980, Bug #83841.

Security Notes

  • The linked OpenSSL library for the MySQL Commercial Server has been updated to version 1.0.2l. 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 #26160962)

  • Previously, any user could execute the XA RECOVER statement to discover the XID values for outstanding prepared XA transactions, possibly leading to commit or rollback of an XA transaction by a user other than the one who started it. Now XA RECOVER is permitted only to users who have the new XA_RECOVER_ADMIN privilege, which is expected to be granted only to administrative users who have need for it. This might be the case, for example, for administrators of an XA application if it has crashed and it is necessary to find outstanding transactions started by the application so they can be rolled back. This privilege requirement does not affect normal commit or rollback of an XA transaction because the user who started it knows its XID.

    For MySQL uprades, mysql_upgrade grants XA_RECOVER_ADMIN to users who have the SUPER privilege, unless some account is found that already has XA_RECOVER_ADMIN. (Bug #17188129, WL #7194)

Spatial Data Support

Test Suite Notes

  • The --do-test-list option for mysql-test-run.pl accepts an argument for a file containing tests one per line. Lines in the file are now accepted in any of the following formats:

    test_name
    test_name.test
    suite_name.test_name
    suite_name.test_name.test
    path/to/test/file

    (Bug #25700362)

  • mysql-test-run.pl and mysqltest are now more restrictive about permitted test case and result file names. Names must consist only of alphanumeric characters (A-Z, a-z, 0-9), dash (-), or underscore (_), and cannot start with dash or underscore. An error occurs for nonconforming file names. (Bug #25487471)

  • 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.

    (Bug #25349924)

  • 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.

    (Bug #24473420, Bug #25984429)

  • 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)

  • mysql-test-run.pl now looks for a testname-client.opt file, which is analogous to the testname-master.opt file but for specifying test-specific client options. (Bug #17084918)

X Plugin Notes

  • X Plugin now handles expired SSL certificates correctly. (Bug #25835833)

  • 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)

  • During install of the X Plugin a blank rule was being generated in the Firewall white list. (Bug #24488234)

Functionality Added or Changed

  • Incompatible Change; InnoDB: ADD PARTITION, DROP PARTITION, COALESCE PARTITION, REORGANIZE PARTITION, and REBUILD PARTITION ALTER TABLE options are now supported by native partitioning in-place APIs and may be used with ALGORITHM={COPY|INPLACE} and LOCK clauses.

    EXCHANGE PARTITION, which previously supported ALGORITHM and LOCK clauses, is performed by a new server layer API for compatibility with the MySQL data dictionary. Partition and table exchange is performed internally by the native partition handler.

    DROP PARTITION with ALGORITHM=INPLACE deletes data stored in the partition and drops the partition. However, DROP PARTITION with ALGORITHM=COPY or old_alter_table=ON rebuilds the partitioned table and attempts to move data from the dropped partition to another partition with a compatible PARTITION ... VALUES definition. Data that cannot be moved to another partition is deleted. (WL #9559)

  • InnoDB: InnoDB now uses tablespace map files during recovery to identify tablespaces that require redo log application. This is a change from redo log tablespace discovery that was used previously.

    If tablespace map files are lost or corrupted, the innodb_scan_directories startup option may be used to specify tablespace directories when starting MySQL after a server outage.

    For more information, see Tablespace Discovery During Crash Recovery. (Bug #24793413, WL #9499)

  • InnoDB: In previous releases, InnoDB stores ROW_FORMAT and KEY_BLOCK_SIZE attributes specified in CREATE TABLE or ALTER TABLE statements even if those attributes are silently ignored when creating or altering a table. In such cases, SHOW CREATE TABLE and the Create_options column reported by SHOW TABLE STATUS show the specified ROW_FORMAT and KEY_BLOCK_SIZE attributes rather than the actual attributes of the table. InnoDB now stores and reports the actual ROW_FORMAT and KEY_BLOCK_SIZE attributes of the table. (WL #9525)

  • 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, WL #10611, WL #10960)

  • Replication: When there was a network partition and a member was in a minority all queries to that member blocked. To improve this situation, the group_replication_unreachable_majority_timeout variable has been added which enables you to configure how long members in a minority wait to regain contact with a member in the majority before leaving the group. (Bug #25473794)

  • 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: Support for binary log files created by versions earlier than MySQL 5.0 has been removed, and binary log Version 1 and Version 3 formats are no longer supported by slaves or mysqlbinlog. (WL #9219)

  • Replication: The Performance Schema replication_group_members and replication_group_member_stats tables have been extended to provide additional monitoring information for Group Replication. replication_group_members now includes information about member roles and the version of MySQL running on a given member. replication_group_member_stats now includes information about all members in the group, the applier and local queues, and transactions which have been rolled back. (WL #10380)

  • Replication: The receiver thread has been improved to no longer block other thread's activities when waiting for disk space. This improves the monitoring of replication ensuring that it reports correctly when the receiver thread is waiting for disk space. If you are not able to free disk space to allow the receiver thread to continue its activity, it can be forcefully stopped without side effects in most cases. (WL #10406)

  • Replication: A new transaction length field has been added to the Gtid_log_event which stores the transaction length in bytes. (WL #10493)

  • Replication: The following variables have had their defaults changed to ensure replication is as robust and efficient as possible by default:

    (WL #10474, WL #10476, WL #10477, WL #10478)

  • Replication: The Group Replication plugin now notifies other server components that relevant events have occurred; the plugin informs listeners registered in the service registry and notifies them that an event has occurred. These listeners, including other plugins, can then react to these events. Such events include view changes, recovery state updates, network partitioning, and primary election. (WL #10412)

  • Group 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 prioritized. (WL #10433, WL #10959)

  • Group Replication: The following system variables affecting Group Replication have been added in this release:

    These variables enable you to fine-tune flow control of individual group members, adjusting the quota depending on the task the member performs in the group. (WL #9838)

  • JSON: Added support for ranges in the XPath expressions used with many MySQL JSON functions, including JSON_EXTRACT() and JSON_REMOVE(). Such a range is specified using the syntax start to end, where start and end are, respectively, the first and last indexes of a range of elements from a JSON array (always numbered starting with 0). For example, $[1 to 3] includes the second, third, and fourth elements, as shown here:

    mysql> SELECT JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[1 to 3]');
    +----------------------------------------------+
    | JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[1 to 3]') |
    +----------------------------------------------+
    | [2, 3, 4]                                    |
    +----------------------------------------------+
    1 row in set (0.00 sec)

    This work also provides support in such expressions for the last keyword, which you can use to represent the index of the last (rightmost) element in the current array, like this:

    mysql> SELECT JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[last]');
    +--------------------------------------------+
    | JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[last]') |
    +--------------------------------------------+
    | 5                                          |
    +--------------------------------------------+
    1 row in set (0.00 sec)

    Indexes relative to the end of the array are also supported, as shown here:

    mysql> SELECT JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[last-4 to last-2]');
    +--------------------------------------------------------+
    | JSON_EXTRACT('[1, 2, 3, 4, 5]', '$[last-4 to last-2]') |
    +--------------------------------------------------------+
    | [1, 2, 3]                                              |
    +--------------------------------------------------------+
    1 row in set (0.00 sec)

    For further information and examples, see Searching and Modifying JSON Values. (Bug #79052, Bug #22285926, WL #9831)

  • JSON: The optimizer now supports partial (in-place) updates of JSON documents when using JSON_SET(), JSON_REPLACE(), or JSON_REMOVE(). (Previously, all updates of JSON column values were done by completely removing the previous document and writing the new one in its place.) In general, this optimization can be performed when the replacement value is less than or equal in size to the column's original value, and no new elements are added to the original value. It cannot be performed for a simple replacement of the column value of the form UPDATE tbl SET json_col = json_val.

    The JSON Data Type provides more information about the requirements for an update to be optimized in this way.

    This work includes the addition of two JSON utility functions, JSON_STORAGE_SIZE() and JSON_STORAGE_FREE(), in the MySQL Server. JSON_STORAGE_SIZE() returns the number of bytes used to store the binary representation of a JSON document, whether the document is presented as a column value in a table, as the value of a user variable, or as a JSON literal. In the case of a JSON column, this is the space used to store the JSON document as it was inserted into the column, prior to any partial updates that may have been performed on it since then. JSON_STORAGE_FREE() shows the number of bytes in the binary representation of a JSON column value that were freed by the most recent partial update of the column. For a user variable storing a JSON document, JSON_STORAGE_FREE() always returns 0; it also returns 0 if the argument is a JSON literal.

    Each of these functions, like many other MySQL functions that act on JSON values, also accepts a string that can be successfully parsed as a JSON document. For more information and examples, see JSON Utility Functions. (WL #9192, WL #8963, WL #10570)

  • RPM .spec files now include support for running unit tests. (Bug #25814143, Bug #85743)

  • 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 SHOW TABLES statement now supports an optional EXTENDED keyword that causes statement output to list hidden tables created by failed ALTER TABLE statements. (These temporary tables have names beginning with #sql.) For more information, see SHOW TABLES Statement. (Bug #24786075, Bug #83241)

  • Serialized dictionary information (SDI) files now have a lowercase extension (.sdi) instead of uppercase. (WL #7069)

  • The TempTable storage engine replaces the MEMORY storage engine as the default engine for in-memory internal temporary tables. The TempTable storage engine provides efficient storage for VARCHAR and VARBINARY columns. The internal_tmp_mem_storage_engine session variable defines the storage engine for in-memory internal temporary tables. Permitted values are TempTable (the default) and MEMORY. The temptable_max_ram configuration option defines the maximum amount of memory that can be occupied by the TempTable storage engine before it starts storing data on disk. The default value is 1073741824 bytes (1GiB).

    The memory/temptable/physical_ram and memory/temptable/physical_disk Performance Schema instruments may be used to monitor TempTable memory allocation and disk storage. (WL #8117)

  • The MySQL 8.0.2 release introduces a number of undo related changes:

    • The number of undo tablespaces can now be modified at runtime, or when the server is restarted, using the innodb_undo_tablespaces configuration option. Previously, the number of undo tablespaces could only be configured when initializing the MySQL instance and could not be changed afterward. This change permits the addition of undo tablespaces and rollback segments as the database grows.

    • innodb_undo_log_truncate is enabled by default. When enabled, any undo tablespace that exceeds the threshold value defined by innodb_max_undo_log_size is marked for truncation. See Truncating Undo Tablespaces.

    • The innodb_undo_tablespaces default value was changed from 0 to 2, which means that rollback segments are created in two separate undo tablespaces instead of the InnoDB system tablespace by default. A minimum of two undo tablespaces is required to permit truncation of undo logs.

      Setting innodb_undo_tablespaces to 0 is deprecated and will not be supported in a future MySQL version.

    • The naming convention used for undo tablespace files is changed from undoNNN to undo_NNN, where NNN is the undo space number.

    • The innodb_rollback_segments configuration option defines the number of rollback segments per undo tablespace. Previously, innodb_rollback_segments was a global setting that specified the total number of rollback segments for the MySQL instance. This change increases the number of rollback segments available for concurrent transactions. More rollback segments increases the likelihood that concurrent transactions use separate rollback segments for undo logs, resulting in less resource contention.

    • The innodb_undo_logs configuration option is removed. The innodb_rollback_segments configuration option performs the same function and should be used instead.

    • The Innodb_available_undo_logs status variable is removed. The number of available rollback segments per tablespace may be retrieved using SHOW VARIABLES LIKE 'innodb_rollback_segments';

    (WL #9507, WL #10498, WL #10499, WL #10322)

  • The SHOW COLUMNS and SHOW INDEX statements now support an optional EXTENDED keyword that causes statement output to include information about hidden columns and indexes that MySQL uses internally and are not accessible by users. For more information, see SHOW COLUMNS Statement, and SHOW INDEX Statement. (WL #9570)

Bugs Fixed

  • InnoDB: Queries run on INFORMATION_SCHEMA.TABLES performed more slowly with information_schema_stats set to latest. (Bug #26197113)

  • InnoDB: An ALTER TABLE ... ADD PARTITION operation that specified a DATA DIRECTORY clause failed to ignore the TABLESPACE attribute of the table. (Bug #26113652)

  • InnoDB: When foreign_key_checks is disabled, a child table with a foreign key constraint can be created before the parent table, which can result in a foreign key constraint failure, as the parent table is unaware of the constraint. When a table is created, there is now a call to load foreign key constraints for the table and check for child tables. (Bug #25976199)

  • InnoDB: A parsing error occurred while optimizing a table with a full-text index. (Bug #25914332)

  • InnoDB: Compiling MySQL on Windows with Microsoft Visual C++ 2015 or macOS 10.12.4 with GCC 4.2.1 or Apple LLVM version 8.0.0 (clang-800.0.38) returned warnings. (Bug #25910531)

  • InnoDB: In debug builds, an assertion was raised during bootstrap when the system tablespace file (ibdata1) ran out of space during creation of doublewrite pages. (Bug #25872368)

  • InnoDB: Incorrect locking order caused a deadlock when InnoDB attempted to persist an auto-increment counter value to disk. (Bug #25833228)

  • InnoDB: Internal methods for accessing dictionary table object data did not account for virtual columns. (Bug #25822154)

    References: This issue is a regression of: Bug #23748128.

  • InnoDB: The length of a virtual column field in a virtual index record was less than the expected template column length. (Bug #25793677)

  • InnoDB: In debug builds, shutting down the server with --innodb-fast-shutdown=0 raised an assertion. (Bug #25756224)

  • InnoDB: The ibd2sdi utility exited when run on an unsupported file type. (Bug #25738491)

  • InnoDB: InnoDB did not set the compression algorithm when opening a partitioned table. (Bug #25685868)

  • InnoDB: An in-place ALTER TABLE operation failed to set the encryption type, causing a FLUSH TABLES ... FOR EXPORT operation to assert. (Bug #25672779)

  • InnoDB: A latch that was held while registering a file close caused a hang condition. (Bug #25658467)

  • InnoDB: During recovery, prepared transactions were rolled back if the innodb_force_recovery setting was greater than 0. (Bug #25651042)

  • InnoDB: A CREATE TABLE operation that defined a unique key with an eight character prefix on a NOT NULL TEXT field would raise an assertion if a primary key was not defined. (Bug #25647413)

  • InnoDB: Updates to data dictionary tables combined with updates to InnoDB system tables for full-text search auxiliary tables raised a lock-related assertion. (Bug #25610353)

  • InnoDB: The server allocated memory unnecessarily for an operation that rebuilt the table. (Bug #25573565, Bug #85043)

  • InnoDB: Test-related code intended to simulate a random read on a nonexistent page raised an invalid assertion. (Bug #25479538)

    References: This issue is a regression of: Bug #25053705.

  • InnoDB: With foreign_key_checks disabled, InnoDB incorrectly printed messages to the error log when operations were performed on a table that referenced a nonexistent 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: A DROP TABLE or TRUNCATE TABLE operation could raise an assertion following a failed online ALTER TABLE .. ADD INDEX operation. The index root page was dropped prematurely. (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: 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)

  • Partitioning: Following execution of an ALTER TABLE ... OPTIMIZE PARTITION statement, names of tablespaces used by the table were not preserved, and subsequent accesses to the table eventually caused the server to fail. (Bug #25512556)

  • 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: A USE statement that followed a SET GTID_NEXT statement sometimes had no effect. (Bug #26128931)

  • 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: Groups can now contain members running different server versions to enable you to do online upgrades of a replication group. The rules for combining members in a group with different versions are:

    • If you have a group with 8.0 members, you cannot add a 5.7 member

    • If you have a group with 5.7 members you can add a 8.0 member, but it remains in read-only mode. Writing to this member is dangerous while the group contains multiple server versions and should be avoided.

    In a single-primary group, if the current primary leaves the group and a new primary must be elected, the primary is first chosen from the lower version members. If no lower version member is found, the primary is chosen from newer version members. (Bug #25876807)

  • 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.

    (Bug #25786490, Bug #85639)

  • Replication: The following Performance Schema replication tables now continue to be populated when the Performance Schema is disabled:

    The exception is local timing information (start and end timestamps for transactions) in the replication tables replication_connection_status, replication_applier_status_by_coordinator, and replication_applier_status_by_worker. This information is not collected when the Performance Schema is disabled. (Bug #25694813)

  • 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: The XA START, XA END, XA COMMIT, and XA ROLLBACK statements, used to perform XA transactions, were incrementing the counter for a replicate-do-db filter that named the relevant database. The counter is no longer incremented for these statements. (Bug #25669344)

  • Replication: MySQL 8.0 servers were not able to join a replication group that contained MySQL 5.7 servers, and MySQL 5.7 servers in a replication group could not be upgraded to MySQL 8.0. (Bug #25477979)

  • Replication: When mysqlbinlog output from a MySQL 5.7 server was applied on a MySQL 8.0 server, the MySQL 8.0 server generated its own timestamp for the original_commit_timestamp. The fix ensures that the value of original_commit_timestamp is correctly set to 0, meaning that the timestamp is not known. (Bug #25316086)

  • Replication: If the server was started with the --log-bin option, discovery of one Performance Schema table with invalid structure caused all subsequently checked Performance Schema tables to be marked invalid as well. (Bug #25041396)

  • Replication: Interleaved transactions could sometimes deadlock the slave applier when the transaction isolation level was set to REPEATABLE-READ. (Bug #25040331)

  • 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: The SQL state of ER_TRANSACTION_ROLLBACK_DURING_COMMIT was HY00, which is generic and not suitable for rollback. The SQL state has been modified to 40000. (Bug #24658431)

  • 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)

    References: See also: Bug #25340185, Bug #84375.

  • Replication: Transmission of large GCS messages could take so long the sender appeared to have died. (Bug #22671846)

  • Replication: Multithreaded 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: Setting an empty filter rule using CHANGE REPLICATION FILTER caused issues when running tests with UBSan. (Bug #85405, Bug #25702297)

  • Replication: When the receiver thread held a lock on the relay log while queuing an event, clients executing SHOW SLAVE STATUS or SHOW RELAYLOG EVENTS were blocked. (Bug #85084, Bug #25584734)

  • Replication: Indexes for the Performance Schema replication_applier_status_by_worker table worked correctly only for single threaded replication. This was due to the fact that the indexing relied exclusively on the SQL thread ID regardless of the existence of any workers. Now in such cases, the index also considers worker thread ID when multithreading is enabled on the slave. (Bug #84646, Bug #25444610)

  • 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: 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)

    References: See also: Bug #87455, Bug #26643180.

  • Replication: It was possible to set binlog_format without causing an error when there were open temporary tables. (Bug #82467, Bug #24411680)

  • 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)

  • Replication: It was possible for FLUSH LOGS to write a Rotate_log_event into an uninitialized log file. (Bug #80368, Bug #22732184)

    References: See also: Bug #23531998, Bug #81734.

  • Group Replication: When binlog_checksum was NONE following startup, when Group Replication was started and an error occurred, the server remained in the RECOVERING state and could not be shut down. (Bug #25793366, Bug #85667)

  • Group 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. This fix ensures that view change log events are ignored outside the named replication group in which they occur, and never generate new GTIDs. (Bug #25674926)

    References: See also: Bug #26049695, Bug #25928854, Bug #25721175.

  • Group Replication: In a setup where single-primary Group Replication was combined with asynchronous replication, for example with servers S1 and S2 forming a group, and S2 and S3 functioning as master and slave, secondaries such as S2 accepted transactions and were then able to enter the group. This fix prevents a secondary from creating an asynchronous replication channel when it belongs to a single-primary group, and Group Replication from starting while asynchronous replication is running. (Bug #25574200, Bug #85047)

    References: See also: Bug #86325, Bug #26078602.

  • Group Replication: Group Replication failed to start if the super_read_only system variable was enabled. (Bug #25481287, Bug #84733)

  • Group 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 use super_read_only=1 in the my.cfg file. Group Replication now checks for this setting upon successful startup, and sets super_read_only=0. This ensures that members which do not successfully join a group cannot accept transactions. (Bug #25474736, Bug #84728)

  • Group Replication: Loading and initialization of the Group Replication plugin failed if no root account was present. (Bug #24311527)

    References: See also: Bug #25750822, Bug #25103980, Bug #83841.

  • Group Replication: Issuing SHOW SLAVE STATUS FOR CHANNEL 'group_replication_recovery' following restart of a server using group replication led to an unplanned shutdown. (Bug #85739, Bug #25813258)

  • Group 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 asynchronous replication. When the transaction has been committed, the server issues a warning that the GTID has already been used, and the transaction is rolled back. (Bug #84153, Bug #25232042)

  • Microsoft Windows: On Windows, the Docs/INFO_SRC file was missing the build-date entry. (Bug #25799855)

  • JSON: NULLIF() failed with an assertion error in debug builds if the result from this function was used in a JSON context. This result can now be used safely as a JSON value.

    This fix includes using DBUG_ASSERT() for handling this error instead of DBUG_ABORT(), which caused debugging problems on some platforms. (Bug #25818544)

    References: See also: Bug #21383497, Bug #21383530.

  • JSON: The internal Json_array now uses a std::vector instead of a Prealloced_array to store its elements, which reduces the amount of heap space required by them. (Bug #85877, Bug #25867454)

  • 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)

  • 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)

  • ALTER TABLE ... ADD PARTITION statements could cause a server exit. (Bug #26132947)

  • SET PERSIST did not work for X Plugin system variables. (Bug #26115672)

  • REFERENCES privilege checking could use the incorrect database in some cases. (Bug #26106655)

  • With the gtid_mode system variable not set in a .cnf option file or on the command-line, the server failed to restart after using SET PERSIST or SET GLOBAL to set gtid_mode to ON_PERMISSIVE. (Bug #26085712)

  • During prepared statement execution, too many bytes of a buffer could be read. (Bug #26042934, Bug #85937)

  • Dynamic privileges were not loaded when the server was started using the --initialize option. (Bug #26005645)

  • Linux: The generic Linux build for MySQL 8.0 now supports Non-Uniform Memory Access (NUMA) on its host system. Systems that use the build need to have libnuma installed on them. See Installing MySQL on Unix/Linux Using Generic Binaries for more details. (Bug #26005558)

  • 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)

  • Upgrading from MySQL 5.7 to MySQL 8.0 failed during data dictionary creation due to table names that exceeded the 64 character length limit. (Bug #25973237, Bug #86120)

  • 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)

  • mysqld misbehaved if compiled with AddressSanitizer enabled and invoked with --basedir= (that is, with an empty option value). (Bug #25914296, Bug #85994)

  • The ST_LatFromGeohash(), ST_LongFromGeohash(), and ST_PointFromGeohash() functions did not allow data that originated from a CHAR column. (Bug #25912557, Bug #85981)

  • Attempting to drop a data file from a tablespace with multiple data files returned a duplicate file name error. (Bug #25858461)

  • An attribute was added to data dictionary client method declarations to generate compilation warnings when return values are ignored. (Bug #25840927)

  • The data dictionary class hierarchy was simplified. (Bug #25835968, Bug #85811)

  • A restriction that prevented the data dictionary object update function (Dictionary_client::update) from being called twice on the same object was removed. (Bug #25833932, Bug #85800)

  • On Ubuntu platforms, the MySQL service script did not terminate correctly if the user running the script did not have permission to access the data directory or PID file. (Bug #25825833)

  • String comparison queries on the INFORMATION_SCHEMA.CHARACTER_SETS.DESCRIPTION field were case sensitive, which is a regression from earlier releases. (Bug #25824297)

  • Man pages for a few utilities were missing from Debian/Ubuntu packages. (Bug #25811814)

  • An INFORMATION_SCHEMA view executed in LOCK TABLES mode, using the SERIALIZABLE isolation level, and with autocommit disabled, failed to use non-locking reads, which could block DDL operations or cause deadlocks. (Bug #25811413)

  • Table locking failures could occur if tables were used by a trigger for which a trigger of the same name existed in another database and the database names differed only in lettercase. (Bug #25807393)

  • An in-place MySQL upgrade failed if a .TRG file was missing the created line for the trigger definition. (This problem is unlikely to occur for upgrades to MySQL 8.0 from 5.7 because the created line is present for MySQL 5.7.2 and higher.) (Bug #25805260, Bug #85704)

  • 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 CREATE_OPTIONS column of the INFORMATION_SCHEMA.TABLES table was treated as having the binary collation, so functions such as UPPER() and LOWER() did not have the intended result. (Bug #25793429)

  • After importing a table with DECIMAL column, accessing the table raised an assertion. (Bug #25792649)

  • ALTER TABLE could fail when the default character set changed to utf8mb4 due to incorrect column length calculations. (Bug #25779239, Bug #85614)

  • If a component deinit() method failed, the component was still unloaded. (Bug #25764325)

  • Stored program execution could fail for DEFINER accounts with expired passwords even if they were locked and could not be used to connect to the server. Now DEFINER accounts are not checked for expired passwords if they are locked. (Bug #25741966)

  • DISTINCT operations on temporary tables could produce incorrect results due to allocation of too-small comparison keys. (Bug #25740550, Bug #85518)

  • In optimizer trace output, num_tmp_files did not actually indicate number of files. It has been renamed to num_initial_chunks_spilled_to_disk and indicates the number of chunks before any merging has occurred. (Bug #25733784, Bug #85487)

  • The Perl path in #! lines at the beginning of Perl scripts has been adjusted to /usr/local/bin/perl for FreeBSD 11. (Bug #25719975)

  • With the IGNORE_SPACE SQL mode enabled, syntax error messages always reported line 1 as the line number. (Bug #25717617)

  • mysqldump failed to properly quote certain identifiers in SQL statements written to the dump output. (Bug #25717383)

  • Dropping a tablespace without that associated tablespace file failed with an error stating that the tablespace dictionary object is invalid. (Bug #25717019)

  • Client preauthorization by the server was missing a length check for a length-encoded string. (Bug #25714674)

  • In debug builds, a CREATE TABLESPACE operation raised an invalid assertion when using the NDB storage engine. A validation function that checked for zero-length data files did not apply to NDB tablepaces and was removed. (Bug #25700242)

  • For debug builds, EXPORT_SET() operations could raise an assertion for some arguments. (Bug #25688192)

  • 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 code refactoring in MySQL 8.0.1 caused several assertions to be raised in debug builds. (Bug #25669590, Bug #25669606, Bug #25669580, Bug #25688504)

    References: This issue is a regression of: Bug #25221172, Bug #84103.

  • For some double-precision calculations, overflow could occur when calculating the exponent part. (Bug #25664323, Bug #85290)

  • SHOW INDEX output was inconsistent for a FULLTEXT index defined on multiple columns. (Bug #25659276)

  • During a group commit, the stack could incorrectly be reported exhausted, leading to stack overflow. (Bug #25656875)

  • An in-place (binary) upgrade could change the default character_set_client and character_set_connection variables for stored routines, possibly resulting in different routine behavior. (Bug #25633041)

  • For debug builds, the partitioning handler could inappropriately evaluate generated column expressions in UPDATE statements, resulting in a raised assertion. (Bug #25615803, Bug #85179)

  • In strict SQL mode, an ER_TRUNCATED_WRONG_VALUE error could be converted from a warning to an error but then ignored, leading to a raised assertion. (Bug #25586959, Bug #25586673)

  • Failure occurred for ALTER TABLE on an ARCHIVE table containing a NOT NULL column having a geometry data type. For debug builds, an assertion was raised. For non-debug builds, an error occurred. (Bug #25582178, Bug #85059)

  • For debug builds, an assertion could be raised for DROP TRIGGER of a trigger for a table used by a view. (Bug #25581925)

  • For upgrades from MySQL 5.7 to MySQL 8.0, the server wrote unnecessary parsing warnings to the error log. These messages are now suppressed. (Bug #25518436, Bug #84889)

  • The server exited abnormally attempting to access invalid memory. (Bug #25501659)

  • The maximum length of the name field in the column_type_elements table in the data dictionary was extended from 255 bytes to 1020 bytes to accommodate long ENUM and SET values that could result from using a multibyte character set.

    When using a multibyte character set, a single ENUM or SET element occupies a maximum of M x w bytes in the column type definition in the data dictionary, where M is the element literal length and w is the number of bytes required for the maximum-length character in the character set.

    In prior releases, the maximum supported length of an individual ENUM or SET element depended on the number of elements in the type. Thus, there could be a single element with (M x w) = 64K, or 64K elements with (M x w) = 1.

    The maximum supported length of an individual ENUM or SET element is now M <= 255 and (M x w) <= 1020, regardless of the number of elements in the type. (Bug #25481355)

  • 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)

  • With AddressSanitizer enabled, compiling the keyring_file plugin produced One-Definition Rule violations. (Bug #25448205)

  • 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 BIN_TO_UUID(), 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)

  • On Windows, Time values in SHOW PROCESSLIST output drifted higher over time. (Bug #25101724, Bug #83019)

  • An assertion was raised when a create function at server bootstrap attempted to evaluate non-resolved expressions. (Bug #24961932)

  • The number of data dictionary cache lookups was reduced, and ALTER TABLE handling of triggers was improved help ensure trigger persistence in case of a server exit during ALTER TABLE processing. (Bug #24930129, Bug #83473)

  • 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)

  • 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)

  • Some syntactically incorrect CREATE INDEX statements could cause a server exit rather than a syntax error. (Bug #24593992)

  • An in-place MySQL upgrade failed if the innodb_table_stats or innodb_index_stats tables were not present in the mysql system database. (This problem should not occur for upgrades to MySQL 8.0 from 5.7 because those tables are present in MySQL 5.7.) (Bug #24557143)

  • 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)

  • Some PROXY grants were not replicated to slaves, causing incorrect replication. (Bug #23289541, Bug #81424, Bug #23623115)

  • EXPLAIN for single-table UPDATE or DELETE statements could raise an assertion attempting to optimize away subqueries. (Bug #23209903)

  • The help output from mysqlxtest has been improved. (Bug #23107137, Bug #81086)

  • For builds with AddressSanitizer enabled, the ST_Simplify() function could attempt to use already freed memory. (Bug #23023817)

  • 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)

  • For some CREATE TABLE ... SELECT statements, adding an ORDER BY clause changed column data types, or caused an assertion to be raised for debug builds. (Bug #16833464)

  • LOAD XML 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)