This is a bugfix release for the current MySQL Community Server production release family. It replaces MySQL 5.0.45.
Functionality Added or Changed
The parser accepted statements that contained
*/ that were not properly closed with
*/, such as
SELECT 1 /* +
2. Statements that contain unclosed
/*-comments now are rejected with a syntax
This fix has the potential to cause incompatibilities. Because
of Bug #26302, which caused the trailing
to be truncated from comments in views, stored routines,
triggers, and events, it is possible that objects of those types
may have been stored with definitions that now will be rejected
as syntactically invalid. Such objects should be dropped and
re-created so that their definitions do not contain truncated
comments. If a stored object definition contains only a single
statement (does not use a
END block) and contains a comment within the
statement, the comment should be moved to follow the statement
or the object should be rewritten to use a
END block. For example, this statement:
CREATE PROCEDURE p() SELECT 1 /* my comment */ ;
Can be rewritten in either of these ways:
CREATE PROCEDURE p() SELECT 1; /* my comment */ CREATE PROCEDURE p() BEGIN SELECT 1 /* my comment */ ; END;
NDB error codes to MySQL
storage engine error codes has been improved.
MySQL Cluster: The output from the cluster management client showing the progress of data node starts has been improved. (Bug #23354)
variables are written to the binary log and honored during
replication. See The Binary Log.
MERGE table cannot be opened or used
because of a problem with an underlying table,
CHECK TABLE now displays
information about which table caused the problem.
EXAMPLE storage engine is now enabled by
Server parser performance was improved for expression parsing by lowering the number of state transitions and reductions needed. (Bug #30625)
MyISAM table is created with no
DATA DIRECTORY option, the
.MYD file is created in the database
directory. By default, if
MyISAM finds an
.MYD file in this case, it
overwrites it. The same applies to
files for tables created with no
DIRECTORY option. To suppress this behavior, start the
server with the new
option, in which case
MyISAM will not
overwrite existing files and returns an error instead.
Server parser performance was improved for boolean expressions. (Bug #30237)
SHOW COLUMNS now returns
NULL instead of the empty string for the
Default value of columns that have no
DEFAULT clause specified.
MySQL source distributions are now available in Zip format. (Bug #27742)
RENAME TABLE against a
table with explicit
DATA DIRECTORY and
INDEX DIRECTORY options can be used to
overwrite system table information by replacing the symbolic
link points. the file to which the symlink points.
MySQL will now return an error when the file to which the symlink points already exists. (Bug #32111, CVE-2007-5969)
mysqld.exe was mistakenly included
in binary distributions between MySQL 5.0.42 and 5.0.48. You
containing ambiguous aliases could have unintended side effects
such as deleting rows from the wrong table. Example:
DELETE FROM t1 AS a2 USING t1 AS a1 INNER JOIN t2 AS a2;
This bug fix enables aliases to be declared only in the
table_references part. Elsewhere in
the statement, alias references are permitted but not alias
declarations. However, this patch was reverted in MySQL 5.0.54
because it changed the behavior of a General Availability MySQL
References: See also Bug #27525.
Failure to consider collation when comparing space characters
could result in incorrect index entry order, leading to
incorrect comparisons, inability to find some index values,
misordered index entries, misordered
results, or tables that
TABLE reports as having corrupt indexes.
As a result of this bug fix, indexes must be rebuilt for columns
that use any of these character sets:
Checking Whether Tables or Indexes Must Be Rebuilt.
MySQL Cluster; Packaging:
Some commercial MySQL Cluster RPM packages included support for
InnoDB storage engine.
InnoDB is not part of the standard
commercial MySQL Cluster offering.)
MySQL Cluster: Large file support did not work in AIX server binaries. (Bug #10776)
BLOB columns were not
locked when they needed to be to guarantee consistency.
References: See also Bug #31482.
MySQL Cluster: Replica redo logs were inconsistently handled during a system restart. (Bug #29354)
A query using joins between several large tables and requiring
unique index lookups failed to complete, eventually returning
Unknown Error after a very long period of
time. This occurred due to inadequate handling of instances
where the Transaction Coordinator ran out of
when the cluster should have returned NDB error code 4012
(Request ndbd time-out).
An invalid subselect on an
table could cause mysqld to crash.
MySQL Cluster: When restarting a data node, queries could hang during that node's start phase 5, and continue only after the node had entered phase 6. (Bug #29364)
Warnings and errors generated by ndb_config
were sent to
stdout, rather than to
An attempt to perform a
SELECT ... FROM
INFORMATION_SCHEMA.TABLES whose result included
NDB tables for
which the user had no privileges crashed the MySQL Server on
which the query was performed.
The description of the
MySQL Cluster: Attempting to restore a backup made on a cluster host using one endian to a machine using the other endian could cause the cluster to fail. (Bug #29674)
The management client's response to
WAIT COMPLETED did not include the backup ID.
INSERT DELAYED statements on a
master server are replicated as non-
inserts on slaves (which is normal, to preserve serialization),
but the inserts on the slave did not use concurrent inserts. Now
INSERT DELAYED on a slave is
converted to a concurrent insert when possible, and to a normal
The thread ID was not reset properly after execution of
mysql_change_user(), which could
cause replication failure when replicating temporary tables.
Replication: Operations that used the time zone replicated the time zone only for successful operations, but did not replicate the time zone for errors that need to know it. (Bug #29536)
DROP USER statements that named
multiple users, only some of which could be dropped, were
An error that happened inside
DELETE statements performed from
within a stored function or trigger could cause inconsistency
between master and slave servers.
Replication: Slave servers could incorrectly interpret an out-of-memory error from the master and reconnect using the wrong binary log position. (Bug #24192)
Index creation could corrupt the table definition in the
.frm file: 1) A table with the maximum
number of key segments and maximum length key name would have a
.frm file, due to incorrect
calculation of the total key length. 2)
MyISAM would reject a table with the maximum
number of keys and the maximum number of key segments in all
keys. (It would permit one less than this total maximum.) Now
MyISAM accepts a table defined with the
InnoDB table if a
SELECT was ordered by the primary
key and also had a
WHERE field = value clause
on a different field that was indexed, a
order instruction would be ignored.
mysql-stress-test.pl and mysqld_multi.server.sh were missing from some binary distributions. (Bug #21023, Bug #25486)
A query with
DISTINCT in the select list to
which the loose-scan optimization for grouping queries was
applied returned an incorrect result set when the query was used
mysqlbinlog --hexdump generated incorrect
output due to omission of the
#” comment character for some
Results for a select query that aliases the column names against
a view could duplicate one column while omitting another. This
bug could occur for a query over a multiple-table view that
ORDER BY clause in its
Tables using the
InnoDB storage engine
AUTO_INCREMENT values incorrectly
ON DUPLICATE KEY UPDATE.
A left join between two views could produce incorrect results. (Bug #29604)
Under ActiveState Perl,
would not run.
option with mysqldump generated
incorrect SQL if the database included any views. The recreation
of views requires the creation and removal of temporary tables.
This option suppressed the removal of those temporary tables.
The same applied to
since this option also invokes
Indexing column prefixes in
could cause table corruption.
When a thread executing a
TABLE statement was killed, the table name locks that
had been acquired were not released.
For a multiple-row insert into a
table that refers to a remote transactional table, if the insert
failed for a row due to constraint failure, the remote table
would contain a partial commit (the rows preceding the failed
one) instead of rolling back the statement completely. This
occurred because the rows were treated as individual inserts.
FEDERATED performs bulk-insert handling
such that multiple rows are sent to the remote table in a batch.
This provides a performance improvement and enables the remote
table to perform statement rollback properly should an error
occur. This capability has the following limitations:
The size of the insert cannot exceed the maximum packet size between servers. If the insert exceeds this size, it is broken into multiple packets and the rollback problem can occur.
Bulk-insert handling does not occur for
... ON DUPLICATE KEY UPDATE.
Index creation could fail due to truncation of key values to the maximum key length rather than to a multiple of the maximum character length. (Bug #28125)
On Windows, the mysql client died if the user entered a statement and Return after entering Control+C. (Bug #29469)
SHOW INNODB STATUS caused an
assertion failure under high load.
A statement of the form
TABLE IF NOT EXISTS t1 SELECT f1() AS i failed with a
deadlock error if the stored function
referred to a table with the same name as the to-be-created
table. Now it correctly produces a message that the table
utf8 characters could get mangled when
The server deducted some bytes from the
value and reduced it to the next lower 512 byte boundary. The
resulting block size was not a power of two. Setting the
variable to a value that is not a power of two resulted in
MyISAM table corruption.
(Bug #23068, Bug #28478, Bug #25853)
Dropping a temporary
InnoDB table that had
been locked with
caused a server crash.
For a table with a
date_col such that selecting rows
a nonempty result, adding
caused the result
to be empty.
mysql_upgrade could run binaries dynamically linked against incorrect versions of shared libraries. (Bug #28560)
When using a
FEDERATED table, the value of
LAST_INSERT_ID() would not
correctly update the C API interface, which would affect the
autogenerated ID returned both through the C API and the MySQL
protocol, affecting Connectors that used the protocol or C API.
When using a combination of
DELETE on a table, MySQL
continued to open new copies of the table every time, leading to
an exhaustion of file descriptors.
References: This bug was introduced by Bug #21587.
After the first read of a
CHECK TABLE could report the
table as being corrupt.
Optimization of queries with
stored functions in the
WHERE clause was
ineffective: A sequential scan was always used.
On Windows, the server used 10MB of memory for each connection thread, resulting in memory exhaustion. Now each thread uses 1MB. (Bug #20815)
... SELECT statement inserted into the same table that
SELECT retrieved from, and
ORDER BY and
clauses, different data was inserted than the data produced by
SELECT executed by itself.
mysql_setpermission tried to grant global-only privileges at the database level. (Bug #14618)
AsText() could fail with a buffer overrun.
0x00 in a
BLOB column sometimes became
0x5C 0x00 following a dump and reload, which
could cause problems with data using multi-byte character sets
GBK (Chinese). This was due to a
SELECT INTO OUTFILE whereby
LOAD DATA later incorrectly
0x5C as the second byte of a
multi-byte sequence rather than as the
SOLIDUS (“\”) character, used by
MySQL as the escape character.
Assertion failure could occur for grouping queries that employed
DECIMAL user variables with
assignments to them.
TABLE a AS SELECT * FROM A would fail.
A field packet with
NULL fields caused a
Very long prepared statements in stored procedures could cause a server crash. (Bug #29856)
If an operation had an
InnoDB table, and two
AFTER UPDATE and
INSERT, competing for different resources (such as two
MyISAM tables), the triggers were
unable to execute concurrently. In addition,
UPDATE statements for the
InnoDB table were unable to run concurrently.
Coercion of ASCII values to character sets that are a superset of ASCII sometimes was not done, resulting in illegal mix of collations errors. These cases now are resolved using repertoire, a new string expression attribute (see String Repertoire). (Bug #28875)
A stack overrun could occur when storing
DATETIME values using repeated
FULLTEXT indexes could be corrupted by
The server crashed when the size of an
ARCHIVE table grew larger than 2GB.
GROUP BY on
BIT columns produced incorrect
On 64-bit Windows systems, the Config Wizard failed to complete
the setup because 64-bit Windows does not resolve dynamic
linking of the 64-bit
libmysql.dll to a
32-bit application like the Config Wizard.
Corrupt data resulted from use of
SELECT ... INTO
OUTFILE ', where
file_name' FIELDS ENCLOSED
c is a digit or minus sign, followed
LOAD DATA INFILE
file_name' FIELDS ENCLOSED BY
The server was blocked from opening other tables while the
FEDERATED engine was attempting to open a
remote table. Now the server does not check the correctness of a
FEDERATED table at
CREATE TABLE time, but waits
until the table actually is accessed.
ALTER TABLE ... ENABLE KEYS could cause
mysqld to crash when executed on a table
containing on a
MyISAM table containing
billions of rows.
ALTER TABLE (that works
without rebuilding the table) acquired duplicate locks in the
storage engine. In
ALTER TABLE was issued under
TABLE, it caused all data inserted after
TABLE to disappear.
When one thread attempts to lock two (or more) tables and
another thread executes a statement that aborts these locks
OPTIMIZE TABLE, or
CHECK TABLE), the thread might
get a table object with an incorrect lock type in the table
cache. The result is table corruption or a server crash.
On Windows, client libraries lacked symbols required for linking. (Bug #30118)
Mixing binary and
utf8 columns in a union
caused field lengths to be calculated incorrectly, resulting in
SELECT with more than 31 nested
dependent subqueries returned an incorrect result.
A maximum of 4TB
InnoDB free space was
SHOW TABLE STATUS, which is
incorrect on systems with more than 4TB space.
Sort order of the collation wasn't used when comparing trailing
spaces. This could lead to incorrect comparison results,
incorrectly created indexes, or incorrect result set order for
queries that include an
ORDER BY clause.
For the general query log, logging of prepared statements
executed using the C API differed from logging of prepared
statements performed with
EXECUTE. Logging for the
latter was missing the
The index merge union access algorithm could produce incorrect
InnoDB tables. The problem could
also occur for queries that used
mysql_list_fields() C API
function incorrectly set
MYSQL_FIELD::decimals for some view columns.
InnoDB tables and executing
RESET MASTER in multiple threads
cause assertion failure in debug server binaries.
If one of the queries in a
SQL_CACHE option and another query
UNION contained a
nondeterministic function, the result was still cached. For
example, this query was incorrectly cached:
SELECT NOW() FROM t1 UNION SELECT SQL_CACHE 1 FROM t1;
Killing an SSL connection on platforms where MySQL is compiled
-DSIGNAL_WITH_VIO_CLOSE (Windows, Mac OS
X, and some others) could crash the server.
If a stored procedure was created and invoked prior to selecting
a default database with
No database selected error occurred.
FEDERATED storage engine failed silently
... ON DUPLICATE KEY UPDATE if a duplicate key
FEDERATED does not
ON DUPLICATE KEY UPDATE, so now it
correctly returns an
error if a duplicate key violation occurs.
LOCK TABLES did not pre-lock
tables used in triggers of the locked tables. Unexpected locking
behavior and statement failures similar to failed:
1100: Table '
xx' was not locked with
LOCK TABLES could result.
DELETE statement having
ORDER BY clause and a
LIMIT clause could cause
mysqld to crash.
could cause a buffer overflow and crash the server or clients.
Use of local variables with non-ASCII names in stored procedures crashed the server. (Bug #30120)
ENUM column contained
'' as one of its members (represented with
numeric value greater than 0), and the column contained error
values (represented as 0 and displayed as
TABLE to modify the column definition caused the 0
values to be given the numeric value of the nonzero
Statements within stored procedures ignored the value of the
References: See also Bug #26162.
Under ActiveState Perl,
could kill itself when attempting to kill other processes.
Some character mappings in the
file were incorrect.
As a result of this bug fix, indexes must be rebuilt for columns
that use the
ascii_general_ci collation for
columns that contain any of these characters:
Checking Whether Tables or Indexes Must Be Rebuilt.
Runtime changes to the
system variable were ignored.
The semantics of
on platform-specific characteristics.
The modification of a table by a partially completed multi-column update was not recorded in the binlog, rather than being marked by an event and a corresponding error code. (Bug #27716)
An assertion failure occurred if a query contained a conjunctive
predicate of the form
view_column = constant
WHERE clause and the
BY clause contained a reference to a different view
column. The fix also enables application of an optimization that
was being skipped if a query contained a conjunctive predicate
of the form
WHERE clause and
GROUP BY clause contained a reference to
the same view column.
Unsafe aliasing in the source caused a client library crash when compiled with gcc 4 at high optimization levels. (Bug #27383)
With auto-reconnect enabled, row fetching for a prepared statement could crash after reconnect occurred because loss of the statement handler was not accounted for. (Bug #29948)
For a join with
GROUP BY or
BY and a view reference in the
list, the query metadata erroneously showed empty table aliases
and database names for the view columns.
Repeatedly accessing a view in a stored procedure (for example, in a loop) caused a small amount of memory to be allocated per access. Although this memory is deallocated on disconnect, it could be a problem for a long running stored procedures that make repeated access of views. (Bug #29834)
Index-based range reads could fail for comparisons that involved
contraction characters (such as
ch in Czech
ll in Spanish).
Dropping a user-defined function could cause a server crash if the function was still in use by another thread. (Bug #27564)
GROUP_CONCAT() did not convert
separators to the result character set before inserting them,
producing a result containing a mixture of two different
DISTINCT could cause incorrect rows to
appear in a query result.
InnoDB crashed very quickly after
starting up, it would not force a checkpoint. In this case,
InnoDB would skip crash recovery at next
startup, and the database would become corrupt. Now, if the redo
log scan at
InnoDB startup goes past the last
checkpoint, crash recovery is forced.
ALTER TABLE hung if
records were locked in share mode by a long-running transaction.
SHOW statements and
INFORMATION_SCHEMA queries could expose
information not permitted by the user's access privileges.
INSERT DELAYED thread
caused a server crash.
Backup software can cause
ERROR_LOCK_VIOLATION conditions during file
InnoDB now retries forever until
the condition goes away.
Aggregations in subqueries that refer to outer query columns were not always correctly referenced to the proper outer query. (Bug #27333)
In a stored function or trigger, when
detected deadlock, it attempted rollback and displayed an
incorrect error message (Explicit or implicit commit
is not permitted in stored function or trigger). Now
InnoDB returns an error under these
conditions and does not attempt rollback. Rollback is handled
InnoDB above the function/trigger
Creation of a legal stored procedure could fail if no default database had been selected. (Bug #29050)
InnoDB tables, MySQL unnecessarily sorted
records in certain cases when the records were retrieved by
InnoDB in the proper order already.
IS_UPDATABLE column in the
INFORMATION_SCHEMA.VIEWS table was
not always set correctly.
InnoDB refused to start on some versions of
FreeBSD with LinuxThreads. This is fixed by enabling file
locking on FreeBSD.
INSERT ... VALUES(CONNECTION_ID(), ...)
statements were written to the binary log in such a way that
they could not be properly restored.
On Windows, executables did not include Vista manifests. (Bug #24732)
References: See also Bug #22563.
In some cases,
INSERT INTO ... SELECT ... GROUP
BY could insert rows even if the
SELECT by itself produced an
HANDLER ... READ operation could
leave the table in a locked state.
Certain statements with unions, subqueries, and joins could result in huge memory consumption. (Bug #29582)
Error returns from the
time() system call
A byte-order issue in writing a spatial index to disk caused bad index files on some systems. (Bug #29070)
mysql_install_db could fail to find script files that it needs. (Bug #28585)
LOCK TABLES was not atomic when
more than one
InnoDB tables were locked.
Prepared statements containing
CONNECTION_ID() could be written
improperly to the binary log.
HANDLER to open a table
having a storage engine not supported by
HANDLER properly returned an
error, but also improperly prevented the table from being
dropped by other connections.
If one thread was performing concurrent inserts, other threads reading from the same table using equality key searches could see the index values for new rows before the data values had been written, leading to reports of table corruption. (Bug #29838)
Queries that performed a lookup into a
BINARY index containing key
values ending with spaces caused an assertion failure for debug
builds and incorrect results for nondebug builds.
The query cache does not support retrieval of statements for which column level access control applies, but the server was still caching such statements, thus wasting memory. (Bug #30269)
ALTER DATABASE did not require at
least one option.
MyISAM corruption could occur with the
cp932_japanese_ci collation for the
cp932 character set due to incorrect
comparison for trailing space.
ascii character set, conversion of DEL
0x7F) to Unicode incorrectly resulted in
QUESTION MARK (
0x3F) rather than DEL.
SUBSTRING() function returned
the entire string instead of an empty string when it was called
from a stored procedure and when the length parameter was
specified by a variable with the value
With recent versions of DBD::mysql, mysqlhotcopy generated table names that were doubly qualified with the database name. (Bug #27694)
InnoDB assertion failures were
The special “zero”
ENUM value was coerced to the
normal empty string
during a column-to-column copy. This affected
... SELECT statements and
SELECT statements with aggregate
ENUM columns in the
GROUP BY clause.
For the embedded server, the
mysql_stmt_store_result() C API
function caused a memory leak for empty result sets.
Under heavy load with a large query cache, invalidating part of the cache could cause the server to freeze (that is, to be unable to service other operations until the invalidation was complete). (Bug #21074)
References: See also Bug #39253.
In strict SQL mode, errors silently stopped the SQL thread even
for errors named using the
The server created temporary tables for filesort operations in
the working directory, not in the directory specified by the
tmpdir system variable.
Queries using UDFs or stored functions were cached. (Bug #28921)
CHECK TABLE for
ARCHIVE tables could falsely report table
corruption or cause a server crash.
A slave running with
--log-slave-updates would fail to
INSERT DELAY IGNORE statements to its
binary log, resulting in different binary log contents on the
master and slave.
Selecting a column not present in the selected-from table caused
an extra error to be produced by
Read lock requests that were blocked by a pending write lock request were not permitted to proceed if the statement requesting the write lock was killed. (Bug #21281)
A network structure was initialized incorrectly, leading to embedded server crashes. (Bug #29117)
gcov coverage-testing information was not written if the server crashed. (Bug #29543)
FEDERATED tables had an artificially low
maximum of key length.
SHOW STATUS LIKE 'Ssl_cipher_list' from a
MySQL client connected using SSL returned an empty string rather
than a list of available ciphers.
A race condition in the interaction between
MyISAM and the query cache code caused the
query cache not to invalidate itself for concurrently inserted
MEMORY tables, the
index_merge union access
method could return incorrect results.
InnoDB produced an unnecessary (and harmless)
InnoDB: Error: trying to
declare trx to enter
InnoDB: it already is declared
Clients using SSL could hang the server. (Bug #29579)
the limits of 65 and 30 on the precision
M) and scale
D) were not enforced.
If query execution involved a temporary table,
GROUP_CONCAT() could return a
result with an incorrect character set.
SELECT ... INTO
OUTFILE followed by
DATA could result in garbled characters when the
FIELDS ENCLOSED BY clause named a delimiter
'Z' due to an interaction of character
encoding and doubling for data values containing the enclosed-by
SHOW BINLOG EVENTS displayed
incorrect values of
End_log_pos for events
associated with transactional storage engines.
mysqldump created a stray file when a given a too-long file name argument. (Bug #29361)
Memory corruption occurred for some queries with a top-level
OR operation in the
condition if they contained equality predicates and other
sargable predicates in disjunctive parts of the condition.
--myisam-recover='' (empty option value) did
On Mac OS X, shared-library installation path names were incorrect. (Bug #28544)
SQL_BIG_RESULT had no effect for
TABLE ... SELECT SQL_BIG_RESULT ... statements.
A server crash could occur when a
DETERMINISTIC stored function was used in
GROUP BY clause.
Queries that had a
GROUP BY clause and
When mysqldump wrote
DROP DATABASE statements within
version-specific comments, it included the terminating semicolon
in the wrong place, causing following statements to fail when
the dump file was reloaded.
variable value can be computed accurately only for simple
“flat” queries, not complex queries such as those
with subqueries or
However, the value was not consistently being set to 0 for
The optimization that uses a unique index to remove
GROUP BY did not ensure that the index was
actually used, thus violating the
that is implied by
Phantom reads could occur under
SERIALIZABLE isolation level.
Short-format mysql commands embedded within
/*! ... */ comments were parsed incorrectly
by mysql, which discarded the rest of the
comment including the terminating
characters. The result was a malformed (unclosed) comment. Now
mysql does not discard the
Worked around an icc problem with an incorrect machine instruction being generated in the context of software pre-fetching after a subroutine got in-lined. (Upgrading to icc 10.0.026 makes the workaround unnecessary.) (Bug #20803)
The anonymous accounts were not being created during MySQL installation. (Bug #27692)
TIMESTAMP with a nonzero
time part was converted to a
value, no warning was generated. This caused index lookups to
assume that this is a valid conversion and was returning rows
that match a comparison between a
TIMESTAMP value and a
DATE keypart. Now a warning is
generated so that
a nonzero time part will not match
The parser rules for the
PROFILE statement were revised to work with older
versions of bison.
On Windows, symbols for yaSSL and taocrypt were missing from
mysqlclient.lib, resulting in unresolved
symbol errors for clients linked against that library.