MySQL 5.1.20ベータ版がリリースされました。


最も普及しているオープンソースデータベースの新ベータバージョンであるMySQL 5.1.20ベータ版がリリースされました。

CREATE TABLE LIKEはソースのテーブルに対して権限が必要ありませんでした。


* エラーコードは、MySQL 5.0.xの同じエラーコードに適応した番号を持つようになりました。このため、1458から始まるエラーコードはMySQL 5.1.20が以前の5.1.xと異なる値を持つということになります。ハードコードされたエラー番号を使用する、以前のMySQL5.1リリースで動作するように設計されたクライアントアプリケーションについてはアップデートが必要です。また、MySQL 5.1に対してコンパイルされたエラーチェックを行なうクライアントアプリケーションについては、再コンパイルが必要です。利点として、MySQL 5.0に対してコンパイルされた既存のクライアントが、今回のリリースからはMySQL 5.1で正確に動作することです。

* GROUP_CONCAT()関数への呼び出しを含むクエリーでORDER BYまたはDISTINCT句を使用すると、現在の結果を再表示するために前回のクエリからの結果を返します。このための修正には、内部でVARCHAR型に一致させるために使用されるBLOBの値の置換が含まれています。このことにより、GROUP_CONCAT()を使用するクエリの結果がVARCHARの制限文字数よりも長い場合、切捨てができるようになります。これはMySQL 5.1.20ベータ版での新しい制限です。(Bugs #23856 #28273)

* ログテーブルのパーティショニングはもうできません。(Bug#27816)

これはベータ版であり、他の多くの試作商品リリースと同様、商品レベルのシステムまたは、重要なデータを含むシステムに対してインストールしないように注意してください。5.0使用の商品レベルのシステムについては、以下のMySQL Enterpriseの商品説明のページをご覧ください。

MySQL 5.1.20ベータ版は、とミラーサイトのダウンロード・ページから、ソースコード及び多くのプラットフォームのためのバイナリで現在利用可能です。






Functionality added or changed:
* Incompatible change: It is no longer possible to partition the
   log tables. (Bug#27816:
* User variables and stored procedure variables are now
   supported for use in XPath expressions employed as arguments
   to the ExtractValue() and UpdateXML() functions.
   This means that:
   + XPath can now be used to load data from XML files using
   virtually any format, and so able to import data from
   most third party software which either has XML export
   functionality, or uses XML natively as a storage format.
   + Various complex conditions can be put on rows and
   columns, so one can filter for desired rows (or skip
   unwanted rows) when loading XML.
   + Various types of preprocessing using SQL functions are
   now possible when loading XML. For example, you can
   concatenate two XML tag or attribute values into a single
   column value using CONCAT(), or remove some parts of the
   data using REPLACE().
   See Section 12.10, "XML Functions," for more information.
* NDB 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 Section
   15.12.1, "Configuring MySQL Cluster to use SCI Sockets."
* NDB Cluster: auto_increment_increment and
   auto_increment_offset are now supported for NDB tables.
* NDB Cluster: The cluster management client now stores command
   history between sessions.
* NDB Cluster: ndb_error_reporter now preserves timestamps on
   files. (Bug#29074:
* NDB Cluster: The TimeBetweenWatchdogCheckInitial configuration
   parameter was added to allow setting of a separate watchdog
   timeout for memory allocation during startup of the data
   nodes. See Section, "Defining Data Nodes," for more
   information. (Bug#28899:
* NDB Cluster: It is now possible to set the maximum size of the
   allocation unit for table memory using the MaxAllocate
   configuration parameter.
* If a 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.

Bugs fixed:
* Security Fix: CREATE TABLE LIKE did not require any privileges
   on the source table. (Bug#25578:
   In addition, CREATE TABLE 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 CREATE TABLE LIKE statement and either DDL
   statements on the source table or DML or DDL statements on the
   target table. (Bug#23667:
* Incompatible change: Some error codes had error numbers in
   MySQL 5.1 different from the numbers in MySQL 5.0. In MySQL
   5.1, error numbers have been changed to match the MySQL 5.0
   values: Error codes with value of 1458 or higher have changed
   in MySQL 5.1 now. Client applications designed to work with
   MySQL 5.1 with hard-coded error code values (for example, in
   statements such as if (mysql_errno(mysql) == 1463) { ... })
   need to be updated in the source code. All clients designed to
   work with MySQL 5.1 that test error codes (for example, in
   statements such as if (mysql_errno(mysql) ==
   ER_VIEW_RECURSIVE) { ... }) should be recompiled. Existing 5.0
   clients should now work, without changes or recompilation,
   against servers for MySQL 5.1.20 or higher.
* Incompatible change: The use of an ORDER BY or DISTINCT clause
   with a query containing a call to the GROUP_CONCAT() 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 VARCHAR. This means
   that for long results (more than 65,535 bytes), it is possible
   for truncation to occur; if so, an appropriate warning is
   issued. (Bug#23856:,
* NDB Cluster: A query having a large IN(...) or NOT IN(...)
   list in the WHERE condition on an NDB table could cause mysqld
   to crash. (Bug#29185:
* NDB Cluster (Disk Data): When dropping a page, the stack's
   bottom entry could sometime be left "cold" rather than "hot",
   violating the rules for stack
* NDB Cluster: In the event that two data nodes in the same node
   group and participating in a GCP crashed before they had
   written their respective P0.sysfile files, QMGR could refuse
   to start, issuing an invalid Insufficient nodes for restart
   error instead.(Bug#29167:
* NDB Cluster: Memory corruption could occur due to a problem in
   the DBTUP kernel block.
* NDB Cluster (APIs): An invalid error code could be set on
   transaction objects by BLOB handling code.
* NDB Cluster: Attempting to restore a NULL row to a VARBINARY
   column caused ndb_restore to fail.
* NDB Cluster: ndb_mgm could hang when connecting to a
   nonexistent host. (Bug#28847:
* NDB Cluster (APIs): The timeout set using the MGM API
   ndb_mgm_set_timeout() function was incorrectly interpreted as
   seconds rather than as milliseconds.
* NDB Cluster: When shutting down mysqld, the NDB binlog process
   was not shut down before log cleanup began.
* NDB Cluster: A race condition could result when non-master
   nodes (in addition to the master node) tried to update active
   status due to a local checkpoint. Now only the master updates
   the active status. (Bug#28717:
* NDB Cluster: The management client's response to START BACKUP
   WAIT COMPLETED did not include the backup ID.
* NDB Cluster: A regression in the heartbeat monitoring code
   could lead to node failure under high load. This issue
   affected MySQL 5.1.19 only.
* NDB Cluster (Replication): When replicating MyISAM or InnoDB
   tables to a MySQL Cluster, it was not possible to determine
   exactly what had been applied following a shutdown of the
   slave cluster or mysqld process.
* NDB Cluster: Having large amounts of memory locked caused
   swapping to disk. (Bug#28751:
* NDB Cluster: The actual value of MaxNoOfOpenFiles as used by
   the cluster was offset by 1 from the value set in config.ini.
   This meant that setting InitialNoOpenFilesto the same value
   always caused an error.
* NDB Cluster: LCP files were not removed following an initial
   system restart. (Bug#28726:
* NDB Cluster: A fast global checkpoint under high load with a
   high usage of the redo buffer caused data nodes to fail.
* NDB Cluster (Disk Data): When loading data into a cluster
   following a version upgrade, the data nodes could forcibly
   shut down due to page and buffer management failures.
* NDB Cluster: UPDATE IGNORE statements involving the primary
   keys of multiple tables could result in data corruption.
* NDB Cluster: A corrupt schema file could cause a File already
   open error. (Bug#28770:
* NDB Cluster Disk Data: Repeated INSERT and DELETE operations
   on a Disk Data table having one or more large VARCHAR columns
   could cause data nodes to fail.
* NDB Cluster (Replication): A replicated unique key allowed
   duplicate key inserts on the slave.
* The binlog_format system variable value was empty if the
   server was started with binary logging disabled. Now it is set
   to MIXED. (Bug#28752:
* Conversion of U+00A5 YEN SIGN and U+203E OVERLINE from ucs2 to
   ujis produced incorrect results.
* Some valid identifiers were not parsed correctly.
* On Windows, USE_TLS was not defined for mysqlclient.lib.
* A malformed password packet in the connection protocol could
   cause the server to crash.
* A too-long shared-memory-base-name value could cause a buffer
   overflow and crash the server or clients.
* On Windows, an application that called mysql_thread_init() but
   forgot to call mysql_thread_end() would get this error: Error
   in my_thread_global_end()
* A stack overrun could occur when storing DATETIME values using
   repeated prepared statements.
* INSERT .. ON DUPLICATE KEY UPDATE could under some
   circumstances silently update rows when it should not have.
* Using events in replication could cause the slave to crash.
* ALTER TABLE ... ENABLE KEYS could cause mysqld to crash when
   executed on a table containing on a MyISAM table containing
   billions of rows. (Bug#27029:
* A FLUSH TABLES WITH READ LOCK statement followed by a FLUSH
   LOGS statement caused a deadlock if the general log or the
   slow query log was enabled.
* The TRUNCATE statement was handled differently by the server
   when row-based logging was in effect, even though the
   binlogging format in effect does not effect the fact that
   TRUNCATE is always logged as a statement.
* When the query cache was fully used, issuing RENAME DATABASE
   or RENAME SCHEMA could cause the server to hang, with 100% CPU
   usage. (Bug#28211:
* Binary content 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 such as GBK
   (Chinese). This was due to a problem with SELECT INTO OUTFILE
   whereby LOAD DATA later incorrectly interpreted 0x5C as the
   second byte of a multi-byte sequence rather than as the
   SOLIDUS ("\") character, used by MySQL as the escape
   character. (Bug#26711:
* If one of the queries in a UNION used the SQL_CACHE option and
   another query in the UNION contained a nondeterministic
   function, the result was still cached. For example, this query
   was incorrectly cached:
* Queries using UDFs or stored functions were cached.
* 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.
   use the same values for representing the same storage engine
   states. (Bug#27684:
* Connections from one mysqld server to another failed on Mac OS
   X, affecting replication and FEDERATED tables.
* 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:
* 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:
* The result of evaluation for a view's CHECK OPTION option over
   an updated record and records of merged tables was arbitrary
   and dependant on the order of records in the merged tables
   during the execution of the SELECT statement.
* Outer join queries with ON conditions over constant outer
   tables did not return NULL-complemented rows when conditions
   were evaluated to FALSE.
* An update on a multiple-table view with the CHECK OPTION
   clause and a subquery in the WHERE condition could cause an
   assertion failure. (Bug#28561:
* mysql_affected_rows() could return an incorrect result for
   flag was set. (Bug#28505:
* Using ALTER TABLE to move columns resulted only in the columns
   being renamed. The table contents were not changed.
* Storing a large number into a FLOAT or DOUBLE column with a
   fixed length could result in incorrect truncation of the
   number if the columns's length was greater than 31.
* 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 MEMORY table with unique key constraints. A consequence
   was that internal MEMORY tables used for GROUP BY calculation
   contained duplicate rows that resulted in duplicate-key errors
   when converting those temporary tables to MyISAM, and that
   error was incorrectly reported as a table is full error.
* The server deducted some bytes from the key_cache_block_size
   option value and reduced it to the next lower 512 byte
   boundary. The resulting block size was not a power of two.
   Setting the key_cache_block_size system variable to a value
   that is not a power of two resulted in MyISAM table
   corruption. (Bug#23068:,
* ON conditions from JOIN expressions were ignored when checking
   the CHECK OPTION clause while updating a multiple-table view
   that included such a clause.
   was not always set correctly.
* For CAST() of a NULL value with type DECIMAL, the return value
   was incorrectly initialized, producing a runtime error for
   binaries built using Visual C++ 2005.
* DECIMAL values beginning with nine 9 digits could be
   incorrectly rounded. (Bug#27984:
* For debug builds, ALTER TABLE could trigger an assertion
   failure due to occurrence of a deadlock when committing
   changes. (Bug#28652:
* Searches on indexed and non-indexed ENUM columns could return
   different results for empty strings.
* Non-utf8 characters could get mangled when stored in CSV
   tables. (Bug#28862:
* If a stored function or trigger was killed, it aborted but no
   error was thrown, allowing the calling statement to continue
   without noticing the problem. This could lead to incorrect
   results. (Bug#27563:
* When ALTER TABLE was used to add a new 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 DATETIME
   columns. (Bug#27507:
* Statements within triggers ignored the value of the
   low_priority_updates system variable.
* The server was ignoring the return value of the parse()
   function for full-text parser plugins.
* Queries that used UUID() were incorrectly allowed into the
   query cache. (This should not happen because UUID() is
   non-deterministic.) (Bug#28897:
* The Bytes_received and Bytes_sent status variables could hold
   only 32-bit values (not 64-bit values) on some platforms.
* SHOW GLOBAL VARIABLES repeated some variable names.
* Passing a DECIMAL value as a parameter of a statement prepared
   with PREPARE resulted in an error.
* For attempts to open a non-existent table, the server should
   report ER_NO_SUCH_TABLE but sometimes reported
   ER_TABLE_NOT_LOCKED. (Bug#27907:
* Due to a race condition, executing FLUSH PRIVILEGES in one
   thread could cause brief table unavailability in other
   threads. (Bug#24988:
* Conversion errors could occur when constructing the condition
   for an IN predicate. The predicate was treated as if the
   affected column contains NULL, but if the IN predicate is
   inside NOT, incorrect results could be returned.
* Linux binaries were unable to dump core after executing a
   setuid() call. (Bug#21723:
* Using up-arrow for command-line recall in mysql* could cause a
   segmentation fault. (Bug#10218:
* Long pathnames for internal temporary tables could cause stack
   overflows. (Bug#29015:
* 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. (Bug#28934:
* Using a VIEW created with a non-existing DEFINER could lead to
   incorrect results under some circumstances.
* In MySQL 5.1.15, a new error code ER_DUP_ENTRY_WITH_KEY_NAME
   (1582) was introduced to replace ER_DUP_ENTRY (1062) so that
   the key name could be provided instead of the key number. This
   was unnecessary, so ER_DUP_ENTRY is used again and the key
   name is printed. The incompatibility introduced in 5.1.15 no
   longer applies. (Bug#28842:
* When one thread attempts to lock two (or more) tables and
   another thread executes a statement that aborts these locks
   thread might get a table object with an incorrect lock type in
   the table cache. The result is table corruption or a server
   crash. (Bug#28574:
* The server crashed when attempting to open a table having a
   #mysql50# prefix in the database or table name. The server now
   will not open such tables. (This prefix is reserved by
   mysql_upgrade for accessing 5.0 tables that have names not yet
   encoded for 5.1.) (Bug#26402:
* Running SHOW TABLE STATUS while performing a high number of
   inserts on partitioned tables with a great many partitions
   could cause the server to crash.
* An error occurred trying to connect to mysqld-debug.exe.
* Using an INTEGER column from a table to ROUND() a number
   produced different results than using a constant with the same
   value as the INTEGER column. (Bug# 28980)
* The PARTITION_COMMENT column of the
   INFORMATION_SCHEMA.PARTITIONS table had the wrong default
   value. (Bug#28007:
   PARTITION could result in inconsistent data, or cause the
   server to crash, if done concurrently with other accesses to
   the table. (Bug#28477:,
* InnoDB tables using an indexed CHAR column with utf8 as the
   default character set could fail to return the right rows.
* Using BETWEEN with non-indexed date columns and short formats
   of the date string could return incorrect results.
* When using a MEMORY table on Mac OS X, dropping a table and
   than creating a table with the same name could cause the
   information of the deleted table to remain accessible, leading
   to index errors. (Bug#28309:
* Granting access privileges to an individual table where the
   database or table name contained an underscore would fail.
* A subquery with ORDER BY and LIMIT 1 could cause a server
   crash. (Bug#28811:
* Selecting GEOMETRY columns in a UNION caused a server crash.
* mysqltest used a too-large stack size on PPC/Debian Linux,
   causing thread-creation failure for tests that use many
   threads. (Bug#28333:
* When constructing the path to the original .frm file, ALTER ..
   RENAME was unnecessarily (and incorrectly) lowercasing the
   entire path when not on a case-insensitive filesystem, causing
   the statement to fail.
* PURGE MASTER LOGS BEFORE (subquery) caused a server crash.
   Subqueries are forbidden in the BEFORE clause now.
* 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 MyISAM table. (Bug#28449:
* 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 problem.
* Stack overflow caused server crashes.
* The test case for mysqldump failed with bin-log disabled.
* The check-cpu script failed to detect AMD64 Turion processors
   correctly. (Bug#17707:
* Attempting to create an index on a BIT column failed after
   modifying the column. (Bug#28631:
* After an upgrade, the names of stored routines referenced by
   views were no longer displayed by SHOW CREATE VIEW. This was a
   regression introduced by the fix for
* Killing from one connection a long-running EXPLAIN QUERY
   started from another connection caused mysqld to crash.
* When upgrading from MySQL 5.1.17 to 5.1.18, mysql_upgrade and
   mysql_fix_privilege_tables did not upgrade the system tables
   relating to the Event Scheduler correctly.
* Subselects returning LONG values in MySQL versions later than
   5.0.24a returned LONGLONG prior to this. The previous behavior
   was restored. This issue was introduced by the fix for
* Executing 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. (Bug#28728:
* 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#12826:,
* Attempting to 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. (Bug#28366:
* 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.
* The query SELECT '2007-01-01' + INTERVAL column_name DAY FROM
   table_name caused mysqld to fail.
* The result of executing of a prepared statement created with
   PREPARE s FROM "SELECT 1 LIMIT ?" was not replicated
   correctly. (Bug#28464:
* For a given user variable @v, the statements SELECT @v and
   CREATE TABLE ... AS SELECT @v did not return the same data
   type. (Bug#26277:
* Trying to shut down the server following a failed LOAD DATA
   INFILE caused mysqld to crash.
* A number of SHOW statements caused mysqld to crash on recent
   versions of Solaris. This issue is believed to be present only
   in MySQL 5.1.12 and later.
* Using CREATE TABLE LIKE ... would raise an assertion when
   replicated to a slave.
* 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.
* When using mysqlbinlog with --read-from-remote-server to load
   the data direct from a remote MySQL server would cause a core
   dump when dumping certain binary log events.
* When using transactions and replication, shutting down the
   master in the middle of a transaction would cause all slaves
   to stop replicating. (Bug#22725:
* 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.
* A stored program that uses a variable name containing
   multibyte characters could fail to execute.
* The internal functions for table preparation, creation, and
   alteration were not re-execution friendly, causing problems in
   code that: repeatedly altered a table; repeatedly created and
   dropped a table; opened and closed a cursor on a table,
   altered the table, and then reopened the cursor; used ALTER
   TABLE to change a table's current AUTO_INCREMENT value;
   created indexes on utf8 columns.
* The query SELECT /*2*/ user, host, db, info FROM
   user='event_scheduler') AND (info IS NULL OR info NOT LIKE
   '%processlist%') ORDER BY INFO yielded inconsistent results.
* Sending debugging information from a dump of the Event
   Scheduler to COM_DEBUG could cause the server to crash.
* Setting an interval of EVERY 0 SECOND for a scheduled event
   caused the server to crash.
* Following an invalid call to UpdateXML(), calling the function
   again (even if valid) crashed the server.
* Calling the UpdateXML() function using invalid XPath syntax
   caused memory corruption possibly leading to a crash of the
   server. (Bug#28558: