Released on 25 Jan 2007
MySQL 5.1.15 Changelog

This is a new Beta development release, fixing recently discovered bugs.


This Beta release, as any other pre-production release, should not be installed on production level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at for more details about the individual bugs fixed in this version.

This section documents all changes and bug fixes that have been applied since the last official MySQL release. If you would like to receive more fine-grained and personalized update alerts about fixes that are relevant to the version and features you use, please consider subscribing to MySQL Enterprise (a commercial MySQL offering). For more details, please see (

  • Functionality Added or Changed

  • Bugs Fixed

Functionality Added or Changed

  • Incompatible Change; MySQL Cluster: The LockPagesInMainMemory configuration parameter has changed its type and possible values.


    The values true and false are no longer accepted for this parameter. If you were using this parameter and had it set to false in a previous release, you must change it to 0. If you had this parameter set to true, you should instead use 1 to obtain the same behavior as previously, or 2 to take advantage of new functionality introduced with this release, as described in the section cited above.

    (Bug #25686)

  • Incompatible Change: InnoDB rolls back only the last statement on a transaction timeout. A new option, --innodb_rollback_on_timeout, causes InnoDB to abort and roll back the entire transaction if a transaction timeout occurs (the same behavior as in MySQL 5.0.13 and earlier). (Bug #24200)

  • Incompatible Change: Previously, the DATE_FORMAT() function returned a binary string. Now it returns a string with a character set and collation given by character_set_connection and collation_connection so that it can return month and weekday names containing non-ASCII characters. (Bug #22646)

  • Incompatible Change: The following conditions apply to enabling the read_only system variable:

    • If you attempt to enable read_only while you have any explicit locks (acquired with LOCK TABLES or have a pending transaction, an error will occur.

    • If other clients hold explicit table locks or have pending transactions, the attempt to enable read_only blocks until the locks are released and the transactions end. While the attempt to enable read_only is pending, requests by other clients for table locks or to begin transactions also block until read_only has been set.

    • read_only can be enabled while you hold a global read lock (acquired with FLUSH TABLES WITH READ LOCK) because that does not involve table locks.

    Previously, the attempt to enable read_only would return immediately even if explicit locks or transactions were pending, so some data changes could occur for statements executing in the server at the same time. (Bug #22009, Bug #11733)

  • Incompatible Change: Previously, the ARCHIVE storage engine created a metadata file with an extension of .ARM for each table. The engine no longer creates this file.

  • Important Change: When using a MERGE table, the definition of the table and the underlying MyISAM tables are checked each time the tables are opened for access (including any SELECT or INSERT statement). Each table is compared for column order, types, sizes, and associated indexes. If there is a difference in any one of the tables, the statement will fail.

  • Important Change: Previously, duplicate-key errors were indicated by the ER_DUP_ENTRY error code (1062). This code is no longer used. Instead, the server returns ER_DUP_ENTRY_WITH_KEY_NAME (1582), and the error message indicates the name of the index for which the duplicate occurred. Applications that test for duplicate keys should look for both error codes if they need to be compatible with current and older servers.

    References: See also Bug #28842.

  • MySQL Cluster: The NDB storage engine could leak memory during file operations. (Bug #21858)

  • Replication: Calling a nondeterministic stored routine when using statement-based replication now throws an error. Formerly, defining such a stored routine would cause an error to be thrown. (Bug #16456)

  • On Unix, when searching the standard locations for option files, MySQL programs now also look for /etc/mysql/my.cnf after checking for /etc/my.cnf and before checking the remaining locations. (Bug #25104)

  • The default value of the max_connections variable has been increased to 151 so that Web sites running on Apache and using MySQL will not have more processes trying to access MySQL than the default number of connections available.

    The maximum number of Apache processes is determined by the Apache MaxClient setting, which defaults to 256, but is usually set to 150 in the httpd.conf commonly distributed with Apache. For more information about MaxClient, see (Bug #23883)

  • The Com_create_user status variable was added (for counting CREATE USER statements). (Bug #22958)

  • The --memlock option relies on system calls that are unreliable on some operating systems. If a crash occurs, the server now checks whether --memlock was specified and if so issues some information about possible workarounds. (Bug #22860)

  • The (undocumented) UNIQUE_USERS() and GROUP_UNIQUE_USERS() functions were removed. (Bug #22687)

  • Partitioning of tables using the FEDERATED storage engine is no longer permitted. Attempting to create such a table or to modify an existing table so that is uses both partitioning and FEDERATED now fails with an error. (Bug #22451)

  • The --skip-thread-priority option now is enabled by default for binary Mac OS X distributions. Use of thread priorities degrades performance on Mac OS X. (Bug #18526)

  • Remote servers for use with the FEDERATED storage engine now can be managed with the new CREATE/ALTER/DROP SERVER syntax.

  • Added the --disable-grant-options option to configure. If configure is run with this option, the --bootstrap, --skip-grant-tables, and --init-file options for mysqld are disabled and cannot be used. For Windows, the configure.js script recognizes the DISABLE_GRANT_OPTIONS flag, which has the same effect.

  • The bundled yaSSL library was upgraded to version 1.5.0.

Bugs Fixed

  • Incompatible Change: For ENUM columns that had enumeration values containing commas, the commas were mapped to 0xff internally. However, this rendered the commas indistinguishable from true 0xff characters in the values. This no longer occurs. However, the fix requires that you dump and reload any tables that have ENUM columns containing any true 0xff values. Dump the tables using mysqldump with the current server before upgrading from a version of MySQL 5.1 older than 5.1.15 to version 5.1.15 or newer. (Bug #24660)

  • MySQL Cluster; Partitioning: Non-32-bit, nonaligned columns were not handled correctly in explicitly partitioned NDB tables. (Bug #25587)

  • MySQL Cluster; Replication: (Replication): Connecting a mysqld to a cluster where not all nodes were running, starting the remaining cluster nodes, and then disconnecting from the cluster caused the mysqld process to crash. (Bug #25387)

  • MySQL Cluster: It was not possible to create an NDB table with a key on two VARCHAR columns where both columns had a storage length in excess of 256. (Bug #25746)

  • MySQL Cluster: Hosts in clusters with large numbers of nodes could experience excessive CPU usage while obtaining configuration data. (Bug #25711)

  • MySQL Cluster: In some circumstances, shutting down the cluster could cause connected mysqld processes to crash. (Bug #25668)

  • MySQL Cluster: Some aggregate queries such as SELECT COUNT(*) performed a table scan on NDB tables rather than checking table statistics, causing such queries to perform much more slowly in MySQL Cluster 5.1 than in 5.0. (Bug #25567)

  • MySQL Cluster: Memory allocations for TEXT columns were calculated incorrectly, resulting in space being wasted and other issues. (Bug #25562)

  • MySQL Cluster: The failure of a master node during a node restart could lead to a resource leak, causing later node failures. (Bug #25554)

  • MySQL Cluster: The failure of a node during a local checkpoint could lead to other node failures. (Bug #25468)

  • MySQL Cluster: A node shutdown occurred if the master failed during a commit. (Bug #25364)

  • MySQL Cluster: Creating a nonunique index with the USING HASH clause silently created an ordered index instead of issuing a warning. (Bug #24820)

  • MySQL Cluster: ndb_config failed when trying to use 2 management servers and node IDs. (Bug #23887)

  • MySQL Cluster: When a data node was shut down using the management client STOP command, a connection event (NDB_LE_Connected) was logged instead of a disconnection event (NDB_LE_Disconnected). (Bug #22773)

  • MySQL Cluster: The management server did not handle logging of node shutdown events correctly in certain cases. (Bug #22013)

  • MySQL Cluster: SELECT statements with a BLOB or TEXT column in the selected column list and a WHERE condition including a primary key lookup on a VARCHAR primary key produced empty result sets. (Bug #19956)

  • MySQL Cluster: When stopping and restarting multiple data nodes, the last node to be restarted would sometimes hang in Phase 100. (Bug #19645)

  • Replication: Using row-based replication to replicate to a table having at least one extra BIT column with a default value on the slave as compared to the master could cause the slave to fail. (Bug #24490)

  • Replication: When SET PASSWORD was written to the binary log, double quotation marks were included in the statement. If the slave was running in with the server SQL mode set to ANSI_QUOTES, then the event failed, which halted the replication process. (Bug #24158)

  • Replication: A stored procedure, executed from a connection using a binary character set, and which wrote multibyte data, would write incorrectly escaped entries to the binary log. This caused syntax errors, and caused replication to fail. (Bug #23619, Bug #24492)

  • Replication: Using CREATE TABLE ... SELECT and rolling back the transaction would leave an empty table on the master, but the instructions would not be recorded in the binary log and therefore replicated to the slave. This would result in a difference between the master and slave databases. An implicit commit has been added to ensure consistency. (Bug #22865)

  • Replication: Changes to the lc_time_names system variable were not replicated. (Bug #22645)

  • Replication: For SET, SELECT, and DO statements that invoked a stored function from a database other than the default database, the function invocation could fail to be replicated. (Bug #19725)

  • Disk Data: Following three or more missed local checkpoints by a cluster node, a restart of the node caused incorrect undo information to be used for Disk Data tables. (Bug #25636)

  • Disk Data: MEDIUMTEXT columns of Disk Data tables were stored in memory rather than on disk, even if the columns were not indexed. (Bug #25001)

  • Disk Data: Performing a node restart with a newly dropped Disk Data table could lead to failure of the node during the restart. (Bug #24917)

  • Disk Data: Changing a column specification or issuing a TRUNCATE TABLE statement on a Disk Data table caused the table to become an in-memory table. (Bug #24667, Bug #25296)

  • Disk Data: When restoring from backup a cluster containing any Disk Data tables with hidden primary keys, a node failure resulted which could lead to a crash of the cluster. (Bug #24166)

  • Disk Data: Repeated CREATE, DROP, or TRUNCATE TABLE in various combinations with system restarts between these operations could lead to the eventual failure of a system restart. (Bug #21948)

  • Disk Data: Extents that should have been available for re-use following a DROP TABLE operation were not actually made available again until after the cluster had performed a local checkpoint. (Bug #17605)

  • Cluster Replication: Certain errors in replication setups could lead to unexpected node failures. (Bug #25755)

  • Cluster Replication: Connecting an API node to the cluster during a node restart while performing database operations could cause the restarting node to fail. (Bug #25329)

  • Cluster Replication: Following a restart of the master cluster, the latest GCI was set to 0 upon reconnection to the slave. (Bug #21806)

  • Cluster API: Deletion of an Ndb_cluster_connection object took a very long time. (Bug #25487)

  • Cluster API: Invoking the NdbTransaction::execute() method using execution type Commit and abort option AO_IgnoreError could lead to a crash of the transaction coordinator (DBTC). (Bug #25090)

  • Cluster API: A unique index lookup on a nonexistent tuple could lead to a data node timeout (error 4012). (Bug #25059)

  • Cluster API: When using the NdbTransaction::execute() method, a very long timeout (greater than 5 minutes) could result if the last data node being polled was disconnected from the cluster. (Bug #24949)

  • Cluster API: Due to an error in the computation of table fragment arrays, some transactions were not executed from the correct starting point. (Bug #24914)

  • mysqltest_embedded crashed at startup. (Bug #25890)

  • Referencing an ambiguous column alias in an expression in the ORDER BY clause of a query caused the server to crash. (Bug #25427)

  • A number of issues were uncovered by Valgrind. (Bug #25396)

  • Using a view in combination with a USING clause caused column aliases to be ignored. (Bug #25106)

  • A multiple-table DELETE QUICK could sometimes cause one of the affected tables to become corrupted. (Bug #25048)

  • An assertion failed incorrectly for prepared statements that contained a single-row uncorrelated subquery that was used as an argument of the IS NULL predicate. (Bug #25027)

  • In the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table, the value displayed for the REFERENCED_TABLE_NAME column was the table name as encoded for disk storage, not the actual table name. (Bug #25026)

  • The REPEAT() function could return NULL when passed a column for the count argument. (Bug #24947)

  • mysql_upgrade failed if the --password (or -p) option was given. (Bug #24896)

  • Accessing a fixed record format table with a crashed key definition results in server/myisamchk segmentation fault. (Bug #24855)

  • mysqld_multi and mysqlaccess looked for option files in /etc even if the --sysconfdir option for configure had been given to specify a different directory. (Bug #24780)

  • If there was insufficient memory available to mysqld, this could sometimes cause the server to hang during startup. (Bug #24751)

  • Optimizations that are legal only for subqueries without tables and WHERE conditions were applied for any subquery without tables. (Bug #24670)

  • Under certain rare circumstances, local checkpoints were not performed properly, leading to an inability to restart one or more data nodes. (Bug #24664)

  • A workaround was implemented to avoid a race condition in the NPTL pthread_exit() implementation. (Bug #24507)

  • Under some circumstances, a REORGANIZE PARTITION statement could crash mysqld. (Bug #24502)

  • mysqltest crashed with a stack overflow. (Bug #24498)

  • Attempts to access a MyISAM table with a corrupt column definition caused a server crash. (Bug #24401)

  • ALTER TABLE ENABLE KEYS or ALTER TABLE DISABLE KEYS combined with another ALTER TABLE option other than RENAME TO did nothing. In addition, if ALTER TABLE was used on a table having disabled keys, the keys of the resulting table were enabled. (Bug #24395)

  • When opening a corrupted .frm file during a query, the server crashes. (Bug #24358)

  • The --extern option for did not function correctly. (Bug #24354)

  • Some joins in which one of the joined tables was a view could return erroneous results or crash the server. (Bug #24345)

  • The mysql.server script used the source command, which is less portable than the . command; it now uses . instead. (Bug #24294)

  • A view was not handled correctly if the SELECT part contained \Z. (Bug #24293)

  • mysql_install_db did not create the mysql.plugin table if strict SQL mode was enabled. (Bug #24270)

  • A query using WHERE unsigned_column NOT IN ('negative_value') could cause the server to crash. (Bug #24261)

  • ALTER TABLE statements that performed both RENAME TO and {ENABLE|DISABLE} KEYS operations caused a server crash. (Bug #24219)

  • A FETCH statement using a cursor on a table which was not in the table cache could sometimes cause the server to crash. (Bug #24117)

  • Hebrew-to-Unicode conversion failed for some characters. Definitions for the following Hebrew characters (as specified by the ISO/IEC 8859-8:1999) were added: LEFT-TO-RIGHT MARK (LRM), RIGHT-TO-LEFT MARK (RLM) (Bug #24037)

  • On HP-UX, mysqltest (nonthread-safe) crashed due to being linked against a thread-safe libmysys library. (Bug #23984)

  • The server was built even when configure was run with the --without-server option. (Bug #23973)

    References: See also Bug #32898.

  • The MySQL 5.1.12 binaries for Windows were missing the FEDERATED, EXAMPLE, and BLACKHOLE storage engines. (Bug #23900)

  • ROW_COUNT() did not work properly as an argument to a stored procedure. (Bug #23760)

  • When reading from the standard input on Windows, mysqlbinlog opened the input in text mode rather than binary mode and consequently misinterpreted some characters such as Control+Z. (Bug #23735)

  • OPTIMIZE TABLE tried to sort R-tree indexes such as spatial indexes, although this is not possible (see OPTIMIZE TABLE Syntax). (Bug #23578)

  • The row count for MyISAM tables was not updated properly, causing SHOW TABLE STATUS to report incorrect values. (Bug #23526)

  • The Instance Manager DROP INSTANCE command did not work. (Bug #23476)

  • User-defined variables could consume excess memory, leading to a crash caused by the exhaustion of resources available to the MEMORY storage engine, due to the fact that this engine is used by MySQL for variable storage and intermediate results of GROUP BY queries. Where SET had been used, such a condition could instead give rise to the misleading error message You may only use constant expressions with SET, rather than Out of memory (Needed NNNNNN bytes). (Bug #23443)

  • A table created with the ROW_FORMAT = FIXED table option lost that option if an index was added or dropped with CREATE INDEX or DROP INDEX. (Bug #23404)

  • A deadlock could occur, with the server hanging on Closing tables, with a sufficient number of concurrent INSERT DELAYED, FLUSH TABLES, and ALTER TABLE operations. (Bug #23312)

  • Accuracy was improved for comparisons between DECIMAL columns and numbers represented as strings. (Bug #23260)

  • The Instance Manager STOP INSTANCE command took too much time and caused Instance Manager to be unresponsive. (Bug #23215)

  • If there was insufficient memory to store or update a blob record in a MyISAM table then the table will marked as crashed. (Bug #23196)

  • A compressed MyISAM table that became corrupted could crash myisamchk and possibly the MySQL Server. (Bug #23139)

  • CREATE TABLE ... SELECT statements were not rolled back correctly. As part of the fix, such a statement now causes an implicit commit before and after it is executed. However, it does not cause a commit when used to create a temporary table. (Bug #22864)

  • mysql_upgrade failed when called with a --basedir path name containing spaces. (Bug #22801)

  • Using INSTALL PLUGIN followed by a restart of the server caused an error due to memory not being properly initialized. (Bug #22694)

  • SET lc_time_names = value permitted only exact literal values, not expression values. (Bug #22647)

  • A partitioned table that used the DATA DIRECTORY option, where the data directory was the same as the directory in which the table definition file resided, became corrupted following ALTER TABLE ENGINE=ARCHIVE. This was actually due to an issue with the ARCHIVE storage engine, and not with partitioned tables in general. (Bug #22634)

  • The STDDEV() function returned a positive value for data sets consisting of a single value. (Bug #22555)

  • SHOW COLUMNS reported some NOT NULL columns as NULL. (Bug #22377)

  • A server crash occurred when using LOAD DATA to load a table containing a NOT NULL spatial column, when the statement did not load the spatial column. Now a NULL supplied to NOT NULL column error occurs. (Bug #22372)

  • An ALTER TABLE statement that used a RENAME clause in combination with a MODIFY or CHANGE that did not actually change the table (for example, when it changed a column's type from INT to INT). The behavior caused by this bug differed according to whether or not the storage engine used by the table was transactional or nontransactional. For transactional tables (such as those using the InnoDB storage engine), the statement simply failed; for nontransactional tables (such as those using the MyISAM storage engine), the ALTER TABLE statement succeeding renaming the table, but subsequent SELECT statements against the renamed table failed. (Bug #22369)

  • The Instance Manager STOP INSTANCE command could not be applied to instances in the Crashed, Failed, or Abandoned state. (Bug #22306)

  • DATE_ADD() requires complete dates with no zero parts, but sometimes did not return NULL when given such a date. (Bug #22229)

  • Some small double precision numbers (such as 1.00000001e-300) that should have been accepted were truncated to zero. (Bug #22129)

  • Changing the value of MI_KEY_BLOCK_LENGTH in myisam.h and recompiling MySQL resulted in a myisamchk that saw existing MyISAM tables as corrupt. (Bug #22119)

  • For a nonexistent table, DROP TEMPORARY TABLE failed with an incorrect error message if read_only was enabled. (Bug #22077)

  • A crash of the MySQL Server could occur when unpacking a BLOB column from a row in a corrupted MyISAM table. This could happen when trying to repair a table using either REPAIR TABLE or myisamchk; it could also happen when trying to access such a broken row using statements like SELECT if the table was not marked as crashed. (Bug #22053)

  • The code for generating USE statements for binary logging of CREATE PROCEDURE statements resulted in confusing output from mysqlbinlog for DROP PROCEDURE statements. (Bug #22043)

  • STR_TO_DATE() returned NULL if the format string contained a space following a nonformat character. (Bug #22029)

  • It was possible to use DATETIME values whose year, month, and day parts were all zeros but whose hour, minute, and second parts contained nonzero values, an example of such an illegal DATETIME being '0000-00-00 11:23:45'.


    This fix was reverted in MySQL 5.1.18.

    (Bug #21789)

    References: See also Bug #25301.

  • SSL connections could hang at connection shutdown. (Bug #21781, Bug #24148)

  • yaSSL crashed on pre-Pentium Intel CPUs. (Bug #21765)

  • Using FLUSH TABLES in one connection while another connection is using HANDLER statements caused a server crash.


    This fix was reverted in MySQL 5.1.22

    (Bug #21587)

    References: See also Bug #29474.

  • The FEDERATED storage engine did not support the euckr character set. (Bug #21556)

  • InnoDB crashed while performing XA recovery of prepared transactions. (Bug #21468)

  • It was possible to set the backslash character (\) as the delimiter character using DELIMITER, but not actually possible to use it as the delimiter. (Bug #21412)

  • Using ALTER TABLE to convert a CSV table containing NULL values to MyISAM resulted in warnings. (Bug #21328)

  • When updating a table that used a JOIN of the table itself (for example, when building trees) and the table was modified on one side of the expression, the table would either be reported as crashed or the wrong rows in the table would be updated. (Bug #21310)

  • mysqld_error.h was not installed when only the client libraries were built. (Bug #21265)

  • InnoDB: During a restart of the MySQL Server that followed the creation of a temporary table using the InnoDB storage engine, MySQL failed to clean up in such a way that InnoDB still attempted to find the files associated with such tables. (Bug #20867)

  • Selecting into variables sometimes returned incorrect wrong results. (Bug #20836)

  • Queries of the form SELECT ... WHERE string = ANY(...) failed when the server used a single-byte character set and the client used a multibyte character set. (Bug #20835)

    References: See also Bug #34760.

  • mysql_fix_privilege_tables.sql altered the table_privs.table_priv column to contain too few privileges, causing loss of the CREATE VIEW and SHOW VIEW privileges. (Bug #20589)

  • A stored routine containing semicolon in its body could not be reloaded from a dump of a binary log. (Bug #20396)

  • SELECT ... FOR UPDATE, SELECT ... LOCK IN SHARE MODE, DELETE, and UPDATE statements executed using a full table scan were not releasing locks on rows that did not satisfy the WHERE condition. (Bug #20390)

  • The BUILD/check-cpu script did not recognize Celeron processors. (Bug #20061)

  • Unsigned BIGINT values treated as signed values by the MOD() function. (Bug #19955)

  • Compiling PHP 5.1 with the MySQL static libraries failed on some versions of Linux. (Bug #19817)

  • The DELIMITER statement did not work correctly when used in an SQL file run using the SOURCE statement. (Bug #19799)

  • mysqltest incorrectly tried to retrieve result sets for some queries where no result set was available. (Bug #19410)

  • VARBINARY column values inserted on a MySQL 4.1 server had trailing zeros following upgrade to MySQL 5.0 or later. (Bug #19371)

  • Some CASE statements inside stored routines could lead to excessive resource usage or a crash of the server. (Bug #19194, Bug #24854)

  • Instance Manager could crash during shutdown. (Bug #19044)

  • myisampack wrote to unallocated memory, causing a crash. (Bug #17951)

  • FLUSH LOGS or mysqladmin flush-logs caused a server crash if the binary log was not open. (Bug #17733)

  • mysql_fix_privilege_tables did not accept a password containing embedded space or apostrophe characters. (Bug #17700)

  • No warning was issued for use of the DATA DIRECTORY or INDEX DIRECTORY table options on a platform that does not support them. (Bug #17498)

  • The FEDERATED storage engine did not support the utf8 character set. (Bug #17044)

  • The optimizer removes expressions from GROUP BY and DISTINCT clauses if they happen to participate in expression = constant predicates of the WHERE clause, the idea being that, if the expression is equal to a constant, then it cannot take on multiple values. However, for predicates where the expression and the constant item are of different result types (for example, when a string column is compared to 0), this is not valid, and can lead to invalid results in such cases. The optimizer now performs an additional check of the result types of the expression and the constant; if their types differ, then the expression is not removed from the GROUP BY list. (Bug #15881)

  • When a prepared statement failed during the prepare operation, the error code was not cleared when it was reused, even if the subsequent use was successful. (Bug #15518)

  • Dropping a user-defined function sometimes did not remove the UDF entry from the mysql.proc table. (Bug #15439)

  • Inserting a row into a table without specifying a value for a BINARY(N) NOT NULL column caused the column to be set to spaces, not zeros. (Bug #14171)

  • On Windows, the SLEEP() function could sleep too long, especially after a change to the system clock. (Bug #14094, Bug #24686, Bug #17635)

  • mysqldump --order-by-primary failed if the primary key name was an identifier that required quoting. (Bug #13926)

  • Subqueries of the form NULL IN (SELECT ...) returned invalid results. (Bug #8804, Bug #23485)