最も普及しているオープンソースデータベース管理システムの新バージョンであるMySQL Community Server 5.0.77がリリースされました。
以下のセクションは、以前のリリースであるMySQL Community Server 5.0.67以来のMySQLソースコードにおけるバージョン間の変更を記載しています。バグ修正を含む変更ログは以下で確認できます。
MySQL 5.0.77は、現在の製品リリースに対するバグ修正版であり、MySQL 5.0.67（バイナリ）およびMySQL 5.0.75（ソースのみ）に代わるものです。
Functionality added or changed:
* Security Enhancement: To enable stricter control over the
location from which user-defined functions can be loaded,
the plugin_dir system variable has been backported from
MySQL 5.1. If the value is non-empty, user-defined
function object files can be loaded only from the
directory named by this variable. If the value is empty,
the behavior that is used prior to the inclusion of
plugin_dir applies: The UDF object files must be located
in a directory that is searched by your system’s dynamic
* A new status variable, Queries, indicates the number of
statements executed by the server. This includes
statements executed within stored programs, unlike the
Questions variable which includes only statements sent to
the server by clients.
* Previously, index hints did not work for FULLTEXT
searches. Now they work as follows:
For natural language mode searches, index hints are
silently ignored. For example, IGNORE INDEX(i) is ignored
with no warning and the index is still used.
For boolean mode searches, index hints are honored.
* Important Change: Security Fix: Additional corrections
were made for the symlink-related privilege problem
originally addressed in MySQL 5.0.60. 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.
* Security Enhancement: 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.
* Incompatible Change: There were some problems using
DllMain() hook functions on Windows that automatically do
global and per-thread initialization for libmysqld.dll:
+ 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.)
+ Process-initialization: my_init() calls 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 invoked from libmysql.dll by default. To obtain the
previous behavior (DLL initialization code will be
called), set the LIBMYSQL_DLLINIT environment 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
LIBMYSQL_DLLINIT is discouraged and is removed in MySQL
* Incompatible Change: SHOW STATUS took a lot of CPU time
for calculating the value of the
Innodb_buffer_pool_pages_latched status variable. Now
this variable is calculated and included in the output of
SHOW STATUS only if the UNIV_DEBUG symbol is defined at
MySQL build time.
* Incompatible Change: In connection with view creation,
the server created arc directories inside database
directories and maintained useless copies of .frm files
there. Creation and renaming procedures of those copies
as well as creation of arc directories has been
This change does cause a problem when downgrading to
older server versions which manifests itself under these
1. Create a view v_orig in MySQL 5.0.72 or higher.
2. Rename the view to v_new and then back to v_orig.
3. Downgrade to an older 5.0.x server and run
4. Try to rename v_orig to v_new again. This operation
As a workaround to avoid this problem, use either of
+ Dump your data using mysqldump before downgrading
and reload the dump file after downgrading.
+ Instead of renaming a view after the downgrade, drop
it and recreate it.
* Replication: When rotating relay log files, the slave
deletes relay log files and then edits the relay log
index file. Formerly, if the slave shut down unexpectedly
between these two events, the relay log index file could
then reference relay logs that no longer existed.
Depending on the circumstances, this could when
restarting the slave cause either a race condition or the
failure of replication.
* CHECK TABLE … FOR UPGRADE did not check for
incompatible collation changes made in MySQL 5.0.48
Bug#29499:http://bugs.mysql.com/29499). This also
affects mysqlcheck and mysql_upgrade, which cause that
statement to be executed. See Section 2.18.3, "Checking
Whether Table Indexes Must Be Rebuilt."
* Support for the revision field in .frm files has been
removed. This addresses the downgrading problem
introduced by the fix for
* If the operating system is configured to return leap
seconds from OS time calls or if the MySQL server uses a
time zone definition that has leap seconds, functions
such as NOW() could return a value having a time part
that ends with :59:60 or :59:61. If such values are
inserted into a table, they would be dumped as is by
mysqldump but considered invalid when reloaded, leading
to backup/restore problems.
Now leap second values are returned with a time part that
ends with :59:59. This means that a function such as
NOW() can return the same value for two or three
consecutive seconds during the leap second. It remains
true that literal temporal values having a time part that
ends with :59:60 or :59:61 are considered invalid.
For additional details about leap-second handling, see
Section 9.7.2, "Time Zone Leap Second Support."
* With the ONLY_FULL_GROUP_BY SQL mode enabled, the check
for non-aggregated columns in queries with aggregate
functions, but without a GROUP BY clause was treating all
the parts of the query as if they were in the select
list. This is fixed by ignoring the non-aggregated
columns in the WHERE clause.
* The server returned a column type of VARBINARY rather
than DATE as the result from the COALESCE(), IFNULL(),
IF(), GREATEST(), or LEAST() functions or CASE expression
if the result was obtained using filesort in an anonymous
temporary table during the query execution.
* References to local variables in stored procedures are
replaced with NAME_CONST(name, value) when written to the
binary log. However, an "illegal mix of collation" error
might occur when executing the log contents if the
value’s collation differed from that of the variable. Now
information about the variable collation is written as
* Some recent releases for Solaris 10 were built on Solaris
10 U5, which included a new version of libnsl.so that
does not work on U4 or earlier. To correct this, Solaris
10 builds now are created on machines that do not have
that upgraded libnsl.so, so that they will work on
Solaris 10 installations both with and without the
* Column names constructed due to wild-card expansion done
inside a stored procedure could point to freed memory if
the expansion was performed after the first call to the
* If delayed insert failed to upgrade the lock, it did not
free the temporary memory storage used to keep newly
constructed BLOB values in memory, resulting in a memory
* A server crash resulted from concurrent execution of a
multiple-table UPDATE that used a NATURAL or USING join
together with FLUSH TABLES WITH READ LOCK or ALTER TABLE
for the table being updated.
* If a table has a BIT NOT NULL column c1 with a length
shorter than 8 bits and some additional NOT NULL columns
c2, …, and a SELECT query has a WHERE clause of the
form (c1 = constant) AND c2 …, the query could return
an unexpected result set.
* The MONTHNAME() and DAYNAME() functions returned a binary
string, so that using LOWER() or UPPER() had no effect.
Now MONTHNAME() and DAYNAME() return a value in
character_set_connection character set.
* mysqlcheck used SHOW FULL TABLES to get the list of
tables in a database. For some problems, such as an empty
.frm file for a table, this would fail and mysqlcheck
then would neglect to check other tables in the database.
* Statements that displayed the value of system variables
(for example, SHOW VARIABLES) expect variable values to
be encoded in character_set_system. However, variables
set from the command line such as basedir or datadir were
encoded using character_set_filesystem and not converted
* For a MyISAM table with CHECKSUM = 1 and ROW_FORMAT =
DYNAMIC table options, a data consistency check (maximum
record length) could fail and cause the table to be
marked as corrupted.
* The code for the ut_usectime() function in InnoDB did not
handle errors from the gettimeofday() system call. Now it
retries gettimeofday() several times and updates the
value of the Innodb_row_lock_time_max status variable
only if ut_usectime() was successful.
* 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 production builds.
* 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 multiplications.
* Freeing of an internal parser stack during parsing of
complex stored programs caused a server crash.
* Index scans performed with the sort_union() access method
returned wrong results, caused memory to be leaked, and
caused temporary files to be deleted when the limit set
by sort_buffer_size was reached.
* If the server crashed with an InnoDB error due to
unavailability of undo slots, errors could persist during
rollback when the server was restarted: There are two
UNDO slot caches (for INSERT and UPDATE). If all slots
end up in one of the slot caches, a request for a slot
from the other slot cache would fail. This can happen if
the request is for an UPDATE slot and all slots are in
the INSERT slot cache, or vice versa.
* Queries of the form SELECT … WHERE string = ANY(…)
failed when the server used a single-byte character set
and the client used a multi-byte character set.
* The mysql client incorrectly parsed statements containing
the word "delimiter" in mid-statement.
This fix is different from the one applied for this bug
in MySQL 5.0.66. (Bug#33812:http://bugs.mysql.com/33812)
* Previously, use of index hints with views (which do not
have indexes) produced the error ERROR 1221 (HY000):
Incorrect usage of USE/IGNORE INDEX and VIEW. Now this
produces ERROR 1176 (HY000): Key ‘…’ doesn’t exist in
table ‘…’, the same error as for base tables without an
* Cached queries that used 256 or more tables were not
properly cached, so that later query invalidation due to
a TRUNCATE TABLE for one of the tables caused the server
to hang. (Bug#33362:http://bugs.mysql.com/33362)
* ALTER TABLE CONVERT TO CHARACTER SET did not convert
TINYTEXT or MEDIUMTEXT columns to a longer text type if
necessary when converting the column to a different
character set. (Bug#31291:http://bugs.mysql.com/31291)
* On Windows, Visual Studio does not take into account some
x86 hardware limitations, which led to incorrect results
converting large DOUBLE values to unsigned BIGINT values.
* The Questions status variable is intended as a count of
statements sent by clients to the server, but was also
counting statements executed within stored routines.
* For access to the INFORMATION_SCHEMA.VIEWS table, the
server did not check the SHOW VIEW and SELECT privileges,
leading to inconsistency between output from that table
and the SHOW CREATE VIEW statement.
* mysqld_safe would sometimes fail to remove the pid file
for the old mysql process after a crash. As a result, the
server would fail to start due to a false A mysqld
process already exists… error.