Functionality added or changed:
A change has been made to the way that the server handles
prepared statements. This affects prepared statements processed
at the SQL level (using the
PREPARE statement) and those
processed using the binary client-server protocol (using the
mysql_stmt_prepare() C API
Previously, changes to metadata of tables or views referred to in a prepared statement could cause a server crash when the statement was next executed, or perhaps an error at execute time with a crash occurring later. For example, this could happen after dropping a table and recreating it with a different definition.
Now metadata changes to tables or views referred to by prepared
statements are detected and cause automatic repreparation of the
statement when it is next executed. Metadata changes occur for
DDL statements such as those that create, drop, alter, rename,
or truncate tables, or that analyze, optimize, or repair tables.
Repreparation also occurs after referenced tables or views are
flushed from the table definition cache, either implicitly to
make room for new entries in the cache, or explicitly due to
Repreparation is automatic, but to the extent that it occurs, performance of prepared statements is diminished.
An incompatibility with previous versions of MySQL is that a
prepared statement may now return a different set of columns or
different column types from one execution to the next. For
example, if the prepared statement is
SELECT * FROM
t1 to contain a
different number of columns causes the next execution to return
a number of columns different from the previous execution.
Older versions of the client library cannot handle this change in behavior. For applications that use prepared statements with the new server, an upgrade to the new client library is strongly recommended.
Along with this change to statement repreparation, the default
value of the
variable has been increased from 128 to 256. The purpose of this
increase is to lessen the chance that prepared statements will
need repreparation due to referred-to tables/views having been
flushed from the cache to make room for new entries.
Some changes were made to
CHECK TABLE ... FOR
TABLE with respect to detection and handling of tables
.frm files (files created
with a different version of the MySQL server). These changes
also affect mysqlcheck because that program
CHECK TABLE and
REPAIR TABLE, and thus also
mysql_upgrade because that program invokes
If your table was created by a different version of the
MySQL server than the one you are currently running,
CHECK TABLE ...
FOR UPGRADE indicates that the table has an
.frm file with an incompatible version.
In this case, the result set returned by
CHECK TABLE contains a line
Msg_type value of
error and a
Table upgrade required. Please do "REPAIR
tbl_name`" to fix
REPAIR TABLE without
USE_FRM upgrades the
.frm file to the current version.
If you use
REPAIR TABLE ...USE_FRM and
your table was created by a different version of the MySQL
server than the one you are currently running,
REPAIR TABLE will not attempt
to repair the table. In this case, the result set returned
REPAIR TABLE contains a
line with a
Msg_type value of
error and a
Failed repairing incompatible .FRM
Previously, use of
...USE_FRM with a table created by a different
version of the MySQL server risked the loss of all rows in
mysqldump now adds the
LOCAL qualifier to the
statement that is sent to the server when the
--master-data option is
enabled. This prevents the
statement from replicating to slaves, which is disadvantageous
because it would cause slaves to block while the statement
See also Bug#38303.
The server no longer issues warnings for truncation of excess
spaces for values inserted into
CHAR columns. This reverts a
change in the previous release that caused warnings to be
See also Bug#32575.
When flushing tables, there was a slight chance that the flush
occurred between the processing of one table map event and the
next. Since the tables were opened one by one, subsequent
locking of tables would cause the slave to crash. This problem
was observed when replicating
InnoDB tables, when executing multi-table
updates, and when a trigger or a stored routine performed an
(additional) insert on a table so that two tables were
effectively being inserted into in the same statement.
CREATE VIEW statements containing
extended comments were not written to the binary log correctly,
causing parse errors on the slave. Now, all comments are
stripped from such statements before being written to the binary
See also Bug#36570.
On Windows 64-bit systems, temporary variables of
long types were used to store
ulong values, causing key cache
initialization to receive distorted parameters. The effect was
values of 2GB or more caused memory exhaustion to due allocation
of too much memory.
mysqltest ignored the value of
--tmpdir in one place.
When updating an existing instance (for example, from MySQL 5.0
to 5.1, or 5.1 to 6.0), the Instance Configuration Wizard
unnecessarily prompted for a
when there was an existing
Conversion of a
FLOAT ZEROFILL value to
string could cause a server crash if the value was
On Windows, the installer attempted to use JScript to determine whether the target data directory already existed. On Windows Vista x64, this resulted in an error because the installer was attempting to run the JScript in a 32-bit engine, which wasn't registered on Vista. The installer no longer uses JScript but instead relies on a native WiX command. (Bug#36103)
mysqltest was performing escape processing
--replace_result command, which it
should not have been.
An error in calculation of the precision of zero-length items
NULL) caused a server crash for
queries that employed temporary tables.
MERGE storage engine did a table scan for
SELECT COUNT(*) statements when it could
calculate the number of records from the underlying tables.
The server crashed inside
NOT IN subqueries
with an impossible
HAVING clause, such as
(SELECT ... FROM t1, t2, ... WHERE 0).
SET GLOBAL debug='' resulted in a Valgrind
DbugParse(), which was reading
beyond the end of the control string.
The “prefer full scan on clustered primary key over full scan of any secondary key” optimizer rule introduced by Bug#26447 caused a performance regression for some queries, so it has been disabled. (Bug#35850)
The server ignored any covering index used for
ref access of a table in a
ORDER BY if this index was
incompatible with the
ORDER BY list and there
was another covering index compatible with this list. As a
result, suboptimal execution plans were chosen for some queries
that used an
ORDER BY clause.
An incorrect error and message was produced for attempts to
MyISAM table with an index
.MYI) file name that was already in use by
MyISAM table that was open at the
same time. For example, this might happen if you use the same
value of the
INDEX DIRECTORY table option for
tables belonging to different databases.
Some binaries produced stack corruption messages due to being built with versions of bison older than 2.1. Builds are now created using bison 2.3. (Bug#34926)
On Windows 64-bit builds, an apparent compiler bug caused memory
overruns for code in
Removed optimizations so as not to trigger this problem.
Several additional configuration scripts in the
BUILD directory now are included in source
distributions. These may be useful for users who wish to build
MySQL from source. (See
Section 2.3.3, “Installing from the Development Source Tree”, for information about
what they do.)
PRIVILEGES statement after creating a temporary table
mysql database with the same name as
one of the MySQL system tables caused the server to crash.
While it is possible to shadow a system table in this way, the temporary table exists only for the current user and connection, and does not effect any user privileges.
UNION constructs cannot contain
INTO except in the final
SELECT. However, if a
UNION was used in a subquery and
INTO clause appeared in the top-level
query, the parser interpreted it as having appeared in the
UNION and raised an error.
jp test suite was not working.
init_time() library function
was renamed to
my_init_time() to avoid
conflicts with external libraries.
The parser used signed rather than unsigned values in some cases that caused legal lengths in column declarations to be rejected. (Bug#15776)