This is a bugfix release for the current MySQL Community Server production release family. It replaces MySQL 5.0.41.
Functionality Added or Changed
This was done to resolve the following interrelated issues:
The server could abort or deadlock for
INSERT DELAYED statements for
which another insert was performed implicitly (for example,
using a stored function that inserted a row).
A trigger using an
DELAYED caused the error INSERT DELAYED
can't be used with table ... because it is locked with LOCK
TABLES although the target table was not
INSERT DELAYED into a table
BEFORE INSERT or
INSERT trigger gave an incorrect
NEW pseudocolumn value and caused the
server to deadlock or abort.
References: See also Bug #20497, Bug #21714.
Prior to this release, when
values were compared with
DATETIME values, the time portion
DATETIME value was
ignored, or the comparison could be performed as a string
compare. Now a
DATE value is
coerced to the
DATETIME type by
adding the time portion as
00:00:00. To mimic
the old behavior, use the
function as shown in this example:
date_col = CAST(NOW() AS DATE) FROM
MySQL Cluster: The server source tree now includes scripts to simplify building MySQL with SCI support. For more information about SCI interconnects and these build scripts, see Configuring MySQL Cluster to use SCI Sockets. (Bug #25470)
A new status variable,
indicates the number of calls to stored procedures.
Binaries for the Linux x86 statically linked
tar.gz Community package were linked
dynamically, not statically. Static linking has been re-enabled.
INSERT DELAYED statements on
BLACKHOLE tables are now rejected, due to the
fact that the
BLACKHOLE storage engine does
not support them.
Potential memory leaks in
PROFILE were eliminated.
Security Fix: A malformed password packet in the connection protocol could cause the server to crash. Thanks for Dormando for reporting this bug, and for providing details and a proof of concept. (Bug #28984, CVE-2007-3780)
LIKE was not isolated from alteration by other
connections, which resulted in various errors and incorrect
binary log order when trying to execute concurrently a
LIKE statement and either DDL statements on the source
table or DML or DDL statements on the target table.
(Bug #23667, Bug #25578, CVE-2007-3781)
If a stored routine was declared using
INVOKER, a user who invoked the routine could gain
(Bug #27337, CVE-2007-2692)
Security Fix: Use of a view could enable a user to gain update privileges for tables in other databases. (Bug #27878, CVE-2007-3782)
The use of an
ORDER BY or
DISTINCT clause with a query containing a
call to the
function caused results from previous queries to be redisplayed
in the current result. The fix for this includes replacing a
BLOB value used internally for
sorting with a
means that for long results (more than 65,535 bytes), it is
possible for truncation to occur; if so, an appropriate warning
(Bug #23856, Bug #28273)
The names of stored functions referenced by views were not
properly displayed by
The fix corrects a problem introduced by Bug #23491. There is an incompatibility when upgrading from versions affected by that bug fix (MySQL 5.0.40 through 5.0.43, MySQL 5.1.18 through 5.1.19): If you use mysqldump before upgrading from an affected version and reload the data after upgrading to a higher version, you must drop and recreate your views. (Bug #28605)
When mysqldump was run with the
binary log files were deleted before it was known that the dump
had succeeded, not after. (The method for removing log files
RESET MASTER prior to the
dump. This also reset the binary log sequence numbering to
.000001.) Now mysqldump
flushes the logs (which creates a new binary log number with the
next sequence number), performs the dump, and then uses
PURGE BINARY LOGS to remove the
log files older than the new one. This also preserves log
numbering because the new log with the next number is generated
and only the preceding logs are removed. However, this may
affect applications if they rely on the log numbering sequence
MySQL Cluster: The cluster waited 30 seconds instead of 30 milliseconds before reading table statistics. (Bug #28093)
MySQL Cluster: The name of the month “March” was given incorrectly in the cluster error log. (Bug #27926)
MySQL Cluster: A corrupt schema file could cause a File already open error. (Bug #28770)
A delay in obtaining
AUTO_INCREMENT IDs could
lead to excess temporary errors.
A race condition could result when nonmaster nodes (in addition
to the master node) tried to update active status due to a local
checkpoint (that is, between
COPY_GCIREQ events). Now only the master
updates the active status.
MySQL Cluster: A fast global checkpoint under high load with high usage of the redo buffer caused data nodes to fail. (Bug #28653)
ndb_connectstring did not appear in the
When an API node sent more than 1024 signals in a single batch,
NDB would process only the first
1024 of these, and then hang.
NULL values in unique
It was not possible to add a unique index to an
NDB table while in single user
UPDATE IGNORE statements involving the
primary keys of multiple tables could result in data corruption.
MySQL Cluster: A failure to release internal resources following an error could lead to problems with single user mode. (Bug #25818)
Repeated insertion of data generated by
NDB tables could eventually lead to
failure of the cluster.
Replication: Recreating a view that already exists on the master would cause a replicating slave to terminate replication with a 'different error message on slave and master' error. (Bug #28244)
The result of executing of a prepared statement created with
PREPARE s FROM "SELECT 1 LIMIT ?" was not
Replication: When using transactions and replication, shutting down the master in the middle of a transaction would cause all slaves to stop replicating. (Bug #22725)
LIKE ... would raise an assertion when replicated to a
Connections from one mysqld server to another
failed on Mac OS X, affecting replication and
References: See also Bug #29083.
Replication: Restoration of the default database after stored routine or trigger execution on a slave could cause replication to stop if the database no longer existed. (Bug #25082)
Replication: Binary logging of prepared statements could produce syntactically incorrect queries in the binary log, replacing some parameters with variable names rather than variable values. This could lead to incorrect results on replication slaves. (Bug #26842, Bug #12826)
Replication: Aborting a statement on the master that applied to a nontransactional statement broke replication. The statement was written to the binary log but not completely executed on the master. Slaves receiving the statement executed it completely, resulting in loss of data synchrony. Now an error code is written to the error log so that the slaves stop without executing the aborted statement. (That is, replication stops, but synchrony to the point of the stop is preserved and you can investigate the problem.) (Bug #26551)
BLOB reads on operations with
LM_CommittedRead, the lock mode was
not upgraded to
LM_Read before the state of
BLOB had already been
NDB API methods
affected by this problem included the following:
SELECT '2007-01-01' + INTERVAL
mysqld to fail.
column_name DAY FROM
The error message for error number
not report which database/table combination reported the
ALTER TABLE was used to add
DATE column with no
explicit default value,
'0000-00-00' was used
as the default even if the SQL mode included the
NO_ZERO_DATE mode to prohibit
that value. A similar problem occurred for
CRC32() function returns an
unsigned integer, but the metadata was signed, which could cause
certain queries to return incorrect results. (For example,
queries that selected a
value and used that value in the
PURGE MASTER LOGS BEFORE
( caused a server
crash. Subqueries are forbidden in the
On the IBM i5 platform, the installation script in the
.savf binaries unconditionally executed the
mysql_install_db script. This problem was
fixed in a repackaged distribution numbered 5.0.45b.
A stored function invocation in the
clause was treated as a constant.
The check-cpu script failed to detect AMD64 Turion processors correctly. (Bug #17707)
Long path names for internal temporary tables could cause stack overflows. (Bug #29015)
Portability problems caused by use of
A query with a
NOT IN subquery predicate
could cause a crash when the left operand of the predicate
For storage engines that permit the current auto-increment value
to be set, using
ALTER TABLE ... ENGINE to
convert a table from one such storage engine to another caused
loss of the current value. (For storage engines that do not
support setting the value, it cannot be retained anyway when
changing the storage engine.)
Granting access privileges to an individual table where the database or table name contained an underscore would fail. (Bug #18660)
Some test suite files were missing from some MySQL-test packages. (Bug #26609)
MERGE storage engine could return
incorrect results when several index values that compare
equality were present in an index (for example,
which are considered equal but have different lengths).
BETWEEN with nonindexed date
columns and short formats of the date string could return
mysql_upgrade did not pass a password to mysqlcheck if one was given. (Bug #25452)
Views ignored precision for
mysql_upgrade failed if certain SQL modes were set. Now it sets the mode itself to avoid this problem. (Bug #28401)
SHOW PROFILE hung if executed
before enabling the
mysql_upgrade did not detect failure of external commands that it runs. (Bug #26639)
InnoDB, in some rare cases the optimizer
preferred a more expensive
ref access to a less
expensive range access.
mysqlbinlog produced different output with
-R option than without it.
Times displayed by
were incorrectly associated with the profile entry one later
than the correct one.
Nongrouped columns were permitted by
ONLY_FULL_GROUP_BY SQL mode.
Killing from one connection a long-running
QUERY started from another connection caused
mysqld to crash.
For queries that used
ORDER BY with
InnoDB tables, if the optimizer chose an
index for accessing the table but found a covering index that
ORDER BY to be skipped, no
results were returned.
If a program binds a given number of parameters to a prepared
statement handle and then somehow changes
stmt->param_count to a different number,
mysql_stmt_execute() could crash
the client or server.
Forcing the use of an index on a
SELECT query when the index had
been disabled would raise an error without running the query.
The query now executes, with a warning generated noting that the
use of a disabled index has been ignored.
An error occurred trying to connect to mysqld-debug.exe. (Bug #27597)
The second execution of a prepared statement from a
UNION query with
BY RAND() caused the server to crash. This problem
could also occur when invoking a stored procedure containing
such a query.
The result of evaluation for a view's
OPTION option over an updated record and records of
merged tables was arbitrary and dependent on the order of
records in the merged tables during the execution of the
return an incorrect rows-matched value if, during insertion of
rows into a temporary table, the table had to be converted from
MEMORY table to a
Conversion errors could occur when constructing the condition
IN predicate. The predicate was
treated as if the affected column contains
NULL, but if the
predicate is inside
NOT, incorrect results
could be returned.
Grouping queries with correlated subqueries in
WHERE conditions could produce incorrect
NULL-filtering optimization did not
eq_ref table access.
A subquery with
ORDER BY and
1 could cause a server crash.
A slave that used
could not connect to the master.
The fix for Bug #17212 provided correct sort order for misordered output of certain queries, but caused significant overall query performance degradation. (Results were correct (good), but returned much more slowly (bad).) The fix also affected performance of queries for which results were correct. The performance degradation has been addressed. (Bug #27531)
The XML output representing an empty result was an empty string
rather than an empty
When constructing the path to the original
RENAME was unnecessarily (and incorrectly) lowercasing
the entire path when not on a case-insensitive file system,
causing the statement to fail.
yaSSL crashed on pre-Pentium Intel CPUs. (Bug #21765)
Searches on indexed and nonindexed
ENUM columns could return
different results for empty strings.
A query that grouped by the result of an expression returned a different result when the expression was assigned to a user variable. (Bug #28494)
UNION on two views
ORDER BY clauses resulted in an
Unknown column error.
Linux binaries were unable to dump core after executing a
VIEW created with a nonexisting
DEFINER could lead to incorrect results under
TABLE IF NOT EXISTS ... SELECT caused a server crash
if the target table already existed and had a
mysqldump could not connect using SSL. (Bug #27669)
Quoted labels in stored routines were mishandled, rendering the routines unusable. (Bug #21513)
Failure to allocate memory associated with
cause a server crash.
InnoDB tables, a multiple-row
INSERT of the form
INSERT INTO t (id...) VALUES (NULL...) ON DUPLICATE KEY
UPDATE id=VALUES(id), where
AUTO_INCREMENT column, could cause
ERROR 1062 (23000): Duplicate entry... errors
or lost rows.
mysqldump calculated the required memory for a hex-blob string incorrectly causing a buffer overrun. This in turn caused mysqldump to crash silently and produce incomplete output. (Bug #28522)
For debug builds,
could trigger an assertion failure due to occurrence of a
deadlock when committing changes.
A buffer overflow could occur when using
DECIMAL columns on Windows
Some views could not be created even when the user had the requisite privileges. (Bug #24040)
The result set of a query that used
DISTINCT could lack some
rollup rows (rows with
NULL values for
grouping attributes) if the
GROUP BY list
contained constant expressions.
mysqldump would not dump a view for which the
DEFINER no longer exists.
USE_TLS was not defined for
An update on a multiple-table view with the
OPTION clause and a subquery in the
WHERE condition could cause an assertion
Flow control optimization in stored routines could cause exception handlers to never return or execute incorrect logic. (Bug #26977)
EXPLAIN for a query on an empty
table immediately after its creation could result in a server
On some systems,
udf_example.c returned an
incorrect result length. Also on some systems,
mysql-test-run.pl could not find the shared
object built from
mysqldump crashed if it got no data from
SHOW CREATE PROCEDURE (for
example, when trying to dump a routine defined by a different
user and for which the current user had no privileges). Now it
prints a comment to indicate the problem. It also returns an
error, or continues if the
--force option is
MIN() on an indexed
column that contained only
NULL values caused
NULL to be returned for other result columns.
GEOMETRY columns in a
UNION caused a server crash.
Due to a race condition, executing
PRIVILEGES in one thread could cause brief table
unavailability in other threads.
The “manager thread” of the LinuxThreads implementation was unintentionally started before mysqld had dropped privileges (to run as an unprivileged user). This caused signaling between threads in mysqld to fail when the privileges were finally dropped. (Bug #28690)
-lmtmalloc library was removed from the
output of mysql_config on Solaris, as it
caused problems when building
possibly other applications) on that platform that tried to use
dlopen() to access the client library.
Debug builds on Windows generated false alarms about uninitialized variables with some Visual Studio runtime libraries. (Bug #27811)
Outer join queries with
ON conditions over
constant outer tables did not return
NULL-complemented rows when conditions were
Index hints (
FORCE INDEX) cannot be used
FULLTEXT indexes, but were not being
Changes to some system variables should invalidate statements in the query cache, but invalidation did not happen. (Bug #27792)
EXECUTE privilege for
a routine in a database should make it possible to
USE that database, but the server
returned an error instead. This has been corrected. As a result
of the change,
SHOW TABLES for a
database in which you have only the
EXECUTE privilege returns an
empty set rather than an error.
Stack overflow caused server crashes. (Bug #21476)
CURDATE() is less than
NOW(), either when comparing
CURDATE() < NOW() is true) or when
DATE) < NOW() is true). However, storing
CURDATE() in a
DATE column and comparing
incorrectly yielded false. This is fixed by
DATE column as
DATETIME for comparisons to a
Some upgrade problems are detected and better error messages suggesting that mysql_upgrade be run are produced. (Bug #24248)
A large filesort could result in a division by zero error and a server crash. (Bug #27119)
On Windows, mysql_upgrade was sensitive to lettercase of the names of some required components. (Bug #25405)
DATETIME column value
with a user variable yielded incorrect results.
DECIMAL values beginning with
9 digits could be incorrectly rounded.
mysql_install_db is supposed to detect existing system tables and create only those that do not exist. Instead, it was exiting with an error if tables already existed. (Bug #27783)
Concurrent execution of
CREATE TABLE ...
SELECT and other statements involving the target table
suffered from various race conditions, some of which might have
led to deadlocks.
EXPLAIN EXTENDED on a
query using a derived table over a grouping subselect could lead
to a server crash. This occurred only when materialization of
the derived tables required creation of an auxiliary temporary
table, an example being when a grouping operation was carried
out with usage of a temporary table.
SELECT COUNT(*) from a table containing a
DATETIME NOT NULL column could produce
spurious warnings with the
NO_ZERO_DATE SQL mode enabled.
LONG values in MySQL
versions later than 5.0.24a returned
prior to this. The previous behavior was restored.
References: This bug was introduced by Bug #19714.
An attempt to execute
CREATE TABLE ...
SELECT when a temporary table with the same name
already existed led to the insertion of data into the temporary
table and creation of an empty nontemporary table.
Statements within triggers ignored the value of the
References: See also Bug #29963.
LOAD_FILE from an empty floppy
drive under Windows, caused the server to hang. For example, if
you opened a connection to the server and then issued the
command SELECT LOAD_FILE('a:test');, with no
floppy in the drive, the server was inaccessible until the modal
pop-up dialog box was dismissed.
CREATE TABLE t1
LIKE t2 failed due to a full disk, an empty
t2.frm file could be created but not
removed. This file then caused subsequent attempts to create a
t2 to fail. This is easily
corrected at the file system level by removing the
t2.frm file manually, but now the server
removes the file if the create operation does not complete
HASH indexes on
VARCHAR columns with binary
collations did not ignore trailing spaces from strings before
comparisons. This could result in duplicate records being
successfully inserted into a
with unique key constraints. A consequence was that internal
MEMORY tables used for
BY calculation contained duplicate rows that resulted
in duplicate-key errors when converting those temporary tables
MyISAM, and that error was incorrectly
reported as a
table is full error.
mysqltest used a too-large stack size on PowerPC/Debian Linux, causing thread-creation failure for tests that use many threads. (Bug #28333)
Creating a temporary table with
using the one-file-per-table setting, and when the host file
system for temporary tables was
cause an assertion within
mysqld. This was
due to the use of
O_DIRECT when opening the
temporary table file.
If a stored function or trigger was killed, it aborted but no error was thrown, permitting the calling statement to continue without noticing the problem. This could lead to incorrect results. (Bug #27563)
The server could hang for
INSERT IGNORE ... ON
DUPLICATE KEY UPDATE if an update failed.
The omission of leading zeros in dates could lead to erroneous results when these were compared with the output of certain date and time functions. (Bug #16377)
When dumping procedures, mysqldump
output that restored the session variable
sql_mode without first
capturing it. When dumping routines, mysqldump
set nor retrieved the value of
A stored program that uses a variable name containing multi-byte characters could fail to execute. (Bug #27876)
Certain queries that used uncorrelated scalar subqueries caused
EXPLAIN to crash.
... ON DUPLICATE KEY UPDATE statements that affected
many rows, updates could be applied to the wrong rows.
INSERT .. ON DUPLICATE KEY UPDATE could under
some circumstances silently update rows when it should not have.
On some Linux distributions where LinuxThreads and NPTL
glibc versions both are available, statically
built binaries can crash because the linker defaults to
LinuxThreads when linking statically, but calls to external
libraries (such as
libnss) are resolved to
NPTL versions. This cannot be worked around in the code, so
instead if a crash occurs on such a binary/OS combination, print
an error message that provides advice about how to fix the
utf8 column in an
InnoDB table to a shorter length did not
shorten the data values.
An interaction between
STATUS and other concurrent statements that modify the
table could result in a divide-by-zero error and a server crash.
libmysql.dll could not be dynamically loaded
For dates with 4-digit year parts less than 200, an incorrect
implicit conversion to add a century was applied for date
arithmetic performed with
- INTERVAL. (For
INTERVAL 0 SECOND) became
Comparisons using row constructors could fail for rows
Trying to shut down the server following a failed
INFILE caused mysqld to crash.
A server crash could happen under rare conditions such that a
temporary table outgrew heap memory reserved for it and the
remaining disk space was not big enough to store the table as a
TEXT local variable in a
stored routine in an expression such as
an incorrect result.
Several math functions produced incorrect results for large
incorrect results or a crash for a large number-of-decimals
On Windows, connection handlers did not properly decrement the server's thread count when exiting. (Bug #25621)
IS_UPDATABLE column in the
INFORMATION_SCHEMA.VIEWS table was
not always set correctly.
ON conditions from
expressions were ignored when checking the
OPTION clause while updating a multiple-table view
that included such a clause.
INSERT...ON DUPLICATE KEY UPDATE could cause
Error 1032: Can't find record in ... for
inserts into an
InnoDB table unique index
using key column prefixes with an underlying
utf8 string column.
SELECT * INTO OUTFILE ... FROM
INFORMATION_SCHEMA.SCHEMATA failed with an
Access denied error, even for a user who
Nested aggregate functions could be improperly evaluated. (Bug #27363)
mysqld did not check the length of option values and could crash with a buffer overflow for long values. (Bug #27715)
The test case for mysqldump failed with
A performance degradation was observed for outer join queries to which a not-exists optimization was applied. (Bug #28188)
AUTO_INCREMENT value would not be
correctly reported for
InnoDB tables when
SHOW CREATE TABLE statement
or mysqldump command.
References: See also Bug #32198.