MySQL 5.7.13 发布

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.

The definer column of the event and proc tables

The grantor column of the procs_priv and tables_priv tables

The size of these mysql system table columns is increased:

In each case, the column previously was defined as CHAR(77), where 77 was chosen to permit a user_name@host_name string containing a user name up to 16 characters, a @ character, and a host name up to 60 characters. Each column now is defined asCHAR(93), reflecting an increase in permitted user name length from 16 to 32 characters.

A similar change from CHAR(77) to CHAR(93)applies to the DEFINER column of these INFORMATION_SCHEMA tables: EVENTS, ROUTINES,TRIGGERS, VIEWS. Along with the changes to INFORMATION_SCHEMA tables, output from any corresponding SHOW statements now displays DEFINER values up to 93 characters. Examples of affected statements: SHOW EVENTS, SHOW TRIGGERS, SHOW PROCEDURE STATUS.

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, seeConfiguring Multiple MySQL Instances Using systemd. Consequently, mysqld_multi and mysqld_multi.server are not installed because they are unnecessary. (Bug #81093, Bug #23134620)

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 JSONdocuments stored in MySQL. The new operator is similar to the -> operator, but performs JSON unquoting of the value as well. For a JSON column mycol and JSON path expression mypath, the following three expressions are equivalent:

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.