Functionality added or changed:
mysqlbinlog now supports
options to display row events as commented SQL statements. (The
default otherwise is to display row events encoded as base-64
See Section 188.8.131.52, “mysqlbinlog Row Event Display”.
MySQL source distributions are now available in Zip format. (Bug#27742)
SHOW PROFILES and
SHOW PROFILE statements to
display statement profile data, and the accompanying
Profiling is controlled via the
variables. see Section 184.108.40.206, “
SHOW PROFILES Syntax”, and
Section 20.26, “The
INFORMATION_SCHEMA PROFILING Table”. (Community contribution by
The profiling feature is enabled via the
to configure. These options are enabled by
default; to disable them, use
Performance: Incompatible Change:
Some performance problems of
SHOW ENGINE INNODB
STATUS were reduced by removing
Total number of lock structs in row
lock hash table from the output. Now these values are
present only if the
UNIV_DEBUG symbol is
defined at MySQL build time.
Over-aggressive lock acquisition by
when calculating free space for tablespaces could result in
performance degradation when multiple threads were executing
statements on multi-core machines.
Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.1.24. The original fix did not correctly handle the data directory path name if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later.
Additional fixes were made in MySQL 5.1.41.
See also Bug#39277.
The server consumed excess memory while parsing statements with
hundreds or thousands of nested boolean conditions (such as
OR (OR ... (OR ... ))). This could lead to a
server crash or incorrect statement execution, or cause other
client statements to fail due to lack of memory. The latter
result constitutes a denial of service.
There were some problems using
hook functions on Windows that automatically do global and
per-thread initialization for
Per-thread initialization: MySQL internally counts the
number of active threads, which causes a delay in
my_end() if not all threads have
exited. But there are threads that can be started either by
Windows internally (often in TCP/IP scenarios) or by users.
Those threads do not necessarily use
libmysql.dll functionality but still
contribute to the open-thread count. (One symptom is a
five-second delay in times for PHP scripts to finish.)
WSAStartup that itself loads DLLs and
can lead to a deadlock in the Windows loader.
To correct these problems, DLL initialization code now is not
libmysql.dll by default. To
obtain the previous behavior (DLL initialization code will be
called), set the
variable to any value. This variable exists only to prevent
breakage of existing Windows-only applications that do not call
mysql_thread_init() and work
okay today. Use of
discouraged and is removed in MySQL 6.0.
SHOW STATUS took a lot of CPU
time for calculating the value of the
status variable. Now this variable is calculated and included in
the output of
SHOW STATUS only if
UNIV_DEBUG symbol is defined at MySQL
An additional correction to the original MySQL 5.1.23 fix was
made to normalize directory names before adding them to the list
of directories. This prevents
/etc from being considered different, for
See also Bug#38180.
When a partitioned table had a
TIMESTAMP column defined with
CURRENT_TIMESTAMP as the default but with no
ON UPDATE clause, the column's value was
incorrectly set to
updating across partitions.
table returned erroneous results when an index was present on a
column in the
WHERE clause and
IN was used on that column.
Searches using the index were also much slower then if the index were not present. (Bug#35931)
SELECT COUNT(*) was not correct for some
partitioned tables using a storage engine that did not support
HA_STATS_RECORDS_IS_EXACT. Tables using the
ARCHIVE storage engine were known to be
This was because
not implemented, and so the default
handler::records() was used in its place.
However, this is not correct behavior if the storage engine does
The solution was to implement
ha_partition::records() as a wrapper around
the underlying partition records.
Attempting to execute an
DELAYED statement on a partitioned table produced the
error Table storage engine for
table' doesn't have this
option, which did not reflect the source of the
error accurately. The error message returned in such cases has
been changed to DELAYED option not supported for
Replication: Some kinds of internal errors, such as Out of memory errors, could cause the server to crash when replicating statements with user variables.
certain internal errors. (Bug#37150)
These statements are not replicated; however, when using
row-based logging, the changes they introduce in the
mysql system tables are written to the
Server-side cursors were not initialized properly, which could cause a server crash. (Bug#38486)
A server crash or Valgrind warnings could result when a stored procedure selected from a view that referenced a function. (Bug#38291)
A failure to clean up binary log events was corrected (detected by Valgrind). (Bug#38290)
Incorrect handling of aggregate functions when loose index scan was used caused a server crash. (Bug#38195)
Queries containing a subquery with
ORDER BY could cause a server crash.
ORDER BY ...
DESC sometimes returned results in ascending order.
If a table has a
BIT NOT NULL column
c1 with a length shorter than 8 bits and some
NOT NULL columns
c2, ..., and a
SELECT query has a
WHERE clause of the form
query could return an unexpected result set.
constant) AND c2 ...
The server returned unexpected results if a right side of the
NOT IN clause consisted of the
NULL value and some constants of the same
type. For example, this query might return 3, 4, 5, and so forth
if a table contained those values:
SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2);
When using indexed
ORDER BY sorting,
incorrect query results could be produced if the optimizer
switched from a covering index to a noncovering index.
TRUNCATE TABLE for an
InnoDB table, inserting explicit values into
AUTO_INCREMENT column could fail to
increment the counter and result in a duplicate-key error for
subsequent insertion of
MyISAM table with
ROW_FORMAT = DYNAMIC table
options, a data consistency check (maximum record length) could
fail and cause the table to be marked as corrupted.
max_length result set metadata value was
calculated incorrectly under some circumstances.
If the length of a field was 3, internal
InnoDB to integer type conversion didn't work
on big-endian machines in the
A query which had an
ORDER BY DESC clause
that is satisfied with a reverse range scan could cause a server
crash for some specific CPU/compiler combinations.
CSV storage engine returned success even
when it failed to open a table's data file.
Dumping information about locks in use by sending a
SIGHUP signal to the server or by invoking
the mysqladmin debug command could lead to a
server crash in debug builds or to undefined behavior in
When the fractional part in a multiplication of
DECIMAL values overflowed, the
server truncated the first operand rather than the longest. Now
the server truncates so as to produce more precise
The server could crash with an assertion failure (or cause the client to get a “Packets out of order” error) when the expected query result was that it should terminate with a “Subquery returns more than 1 row” error. (Bug#36135)
The configure script did not allow
utf8_hungarian_ci to be specified as the
REPLACE statements used
“traditional” style locking, regardless of the
REPLACE works the same way as
“simple inserts” instead of using the old locking
are treated in the same way as
mysqlbinlog left temporary files on the disk after shutdown, leading to the pollution of the temporary directory, which eventually caused mysqlbinlog to fail. This caused problems in testing and other situations where mysqlbinlog might be invoked many times in a relatively short period of time. (Bug#35543)
Index scans performed with the
access method returned wrong results, caused memory to be
leaked, and caused temporary files to be deleted when the limit
Changes to build files were made to enable the MySQL distribution to compile on Microsoft Visual C++ Express 2008. (Bug#33907)
The internal functions
my_micro_time_and_time() did not work
correctly on Windows. One symptom was that uniqueness of
UUID() values could be
Several MySQL programs could fail if the
environment variable had an empty value.
The BUILD/check-cpu build script failed if gcc had a different name (such as gcc.real on Debian). (Bug#27526)
In some cases, the parser interpreted the
character as the end of input and misinterpreted stored program
After executing a prepared statement that accesses a stored function, the next execution would fail to find the function if the stored function cache was flushed in the meantime. (Bug#12093, Bug#21294)