MySQL 5.7 Release Notes
Previously, MySQL supported only the TLSv1 protocol for encrypting connections. TLS support is now extended to enable a higher level of connection encryption:
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
specifies at startup which TLS protocols the server permits for
incoming client and replication slave connections.
For client programs, the
--tls-version
option specifies
which TLS protocols the client permits for connections to the
server.
For replication connections, the
MASTER_TLS_VERSION
option for the
CHANGE MASTER TO
statement
specifies which TLS protocols a slave permits for connections to
the master.
The mysql_options()
C API
function has a new MYSQL_OPT_TLS_VERSION
option that specifies from within the client library which TLS
protocols a client program permits.
By default, MySQL attempts to use the highest TLS protocol
version available, depending on the SSL library 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
).
For more information, see Encrypted Connection TLS Protocols and Ciphers. (Bug #19921150)
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.
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
Client-Side Cleartext Pluggable Authentication.)
(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)
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 #78108, Bug #21644479)
mysql_upgrade now attempts to print more
informative errors than FATAL ERROR: Upgrade
failed
.
(Bug #77803, Bug #21489398)
InnoDB; Microsoft Windows: 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:
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:
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 issue 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: 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: Successive open table operations on tables with virtual columns caused a memory access violation. (Bug #21894654)
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 on an instance with a
64KB innodb_page_size
setting.
(Bug #21882024, Bug #78516)
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:
A
FLUSH
TABLES ... 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 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 in MySQL 5.7. (Bug #21508582)
References: This issue is a regression of: Bug #21340268.
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, Bug #77843)
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 lettercase 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 multithreaded 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 unexpectedly. 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)
Microsoft Windows: Querying views on Windows could lead to memory leaks. (Bug #21908206)
References: This issue is a regression of: Bug #13901905.
Microsoft Windows: 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)
JSON:
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)
JSON:
A query using JSON_EXTRACT()
returned the wrong result after a virtual index was added to the
table.
(Bug #78464, Bug #21854241)
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)
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)
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)
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)
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 threads
Performance
Schema 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 variables_by_thread
Performance Schema table could cause a server exit when
examining the system variables of a new connection.
(Bug #21840950)
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)
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, Bug #27470071, Bug #89482)
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
semijoin 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)
Configuring with -DBUILD_SHARED_LIBS=1
resulted
in a build error. Thanks to SuSE for the correction
contribution.
(Bug #21387880, Bug #77647)
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)
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)
On SELinux, mysqld --initialize with an
init_file
system variable could
fail to initialize the data directory. Although fixed in 5.7.11,
the Fedora 23 and EL6 5.7.10 RPM's were also updated with the
fix; as a *-5.7.10-2
-*.rpm release to the Yum
repository.
(Bug #79442, Bug #22314098, Bug #22286481)
INSERT ... ON DUPLICATE KEY UPDATE
could
result in a memory leak when executed as a prepared statement.
(Bug #79122, Bug #22151233)
References: This issue is a regression of: Bug #21908206.
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 issue is a regression of: 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)
Some of the source files for spatial functions in the
sql
directory took excessive compile time and
required too much compiler memory allocation.
(Bug #78900, Bug #22078874)
Internal buffer sizes in resolve_stack_dump were increased to accommodate larger symbol space requirements for C++ code. (Bug #78885, Bug #22071592)
Problems leading to Valgrind warnings for
libmysqld
were corrected.
(Bug #78819, Bug #22007587)
MySQL development RPM packages could fail to install if MySQL Connector/C development RPM packages were installed. (Bug #78815, Bug #22005375)
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)
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 #78443, Bug #21840241)
MySQL did not recognize functional dependencies from base columns in a generated column expression to the generated column. (Bug #78377, Bug #21807579)
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)
An aggregate function that should return NULL
returned non-NULL
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,
(Bug #77480, Bug #21318711)
LOAD_FILE()
could cause a server
exit for some pathnames if the character set was
cp932
.
(Bug #76555, Bug #20819220)
References: See also: Bug #51893.
For constructs such as ORDER BY
, the
character set of the expression was treated as
numeric_expr
COLLATE
collation_name
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)