Appendix C MySQL Release Notes

Table of Contents

C.1 Changes in Release 4.1.x (Lifecycle Support Ended)
C.1.1 Changes in MySQL 4.1.25 (2008-12-01)
C.1.2 Changes in MySQL 4.1.24 (2008-03-01)
C.1.3 Changes in MySQL 4.1.23 (2007-06-12)
C.1.4 Changes in MySQL 4.1.22 (2006-11-02)
C.1.5 Changes in MySQL 4.1.21 (2006-07-19)
C.1.6 Changes in MySQL 4.1.20 (2006-05-24)
C.1.7 Changes in MySQL 4.1.19 (2006-04-29)
C.1.8 Changes in MySQL 4.1.18 (2006-01-27)
C.1.9 Changes in MySQL 4.1.17 (Not released)
C.1.10 Changes in MySQL 4.1.16 (2005-11-29)
C.1.11 Changes in MySQL 4.1.15 (2005-10-13)
C.1.12 Changes in MySQL 4.1.14 (2005-08-17)
C.1.13 Changes in MySQL 4.1.13 (2005-07-15)
C.1.14 Changes in MySQL 4.1.12 (2005-05-13)
C.1.15 Changes in MySQL 4.1.11 (2005-04-01)
C.1.16 Changes in MySQL 4.1.10 (2005-02-12)
C.1.17 Changes in MySQL 4.1.9 (2005-01-11)
C.1.18 Changes in MySQL 4.1.8 (2004-12-14)
C.1.19 Changes in MySQL 4.1.7 (2004-10-23, Production)
C.1.20 Changes in MySQL 4.1.6 (2004-10-10)
C.1.21 Changes in MySQL 4.1.5 (2004-09-16)
C.1.22 Changes in MySQL 4.1.4 (2004-08-26, Gamma)
C.1.23 Changes in MySQL 4.1.3 (2004-06-28, Beta)
C.1.24 Changes in MySQL 4.1.2 (2004-05-28)
C.1.25 Changes in MySQL 4.1.1 (2003-12-01)
C.1.26 Changes in MySQL 4.1.0 (2003-04-03, Alpha)
C.2 Changes in Release 4.0.x (Lifecycle Support Ended)
C.2.1 Changes in Release 4.0.31 (Not released)
C.2.2 Changes in Release 4.0.30 (12 February 2007)
C.2.3 Changes in Release 4.0.29 (Not released)
C.2.4 Changes in Release 4.0.28 (Not released)
C.2.5 Changes in Release 4.0.27 (06 May 2006)
C.2.6 Changes in Release 4.0.26 (08 September 2005)
C.2.7 Changes in Release 4.0.25 (05 July 2005)
C.2.8 Changes in Release 4.0.24 (04 March 2005)
C.2.9 Changes in Release 4.0.23 (18 December 2004)
C.2.10 Changes in Release 4.0.22 (27 October 2004)
C.2.11 Changes in Release 4.0.21 (06 September 2004)
C.2.12 Changes in Release 4.0.20 (17 May 2004)
C.2.13 Changes in Release 4.0.19 (04 May 2004)
C.2.14 Changes in Release 4.0.18 (12 February 2004)
C.2.15 Changes in Release 4.0.17 (14 December 2003)
C.2.16 Changes in Release 4.0.16 (17 October 2003)
C.2.17 Changes in Release 4.0.15 (03 September 2003)
C.2.18 Changes in Release 4.0.14 (18 July 2003)
C.2.19 Changes in Release 4.0.13 (16 May 2003)
C.2.20 Changes in Release 4.0.12 (15 March 2003: Production)
C.2.21 Changes in Release 4.0.11 (20 February 2003)
C.2.22 Changes in Release 4.0.10 (29 January 2003)
C.2.23 Changes in Release 4.0.9 (09 January 2003)
C.2.24 Changes in Release 4.0.8 (07 January 2003)
C.2.25 Changes in Release 4.0.7 (20 December 2002)
C.2.26 Changes in Release 4.0.6 (14 December 2002: Gamma)
C.2.27 Changes in Release 4.0.5 (13 November 2002)
C.2.28 Changes in Release 4.0.4 (29 September 2002)
C.2.29 Changes in Release 4.0.3 (26 August 2002: Beta)
C.2.30 Changes in Release 4.0.2 (01 July 2002)
C.2.31 Changes in Release 4.0.1 (23 December 2001)
C.2.32 Changes in Release 4.0.0 (October 2001: Alpha)
C.3 Changes in Release 3.23.x (Lifecycle Support Ended)
C.3.1 Changes in Release 3.23.59 (Not released)
C.3.2 Changes in Release 3.23.58 (11 September 2003)
C.3.3 Changes in Release 3.23.57 (06 June 2003)
C.3.4 Changes in Release 3.23.56 (13 March 2003)
C.3.5 Changes in Release 3.23.55 (23 January 2003)
C.3.6 Changes in Release 3.23.54 (05 December 2002)
C.3.7 Changes in Release 3.23.53 (09 October 2002)
C.3.8 Changes in Release 3.23.52 (14 August 2002)
C.3.9 Changes in Release 3.23.51 (31 May 2002)
C.3.10 Changes in Release 3.23.50 (21 April 2002)
C.3.11 Changes in Release 3.23.49 (14 February 2002)
C.3.12 Changes in Release 3.23.48 (07 February 2002)
C.3.13 Changes in Release 3.23.47 (27 December 2001)
C.3.14 Changes in Release 3.23.46 (29 November 2001)
C.3.15 Changes in Release 3.23.45 (22 November 2001)
C.3.16 Changes in Release 3.23.44 (31 October 2001)
C.3.17 Changes in Release 3.23.43 (04 October 2001)
C.3.18 Changes in Release 3.23.42 (08 September 2001)
C.3.19 Changes in Release 3.23.41 (11 August 2001)
C.3.20 Changes in Release 3.23.40 (18 July 2001)
C.3.21 Changes in Release 3.23.39 (12 June 2001)
C.3.22 Changes in Release 3.23.38 (09 May 2001)
C.3.23 Changes in Release 3.23.37 (17 April 2001)
C.3.24 Changes in Release 3.23.36 (27 March 2001)
C.3.25 Changes in Release 3.23.35 (15 March 2001)
C.3.26 Changes in Release 3.23.34a (11 March 2001)
C.3.27 Changes in Release 3.23.34 (10 March 2001)
C.3.28 Changes in Release 3.23.33 (09 February 2001)
C.3.29 Changes in Release 3.23.32 (22 January 2001)
C.3.30 Changes in Release 3.23.31 (17 January 2001: Production)
C.3.31 Changes in Release 3.23.30 (04 January 2001)
C.3.32 Changes in Release 3.23.29 (16 December 2000)
C.3.33 Changes in Release 3.23.28 (22 November 2000: Gamma)
C.3.34 Changes in Release 3.23.27 (24 October 2000)
C.3.35 Changes in Release 3.23.26 (18 October 2000)
C.3.36 Changes in Release 3.23.25 (29 September 2000)
C.3.37 Changes in Release 3.23.24 (08 September 2000)
C.3.38 Changes in Release 3.23.23 (01 September 2000)
C.3.39 Changes in Release 3.23.22 (31 July 2000)
C.3.40 Changes in Release 3.23.21 (04 July 2000)
C.3.41 Changes in Release 3.23.20 (28 June 2000: Beta)
C.3.42 Changes in Release 3.23.19
C.3.43 Changes in Release 3.23.18 (11 June 2000)
C.3.44 Changes in Release 3.23.17 (07 June 2000)
C.3.45 Changes in Release 3.23.16 (16 May 2000)
C.3.46 Changes in Release 3.23.15 (08 May 2000)
C.3.47 Changes in Release 3.23.14 (09 April 2000)
C.3.48 Changes in Release 3.23.13 (14 March 2000)
C.3.49 Changes in Release 3.23.12 (07 March 2000)
C.3.50 Changes in Release 3.23.11 (16 February 2000)
C.3.51 Changes in Release 3.23.10 (30 January 2000)
C.3.52 Changes in Release 3.23.9 (29 January 2000)
C.3.53 Changes in Release 3.23.8 (02 January 2000)
C.3.54 Changes in Release 3.23.7 (10 December 1999)
C.3.55 Changes in Release 3.23.6 (15 December 1999)
C.3.56 Changes in Release 3.23.5 (20 October 1999)
C.3.57 Changes in Release 3.23.4 (28 September 1999)
C.3.58 Changes in Release 3.23.3 (13 September 1999)
C.3.59 Changes in Release 3.23.2 (09 August 1999)
C.3.60 Changes in Release 3.23.1 (08 July 1999)
C.3.61 Changes in Release 3.23.0 (05 July 1999: Alpha)
C.4 Changes in InnoDB
C.4.1 Changes in MySQL/InnoDB-4.0.21, September 10, 2004
C.4.2 Changes in MySQL/InnoDB-4.1.4, August 31, 2004
C.4.3 Changes in MySQL/InnoDB-4.1.3, June 28, 2004
C.4.4 Changes in MySQL/InnoDB-4.1.2, May 30, 2004
C.4.5 Changes in MySQL/InnoDB-4.0.20, May 18, 2004
C.4.6 Changes in MySQL/InnoDB-4.0.19, May 4, 2004
C.4.7 Changes in MySQL/InnoDB-4.0.18, February 13, 2004
C.4.8 Changes in MySQL/InnoDB-5.0.0, December 24, 2003
C.4.9 Changes in MySQL/InnoDB-4.0.17, December 17, 2003
C.4.10 Changes in MySQL/InnoDB-4.1.1, December 4, 2003
C.4.11 Changes in MySQL/InnoDB-4.0.16, October 22, 2003
C.4.12 Changes in MySQL/InnoDB-3.23.58, September 15, 2003
C.4.13 Changes in MySQL/InnoDB-4.0.15, September 10, 2003
C.4.14 Changes in MySQL/InnoDB-4.0.14, July 22, 2003
C.4.15 Changes in MySQL/InnoDB-3.23.57, June 20, 2003
C.4.16 Changes in MySQL/InnoDB-4.0.13, May 20, 2003
C.4.17 Changes in MySQL/InnoDB-4.1.0, April 3, 2003
C.4.18 Changes in MySQL/InnoDB-3.23.56, March 17, 2003
C.4.19 Changes in MySQL/InnoDB-4.0.12, March 18, 2003
C.4.20 Changes in MySQL/InnoDB-4.0.11, February 25, 2003
C.4.21 Changes in MySQL/InnoDB-4.0.10, February 4, 2003
C.4.22 Changes in MySQL/InnoDB-3.23.55, January 24, 2003
C.4.23 Changes in MySQL/InnoDB-4.0.9, January 14, 2003
C.4.24 Changes in MySQL/InnoDB-4.0.8, January 7, 2003
C.4.25 Changes in MySQL/InnoDB-4.0.7, December 26, 2002
C.4.26 Changes in MySQL/InnoDB-4.0.6, December 19, 2002
C.4.27 Changes in MySQL/InnoDB-3.23.54, December 12, 2002
C.4.28 Changes in MySQL/InnoDB-4.0.5, November 18, 2002
C.4.29 Changes in MySQL/InnoDB-3.23.53, October 9, 2002
C.4.30 Changes in MySQL/InnoDB-4.0.4, October 2, 2002
C.4.31 Changes in MySQL/InnoDB-4.0.3, August 28, 2002
C.4.32 Changes in MySQL/InnoDB-3.23.52, August 16, 2002
C.4.33 Changes in MySQL/InnoDB-4.0.2, July 10, 2002
C.4.34 Changes in MySQL/InnoDB-3.23.51, June 12, 2002
C.4.35 Changes in MySQL/InnoDB-3.23.50, April 23, 2002
C.4.36 Changes in MySQL/InnoDB-3.23.49, February 17, 2002
C.4.37 Changes in MySQL/InnoDB-3.23.48, February 9, 2002
C.4.38 Changes in MySQL/InnoDB-3.23.47, December 28, 2001
C.4.39 Changes in MySQL/InnoDB-4.0.1, December 23, 2001
C.4.40 Changes in MySQL/InnoDB-3.23.46, November 30, 2001
C.4.41 Changes in MySQL/InnoDB-3.23.45, November 23, 2001
C.4.42 Changes in MySQL/InnoDB-3.23.44, November 2, 2001
C.4.43 Changes in MySQL/InnoDB-3.23.43, October 4, 2001
C.4.44 Changes in MySQL/InnoDB-3.23.42, September 9, 2001
C.4.45 Changes in MySQL/InnoDB-3.23.41, August 13, 2001
C.4.46 Changes in MySQL/InnoDB-3.23.40, July 16, 2001
C.4.47 Changes in MySQL/InnoDB-3.23.39, June 13, 2001
C.4.48 Changes in MySQL/InnoDB-3.23.38, May 12, 2001
C.5 MySQL Cluster Change History
C.6 MySQL Connector/ODBC Change History
C.7 MySQL Connector/Net Change History
C.8 MySQL Connector/J Change History

This appendix lists the changes from version to version in the MySQL source code through the latest version of MySQL 4.1.

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note that we tend to update the manual at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you can't find on our download page (http://dev.mysql.com/downloads/), it means that the version has not yet been released.

The date mentioned with a release version is the date of the last Bazaar commit on which the release was based, not the date when the packages were made available. The binaries are usually made available a few days after the date of the tagged ChangeSet, because building and testing all packages takes some time.

The manual included in the source and binary distributions may not be fully accurate when it comes to the release changelog entries, because the integration of the manual happens at build time. For the most up-to-date release changelog, please refer to the online version instead.

C.1 Changes in Release 4.1.x (Lifecycle Support Ended)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

The following list summarizes the features in MySQL Server 4.1 that are not present in previous versions. For a full list of changes, please refer to the changelog sections for individual 4.1 releases.

C.1.1 Changes in MySQL 4.1.25 (2008-12-01)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.1 release family.

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 nonempty, 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 linker.

    If the plugin directory is writable by the server, it may be possible for a user to write executable code to a file in the directory using SELECT ... INTO DUMPFILE. This can be prevented by making plugin_dir read only to the server or by setting --secure-file-priv to a directory where SELECT writes can be made safely. (Bug #37428)

Bugs Fixed

  • Security Fix; Important Change: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 4.1.24. 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. (Bug #32167, CVE-2008-2079)

    References: See also Bug #39277.

  • On Windows, the installer attempted to use JScript to determine whether the target data directory already existed. On Windows Vista x64, this resulted in an error because the installer was attempting to run the JScript in a 32-bit engine, which wasn't registered on Vista. The installer no longer uses JScript but instead relies on a native WiX command. (Bug #36103)

  • The Windows installer displayed incorrect product names in some images. (Bug #40845)

  • INSERT INTO ... SELECT caused a crash if innodb_locks_unsafe_for_binlog was enabled. (Bug #27294)

  • The MySQL Instance Configuration Wizard would not permit you to choose a service name, even though the criteria for the service name were valid. The code that checks the name has been updated to support the correct criteria of any string less than 256 character and not containing either a forward or backward slash character. (Bug #27013)

C.1.2 Changes in MySQL 4.1.24 (2008-03-01)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.1 release family.

Functionality Added or Changed

  • The ndbd and ndb_mgmd man pages have been reclassified from volume 1 to volume 8. (Bug #34642)

Bugs Fixed

  • Security Fix; Important Change: It was possible to circumvent privileges through the creation of MyISAM tables employing the DATA DIRECTORY and INDEX DIRECTORY options to overwrite existing table files in the MySQL data directory. Use of the MySQL data directory in DATA DIRECTORY and INDEX DIRECTORY path name is no longer permitted.

    Note

    Additional fixes were made in MySQL 4.1.25.

    (Bug #32167, CVE-2008-2079)

    References: See also Bug #39277.

  • Security Fix: Using 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)

  • Security Fix: A malformed password packet in the connection protocol could cause the server to crash. Thanks for Dormando for reporting this bug, and for providing details and a proof of concept. (Bug #28984, CVE-2007-3780)

  • Security Enhancement: It was possible to force an error message of excessive length which could lead to a buffer overflow. This has been made no longer possible as a security precaution. (Bug #32707)

  • Replication: Connections from one mysqld server to another failed on Mac OS X, affecting replication and FEDERATED tables. (Bug #29083)

    References: See also Bug #26664.

  • An internal buffer in mysql was too short. Overextending it could cause stack problems or segmentation violations on some architectures. (This is not a problem that could be exploited to run arbitrary code.) (Bug #33841)

  • make_binary_distribution passed the --print-libgcc-file option to the C compiler, but this does not work with the ICC compiler. (Bug #33536)

  • Performing a full text search on a table could cause a crash on a 64-bit platforms with certain characteristics. Searches that were known to cause a crash with certain datasets included numeric values and strings where the match string included data enclosed in single or double quotation marks. (Bug #11392)

  • PURGE MASTER LOGS BEFORE (subquery) caused a server crash. Subqueries are forbidden in the BEFORE clause now. (Bug #28553)

  • mysql_setpermission tried to grant global-only privileges at the database level. (Bug #14618)

  • A field packet with NULL fields caused a libmysqlclient crash. (Bug #29494)

  • 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. (Bug #14649)

  • When one thread attempts to lock two (or more) tables and another thread executes a statement that aborts these locks (such as REPAIR TABLE, 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. (Bug #28574)

  • Issuing a DELETE statement having both an ORDER BY clause and a LIMIT clause could cause mysqld to crash. (Bug #30385)

  • If an 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 ''), using ALTER TABLE to modify the column definition caused the 0 values to be given the numeric value of the nonzero '' member. (Bug #29251)

  • The semantics of BIGINT depended on platform-specific characteristics. (Bug #29079)

  • Using up-arrow for command-line recall in mysql could cause a segmentation fault. (Bug #10218)

  • Dropping a user-defined function could cause a server crash if the function was still in use by another thread. (Bug #27564)

  • Adding DISTINCT could cause incorrect rows to appear in a query result. (Bug #29911)

  • In some cases, INSERT INTO ... SELECT ... GROUP BY could insert rows even if the SELECT by itself produced an empty result. (Bug #29717)

  • Error returns from the time() system call were ignored. (Bug #27198)

  • 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)

  • A network structure was initialized incorrectly, leading to embedded server crashes. (Bug #29117)

  • SELECT ... INTO OUTFILE followed by LOAD DATA could result in garbled characters when the FIELDS ENCLOSED BY clause named a delimiter of '0', 'b', 'n', 'r', 't', 'N', or 'Z' due to an interaction of character encoding and doubling for data values containing the enclosed-by character. (Bug #29294)

  • Format strings in English error messages were insufficiently wide for path names printed in those messages by the embedded server. (Bug #16635)

  • On Mac OS X, shared-library installation path names were incorrect. (Bug #28544)

  • For MEMORY tables, DELETE statements that remove rows based on an index read could fail to remove all matching rows. (Bug #30590)

  • For InnoDB tables that use the utf8 character set, incorrect results could occur for DML statements such as DELETE or UPDATE that use an index on character-based columns. (Bug #28878)

    References: See also Bug #29449, Bug #30485, Bug #31395. This bug was introduced by Bug #13195.

  • With small values of myisam_sort_buffer_size, REPAIR TABLE for MyISAM tables could cause a server crash. (Bug #31174)

  • Internal conversion routines could fail for several multi-byte character sets (big5, cp932, euckr, gb2312, sjis) for empty strings or during evaluation of SOUNDS LIKE. (Bug #31069, Bug #31070)

  • Versions of mysqldump from MySQL 4.1 or higher tried to use START TRANSACTION WITH CONSISTENT SNAPSHOT if the --single-transaction and --master-data options were given, even with servers older than 4.1 that do not support consistent snapshots. (Bug #30444)

  • A buffer used when setting variables was not dimensioned to accommodate the trailing '\0' byte, so a single-byte buffer overrun was possible. (Bug #31588)

  • Setting certain values on a table using a spatial index could cause the server to crash. (Bug #30286)

  • The GeomFromText() function could cause a server crash if the first argument was NULL or the empty string. (Bug #30955)

  • The server crashed on optimizations involving a join of INT and MEDIUMINT columns and a system variable in the WHERE clause. (Bug #32103)

  • Full-text searches on ucs2 columns caused a server crash. (FULLTEXT indexes on ucs2 columns cannot be used, but it should be possible to perform IN BOOLEAN MODE searches on ucs2 columns without a crash.) (Bug #31159)

  • For an almost-full MyISAM table, an insert that failed could leave the table in a corrupt state. (Bug #31305)

  • The server could crash during filesort for ORDER BY based on expressions with INET_NTOA() or OCT() if those functions returned NULL. (Bug #31758)

  • myisamchk --unpack could corrupt a table that when unpacked has static (fixed-length) row format. (Bug #31277)

  • Data in BLOB or GEOMETRY columns could be cropped when performing a UNION query. (Bug #31158)

  • Tables with a GEOMETRY column could be marked as corrupt if you added a non-SPATIAL index on a GEOMETRY column. (Bug #30284)

  • On some 64-bit systems, inserting the largest negative value into a BIGINT column resulted in incorrect data. (Bug #30069)

  • With lower_case_table_names set, CREATE TABLE LIKE was treated differently by libmysqld than by the nonembedded server. (Bug #32063)

  • ucs2 does not work as a client character set, but attempts to use it as such were not rejected. Now character_set_client cannot be set to ucs2. This also affects statements such as SET NAMES and SET CHARACTER SET. (Bug #31615)

  • Denormalized double-precision numbers cannot be handled properly by old MIPS processors. For IRIX, this is now handled by enabling a mode to use a software workaround. (Bug #29085)

  • The MySQL preferences pane did not work to start or stop MySQL on Mac OS X 10.5 (Leopard). (Bug #28854)

  • On Mac OS X, the StartupItem for MySQL did not work. (Bug #25008)

C.1.3 Changes in MySQL 4.1.23 (2007-06-12)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.1 release family.

Functionality Added or Changed

  • 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 prepared_stmt_count system variable has been converted to the Prepared_stmt_count global status variable (viewable with the SHOW GLOBAL STATUS statement). (Bug #23159)

  • 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.

  • 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)

  • If the user specified the server options --max-connections=N or --table-cache=M , a warning would be given in some cases that some values were recalculated, with the result that --table-cache could be assigned greater value.

    In such cases, both the warning and the increase in the --table-cache value were completely harmless. Note also that it is not possible for the MySQL Server to predict or to control limitations on the maximum number of open files, since this is determined by the operating system.

    The value of --table-cache is no longer increased automatically, and a warning is now given only if some values had to be decreased due to operating system limits. (Bug #21915)

  • The server now includes a timestamp in error messages that are logged as a result of unhandled signals (such as mysqld got signal 11 messages). (Bug #24878)

  • mysqldump --single-transaction now uses START TRANSACTION /*!40100 WITH CONSISTENT SNAPSHOT */ rather than BEGIN to start a transaction, so that a consistent snapshot will be used on those servers that support it. (Bug #19660)

  • INSERT DELAYED statements on BLACKHOLE tables are now rejected, due to the fact that the BLACKHOLE storage engine does not support them. (Bug #27998)

  • A dependency on the Intel runtime libraries existed in the shared-xxx RPMs for the IA-64 CPU of some versions of MySQL 4.1 (4.1.16, 4.1.20, and 4.1.22). This has been resolved. (Bug #18776)

Bugs Fixed

  • Security Fix: The requirement of the DROP privilege for RENAME TABLE was not enforced. (Bug #27515, CVE-2007-2691)

  • Performance: InnoDB showed substandard performance with multiple queries running concurrently. (Bug #15815)

  • Performance: InnoDB exhibited thread thrashing with more than 50 concurrent connections under an update-intensive workload. (Bug #22868)

  • Incompatible Change: INSERT DELAYED statements are not supported for MERGE tables, but the MERGE storage engine was not rejecting such statements, resulting in table corruption. Applications previously using INSERT DELAYED into MERGE table will break when upgrading to versions with this fix. To avoid the problem, remove DELAYED from such statements. (Bug #26464)

  • 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 4.1 older than 4.1.23 to version 4.1.23 or newer. (Bug #24660)

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

  • MySQL Cluster: The management client command node_id STATUS displayed the message Node node_id: not connected when node_id was not the node ID of a data node.

    Note

    The ALL STATUS command in the cluster management client still displays status information for data nodes only. This is by design. See Section 15.5.2, “Commands in the MySQL Cluster Management Client”, for more information.

    (Bug #21715)

  • MySQL Cluster: When an API node sent more than 1024 signals in a single batch, NDB would process only the first 1024 of these, and then hang. (Bug #28443)

  • Replication: Transient errors in replication from master to slave may trigger multiple Got fatal error 1236: 'binlog truncated in the middle of event' errors on the slave. (Bug #4053)

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

  • Replication: SQL statements close to the size of max_allowed_packet could produce binary log events larger than max_allowed_packet that could not be read by slave servers. (Bug #19402)

  • Replication: GRANT statements were not replicated if the server was started with the --replicate-ignore-table or --replicate-wild-ignore-table option. (Bug #25482)

  • Replication: If a slave server closed its relay log (for example, due to an error during log rotation), the I/O thread did not recognize this and still tried to write to the log, causing a server crash. (Bug #10798)

  • Cluster Replication: Some queries that updated multiple tables were not backed up correctly. (Bug #27748)

  • Cluster API: libndbclient.so was not versioned. (Bug #13522)

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

  • ISNULL(DATE(NULL)) and ISNULL(CAST(NULL AS DATE)) erroneously returned false. (Bug #23938)

  • The error message for error number 137 did not report which database/table combination reported the problem. (Bug #27173)

  • A return value of -1 from user-defined handlers was not handled well and could result in conflicts with server code. (Bug #24987)

  • X() IS NULL and Y() IS NULL comparisons failed when X() and Y() returned NULL. (Bug #26038)

  • DOUBLE values such as 20070202191048.000000 were being treated as illegal arguments by WEEK(). (Bug #23616)

  • The mysqlserver.lib library on Windows had many missing symbols. (Bug #29007)

  • LAST_DAY('0000-00-00') could cause a server crash. (Bug #23653)

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

  • The server could send incorrect column count information to the client for queries that produce a larger number of columns than can fit in a two-byte number. (Bug #19216)

  • 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 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)

  • If elements in a nontop-level IN subquery were accessed by an index and the subquery result set included a NULL value, the quantified predicate that contained the subquery was evaluated to NULL when it should return a non-NULL value. (Bug #23478)

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

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

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

  • If a thread previously serviced a connection that was killed, excessive memory and CPU use by the thread occurred if it later serviced a connection that had to wait for a table lock. (Bug #25966)

  • The MERGE storage engine could return incorrect results when several index values that compare equality were present in an index (for example, 'gross' and 'gross ', which are considered equal but have different lengths). (Bug #24342)

  • If COMPRESS() returned NULL, subsequent invocations of COMPRESS() within a result set or within a trigger also returned NULL. (Bug #23254)

  • 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)

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

  • 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)

  • Duplicate entries were not assessed correctly in a MEMORY table with a BTREE primary key on a utf8 ENUM column. (Bug #24985)

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

  • 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.

    Re-execution of CREATE DATABASE, CREATE TABLE, and ALTER TABLE statements as prepared statements also caused incorrect results or crashes. (Bug #4968, Bug #6895, Bug #19182, Bug #19733, Bug #22060, Bug #24879)

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

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

  • The arguments to the ENCODE() and the DECODE() functions were not printed correctly, causing problems in the output of EXPLAIN EXTENDED and in view definitions. (Bug #23409)

  • Passing nested row expressions with different structures to an IN predicate caused a server crash. (Bug #27484)

  • For MyISAM tables, COUNT(*) could return an incorrect value if the WHERE clause compared an indexed TEXT column to the empty string (''). This happened if the column contained empty strings and also strings starting with control characters such as tab or newline. (Bug #26231)

  • If an ORDER BY or GROUP BY list included a constant expression being optimized away and, at the same time, containing single-row subselects that returned more that one row, no error was reported. If a query required sorting by expressions containing single-row subselects that returned more than one row, execution of the query could cause a server crash. (Bug #24653)

  • The return value from my_seek() was ignored. (Bug #22828)

  • The second execution of a prepared statement from a UNION query with ORDER BY RAND() caused the server to crash. (Bug #27937)

  • LOAD DATA INFILE sent an okay to the client before writing the binary log and committing the changes to the table had finished, thus violating ACID requirements. (Bug #26050)

  • NOW() returned the wrong value in statements executed at server startup with the --init-file option. (Bug #23240)

  • The fix for Bug #17212 provided correct sort order for misordered output of certain queries, but caused significant overall query performance degradation. (Results were correct (good), but returned much more slowly (bad).) The fix also affected performance of queries for which results were correct. The performance degradation has been addressed. (Bug #27531)

  • mysql_stmt_fetch() did an invalid memory deallocation when used with the embedded server. (Bug #25492)

  • For not-yet-authenticated connections, the Time column in SHOW PROCESSLIST was a random value rather than NULL. (Bug #23379)

  • The Handler_rollback status variable sometimes was incremented when no rollback had taken place. (Bug #22728)

  • 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'.

    Note

    This fix was reverted in MySQL 4.1.24.

    (Bug #21789)

    References: See also Bug #25301.

  • The creation of MySQL system tables was not checked for by mysql-test-run.pl. (Bug #20166)

  • For ODBC compatibility, MySQL supports use of WHERE col_name IS NULL for DATE or DATETIME columns that are NOT NULL, to permit column values of '0000-00-00' or '0000-00-00 00:00:00' to be selected. However, this was not working for WHERE clauses in DELETE statements. (Bug #23412)

  • For MERGE tables defined on underlying tables that contained a short VARCHAR column (shorter than four characters), using ALTER TABLE on at least one but not all of the underlying tables caused the table definitions to be considered different from that of the MERGE table, even if the ALTER TABLE did not change the definition.

    In addition, when the underlying tables contained a TINYINT or CHAR(1) column, the MERGE storage engine incorrectly reported that they differed from the MERGE table in certain cases. (Bug #26881)

  • For BOOLEAN mode full-text searches on nonindexed columns, NULL rows generated by a LEFT JOIN caused incorrect query results. (Bug #14708, Bug #25637)

  • Lack of validation for input and output TIME values resulted in several problems: SEC_TO_TIME() in some cases did not clip large values to the TIME range appropriately; SEC_TO_TIME() treated BIGINT UNSIGNED values as signed; only truncation warnings were produced when both truncation and out-of-range TIME values occurred. (Bug #11655, Bug #20927)

  • Using CAST() to convert DATETIME values to numeric values did not work. (Bug #23656)

  • A reference to a nonexistent column in the ORDER BY clause of an UPDATE ... ORDER BY statement could cause a server crash. (Bug #25126)

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

  • 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)

  • Metadata for columns calculated from scalar subqueries was limited to integer, double, or string, even if the actual type of the column was different. (Bug #11032)

  • The result set of a query that used WITH ROLLUP and DISTINCT could lack some rollup rows (rows with NULL values for grouping attributes) if the GROUP BY list contained constant expressions. (Bug #24856)

  • 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)

  • Added support for --debugger=dbx for mysql-test-run.pl and added support for --debugger=devenv, --debugger=DevEnv, and --debugger=/path/to/devenv. (Bug #26792)

  • There was a race condition in the InnoDB fil_flush_file_spaces() function. (Bug #24089)

    References: This bug was introduced by Bug #15653.

  • EXPLAIN for a query on an empty table immediately after its creation could result in a server crash. (Bug #28272)

  • MySQL failed to build on Linux/Alpha. (Bug #23256)

    References: This bug was introduced by Bug #21250.

  • Running CHECK TABLE concurrently with a SELECT, INSERT or other statement on Windows could corrupt a MyISAM table. (Bug #25712)

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

  • 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)

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

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

  • mysql-test-run did not work correctly for RPM-based installations. (Bug #17194)

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

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

  • Trailing spaces were not removed from Unicode CHAR column values when used in indexes. This resulted in excessive usage of storage space, and could affect the results of some ORDER BY queries that made use of such indexes.

    Note

    When upgrading, it is necessary to re-create any existing indexes on Unicode CHAR columns of each affected table to take advantage of the fix. See Section 2.11.4, “Rebuilding or Repairing Tables or Indexes”.

    (Bug #22052)

  • Incorrect results could be returned for some queries that contained a select list expression with IN or BETWEEN together with an ORDER BY or GROUP BY on the same expression using NOT IN or NOT BETWEEN. (Bug #27532)

  • Index hints (USE INDEX, IGNORE INDEX, FORCE INDEX) cannot be used with FULLTEXT indexes, but were not being ignored. (Bug #25951)

  • Changes to some system variables should invalidate statements in the query cache, but invalidation did not happen. (Bug #27792)

  • Queries using a column alias in an expression as part of an ORDER BY clause failed, an example of such a query being SELECT mycol + 1 AS mynum FROM mytable ORDER BY 30 - mynum. (Bug #22457)

  • The range optimizer could consume a combinatorial amount of memory for certain classes of WHERE clauses. (Bug #26624)

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

  • The InnoDB parser sometimes did not account for null bytes, causing spurious failure of some queries. (Bug #25596)

  • Storing NULL values in spatial fields caused excessive memory allocation and crashes on some systems. (Bug #27164)

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

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

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

  • In a MEMORY table, using a BTREE index to scan for updatable rows could lead to an infinite loop. (Bug #26996)

  • The range optimizer could cause the server to run out of memory. (Bug #26625)

  • Storing values specified as hexadecimal values 64 or more bits long into BIGINT or BIGINT UNSIGNED columns did not raise any warning or error if the value was out of range. (Bug #22533)

  • The number of setsockopt() calls performed for reads and writes to the network socket was reduced to decrease system call overhead. (Bug #22943)

  • mysql did not check for errors when fetching data during result set printing. (Bug #22913)

  • 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)

  • IN() and CHAR() can return NULL, but did not signal that to the query processor, causing incorrect results for IS NULL operations. (Bug #17047)

  • For ALTER TABLE, using ORDER BY expression could cause a server crash. Now the ORDER BY clause permits only column names to be specified as sort criteria (which was the only documented syntax, anyway). (Bug #24562)

  • ORDER BY values of the DOUBLE or DECIMAL types could change the result returned by a query. (Bug #19690)

  • 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)

  • 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)

  • Difficult repair or optimization operations could cause an assertion failure, resulting in a server crash. (Bug #25289)

  • The stack size for NetWare binaries was increased to 128KB to prevent problems caused by insufficient stack size. (Bug #23504)

  • 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)

  • Foreign key identifiers for InnoDB tables could not contain certain characters. (Bug #24299)

  • Some long error messages were printed incorrectly. (Bug #20710)

  • Conversion of DATETIME values in numeric contexts sometimes did not produce a double (YYYYMMDDHHMMSS.uuuuuu) value. (Bug #16546)

  • Comparisons using row constructors could fail for rows containing NULL values. (Bug #27704)

  • Through the C API, the member strings in MYSQL_FIELD for a query that contained expressions could return incorrect results. (Bug #21635)

  • Range searches on columns with an index prefix could miss records. (Bug #20732)

  • perror crashed on some platforms due to failure to handle a NULL pointer. (Bug #25344)

  • mysql would lose its connection to the server if its standard output was not writable. (Bug #17583)

  • INSERT...ON DUPLICATE KEY UPDATE could cause Error 1032: Can't find record in ... for inserts into an InnoDB table unique index using key column prefixes with an underlying utf8 string column. (Bug #13191)

  • In certain cases it could happen that deleting a row corrupted an RTREE index. This affected indexes on spatial columns. (Bug #25673)

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

    References: See also Bug #32898.

  • 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)

  • Certain joins using Range checked for each record in the query execution plan could cause the server to crash. (Bug #24776)

  • The server might fail to use an appropriate index for DELETE when ORDER BY, LIMIT, and a nonrestricting WHERE are present. (Bug #17711)

  • Adding a day, month, or year interval to a DATE value produced a DATE, but adding a week interval produced a DATETIME value. Now all produce a DATE value. (Bug #21811)

C.1.4 Changes in MySQL 4.1.22 (2006-11-02)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.1 release family.

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 (http://www.mysql.com/products/enterprise).

Functionality Added or Changed

  • The LOAD DATA FROM MASTER and LOAD TABLE FROM MASTER statements are deprecated. See Section 12.5.2.2, “LOAD DATA FROM MASTER Syntax”, for recommended alternatives. (Bug #9125, Bug #20596, Bug #14399, Bug #12187, Bug #15025, Bug #18822)

  • The mysqld man page has been reclassified from volume 1 to volume 8. (Bug #21220)

  • MySQL did not properly do stack dumps on x86_64 and i386/NPTL systems. (Note that the initial fix for this problem was discovered not to be correct. Further work on the problem was undertaken only for MySQL 5.1 and up. See Bug #31891.) (Bug #21250)

  • A warning now is issued if the client attempts to set the sql_log_off variable without the SUPER privilege. (Bug #16180)

Bugs Fixed

  • Packaging; MySQL Cluster: The ndb_mgm program was included in both the MySQL-ndb-tools and MySQL-ndb-management RPM packages, resulting in a conflict if both were installed. Now ndb_mgm is included only in MySQL-ndb-tools. (Bug #21058)

  • MySQL Cluster: When inserting a row into an NDB table with a duplicate value for a nonprimary unique key, the error issued would reference the wrong key. (Bug #21072)

  • MySQL Cluster: In some situations with a high disk-load, writing of the redo log could hang, causing a crash with the error message GCP STOP detected. (Bug #20904)

  • MySQL Cluster: Multiple node restarts in rapid succession could cause a system restart to fail , or induce a race condition. (Bug #22892, Bug #23210)

  • MySQL Cluster: The output for the --help option used with NDB executable programs (such as ndbd, ndb_mgm, ndb_restore, ndb_config, and others mentioned in Section 15.4, “MySQL Cluster Programs”) referred to the Ndb.cfg file, instead of to my.cnf. (Bug #21585)

  • MySQL Cluster: ndb_size.pl and ndb_error_reporter were missing from RPM packages. (Bug #20426)

  • MySQL Cluster: The failure of a unique index read due to an invalid schema version could be handled incorrectly in some cases, leading to unpredictable results. (Bug #21384)

  • MySQL Cluster: The ndb_mgm management client did not set the exit status on errors, always returning 0 instead. (Bug #21530)

  • MySQL Cluster: Under some circumstances, local checkpointing would hang, keeping any unstarted nodes from being started. (Bug #20895)

  • MySQL Cluster: Setting TransactionDeadlockDetectionTimeout to a value greater than 12000 would cause scans to deadlock, time out, fail to release scan records, until the cluster ran out of scan records and stopped processing. (Bug #21800)

  • MySQL Cluster: Some queries involving joins on very large NDB tables could crash the MySQL server. (Bug #21059)

  • MySQL Cluster: A partial rollback could lead to node restart failures. (Bug #21536)

  • MySQL Cluster: If a node restart could not be performed from the REDO log, no node takeover took place. This could cause partitions to be left empty during a system restart. (Bug #22893)

  • MySQL Cluster: The ndb_size.pl script did not account for TEXT and BLOB column values correctly. (Bug #21204)

  • MySQL Cluster: Attempting to create an NDB table on a MySQL with an existing non-Cluster table with the same name in the same database could result in data loss or corruption. MySQL now issues a warning when a SHOW TABLES or other statement causing table discovery finds such a table. (Bug #21378)

  • MySQL Cluster: INSERT ... ON DUPLICATE KEY UPDATE on an NDB table could lead to deadlocks and memory leaks. (Bug #23200)

  • MySQL Cluster: The server provided a nondescriptive error message when encountering a fatally corrupted REDO log. (Bug #21615)

  • MySQL Cluster: ndb_restore did not always make clear that it had recovered successfully from temporary errors while restoring a cluster backup. (Bug #19651)

  • MySQL Cluster: Cluster logs were not rotated following the first rotation cycle. (Bug #21345)

  • MySQL Cluster: When the redo buffer ran out of space, a Pointer too large error was raised and the cluster could become unusable until restarted with --initial. (Bug #20892)

  • MySQL Cluster: Backup of a cluster failed if there were any tables with 128 or more columns. (Bug #23502)

  • MySQL Cluster: A problem with takeover during a system restart caused ordered indexes to be rebuilt incorrectly. (Bug #15303)

  • MySQL Cluster: In some cases where SELECT COUNT(*) from an NDB table should have yielded an error, MAX_INT was returned instead. (Bug #19914)

  • MySQL Cluster: (NDB API): Attempting to read a nonexistent tuple using Commit mode for NdbTransaction::execute() caused node failures. (Bug #22672)

  • MySQL Cluster: SELECT ... FOR UPDATE failed to lock the selected rows. (Bug #18184)

  • MySQL Cluster: The node recovery algorithm was missing a version check for tables in the ALTER_TABLE_COMMITTED state (as opposed to the TABLE_ADD_COMMITTED state, which has the version check). This could cause inconsistent schemas across nodes following node recovery. (Bug #21756)

  • MySQL Cluster: In a cluster with more than 2 replicas, a manual restart of one of the data nodes could fail and cause the other nodes in the same node group to shut down. (Bug #21213)

  • MySQL Cluster: The server failed with a nondescriptive error message when out of data memory. (Bug #18475)

  • Using ALTER TABLE to add an ENUM column with an enumeration value containing 0xFF caused the name of the first table column to be lost. (Bug #20922)

  • SUBSTRING() results sometimes were stored improperly into a temporary table when multi-byte character sets were used. (Bug #20204)

  • mysql_install_db incorrectly had an empty first line. (Bug #20721)

  • The optimizer could produce an incorrect result after AND with collations such as latin1_german2_ci, utf8_czech_ci, and utf8_lithuanian_ci. (Bug #9509)

  • If a column definition contained a character set declaration, but a DEFAULT value began with an introducer, the introducer character set was used as the column character set. (Bug #20695)

  • User names have a maximum length of 16 characters (even if they contain multi-byte characters), but were being truncated to 16 bytes. (Bug #20393)

  • PROCEDURE ANALYSE() returned incorrect values of M FLOAT(M, D) and DOUBLE(M, D). (Bug #20305)

  • For a MyISAM table with a FULLTEXT index, compression with myisampack or a check with myisamchk after compression resulted in table corruption. (Bug #19702)

  • A query using WHERE column = constant OR column IS NULL did not return consistent results on successive invocations. The column in each part of the WHERE clause could be either the same column, or two different columns, for the effect to be observed. (Bug #21019)

  • mysqld --flush failed to flush MyISAM table changes to disk following an UPDATE statement for which no updated column had an index. (Bug #20060)

  • For TIME_FORMAT(), the %H and %k format specifiers can return values larger than two digits (if the hour is greater than 99), but for some query results that contained three-character hours, column values were truncated. (Bug #19844)

  • A subquery that uses an index for both the WHERE and ORDER BY clauses produced an empty result. (Bug #21180)

  • Some Linux-x86_64-icc packages (of previous releases) mistakenly contained 32-bit binaries. Only ICC builds are affected, not gcc builds. Solaris and FreeBSD x86_64 builds are not affected. (Bug #22238)

  • Redundant binary log LAST_INSERT_ID events could be generated; LAST_INSERT_ID(expr) did not return the value of expr; LAST_INSERT_ID() could return the value generated by the current statement if the call occurred after value generation, as in:

    CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY, j INT);
    INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID());
    

    (Bug #21726)

  • A query that used GROUP BY and an ALL or ANY quantified subquery in a HAVING clause could trigger an assertion failure. (Bug #21853)

  • EXPORT_SET() did not accept arguments with coercible character sets. (Bug #21531)

  • The source distribution failed to compile when configured with the --without-geometry option. (Bug #12991)

  • For INSERT ... ON DUPLICATE KEY UPDATE, use of VALUES(col_name) within the UPDATE clause sometimes was handled incorrectly. (Bug #21555)

  • When using tables containing VARCHAR columns created under MySQL 4.1 with a 5.0 or later server, for some queries the metadata sent to the client could have an empty column name. (Bug #14897)

  • Incorporated portability fixes into the definition of __attribute__ in my_global.h. (Bug #2717)

  • Under heavy load (executing more than 1024 simultaneous complex queries), a problem in the code that handles internal temporary tables could lead to writing beyond allocated space and memory corruption. (Bug #21206)

  • The --collation-server server option was being ignored. With the fix, if you choose a nondefault character set with --character-set-server, you should also use --collation-server to specify the collation. (Bug #15276)

  • On Mac OS X, zero-byte read() or write() calls to an SMB-mounted file system could return a nonstandard return value, leading to data corruption. Now such calls are avoided. (Bug #12620)

  • LIKE searches failed for indexed utf8 character columns. (Bug #20471)

  • The MD5(), SHA1(), and ENCRYPT() functions should return a binary string, but the result sometimes was converted to the character set of the argument. MAKE_SET() and EXPORT_SET() now use the correct character set for their default separators, resulting in consistent result strings which can be coerced according to normal character set rules. (Bug #20536)

  • Certain malformed INSERT statements could crash the mysql client. (Bug #21142)

  • Entries in the slow query log could have an incorrect Rows_examined value. (Bug #12240)

  • The result for CAST() when casting a value to UNSIGNED was limited to the maximum signed BIGINT value (9223372036854775808), rather than the maximum unsigned value (18446744073709551615). (Bug #8663)

  • Using the extended syntax for TRIM()—that is, TRIM(... FROM ...)—in a SELECT statement defining a view caused an invalid syntax error when selecting from the view. (Bug #17526)

  • OPTIMIZE TABLE with myisam_repair_threads > 1 could result in MyISAM table corruption. (Bug #8283)

  • WITH ROLLUP could group unequal values. (Bug #20825)

  • REPAIR TABLE ... USE_FRM could cause a server crash or hang when used for a MyISAM table in a database other than the default database. (Bug #22562)

  • Insufficient memory (myisam_sort_buffer_size) could cause a server crash for several operations on MyISAM tables: repair table, create index by sort, repair by sort, parallel repair, bulk insert. (Bug #23175)

  • Execution of a prepared statement that uses an IN subquery with aggregate functions in the HAVING clause could cause a server crash. (Bug #22085)

  • The myisam_stats_method variable was mishandled when set from an option file or on the command line. (Bug #21054)

  • Using ANY with nontable subqueries such as SELECT 1 yielded incorrect results under certain circumstances due to incorrect application of MIN()/MAX() optimization. (Bug #16302)

  • For cross-database multiple-table UPDATE statements, a user with all privileges for the default database could update tables in another database for which the user did not have UPDATE privileges. (Bug #7391)

  • Adding ORDER BY to a SELECT DISTINCT(expr) query could produce incorrect results. (Bug #21456)

  • COUNT(*) queries with ORDER BY and LIMIT could return the wrong result.

    Note

    This problem was introduced by the fix for Bug #9676, which limited the rows stored in a temporary table to the LIMIT clause. This optimization is not applicable to nongroup queries with aggregate functions. The current fix disables the optimization in such cases.

    (Bug #21787)

  • Conversion of TIMESTAMP values between UTC and the local time zone resulted in some values having the year 2069 rather than 1969. (Bug #16327)

  • DELETE IGNORE could hang for foreign key parent deletes. (Bug #18819)

  • A query using WHERE NOT (column < ANY (subquery)) yielded a different result from the same query using the same column and subquery with WHERE (column > ANY (subquery)). (Bug #20975)

  • Creating a TEMPORARY table with the same name as an existing table that was locked by another client could result in a lock conflict for DROP TEMPORARY TABLE because the server unnecessarily tried to acquire a name lock. (Bug #21096)

  • FROM_UNIXTIME() did not accept arguments up to POWER(2,31)-1, which it had previously. (Bug #9191)

  • libmysqld returned TEXT columns to the client as number of bytes, not number of characters (which can be different for multi-byte character sets). (Bug #19983)

  • A literal string in a GROUP BY clause could be interpreted as a column name. (Bug #14019)

  • The --with-collation option was not honored for client connections. (Bug #7192)

  • A patch fixing the omission of leading zeros in dates in MySQL 4.1.21 was reverted.

    References: The patch for the following bug was reverted: Bug #16377.

  • Multiple invocations of the REVERSE() function could return different results. (Bug #18243)

  • Within a prepared statement, SELECT (COUNT(*) = 1) (or similar use of other aggregate functions) did not return the correct result for statement re-execution. (Bug #21354)

  • Running SHOW MASTER LOGS at the same time as binary log files were being switched would cause mysqld to hang. (Bug #21965)

  • For multiple-table UPDATE statements, storage engines were not notified of duplicate-key errors. (Bug #21381)

  • A subquery in the WHERE clause of the outer query and using IN and GROUP BY returned an incorrect result. (Bug #16255)

  • A server or network failure with an open client connection would cause the client to hang even though the server was no longer available.

    As a result of this change, the MYSQL_OPT_READ_TIMEOUT and MYSQL_OPT_WRITE_TIMEOUT options for mysql_options() now apply to TCP/IP connections on all platforms. Previously, they applied only to Windows. (Bug #9678)

  • DELETE with WHERE condition on a BTREE-indexed column for a MEMORY table deleted only the first matched row. (Bug #9719)

  • Using aggregate functions in subqueries yielded incorrect results under certain circumstances due to incorrect application of MIN()/MAX() optimization. (Bug #20792)

  • Deleting entries from a large MyISAM index could cause index corruption when it needed to shrink. Deletes from an index can happen when a record is deleted, when a key changes and must be moved, and when a key must be un-inserted because of a duplicate key. This can also happen in REPAIR TABLE when a duplicate key is found and in myisamchk when sorting the records by an index. (Bug #22384)

  • For an ENUM column that used the ucs2 character set, using ALTER TABLE to modify the column definition caused the default value to be lost. (Bug #20108)

  • The server returns a more informative error message when it attempts to open a MERGE table that has been defined to use non-MyISAM tables. (Bug #10974)

  • libmysqld produced some warnings to stderr which could not be silenced. These warnings now are suppressed. (Bug #13717)

  • Character set collation was ignored in GROUP BY clauses. (Bug #20709)

  • Use of the join cache in favor of an index for ORDER BY operations could cause incorrect result sorting. (Bug #17212)

  • The optimizer sometimes mishandled R-tree indexes for GEOMETRY data types, resulting in a server crash. (Bug #21888)

  • Views could not be updated within a stored function or trigger. (Bug #17591)

  • Setting myisam_repair_threads caused any repair operation on a MyISAM table to fail to update the cardinality of indexes, instead making them always equal to 1. (Bug #18874)

  • Table aliases in multiple-table DELETE statements sometimes were not resolved. (Bug #21392)

  • Parallel builds occasionally failed on Solaris. (Bug #16282)

  • On 64-bit systems, use of the cp1250 character set with a primary key column in a LIKE clause caused a server crash for patterns having letters in the range 128..255. (Bug #19741)

  • The use of WHERE col_name IS NULL in SELECT statements reset the value of LAST_INSERT_ID() to zero. (Bug #14553)

  • For table-format output, mysql did not always calculate columns widths correctly for columns containing multi-byte characters in the column name or contents. (Bug #17939)

  • The build process incorrectly tried to overwrite sql/lex_hash.h. This caused the build to fail when using a shadow link tree pointing to original sources that were owned by another account. (Bug #18888)

  • Selecting from a MERGE table could result in a server crash if the underlying tables had fewer indexes than the MERGE table itself. (Bug #21617, Bug #22937)

  • character_set_results can be NULL to signify no conversion, but some code did not check for NULL, resulting in a server crash. (Bug #21913)

  • Using > ALL with subqueries that return no rows yielded incorrect results under certain circumstances due to incorrect application of MIN()/MAX() optimization. (Bug #18503)

  • For InnoDB tables, the server could crash when executing NOT IN(...) subqueries. (Bug #21077)

  • Under certain circumstances, AVG(key_val) returned a value but MAX(key_val) returned an empty set due to incorrect application of MIN()/MAX() optimization. (Bug #20954)

  • In the package of pre-built time zone tables that is available for download at http://dev.mysql.com/downloads/timezones.html, the tables now explicitly use the utf8 character set so that they work the same way regardless of the system character set value. (Bug #21208)

  • Queries containing a subquery that used aggregate functions could return incorrect results. (Bug #16792)

C.1.5 Changes in MySQL 4.1.21 (2006-07-19)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.1 release family.

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 (http://www.mysql.com/products/enterprise).

Functionality Added or Changed

  • For a table with an AUTO_INCREMENT column, SHOW CREATE TABLE now shows the next AUTO_INCREMENT value to be generated. (Bug #19025)

  • The mysqldumpslow script has been moved from client RPM packages to server RPM packages. This corrects a problem where mysqldumpslow could not be used with a client-only RPM install, because it depends on my_print_defaults which is in the server RPM. (Bug #20216)

  • Added the --set-charset option to mysqlbinlog to enable the character set to be specified for processing binary log files. (Bug #18351)

  • For spatial data types, the server formerly returned these as VARSTRING values with a binary collation. Now the server returns spatial values as BLOB values. (Bug #10166)

  • A new system variable, lc_time_names, specifies the locale that controls the language used to display day and month names and abbreviations. This variable affects the output from the DATE_FORMAT(), DAYNAME() and MONTHNAME() functions. See Section 9.8, “MySQL Server Locale Support”.

Bugs Fixed

  • Security Fix: If a user has access to MyISAM table t, that user can create a MERGE table m that accesses t. However, if the user's privileges on t are subsequently revoked, the user can continue to access t by doing so through m. If this behavior is undesirable, you can start the server with the new --skip-merge option to disable the MERGE storage engine. (Bug #15195, CVE-2006-4031)

  • Security Fix: Invalid arguments to DATE_FORMAT() caused a server crash. Thanks to Jean-David Maillefer for discovering and reporting this problem to the Debian project and to Christian Hammers from the Debian Team for notifying us of it. (Bug #20729, CVE-2006-3469)

  • Security Fix: On Linux, and possibly other platforms using case-sensitive file systems, it was possible for a user granted rights on a database to create or access a database whose name differed only from that of the first by the case of one or more letters. (Bug #17647, CVE-2006-4226)

  • MySQL Cluster: Resources for unique indexes on Cluster table columns were incorrectly allocated, so that only one-fourth as many unique indexes as indicated by the value of UniqueHashIndexes could be created. (Bug #19623)

  • MySQL Cluster: It was possible to use port numbers greater than 65535 for ServerPort in the config.ini file. (Bug #19164)

  • MySQL Cluster: Repeated use of the SHOW and ALL STATUS commands in the ndb_mgm client could cause the mgmd process to crash. (Bug #18591)

  • MySQL Cluster: Renaming a table in such a way as to move it to a different database failed to move the table's indexes. (Bug #19967)

  • MySQL Cluster: Using stale mysqld .frm files could cause a newly restored cluster to fail. This situation could arise when restarting a MySQL Cluster using the --initial option while leaving connected mysqld processes running. (Bug #16875)

  • MySQL Cluster: A problem with error handling when ndb_use_exact_count was enabled could lead to incorrect values returned from queries using COUNT(). A warning is now returned in such cases. (Bug #19202)

  • MySQL Cluster: A Cluster whose storage nodes were installed from the MySQL-ndb-storage-* RPMs could not perform CREATE or ALTER operations that made use of nondefault character sets or collations. (Bug #14918)

  • MySQL Cluster: The failure of a data node when preparing to commit a transaction (that is, while the node's status was CS_PREPARE_TO_COMMIT) could cause the failure of other cluster data nodes. (Bug #20185)

  • MySQL Cluster: Data node failures could cause excessive CPU usage by ndb_mgmd. (Bug #13987)

  • MySQL Cluster: A node failure during a scan could sometime cause the node to crash when restarting too quickly following the failure. (Bug #20197)

  • MySQL Cluster: Some queries having a WHERE clause of the form c1=val1 OR c2 LIKE 'val2' were not evaluated correctly. (Bug #17421)

  • MySQL Cluster: TRUNCATE TABLE failed on tables having BLOB or TEXT columns with the error Lock wait timeout exceeded. (Bug #19201)

  • MySQL Cluster: An issue with ndb_mgmd prevented more than 27 mysqld processes from connecting to a single cluster at one time. (Bug #17150)

  • MySQL Cluster: The ndb_mgm client command ALL CLUSTERLOG STATISTICS=15 had no effect. (Bug #20336)

  • MySQL Cluster: LOAD DATA LOCAL failed to ignore duplicate keys in Cluster tables. (Bug #19496)

  • MySQL Cluster: The repeated creating and dropping of a table would eventually lead to NDB Error 826, Too many tables and attributes ... Insufficient space. (Bug #20847)

  • MySQL Cluster: The cluster's data nodes failed while trying to load data when NoOfFrangmentLogFiles was set equal to 1. (Bug #19894)

  • MySQL Cluster: TRUNCATE TABLE failed to reset the AUTO_INCREMENT counter. (Bug #18864)

  • MySQL Cluster: When attempting to restart the cluster following a data import, the cluster failed during Phase 4 of the restart with Error 2334: Job buffer congestion. (Bug #20774)

  • MySQL Cluster: Repeated CREATE - INSERT - DROP operations on tables could in some circumstances cause the MySQL table definition cache to become corrupt, so that some mysqld processes could access table information but others could not. (Bug #18595)

  • Replication: The binary log would create an incorrect DROP query when creating temporary tables during replication. (Bug #17263)

  • Cluster API: On big-endian platforms, NdbOperation::write_attr() did not update 32-bit fields correctly. (Bug #19537)

  • Checking a MyISAM table (using CHECK TABLE) having a spatial index and only one row would wrongly indicate that the table was corrupted. (Bug #17877)

  • Use of MIN() or MAX() with GROUP BY on a ucs2 column could cause a server crash. (Bug #20076)

  • Multiple-table DELETE statements containing a subquery that selected from one of the tables being modified caused a server crash. (Bug #19225)

  • Concatenating the results of multiple constant subselects produced incorrect results. (Bug #16716)

  • ANALYZE TABLE for TEMPORARY tables had no effect. (Bug #15225)

  • The fill_help_tables.sql file did not contain a SET NAMES 'utf8' statement to indicate its encoding. This caused problems for some settings of the MySQL character set such as big5. (Bug #20551)

  • The binary log lacked character set information for table names when dropping temporary tables. (Bug #14157)

  • mysqldump did not respect the order of tables named with the --tables option. (Bug #18536)

  • For a reference to a nonexistent index in FORCE INDEX, the error message referred to a column, not an index. (Bug #17873)

  • DATE_ADD() and DATE_SUB() returned NULL when the result date was on the day '9999-12-31'. (Bug #12356)

  • The DATA DIRECTORY table option did not work for TEMPORARY tables. (Bug #8706)

  • The ARCHIVE storage engine does not support TRUNCATE TABLE, but the server was not returning an appropriate error when truncation of an ARCHIVE table was attempted. (Bug #15558)

  • Improper character set initialization in the embedded server could result in a server crash. (Bug #20318)

  • For a DATE parameter sent using a MYSQL_TIME data structure, mysql_stmt_execute() zeroed the hour, minute, and second members of the structure rather than treating them as read only. (Bug #20152)

  • Certain queries having a WHERE clause that included conditions on multi-part keys with more than 2 key parts could produce incorrect results and send [Note] Use_count: Wrong count for key at... messages to STDERR. (Bug #16168)

  • InnoDB unlocked its data directory before committing a transaction, potentially resulting in nonrecoverable tables if a server crash occurred before the commit. (Bug #19727)

  • Invalid escape sequences in option files caused MySQL programs that read them to abort. (Bug #15328)

  • Queries using an indexed column as the argument for the MIN() and MAX() functions following an ALTER TABLE .. DISABLE KEYS statement returned Got error 124 from storage engine until ALTER TABLE ... ENABLE KEYS was run on the table. (Bug #20357)

  • For very complex SELECT statements could create temporary tables that were too large, and for which the temporary files were not removed, causing subsequent queries to fail. (Bug #11824)

  • For SELECT ... FOR UPDATE statements that used DISTINCT or GROUP BY over all key parts of a unique index (or primary key), the optimizer unnecessarily created a temporary table, thus losing the linkage to the underlying unique index values. This caused a Result set not updatable error. (The temporary table is unnecessary because under these circumstances the distinct or grouped columns must also be unique.) (Bug #16458)

  • IS_USED_LOCK() could return an incorrect connection identifier. (Bug #16501)

  • The server no longer uses a signal handler for signal 0 because it could cause a crash on some platforms. (Bug #15869)

  • A statement containing GROUP BY and HAVING clauses could return incorrect results when the HAVING clause contained logic that returned FALSE for every row. (Bug #14927)

  • The use of MIN() and MAX() on columns with an index prefix produced incorrect results in some queries. (Bug #18206)

  • INSERT INTO ... SELECT ... LIMIT 1 could be slow because the LIMIT was ignored when selecting candidate rows. (Bug #9676)

  • InnoDB failed to increment the handler_read_prev counter. (Bug #19542)

  • An invalid comparison between keys with index prefixes over multi-byte character fields could lead to incorrect result sets if the selected query execution plan used a range scan by an index prefix over a UTF8 character field. This also caused incorrect results under similar circumstances with many other character sets. (Bug #14896)

  • Closing of temporary tables failed if binary logging was not enabled. (Bug #20919)

  • An update that used a join of a table to itself and modified the table on both sides of the join reported the table as crashed. (Bug #18036)

  • The MD5() and SHA() functions treat their arguments as case-sensitive strings. But when they are compared, their arguments were compared as case-insensitive strings, which leads to two function calls with different arguments (and thus different results) compared as being identical. This can lead to a wrong decision made in the range optimizer and thus to an incorrect result set. (Bug #15351)

  • Using SELECT and a table join while running a concurrent INSERT operation would join incorrect rows. (Bug #14400)

  • The fill_help_tables.sql file did not load properly if the ANSI_QUOTES SQL mode was enabled. (Bug #20542)

  • The MySQL server startup script /etc/init.d/mysql (created from mysql.server) is now marked to ensure that the system services ypbind, nscd, ldap, and NTP are started first (if these are configured on the machine). (Bug #18810)

  • The ref optimizer could choose the ref_or_null access method in cases where it was not applicable. This could cause inconsistent EXPLAIN or SELECT results for a given statement. (Bug #16798)

  • The mysql client did not understand help commands that had spaces at the end. (Bug #20328)

  • Concurrent reading and writing of privilege structures could crash the server. (Bug #16372)

  • Slave SQL thread cleanup was not handled properly on Mac OS X when a statement was killed, resulting in a slave crash. (Bug #16900)

  • When mysqldump disabled keys and locked a MyISAM table, the lock operation happened second. If another client performed a query on the table in the interim, it could take a long time due to indexes not being used. Now the lock operation happens first. (Bug #15977)

  • LOAD_FILE() returned an error if the file did not exist, rather than NULL as it should according to the manual. (Bug #10418)

  • SHOW CREATE TABLE did not display the AUTO_INCREMENT column attribute if the SQL mode was MYSQL323 or MYSQL40. This also affected mysqldump, which uses SHOW CREATE TABLE to get table definitions. (Bug #14515)

  • The mysql client did not ignore client-specific commands (such as use or help) that occurred as the first word on a line within multiple-line /* ... */ comments. (Bug #20432)

  • A number of dependency issues in the RPM bench and test packages caused installation of these packages to fail. (Bug #20078)

  • In a multiple-row INSERT statement, LAST_INSERT_ID() should return the same value for each row. However, in some cases, the value could change if the table being inserted into had its own AUTO_INCREMENT column. (Bug #6880)

  • Some memory leaks in the libmysqld embedded server were corrected. (Bug #16017)

  • Some queries that used ORDER BY and LIMIT performed quickly in MySQL 3.23, but slowly in MySQL 4.x/5.x due to an optimizer problem. (Bug #4981)

  • MONTHNAME(STR_TO_DATE(NULL, '%m')) could cause a server crash. (Bug #18501)

  • The omission of leading zeros in dates could lead to erroneous results when these were compared with the output of certain date and time functions.

    Note

    The patch for this bug was reverted in MySQL 4.1.22.

    (Bug #16377)

  • Repeated DROP TABLE statements in a stored procedure could sometimes cause the server to crash. (Bug #19399)

  • The length of the pattern string prefix for LIKE operations was calculated incorrectly for multi-byte character sets. As a result, the scanned range was wider than necessary if the prefix contained any multi-byte characters, and rows could be missing from the result set. (Bug #18359, Bug #16674)

  • Using SELECT on a corrupt MyISAM table using the dynamic record format could cause a server crash. (Bug #19835)

  • No error message was being issued for storage engines that do not support ALTER TABLE. Now an ER_NOT_SUPPORTED_YET error occurs. (Bug #7643)

  • A cast problem caused incorrect results for prepared statements that returned float values when MySQL was compiled with gcc 4.0. (Bug #19694)

  • Use of uninitialized user variables in a subquery in the FROM clause resulted in invalid entries in the binary log. (Bug #19136)

  • When myisamchk needed to rebuild a table, AUTO_INCREMENT information was lost. (Bug #10405)

  • Failure to account for a NULL table pointer on big-endian machines could cause a server crash during type conversion. (Bug #21135)

C.1.6 Changes in MySQL 4.1.20 (2006-05-24)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a security fix release for the MySQL 4.1 release family.

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 (http://www.mysql.com/products/enterprise).

Bugs Fixed

  • Security Fix: An SQL-injection security hole has been found in multi-byte encoding processing. The bug was in the server, incorrectly parsing the string escaped with the mysql_real_escape_string() C API function.

    This vulnerability was discovered and reported by Josh Berkus and Tom Lane as part of the inter-project security collaboration of the OSDB consortium. For more information about SQL injection, please see the following text.

    Discussion.  An SQL injection security hole has been found in multi-byte encoding processing. An SQL injection security hole can include a situation whereby when a user supplied data to be inserted into a database, the user might inject SQL statements into the data that the server will execute. With regards to this vulnerability, when character set-unaware escaping is used (for example, addslashes() in PHP), it is possible to bypass the escaping in some multi-byte character sets (for example, SJIS, BIG5 and GBK). As a result, a function such as addslashes() is not able to prevent SQL-injection attacks. It is impossible to fix this on the server side. The best solution is for applications to use character set-aware escaping offered by a function such mysql_real_escape_string().

    However, a bug was detected in how the MySQL server parses the output of mysql_real_escape_string(). As a result, even when the character set-aware function mysql_real_escape_string() was used, SQL injection was possible. This bug has been fixed.

    Workarounds.  If you are unable to upgrade MySQL to a version that includes the fix for the bug in mysql_real_escape_string() parsing, but run MySQL 5.0.1 or higher, you can use the NO_BACKSLASH_ESCAPES SQL mode as a workaround. (This mode was introduced in MySQL 5.0.1.) NO_BACKSLASH_ESCAPES enables an SQL standard compatibility mode, where backslash is not considered a special character. The result will be that queries will fail.

    To set this mode for the current connection, enter the following SQL statement:

    SET sql_mode='NO_BACKSLASH_ESCAPES';
    

    You can also set the mode globally for all clients:

    SET GLOBAL sql_mode='NO_BACKSLASH_ESCAPES';
    

    This SQL mode also can be enabled automatically when the server starts by using the command-line option --sql-mode=NO_BACKSLASH_ESCAPES or by setting sql-mode=NO_BACKSLASH_ESCAPES in the server option file (for example, my.cnf or my.ini, depending on your system). (Bug #8378, CVE-2006-2753)

    References: See also Bug #8303.

  • Replication: The dropping of a temporary table whose name contained a backtick ('`') character was not correctly written to the binary log, which also caused it not to be replicated correctly. (Bug #19188)

  • Running myisampack followed by myisamchk with the --unpack option would corrupt the AUTO_INCREMENT key. (Bug #12633)

  • The patch for Bug #8303 broke the fix for Bug #8378 and was reverted.

    In string literals with an escape character (\) followed by a multi-byte character that had (\) as its second byte, the literal was not interpreted correctly. Now only next byte now is escaped, and not the entire multi-byte character. This means it is a strict reverse of the mysql_real_escape_string() function.

  • RPM packages had spurious dependencies on Perl modules and other programs. (Bug #13634)

  • The client libraries were not compiled for position-independent code on Solaris-SPARC and AMD x86_64 platforms. (Bug #18091, Bug #13159, Bug #14202)

C.1.7 Changes in MySQL 4.1.19 (2006-04-29)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This release includes the patches for recently reported security vulnerabilites in the MySQL client/server protocol. We would like to thank Stefano Di Paola for finding and reporting these to us.

Functionality Added or Changed

  • Security Enhancement: Added the global max_prepared_stmt_count system variable to limit the total number of prepared statements in the server. This limits the potential for denial-of-service attacks based on running the server out of memory by preparing huge numbers of statements. The current number of prepared statements is available through the prepared_stmt_count system variable. (Bug #16365)

  • Packaging: The MySQL-shared-compat-4.1.X-.i386.rpm shared compatibility RPMs no longer contain libraries for MySQL 5.0 and up. They now contain libraries for MySQL 3.23, 4.0, and 4.1.1 only. (Bug #19288)

  • InnoDB now caches a list of unflushed files instead of scanning for unflushed files during a table flush operation. This improves performance when --innodb_file_per_table is set on a system with a large number of InnoDB tables. (Bug #15653)

  • New charset command added to mysql command-line client. By typing charset name or \C name (such as \C UTF8), the client character set can be changed without reconnecting. (Bug #16217)

  • When using the GROUP_CONCAT() function where the group_concat_max_len system variable was greater than 255, the result type differed depending on whether an ORDER BY clause was included: BLOB if it was, VARBINARY if it was not. (For nonbinary string arguments, the result was TEXT or VARCHAR.)

    Now an ORDER BY does not affect the result, which is VARBINARY (VARCHAR) only if group_concat_max_len is less than or equal to 255, BLOB (TEXT) otherwise. (Bug #14169)

  • Large file support was re-enabled for the MySQL server binary for the AIX 5.2 platform. (Bug #13571)

Bugs Fixed

  • Security Fix: A malicious client, using specially crafted invalid login or COM_TABLE_DUMP packets was able to read uninitialized memory, which potentially, though unlikely in MySQL, could have led to an information disclosure. (, ) Thanks to Stefano Di Paola for finding and reporting this bug. (CVE-2006-1516, CVE-2006-1517)

  • MySQL Cluster: In some cases, LOAD DATA INFILE did not load all data into NDB tables. (Bug #17081)

  • MySQL Cluster: The server would not compile with NDB support on AIX 5.2. (Bug #10776)

  • MySQL Cluster: In a 2-node cluster with a node failure, restarting the node with a low value for StartPartialTimeout could cause the cluster to come up partitioned (split-brain issue).

    A similar issue could occur when the cluster was first started with a sufficiently low value for this parameter. (Bug #16447, Bug #18612)

  • MySQL Cluster: A timeout in the handling of an ABORT condition with more that 32 operations could yield a node failure. (Bug #18414)

  • MySQL Cluster: A simultaneous DROP TABLE and table update operation utilising a table scan could trigger a node failure. (Bug #18597)

  • MySQL Cluster: When replacing a failed master node, the replacement node could cause the cluster to crash from a buffer overflow if it had an excessively large amount of data to write to the cluster log. (Bug #18118)

  • MySQL Cluster: A DELETE with a join in the WHERE clause failed to retrieve any records if both tables in the join did not have a primary key. (Bug #17249)

  • MySQL Cluster: The cluster created a crashed replica of a table having an ordered index—or when logging was not enabled, of a table having a table or unique index—leading to a crash of the cluster following 8 successive restarts. (Bug #18298)

  • MySQL Cluster: The REDO log would become corrupted (and thus unreadable) in some circumstances, due to a failure in the query handler. (Bug #17295)

  • MySQL Cluster: Inserting and deleting BLOB column values while a backup was in process could cause data nodes to shut down. (Bug #14028)

  • MySQL Cluster: No error message was generated for setting NoOfFragmentLogFiles too low. (Bug #13966)

  • MySQL Cluster: In event of a node failure during a rollback, a false lock could be established on the backup for that node, which lock could not be removed without restarting the node. (Bug #18352)

  • MySQL Cluster: No error message was generated for setting MaxNoOfAttributes too low. (Bug #13965)

  • MySQL Cluster: A node restart immediately following a CREATE TABLE would fail.

    Important

    This fix supports 2-node Clusters only.

    (Bug #18385)

  • MySQL Cluster: Backups could fail for large clusters with many tables, where the number of tables approached MaxNoOfTables. (Bug #17607)

  • MySQL Cluster: An UPDATE with an inner join failed to match any records if both tables in the join did not have a primary key. (Bug #17257)

  • MySQL Cluster: Restarting nodes were permitted to start and join the cluster too early. (Bug #16772)

  • MySQL Cluster: ndb_delete_all ran out of memory when processing tables containing BLOB columns. (Bug #16693)

  • MySQL Cluster: On systems with multiple network interfaces, data nodes would get stuck in startup phase 2 if the interface connecting them to the management server was working on node startup while the interface interconnecting the data nodes experienced a temporary outage. (Bug #15695)

  • Replication: Use of TRUNCATE TABLE for a TEMPORARY table on a master server was propagated to slaves properly, but slaves did not decrement the Slave_open_temp_tables counter properly. (Bug #17137)

  • The IN-to-EXISTS transformation was making a reference to a parse tree fragment that was left out of the parse tree. This caused problems with prepared statements. (Bug #18492)

  • Conversion of a number to a CHAR UNICODE string returned an invalid result. (Bug #18691)

  • The mysql_close() C API function leaked handles for shared-memory connections on Windows. (Bug #15846)

  • MyISAM: Keys for which the first part of the key was a CHAR or VARCHAR column using the UTF-8 character set and longer than 254 bytes could become corrupted. (Bug #17705)

  • A query using WHERE (column_1, column_2) IN ((value_1, value_2)[, (..., ...), ...]) would return incorrect results. (Bug #16248)

  • The euro sign () was not stored correctly in columns using the latin1_german1_ci or latin1_general_ci collation. (Bug #18321)

  • If InnoDB encountered a HA_ERR_LOCK_TABLE_FULL error and rolled back a transaction, the transaction was still written to the binary log. (Bug #18283)

  • A FULLTEXT query in a UNION could result in unexpected behavior. (Bug #16893)

  • A key on a MEMORY table would sometimes fail to match a row. (Bug #12796)

  • When running a query that contained a GROUP_CONCAT(SELECT GROUP_CONCAT(...) ), the result was NULL except in the ROLLUP part of the result, if there was one. (Bug #15560)

  • Connecting to a server with a UCS2 default character set with a client using a non-UCS2 character set crashed the server. (Bug #18004)

  • Security Improvement: GRANTs to users with wildcards in their host information could be erroneously applied to similar users with the same user name and similar wildcards. For example, a privilege granted to foo@% are also applied to user foo@192.%. (Bug #14385)

  • LOAD DATA FROM MASTER produced invalid warnings and Packet out of order errors when the database already existed on the slave. (Bug #15302)

  • Dropping InnoDB constraints named tbl_name_ibfk_0 could crash the server. (Bug #16387)

  • A LOCK TABLES statement that failed could cause MyISAM not to update table statistics properly, causing a subsequent CHECK TABLE to report table corruption. (Bug #18544)

  • CAST(double AS SIGNED INT) for large double values outside the signed integer range truncated the result to be within range, but the result sometimes had the wrong sign, and no warning was generated. (Bug #15098)

  • For single-SELECT union constructs of the form (SELECT ... ORDER BY order_list1 [LIMIT n]) ORDER BY order_list2, the ORDER BY lists were concatenated and the LIMIT clause was ignored. (Bug #18767)

  • Killing a long-running query containing a subquery could cause a server crash. (Bug #14851)

  • Security improvement: In grant table comparisons, improper use of a latin1 collation caused some host name matches to be true that should have been false. Thanks to Deomid Ryabkov for finding this bug and proposing a solution. (Bug #15756)

  • Index corruption could occur in cases when key_cache_block_size was not a multiple of the myisam-block-size value (for example, with --key_cache_block_size=1536 and --myisam-block-size=1024). (Bug #19079)

  • mysql_reconnect() sent a SET NAMES statement to the server, even for pre-4.1 servers that do not understand the statement. (Bug #18830)

  • A race condition could occur when dropping the adaptive hash index for a B-tree page in InnoDB. (Bug #16582)

  • SET value definitions containing commas were not rejected. Now a definition such as SET('a,b','c,d') results in an error. (Bug #15316)

  • The -lmtmalloc library was removed from the output of mysql_config on Solaris, as it caused problems when building DBD::mysql (and possibly other applications) on that platform that tried to use dlopen() to access the client library. (Bug #18322)

  • Attempting to set the default value of an ENUM or SET column to NULL caused a server crash. (Bug #19145)

  • The server was always built as though --with-extra-charsets=complex had been specified. (Bug #12076)

  • UNCOMPRESS(NULL) could cause subsequent UNCOMPRESS() calls to return NULL for legal non-NULL arguments. (Bug #18643)

  • Setting the myisam_repair_threads system variable to a value larger than 1 could cause corruption of large MyISAM tables. (Bug #11527)

  • MySQL would not compile on Linux distributions that use the tinfo library. (Bug #18912)

  • Avoid trying to include <asm/atomic.h> when it doesn't work in C++ code. (Bug #13621)

  • Executing SELECT on a large table that had been compressed within myisampack could cause a crash. (Bug #17917)

  • Binary distributions for Solaris contained files with group ownership set to the nonexisting wheel group. Now the bin group is used. (Bug #15562)

  • IA-64 RPM packages for Red Hat and SuSE Linux that were built with the icc compiler incorrectly depended on icc runtime libraries. (Bug #16662)

  • SELECT ... WHERE column LIKE 'A%', when column had a key and used the latin2_czech_cs collation, caused the wrong number of rows to be returned. (Bug #17374)

  • A call to MIN() with a CASE expression as its argument could return a nonminimum value. (Bug #17896)

  • A FULLTEXT query in a prepared statement could result in unexpected behavior. (Bug #14496)

  • MYSQL_STMT objects were not preserved following a connection reset. Attempting to operate on them afterward caused the server to crash. (Bug #12744)

  • SELECT COUNT(*) for a MyISAM table could return different results depending on whether an index was used. (Bug #14980)

  • Creating a table in an InnoDB database with a column name that matched the name of an internal InnoDB column (including DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR and DB_MIX_ID) would cause a crash. MySQL now returns Error 1005 Cannot create table with errno set to -1. (Bug #18934)

  • mysql_config returned incorrect libraries on x86_64 systems. (Bug #13158)

  • Repeated invocation of my_init() and my_end() caused corruption of character set data and connection failure. (Bug #6536)

  • mysqldump tried to dump data from a view. (In MySQL 4.1, this applies when connecting to a server from MySQL 5.0 or higher.) (Bug #16389)

  • MySQL-shared-compat-4.1.15-0.i386.rpm, MySQL-shared-compat-4.1.16-0.i386.rpm, and MySQL-shared-compat-4.1.18-0.i386.rpm incorrectly depended on glibc 2.3 and could not be installed on a glibc 2.2 system. (Bug #16539)

  • Index prefixes for utf8 VARCHAR columns did not work for UPDATE statements. (Bug #19080)

  • Character set conversion of string constants for UNION of constant and table column was not done when it was safe to do so. (Bug #15949)

  • During conversion from one character set to ucs2, multi-byte characters with no ucs2 equivalent were converted to multiple characters, rather than to 0x003F QUESTION MARK. (Bug #15375)

C.1.8 Changes in MySQL 4.1.18 (2006-01-27)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • MySQL Cluster: More descriptive warnings are now issued when inappropriate logging parameters are set in config.ini. (Formerly, the warning issued was simply Could not add logfile destination.) (Bug #11331)

  • libmysqlclient now uses versioned symbols with GNU ld. (Bug #3074)

Bugs Fixed

  • Replication: The --replicate-do and --replicate-ignore options were not being enforced on multiple-table statements. (Bug #16487, Bug #15699)

  • A CREATE TABLE ... SELECT ... on an equation involving DOUBLE values could result in the table being created with columns too small to hold the equation result. (Bug #9855)

  • A prepared statement created from a SELECT ... LIKE query (such as PREPARE stmt1 FROM 'SELECT col_1 FROM tedd_test WHERE col_1 LIKE ?';) would begin to produce erratic results after being executed repeatedly numerous (thousands) of times. (Bug #12734)

  • UPDATE statement crashed multi-byte character set FULLTEXT index if update value was almost identical to initial value only differing in some spaces being changed to &nbsp;. (Bug #16489)

  • Single table UPDATE statements without ORDER BY clauses which updated the same indexed column that was being filtered on were optimized with a full index scan instead of a more appropriate index range scan. (Bug #15935)

  • RPM packages had an incorrect zlib dependency. (Bug #15223)

  • Running out of diskspace in the location specified by the tmpdir option resulted in incorrect error message. (Bug #14634)

  • Test suite func_math test returned warnings when the server was not compiled with InnoDB support. (Bug #15429)

  • The MBROverlaps GIS function returned incorrect results. (Bug #14320)

  • STR_TO_DATE(1,NULL) caused a server crash. (Bug #15828, CVE-2006-3081)

  • The length of a VARCHAR() column that used the utf8 character set would increase each time the table was re-created in a stored procedure or prepared statement, eventually causing the CREATE TABLE statement to fail. (Bug #13134)

C.1.9 Changes in MySQL 4.1.17 (Not released)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Support files for compiling with Visual Studio 6 have been removed. (Bug #15094)

  • In the latin5_turkish_ci collation, the order of the characters A WITH CIRCUMFLEX, I WITH CIRCUMLEX, and U WITH CIRCUMFLEX was changed. If you have used these characters in any indexed columns, you should rebuild those indexes. (Bug #13421)

  • Internal sha1_result function renamed to mysql_sha1_result to prevent conflicts with other projects. (Bug #13944)

Bugs Fixed

  • MySQL Cluster: A node which failed during cluster startup was sometimes not removed from the internal list of active nodes. (Bug #15587)

  • MySQL Cluster: If an abort by the Transaction Coordinator timed out, the abort condition was incorrectly handled, causing the transaction record to be released prematurely. (Bug #15685)

  • MySQL Cluster: Under some circumstances, it was possible for a restarting node to undergo a forced shutdown. (Bug #15632)

  • MySQL Cluster: There was a small window for a node failure to occur during a backup without an error being reported. (Bug #15425)

  • MySQL Cluster: A memory leak occurred when performing ordered index scans using indexes on columns larger than 32 bytes. This would eventually lead to the forced shutdown of all mysqld server processes used with the cluster. (Bug #13078)

  • Cluster API: Upon the completion of a scan where a key request remained outstanding on the primary replica and a starting node died, the scan did not terminate. This caused incomplete error handling for the failed node. (Bug #15908)

  • Multiple-table update operations were counting updates and not updated rows. As a result, if a row had several updates it was counted several times for the rows matched value but updated only once. (Bug #15028)

  • InnoDB: Comparison of indexed VARCHAR CHARACTER SET ucs2 COLLATE ucs2_bin columns using LIKE could fail. (Bug #14583)

  • Performing a RENAME TABLE on an InnoDB table when the server was started with the --innodb_file_per_table option and the data directory was a symlink caused a server crash. (Bug #15991)

  • Characters in the gb2312 and euckr character sets which did not have Unicode mappings were truncated. (Bug #15377)

  • Using an aggregate function as the argument for a HAVING clause resulted in the aggregate function always returning FALSE. (Bug #14274)

  • SELECT queries that began with an opening parenthesis were not being placed in the query cache. (Bug #14652)

  • DELETE could report full-text index corruption (Invalid key for table ...) if the index was built with repair-by-sort, the data in the full-text index used UCA collation, and some word appeared in the data terminated by a 0xC2A0 character as well as by other nonletter characters. (Bug #11336)

  • InnoDB: If foreign_key_checks was 0, InnoDB permitted inconsistent foreign keys to be created. (Bug #13778)

  • CAST(... AS TIME) operations returned different results when using versus not using prepared-statement protocol. (Bug #15805)

  • The COALESCE() function truncated data in a TINYTEXT column. (Bug #15581)

  • BDB: A DELETE, INSERT, or UPDATE of a BDB table could cause the server to crash where the query contained a subquery using an index read. (Bug #15536)

  • Symbolic links did not function properly on Windows platforms. (Bug #14960, Bug #14310)

  • Certain CREATE TABLE ... AS ... statements involving ENUM columns could cause server crash. (Bug #12913)

  • Using CAST() to convert values with long fractional or exponent parts to TIME returned wrong results. (Bug #12440)

  • A race condition when creating temporary files caused a deadlock on Windows with threads in Opening tables or Waiting for table states. (Bug #12071)

  • Certain permission management statements could create a NULL host name for a user, resulting in a server crash. (Bug #15598)

  • Issuing a DROP USER statement could cause some users to encounter a hostname is not permitted to connect to this MySQL server error. (Bug #15775)

  • For InnoDB tables, using a column prefix for a utf8 column in a primary key caused Cannot find record errors when attempting to locate records. (Bug #14056)

  • Access Denied error could be erroneously returned with specific grant combinations under high load. (Bug #7209)

  • Piping the fill_help_tables.sql file into mysqld resulted in a syntax error. (Bug #15965)

  • An INSERT ... SELECT statement between tables in a MERGE set can return errors when statement involves insert into child table from merge table or vice-versa. (Bug #5390)

C.1.10 Changes in MySQL 4.1.16 (2005-11-29)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • MySQL now supports character set conversion for seven additional cp950 characters into the big5 character set: 0xF9D6, 0xF9D7, 0xF9D8, 0xF9D9, 0xF9DA, 0xF9DB, and 0xF9DC.

    Note

    If you move data containing these additional characters to an older MySQL installation which does not support them, you may encounter errors.

    (Bug #12476)

  • When a date column is set NOT NULL and contains 0000-00-00, it will be updated for UPDATE statements that contains columnname IS NULL in the WHERE clause. (Bug #14186)

  • The MySQL-server RPM now explicitly assigns the mysql system user to the mysql user group during the postinstallation process. This corrects an issue with upgrading the server on some Linux distributions whereby a previously existing mysql user was not changed to the mysql group, resulting in wrong groups for files created following the installation. (Bug #12823)

  • The CHAR() function now takes an optional USING charset clause that may be used to produce a result in a specific character set rather than in the connection character set.

  • When executing single-table UPDATE or DELETE queries containing an ORDER BY ... LIMIT N clause, but not having any WHERE clause, MySQL can now take advantage of an index to read the first N rows in the ordering specified in the query. If an index is used, only the first N records will be read, as opposed to scanning the entire table. (Bug #12915)

Bugs Fixed

  • MySQL Cluster: Creating a table with packed keys failed silently. NDB now supports the PACK_KEYS option to CREATE TABLE correctly. (Bug #14514)

  • MySQL Cluster: REPLACE failed when attempting to update a primary key value in a Cluster table. (Bug #14007)

  • MySQL Cluster: Repeated transactions using unique index lookups could cause a memory leak leading to error 288, Out of index operations in transaction coordinator. (Bug #14199)

  • MySQL Cluster: Placing multiple [tcp default] sections in the cluster's config.ini file crashed ndb_mgmd. (The process now exits gracefully in such cases, with an appropriate error message.) (Bug #13611)

  • MySQL Cluster: The perror utility included with the MySQL-Server RPM did not provide support for the --ndb option. It now supports this option, and so can be used to obtain error message text for MySQL Cluster error codes. (Bug #13740)

  • Replication: On Windows, the server could crash during shutdown if both replication threads and normal client connection threads were active. (Bug #11796)

  • Replication: Multiple update queries using any type of subquery would be ignored by a replication slave when a condition such as --replicate-ignore-table like condition was used. (Bug #13236)

  • Replication: InnoDB: During replication, There was a failure to record events in the binary log that still occurred even in the event of a ROLLBACK. For example, this sequence of commands:

    BEGIN;
    CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
    ROLLBACK;
    INSERT INTO t1 VALUES (1);
    

    would succeed on the replication master as expected. However, the INSERT would fail on the slave because the ROLLBACK would (erroneously) cause the CREATE TEMPORARY TABLE statement not to be written to the binlog. (Bug #7947)

  • Replication: An UPDATE query using a join would be executed incorrectly on a replication slave. (Bug #12618)

  • Given a column col_name defined as NOT NULL, a SELECT ... FROM ... WHERE col_name IS NULL query following SHOW TABLE STATUS would erroneously return a nonempty result. (Bug #13535)

  • The default value of query_prealloc_size was set to 8192, lower than its minimum of 16384. The minimum has been lowered to 8192. (Bug #13334)

  • make failed when attempting to build MySQL in different directory other than that containing the source. (Bug #11827)

  • CREATE TABLE tbl_name (...) SELECT ... could crash the server and write invalid data into the .frm file if the CREATE TABLE and SELECT both contained a column with the same name. Also, if a default value is specified in the column definition, it is now actually used. (Bug #14480)

  • InnoDB: Pad UTF-8 VARCHAR columns with 0x20. Pad UCS2 CHAR columns with 0x0020. (Bug #10511)

  • Queries of the form (SELECT ...) ORDER BY ... were being treated as a UNION. This improperly resulted in only distinct values being returned (because UNION by default eliminates duplicate results). Also, references to column aliases in ORDER BY clauses following parenthesized SELECT statements were not resolved properly. (Bug #7672)

  • On Windows, the server was not ignoring hidden or system directories that Windows may have created in the data directory, and would treat them as available databases. (Bug #4375)

  • An expression in an ORDER BY clause failed with Unknown column 'col_name' in 'order clause' if the expression referred to a column alias. (Bug #11694)

  • TIMEDIFF(), ADDTIME(), and STR_TO_DATE() were not reporting that they could return NULL, so functions that invoked them might misinterpret their results. (Bug #14009)

  • With --log-slave-updates Exec_master_log_pos of SQL thread lagged IO (Bug #13023)

  • LIKE operations did not work reliably for the cp1250 character set. (Bug #13347)

  • mysqladmin and mysqldump would hang on SCO OpenServer. (Bug #13238)

  • For MyISAM tables, incorrect query results or incorrect updates could occur under these conditions: There is a multiple-column index that includes a BLOB column that is not the last column in the index, and the statement performs a lookup on the index using key column values that have NULL for the BLOB column and that provide values for all columns up to the BLOB column and at least the next column in the index. (Bug #13814)

  • Closed a memory leak in the SSL code. (Bug #14780)

  • PURGE MASTER LOGS statement that used subquery for date crashed server. (Bug #10308)

  • Multiple race conditions existed in OpenSSL, particularly noticeable on Solaris. (Bug #9270)

  • A UNION of DECIMAL columns could produce incorrect results. (Bug #14216)

  • Use of WITH ROLLUP PROCEDURE ANALYSE() could hang the server. (Bug #14138)

  • For a table that had been opened with HANDLER OPEN, issuing OPTIMIZE TABLE, ALTER TABLE, or REPAIR TABLE caused a server crash. (Bug #14397)

  • ALTER TABLE ... ENABLE INDEXES treated NULL values as equal when collecting index statistics for MyISAM tables, resulting in different statistics from those generated by ANALYZE TABLE and causing the optimizer to make poor index choices later. The same problem occurred for bulk insert statistics collection. Now NULL values are treated as unequal, just as for ANALYZE TABLE. (Bug #9622)

  • A LIMIT-related optimization failed to take into account that MyISAM table indexes can be disabled, causing Error 124 when it tried to use such an index. (Bug #14616)

  • Corrected a memory-copying problem for big5 values when using icc compiler on Linux IA-64 systems. (Bug #10836)

  • LOAD DATA INFILE would not accept the same character for both the ESCAPED BY and the ENCLOSED BY clauses. (Bug #11203)

  • An update of a CSV table could cause a server crash. (Bug #13894)

  • Full-text indexing/searching failed for words that end with more than one apostrophe. (Bug #5686)

  • Character set conversion was not being done for FIND_IN_SET(). (Bug #13751)

  • The endian byte in for spatial values in WKB format was not consistently respected. (Bug #12839)

  • Creating a table containing an ENUM or SET column from within a stored procedure or prepared statement caused a server crash later when executing the procedure or statement. (Bug #14410)

  • Use of col_name = VALUES(col_name) in the ON DUPLICATE KEY UPDATE clause of an INSERT statement failed with an Column 'col_name' in field list is ambiguous error. (Bug #13392)

  • SELECT DISTINCT CHAR(col_name) returned incorrect results after SET NAMES utf8. (Bug #13233)

  • Maximum values were handled incorrectly for command-line options of type GET_LL. (Bug #12925)

  • CAST(1E+300 TO SIGNED INT) produced an incorrect result on little-endian machines. (Bug #13344)

  • The server did not take character set into account in checking the width of the mysql.user.Password column. As a result, it could incorrectly generate long password hashes even if the column was not long enough to hold them. (Bug #13064)

  • The --interactive-timeout and --slave-net-timeout options for mysqld were not being obeyed on Mac OS X and other BSD-based platforms. (Bug #8731)

  • mysqld_safe did not correctly start the -max version of the server (if it was present) if the --ledir option was given. (Bug #13774)

  • Issuing STOP SLAVE after having acquired a global read lock with FLUSH TABLES WITH READ LOCK caused a deadlock. Now STOP SLAVE is generates an error in such circumstances. (Bug #10942)

  • Deletes from a CSV table could cause table corruption. (Bug #14672)

  • Selecting from a table in both an outer query and a subquery could cause a server crash. (Bug #14482)

  • Character set file parsing during mysql_real_connect() read past the end of a memory buffer. (Bug #6413)

  • Specifying --default-character-set=cp-932 for mysqld would cause SQL scripts containing comments written using that character set to fail with a syntax error. (Bug #13487)

  • On BSD systems, the system crypt() call could return an error for some salt values. The error was not handled, resulting in a server crash. (Bug #13619)

  • Statements of the form CREATE TABLE ... SELECT ... that created a column with a multi-byte character set could incorrectly calculate the maximum length of the column, resulting in a Specified key was too long error. (Bug #14139)

  • The example configuration files supplied with MySQL distributions listed the thread_cache_size variable as thread_cache. (Bug #13811)

  • Perform character set conversion of constant values whenever possible without data loss. (Bug #10446)

  • Portability fixes to support OpenSSL 0.9.8a. (Bug #14221)

  • Non-latin1 object names were written with wrong character set to grant tables. (Bug #14406)

  • PROCEDURE ANALYSE() could suggest a data type with a negative display width. (Bug #10716)

  • mysql_fix_privilege_tables.sql contained an erroneous comment that resulted in an error when the file contents were processed. (Bug #14469)

  • When the DATE_FORMAT() function appeared in both the SELECT and ORDER BY clauses of a query but with arguments that differ by case (for example, %m and %M), incorrect sorting may have occurred. (Bug #14016)

C.1.11 Changes in MySQL 4.1.15 (2005-10-13)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • MySQL Cluster: The parsing of the CLUSTERLOG command by ndb_mgm was corrected to permit multiple items. (Bug #12833)

  • Replication: Better detection of connection timeout for replication servers on Windows enables elimination of extraneous Lost connection errors in the error log. (Bug #5588)

  • A new command line argument was added to mysqld to ignore client character set information sent during handshake, and use server side settings instead, to reproduce 4.0 behavior :

    mysqld --skip-character-set-client-handshake

    (Bug #9948)

  • When using IF NOT EXISTS with CREATE DATABASE or CREATE TABLE, a warning now is generated if the database or table already exists. : (Bug #6008)

  • Added the myisam_stats_method, which controls whether NULL values in indexes are considered the same or different when collecting statistics for MyISAM tables. This influences the query optimizer as described in Section 7.4.4, “MyISAM Index Statistics Collection”. (Bug #12232)

  • The limit of 255 characters on the input buffer for mysql on Windows has been lifted. The exact limit depends on what the system permits, but can be up to 64KB characters. A typical limit is 16KB characters. (Bug #12929)

  • RAND() no longer permits nonconstant initializers. (Previously, the effect of nonconstant initializers is undefined.) (Bug #6172)

Bugs Fixed

  • MySQL Cluster: With two mgmd processes in a cluster, ndb_mgm output for SHOW would display the same IP address for both processes, even when they were on different hosts. (Bug #11595)

  • MySQL Cluster: Adding an index to a table with a large number of columns (more then 100) crashed the storage node. (Bug #13316)

  • MySQL Cluster: Improved error messages related to file system issues. (Bug #11218)

  • MySQL Cluster: The cluster management client START BACKUP command could be interrupted by a SHOW command. (Bug #13054)

  • MySQL Cluster: Multiple ndb_mgmd processes in a cluster did not know each other's IP addresses. (Bug #12037)

  • MySQL Cluster: When it could not copy a fragment, ndbd exited without printing a message about the condition to the error log. Now the message is written. (Bug #12900)

  • MySQL Cluster: When a schema was detected to be corrupt, ndb neglected to close it, resulting in a file already open error if the schema was opened again later. written. (Bug #12027)

  • MySQL Cluster: LOAD DATA INFILE with a large data file failed. (Bug #10694)

  • MySQL Cluster: A cluster shutdown following the crash of a data node failed to terminate any remaining node processes, even though ndb_mgm showed the shutdown request as having been completed. (Bug #9996, Bug #10938, Bug #11623)

  • MySQL Cluster: When deleting a great many (tens of thousands of) rows at once from an NDB table, an improperly dereferenced pointer could cause the mysqld process to crash. (Bug #9282)

  • MySQL Cluster: Invalid values in config.ini caused ndb_mgmd to crash. (Bug #12043)

  • MySQL Cluster: An ALTER TABLE statement caused loss of data stored prior to the issuing of the command. (Bug #12118)

  • MySQL Cluster: Updating a column of one of the TEXT types during a cluster backup could cause the ndbd process to crash, due to the incorrect use of charset-normalized reads. This could also lead to character data having the wrong lettercase in the backup if such a column was updated during the backup; for example, supposing that the column used latin_ci, then aAa might be stored in the backup as AAA. (Bug #12950)

  • MySQL Cluster: MySQL failed to compile when --with-ndb-ccflags was specified. (Bug #11538)

  • MySQL Cluster: When a Disk is full condition occurred, ndbd exited without reporting this condition in the error log. (Bug #12716)

  • Replication: The --replicate-rewrite-db and --replicate-do-table options did not work for statements in which tables were aliased to names other than those listed by the options. (Bug #11139)

  • Replication: If a DROP DATABASE fails on a master server due to the presence of a nondatabase file in the database directory, the master have the database tables deleted, but not the slaves. To deal with failed database drops, we now write DROP TABLE statements to the binary log for the tables so that they are dropped on slaves. (Bug #4680)

  • Replication: When any --replicate-wild-* option is used, the slave ignores SET ONE_SHOT TIME_ZONE statements as belonging to a nonreplicated table. (Bug #12542)

  • SHOW CREATE TABLE did not display any FOREIGN KEY clauses if a temporary file could not be created. Now SHOW CREATE TABLE displays an error message in an SQL comment if this occurs. (Bug #13002)

  • The counters for the Key_read_requests, Key_reads, Key_write_requests, and Key_writes status variables were changed from unsigned long to unsigned longlong to accommodate larger values before the variables roll over and restart from 0. (Bug #12920)

  • A SELECT DISTINCT query with a constant value for one of the columns would return only a single row. (Bug #12625)

  • A client connection thread cleanup problem caused the server to crash when closing the connection if the binary log was enabled. (Bug #12517)

  • The ARCHIVE storage engine does not support deletes, but it was possible to delete by using DELETE or TRUNCATE TABLE with a FEDERATED table that points to an ARCHIVE table. (Bug #12836)

  • If a client has opened an InnoDB table for which the .ibd file is missing, InnoDB would not honor a DROP TABLE statement for the table. (Bug #12852)

  • UNION of two DECIMAL columns returned the wrong field type. (Bug #13372)

  • If special characters such as '_' , '%', or the escape character were included within the prefix of a column index, LIKE pattern matching on the indexed column did not return the correct result. (Bug #13046, Bug #13919)

  • For VARCHAR columns with the ucs2 character set, InnoDB trimmed trailing 0x20 bytes rather than 0x0020 words, resulting in incorrect index lookups later. (Bug #12178)

  • Display of the AUTO_INCREMENT attribute by SHOW CREATE TABLE was not controlled by the NO_FIELD_OPTIONS SQL mode as it should have been. (Bug #7977)

  • The CHECKSUM TABLE statement returned incorrect results for tables with deleted rows. After upgrading, users who used stored checksum information to detect table changes should rebuild their checksum data. (Bug #12296)

  • On Windows, the server was preventing tables from being created if the table name was a prefix of a forbidden name. For example, nul is a forbidden name because it is the same as a Windows device name, but a table with the name of n or nu was being forbidden as well. (Bug #12325)

  • Deadlock occurred when several account management statements were run (particularly between FLUSH PRIVILEGES/SET PASSWORD and GRANT/REVOKE statements). (Bug #12423)

  • Aggregate functions sometimes incorrectly were permitted in the WHERE clause of UPDATE and DELETE statements. (Bug #13180)

  • The server could over-allocate memory when performing a FULLTEXT search for stopwords only. (Bug #13582)

  • Reverted a change introduced in MySQL 4.1.13 (SHOW FIELDS truncated the TYPE column to 40 characters). This fix was reverted for MySQL 4.1 because it broke existing applications. The fix will be made in MySQL 5.0 instead (5.0.13). (Bug #12817)

    References: The patch for the following bug was reverted: Bug #7142.

  • SELECT GROUP_CONCAT(...) FROM DUAL in a subquery could cause the client to hang. (Bug #12861)

  • A concurrency problem for CREATE ... SELECT could cause a server crash. (Bug #12845)

  • CHECKSUM TABLE locked InnoDB tables and did not use a consistent read. (Bug #12669)

  • DELETE or UPDATE for an indexed MyISAM table could fail. This was due to a change in end-space comparison behavior from 4.0 to 4.1. (Bug #12565)

  • MEMORY tables using B-Tree index on 64-bit platforms could produce false table is full errors. (Bug #12460)

  • A prepared statement failed with Illegal mix of collations if the client character set was utf8 and the statement used a table that had a character set of latin1. (Bug #12371)

  • Performing an IS NULL check on the MIN() or MAX() of an indexed column in a complex query could produce incorrect results. (Bug #12695)

  • On Windows when the --innodb_buffer_pool_awe_mem_mb option has been given, the server detects whether AWE support is available and has been compiled into the server, and displays an appropriate error message if not. (Bug #6581)

  • InnoDB was too permissive with LOCK TABLE ... READ LOCAL and permitted new inserts into the table. Now READ LOCAL is equivalent to READ for InnoDB. This will cause slightly more locking in mysqldump, but makes InnoDB table dumps consistent with MyISAM table dumps. (Bug #12410)

  • For queries with DISTINCT and WITH ROLLUP, the DISTINCT should be applied after the rollup operation, but was not always. (Bug #12887)

  • ALTER TABLE db_name.t RENAME t did not move the table to default database unless the new name was qualified with the database name. (Bug #11493)

  • MySQL would pass an incorrect key length to storage engines for MIN(). This could cause spurious warnings such as InnoDB: Warning: using a partial-field key prefix in search to appear in the .err log. (Bug #13218, Bug #11039)

  • The data type for DECIMAL columns was not respected when updating the column from another column. For example, updating a DECIMAL(10,1) column with the value from a DECIMAL(10,5) column resulted in a DECIMAL(10,5) value being stored. Similarly, altering a column with a DECIMAL(10,5) data type to a DECIMAL(10,1) data type did not properly convert data values. (Bug #7598)

  • Shared-memory connections were not working on Windows. (Bug #12723)

  • LOAD DATA INFILE did not respect the NO_AUTO_VALUE_ON_ZERO SQL mode setting. (Bug #12053)

  • After changing the character set with SET CHARACTER SET, the result of the GROUP_CONCAT() function was not converted to the proper character set. (Bug #12829)

  • Queries against a MERGE table that has a composite index could produce incorrect results. (Bug #9112)

  • GROUP_CONCAT() ignored an empty string if it was the first value to occur in the result. (Bug #12863)

  • TRUNCATE TABLE did not work with TEMPORARY InnoDB tables. (Bug #11816)

  • An optimizer estimate of zero rows for a nonempty InnoDB table used in a left or right join could cause incomplete rollback for the table. (Bug #12779)

  • Use of a user-defined function within the HAVING clause of a query resulted in an Unknown column error. (Bug #11553)

  • Users created using an IP address or other alias rather than a host name listed in /etc/hosts could not set their own passwords. (Bug #12302)

  • The value of character_set_results could be set to NULL, but returned the string "NULL" when retrieved. (Bug #12363)

  • Outer join elimination was erroneously applied for some queries that used a NOT BETWEEN condition, an IN(value_list) condition, or an IF() condition. (Bug #12102, Bug #12101)

  • A UNION of long utf8 VARCHAR columns was sometimes returned as a column with a LONGTEXT data type rather than VARCHAR. This could prevent such queries from working at all if selected into a MEMORY table because the MEMORY storage engine does not support the TEXT data types. (Bug #12537)

  • A column that can be NULL was not handled properly for WITH ROLLUP in a subquery or view. (Bug #12885)

  • Spatial index corruption could occur during updates. (Bug #9645)

  • Queries that created implicit temporary tables could return incorrect data types for some columns. (Bug #11718)

  • On HP-UX 11.x (PA-RISC), the -L option caused mysqlimport to crash. (Bug #12958)

  • The have_innodb read-only system variable could not be selected with SELECT @@have_innodb. (Bug #9613)

  • After running configure with the --with-embedded-privilege-control option, the embedded server failed to build. (Bug #13501)

  • The server crashed when one thread resized the query cache while another thread was using it. (Bug #12848)

  • mysqld_multi now quotes arguments on command lines that it constructs to avoid problems with arguments that contain shell metacharacters. (Bug #11280)

  • Comparisons involving row constructors containing constants could cause a server crash. (Bug #13356)

  • myisampack did not properly pack BLOB values larger than 224 bytes. (Bug #4214)

  • The LIKE ... ESCAPE syntax produced invalid results when escape character was larger than one byte. (Bug #12611)

  • MySQL programs in binary distributions for Solaris 8/9/10 x86 systems would not run on Pentium III machines. (Bug #6772)

  • MIN() and MAX() sometimes returned a non-NULL value for an empty row set (for example, SELECT MAX(1) FROM empty_table). (Bug #12882)

C.1.12 Changes in MySQL 4.1.14 (2005-08-17)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • MySQL Cluster: Improved handling of the configuration variables NoOfPagesToDiskDuringRestartACC, NoOfPagesToDiskAfterRestartACC, NoOfPagesToDiskDuringRestartTUP, and NoOfPagesToDiskAfterRestartTUP should result in noticeably faster startup times for MySQL Cluster. (Bug #12149)

  • MySQL Cluster: A new -P option is available for use with the ndb_mgmd client. When called with this option, ndb_mgmd prints all configuration data to stdout, then exits.

  • The MySQL server now starts correctly with all combinations of --basedir and --datadir, resolving an issue introduced by the original fix for this bug in MySQL 4.1.9. (Bug #7249)

    References: See also Bug #7518.

  • Added support of where clause for queries with FROM DUAL. (Bug #11745)

  • SHOW CHARACTER SET and INFORMATION_SCHEMA now properly report the Latin1 character set as cp1252. (Bug #11216)

  • If a thread (connection) has tables locked, the query cache is switched off for that thread. This prevents invalid results where the locking thread inserts values between a second thread connecting and selecting from the table. (Bug #12385)

  • Added an optimization that avoids key access with NULL keys for the ref method when used in outer joins. (Bug #12144)

  • Added new query cache test for the embedded server to the test suite, there are now specific tests for the embedded and nonembedded servers. (Bug #9508)

Bugs Fixed

  • MySQL Cluster: NDB ignored the Hostname option in the [ndbd default] section of the cluster configuration file. (Bug #12028)

  • MySQL Cluster: ndb_mgmd leaked file descriptors. (Bug #11898)

  • MySQL Cluster: The temporary tables created by an ALTER TABLE on an NDB table were visible to all SQL nodes in the cluster. (Bug #12055)

  • MySQL Cluster: The output of perror --help did not display any information about the --ndb option. (Bug #11999)

  • MySQL Cluster: Attempting to create or drop tables during a backup would cause the cluster to shut down. (Bug #11942)

  • Replication: Slave I/O threads were considered to be in the running state when launched (rather than after successfully connecting to the master server), resulting in incorrect SHOW SLAVE STATUS output. (Bug #10780)

  • SELECT @@local... returned @@session... in the column header. (Bug #10724)

  • The value of max_connections_per_hour was capped by the unrelated max_user_connections setting. (Bug #9947)

  • Performing DATE(LEFT(column,8)) on a DATE column produces incorrect results. (Bug #12266)

  • Renamed the rest() macro in my_list.h to list_rest() to avoid name clashes with user code. (Bug #12327)

  • For prepared statements, the SQL parser did not disallow ? parameter markers immediately adjacent to other tokens, which could result in malformed statements in the binary log. (For example, SELECT * FROM t WHERE? = 1 could become SELECT * FROM t WHERE0 = 1.) (Bug #11299)

  • Some subqueries of the form SELECT ... WHERE ROW(...) IN (subquery) were being handled incorrectly. (Bug #11867)

  • References to system variables in an SQL statement prepared with PREPARE were evaluated during EXECUTE to their values at prepare time, not to their values at execution time. (Bug #9359)

  • When two threads competed for the same table, a deadlock could occur if one thread also had a lock on another table through LOCK TABLES and the thread was attempting to remove the table in some manner while the other thread tried to place locks on both tables. (Bug #10600)

  • A UNION query with FULLTEXT could cause server crash. (Bug #11869)

  • ISO-8601 formatted dates were not being parsed correctly. (Bug #7308)

  • Character data truncated when GBK characters 0xA3A0 and 0xA1 are present. (Bug #11987)

  • Two threads could potentially initialize different characters sets and overwrite each other. (Bug #12109)

  • Comparisons like SELECT "A\\" LIKE "A\\"; fail when using SET NAMES utf8;. (Bug #11754)

  • Attempting to repair a table having a full-text index on a column containing words whose length exceeded 21 characters and where myisam_repair_threads was greater than 1 would crash the server. (Bug #11684)

  • InnoDB: Do not flush after each write, not even before setting up the doublewrite buffer. Flushing can be extremely slow on some systems. (Bug #12125)

  • SHOW BINARY LOGS displayed a file size of 0 for all log files but the current one if the files were not located in the data directory. (Bug #12004)

  • Mishandling of comparison for rows containing NULL values against rows produced by an IN subquery could cause a server crash. (Bug #12392)

  • Concatenating USER() or DATABASE() with a column produced invalid results. (Bug #12351)

  • Creation of the mysql group account failed during the RPM installation. (Bug #12348)

  • myisam.test failed when server compiled using --without-geometry option. (Bug #11083)

  • Pathame values for options such as --basedir or --datadir didn't work on Japanese Windows machines for directory names containing multi-byte characters having a second byte of 0x5C (\). (Bug #5439)

  • myisampack failed to delete .TMD temporary files when run with the -T option. (Bug #12235)

  • INSERT ... SELECT ... ON DUPLICATE KEY UPDATE could fail with an erroneous Column 'col_name' specified twice error. (Bug #10109)

  • Multiplying ABS() output by a negative number would return incorrect results. (Bug #11402)

  • big5 strings were not being stored in FULLTEXT index. (Bug #12075)

  • FLUSH TABLES WITH READ LOCK combined with LOCK TABLE .. WRITE caused deadlock. (Bug #9459)

  • GROUP_CONCAT() sometimes returned a result with a different collation from that of its arguments. (Bug #10201)

  • Incorrect error message displayed if user attempted to create a table in a nonexisting database using CREATE database_name.table_name syntax. (Bug #10407)

  • The LPAD() and RPAD() functions returned the wrong length to mysql_fetch_fields(). (Bug #11311)

  • The mysql_info() C API function could return incorrect data when executed as part of a multi-statement that included a mix of statements that do and do not return information. (Bug #11688)

  • Queries with subqueries that contain outer joins could return wrong results. (Bug #11479)

  • Corrected a problem with the optimizer incorrectly adding NOT NULL constraints, producing in incorrect results for complex queries. (Bug #11482)

  • Creating a table with a SET or ENUM column with the DEFAULT 0 clause caused a server crash if the table's character set was utf8. (Bug #11819)

  • In SQL prepared statements, comparisons could fail for values not equally space-padded. For example, SELECT 'a' = 'a '; returns 1, but PREPARE s FROM 'SELECT ?=?'; SET @a = 'a', @b = 'a '; PREPARE s FROM 'SELECT ?=?'; EXECUTE s USING @a, @b; incorrectly returned 0. (Bug #9379)

  • Updated dependency list for RPM builds to include missing dependencies such as useradd and groupadd. (Bug #12233)

  • mysql_fetch_fields() returned incorrect length information for MEDIUM and LONG TEXT and BLOB columns. (Bug #9735)

  • Corrected an optimizer problem with NOT NULL constraints within a subquery in an UPDATE statement that resulted in a server crash. (Bug #11868)

  • For DMG installs on Mac OS X, the preinstallation and postinstallation scripts were being run only for new installations and not for upgrade installations, resulting in an incomplete installation process. (Bug #11380)

  • mysql_next_result() returns incorrect value if final query in a batch fails. (Bug #12001)

  • Prepared statement parameters could cause errors in the binary log if the character set was cp932. (Bug #11338)

  • LIKE pattern matching using prefix index didn't return correct result. (Bug #11650)

  • Multiple-table UPDATE queries using CONVERT_TZ() would fail with an error. (Bug #9979)

  • GROUP_CONCAT ignored the DISTINCT modifier when used in a query joining multiple tables where one of the tables had a single row. (Bug #12095)

  • The C API function mysql_stmt_reset() did not clear error information. (Bug #11183)

  • User variables were not automatically cast for comparisons, causing queries to fail if the column and connection character sets differed. Now when mixing strings with different character sets but the same coercibility, permit conversion if one character set is a superset of the other. (Bug #10892)

  • Server-side prepared statements failed for columns with a character set of ucs2. (Bug #9442)

C.1.13 Changes in MySQL 4.1.13 (2005-07-15)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Security Fix: A UDF library-loading vulnerability could result in a buffer overflow and code execution. (CVE-2005-2558)

  • Incompatible Change: Previously, conversion of DATETIME values to numeric form by adding zero produced a result in YYYYMMDDHHMMSS format. The result of DATETIME+0 is now in YYYYMMDDHHMMSS.000000 format. (Bug #12268)

  • Replication: Some data definition statements (CREATE TABLE where the table was not a temporary table, TRUNCATE TABLE, DROP DATABASE, and CREATE DATABASE) were not being written to the binary log after a ROLLBACK. This also caused problems with replication.

    Important

    As a result of this fix, the following statements now cause an implicit commit:

    (Bug #6883)

  • System variables are now treated as having SYSVAR (system constant) coercibility. For example, @@version is now treated like VERSION() and @@character_set_client is now treated like CHARSET( USER() ). See Section 9.1.7.5, “Collation of Expressions”. (Bug #10904)

  • InnoDB: When creating or extending an InnoDB data file, allocate at most one megabyte at a time for initializing the file. Previously, InnoDB used to allocate and initialize 1 or 8 megabytes of memory, even if a few 16-kilobyte pages were to be written. This fix improves the performance of CREATE TABLE in innodb_file_per_table mode.

  • Added the --add-drop-database option to mysqldump. (Bug #3716)

  • Added mysql_set_character_set() C API function for setting the default character set of the current connection. This enables clients to affect the character set used by mysql_real_escape_string(). (Bug #8317)

  • SHOW BINARY LOGS now displays a File_size column that indicates the size of each file.

  • You can again refer to other tables in the ON DUPLICATE KEY UPDATE part of an INSERT ... SELECT statement as long as there is no GROUP BY in the SELECT part. One side effect of this is that you may have to qualify nonunique column names in the values part of ON DUPLICATE KEY UPDATE. (Bug #9728, Bug #8147)

  • Added the --log-slow-admin-statements server option to request logging of slow administrative statements such as OPTIMIZE TABLE, ANALYZE TABLE, and ALTER TABLE to the slow query log. These statements were logged in MySQL 4.0, but not in 4.1. (Bug #9141)

  • MEMORY tables now support indexes of up to 500 bytes. See Section 13.4, “The MEMORY (HEAP) Storage Engine”. (Bug #10566)

  • The table, type, and rows columns of EXPLAIN output can now be NULL. This is required for using EXPLAIN on SELECT queries that use no tables, such as EXPLAIN SELECT 1). (Bug #9899)

  • Expanded on information provided in general log and slow query log for prepared statements. (Bug #8367, Bug #9334)

Bugs Fixed

  • Security Fix: A vulnerability in zlib could result in a buffer overflow and arbitrary code execution. Shortly after MySQL 4.1.13 was released, a second potential zlib security flaw was discovered and fixed. A patch for this flaw was applied to the 4.1.13 sources, and the result published as MySQL 4.1.13a. The affected binaries were rebuilt. (Bug #11844, CVE-2005-2096, CVE-2005-1849)

  • Security Fix: On Windows systems, a user with any of the following privileges on *.* could crash mysqld by issuing a USE LPT1; or USE PRN; command:

    In addition, any of the commands USE NUL;, USE CON;, USE COM1;, or USE AUX; would report success even though the database was not in fact changed. (Bug #9148)

  • MySQL Cluster: When trying to open a table that could not be discovered or unpacked, the cluster returned error codes which the MySQL server falsely interpreted as operating system errors. (Bug #10365)

  • MySQL Cluster: NDB failed to build with gcc 4.0. (Bug #11377)

  • Replication: LOAD DATA ... REPLACE INTO ... on a replication slave failed for an InnoDB table having a unique index in addition to the primary key. (Bug #11401)

  • Replication: An UPDATE query containing a subquery caused replication to fail. (Bug #9361)

  • Replication: An invalid comparison caused warnings for packet length in replication on 64-bit compilers. (Bug #11064)

  • Replication: Queries of the form UPDATE ... (SELECT ... ) SET ... run on a replication master would crash all the slaves. (Bug #10442, CVE-2004-4380)

  • Some internal functions did not take into account that, for multi-byte character sets, CHAR and VARCHAR columns could exceed 255 bytes, which could cause the server to crash. (Bug #11167)

  • Queries with subqueries in the FROM clause were not being added to the query cache. (Bug #11522)

  • Invoking the DES_ENCRYPT() function could cause a server crash if the server was started without the --des-key-file option. (Bug #11643)

  • Incorrect results when searching using IN() where search items included NULL and 0. (Bug #9393)

  • Queries with ROLLUP returned wrong results for expressions containingGROUP BY columns. (Bug #7894)

  • SHOW WARNINGS with a LIMIT 0 clause returned all messages rather than an empty result set. (Bug #11095)

  • Using #pragma interface or #pragma implementation in source files caused portability issues for cygwin. (Bug #10241)

  • Table names were not handled correctly when lower_case_table_names = 2 if the table name lettercase differed in the FROM and WHERE clauses. (Bug #9500)

  • On Mac OS X, libmysqlclient_r.a now is built with --fno-common to make it possible to link a shared two-level namespace library against libmysqlclient_r.a. (Bug #10638)

  • Optimizer performed range check when comparing unsigned integers to negative constants, could cause errors. (Bug #11185)

  • The host name cache was not working. (Bug #10931)

  • When used within a subquery, SUBSTRING() returned an empty string. (Bug #10269)

  • Possible NULL values in BLOB columns could crash the server when a BLOB was used in a GROUP BY query. (Bug #11295)

  • A simultaneous CREATE TABLE ... SELECT FROM table and ALTER TABLE table on the same table caused the server to crash. (Bug #10224)

  • SHOW FIELDS truncated the TYPE column to 40 characters.

    Note

    This fix was reverted in MySQL 4.1.15 because it broke existing applications.

    (Bug #7142)

    References: See also Bug #12817.

  • The LAST_DAY() failed to return NULL when supplied with an invalid argument. See Section 11.7, “Date and Time Functions”. (Bug #10568)

  • Modifying a CHAR column with the utf8 character set to a shorter length did not properly truncate values due to not computing their length in utf8 character units. (Bug #11591)

  • mysqldump could crash for illegal or nonexistent table names. (Bug #9358)

  • Inserting a DOUBLE value into a utf8 string column crashed the server on Windows. (Bug #10714)

  • Corrected an optimization failure where a query returned an incorrect result for use of a newly populated table until the table was flushed. (Bug #11700)

  • mysqldump crashed using the --complete-insert option while dumping tables with a large number of long column names. (Bug #10286)

  • The mysql_config script did not handle symbolic linking properly. (Bug #10986)

  • CASE operator returns incorrect result when its arguments are not constants and its return value is put into a regular or temporary table (temporary == created by SQL engine for UNION/nonindexed GROUP BY and such operations). (Bug #10151)

  • For a MERGE table with MyISAM tables in other, symlinked, databases, SHOW CREATE TABLE reported the MyISAM tables using the name of the symlinked directory rather than the database name. (Bug #8183)

  • INSERT ... ON DUPLICATE KEY UPDATE with MERGE tables, which do not have unique indexes, caused the server to crash. (Bug #10400)

  • A three byte buffer overflow in the client functions caused improper exiting of the client when reading a command from the user. (Bug #10841)

  • 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. (Bug #11122)

  • Selecting the result of an aggregate function for an ENUM or SET column within a subquery could result in a server crash. (Bug #11821)

  • The server timed out SSL connections too quickly on Windows. (Bug #8572)

  • mysqldump --xml did not format NULL column values correctly. (Bug #9657)

  • When used in joins, SUBSTRING() failed to truncate to zero those string values that could not be converted to numbers. (Bug #10124)

  • DES_ENCRYPT() and DES_DECRYPT() require SSL support to be enabled, but were not checking for it. Checking for incorrect arguments or resource exhaustion was also improved for these functions. (Bug #10589)

  • For a UNION that involved long string values, values were not being converted correctly to TEXT values. (Bug #10025)

  • The incorrect sequence of statements HANDLER tbl_name READ index_name NEXT without a preceding HANDLER tbl_name READ index_name = (value_list) for an InnoDB table resulted in a server crash rather than an error. (Bug #5373)

  • A CREATE TABLE db_name.tbl_name LIKE ... statement would crash the server when no database was selected. (Bug #11028)

  • IP addresses not shown in ndb_mgm SHOW command on second ndb_mgmd (or on ndb_mgmd restart). (Bug #11596)

  • MySQL sometimes reported erroneously that certain character values had crashed a table when trying to convert other character sets to UTF-8. (Bug #9557)

  • Setting @@sql_mode = NULL caused an erroneous error message. (Bug #10732)

  • ALTER TABLE ... ENABLE INDEXES treated NULL values as equal when collecting index statistics for MyISAM tables, resulting in different statistics from those generated by ANALYZE TABLE and causing the optimizer to make poor index choices later. The same problem occurred for bulk insert statistics collection. Now NULL values are treated as unequal, just as for ANALYZE TABLE. (Bug #9622)

  • CREATE TABLE t AS SELECT UUID() created a VARCHAR(12) column, which is too small to hold the 36-character result from UUID(). (Bug #9535)

  • A problem with the my_global.h file caused compilation of MySQL to fail on single-processor Linux systems running 2.6 kernels. (Bug #10364)

  • Temporary tables were created in the data directory instead of tmpdir. (Bug #11440)

  • A Boolean full-text search where a query contained more query terms than one-third of the query length caused the server to hang or crash. (Bug #7858)

  • The mysqlhotcopy script was not parsing the output of SHOW SLAVE STATUS correctly when called with the --record_log_pos option. (Bug #7967)

  • Prepared statement with subqueries returned corrupt data. (Bug #11458)

  • On Windows, with lower_case_table_names set to 2, using ALTER TABLE to alter a MEMORY or InnoDB table that had a mixed-case name also improperly changed the name to lowercase. (Bug #9660)

  • InnoDB wrongly reported in the .err log that MySQL wass trying to drop a nonexistent table, if no more room remained in the tablespace. (Bug #10607)

  • SHOW WARNINGS did not properly display warnings generated by executing a cached query. (Bug #9414)

  • The server could crash due to an attempt to allocate too much memory when GROUP BY blob_col and COUNT(DISTINCT) were used. (Bug #11088)

  • When applying the group_concat_max_len limit, GROUP_CONCAT() could truncate multi-byte characters in the middle. (Bug #23451)

  • Under certain rare circumstances, inserting into the mysql.host table could cause the server to crash. (Bug #10181)

  • For MEMORY tables, it was possible for updates to be performed using outdated key statistics when the updates involved only very small changes in a very few rows. This resulted in the random failures of queries such as UPDATE t SET col = col + 1 WHERE col_key = 2; where the same query with no WHERE clause would succeed. (Bug #10178)

  • The --master-data option for mysqldump resulted in no error if the binary log was not enabled. Now an error occurs unless the --force option is given. (Bug #11678)

  • A ROLLUP query could return a wrong result set when its GROUP BY clause contained references to the same column. (Bug #11543)

  • Testing for crypt() support caused compilation problems when using OpenSSL/yaSSL on HP-UX and Mac OS X. (Bug #11150, Bug #10675)

  • Manually inserting a row with host='' into mysql.tables_priv and performing a FLUSH PRIVILEGES would cause the server to crash. (Bug #11330)

  • Added a missing mutex when rotating the relay logs. Also, the server now logs an error message if the size of a relay log cannot be read. (Bug #6987)

  • MySQL would not compile correctly on QNX due to missing rint() function. (Bug #11544)

  • An incorrect result was obtained for columns that included an aggregate function as part of an expression, and when WITH ROLLUP was used with GROUP BY. (Bug #7914)

  • INSERT ... SELECT ... ON DUPLICATE KEY UPDATE produced inaccurate results. (Bug #10886)

  • The handling by the HEX() function of numbers larger than 264 was improved. (Bug #9854)

  • A problem with the cp1250_czech_cs collation caused some LIKE comparisons to fail. (Bug #9759)

  • The value returned by the FIELD() function was incorrect when its parameter list contained one or more instances of NULL. (Bug #10944)

  • The NULLIF() function could produce incorrect results if the first argument was NULL. (Bug #11142)

  • OPTIMIZE run on an InnoDB table did not return a Table is full error if there was insufficient room in the tablespace. (Bug #8135)

  • The mysql client would output a prompt twice following input of very long strings, because it incorrectly assumed that a call to the _cgets() function would clear the input buffer. (Bug #10840)

  • Executing LOAD INDEX INTO CACHE for a table while other threads where selecting from the table caused a deadlock. (Bug #10602)

  • Errors could occur when performing GROUP BY on calculated values of a single row table. These could sometimes cause the server to crash on Windows. (Bug #11414)

  • Server crashed when using GROUP BY on the result of a DIV operation on a DATETIME value. (Bug #11385)

  • Queries against a table using a compound index based on the length of a UTF-8 text column produced incorrect results. For example, given a table with an index defined as shown:

    CREATE TABLE t (
      id INT NOT NULL,
      city VARCHAR(20) NOT NULL,
      KEY (city(7),id)
    ) TYPE=MYISAM CHARACTER SET=utf8;
    

    Assuming that suitable data has been inserted into the table, then a query such as SELECT * FROM t WHERE city = 'Durban'; would fail. (Bug #10253)

  • GROUP_CONCAT() with DISTINCT and WITH ROLLUP ignored DISTINCT for some rows. (Bug #7405)

  • The --no-data option for mysqldump was being ignored if table names were given after the database name. (Bug #9558)

  • Locking for CREATE TABLE ... SELECT for InnoDB tables was too weak. It permitted INSERT statements issued for the created table while the CREATE TABLE statement was still running to appear in the binary log before the CREATE TABLE statement. (Bug #6678)

  • SELECT DISTINCT ... GROUP BY constant returned multiple rows (it should return a single row). (Bug #8614)

  • An overly strict debugging assertion caused debug server builds to fail for some col_name = const_expr, where const_expr was a constant expression such as a subquery. (Bug #10020)

  • DROP DATABASE failed to check for all referencing InnoDB tables from other databases before dropping any tables. (Bug #10335)

  • mysqldump now exports HASH index definitions using USING rather than TYPE when the index name is optional. This corrects a problem when reloading the output for PRIMARY KEY definition, because TYPE must be preceded an index name, which is not given for a PRIMARY KEY. (Bug #11635)

  • Using CONCAT_WS() on a column set NOT NULL caused incorrect results when used in a LEFT JOIN. (Bug #11469)

  • SUBSTRING() did not work properly for input in the ucs2 character set. (Bug #10344)

C.1.14 Changes in MySQL 4.1.12 (2005-05-13)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

The fix for interpretation of MERGE table .MRG files (Bug #10687) was made for Windows builds after MySQL 4.1.12 was released and is present in MySQL 4.1.12a.

Functionality Added or Changed

  • Incompatible Change: The behavior of LOAD DATA INFILE and SELECT ... INTO OUTFILE has changed when the FIELDS TERMINATED BY and FIELDS ENCLOSED BY values both are empty. Formerly, a column was read or written the display width of the column. For example, INT(4) was read or written using a field with a width of 4. Now columns are read and written using a field width wide enough to hold all values in the field. However, data files written before this change was made might not be reloaded correctly with LOAD DATA INFILE for MySQL 4.1.12 and up. This change also affects data files read by mysqlimport and written by mysqldump --tab, which use LOAD DATA INFILE and SELECT ... INTO OUTFILE. For more information, see Section 12.2.5, “LOAD DATA INFILE Syntax”. (Bug #12564)

  • New /*> prompt for mysql. This prompt indicates that a /* ... */ comment was begun on an earlier line and the closing */ sequence has not yet been seen. (Bug #9186)

  • Added a --debug option to my_print_defaults.

  • Updated version of libedit to 2.9. (Bug #2596)

  • InnoDB: When foreign_key_checks = 0, ALTER TABLE and RENAME TABLE will ignore any type incompatibilities between referencing and referenced columns. Thus, it will be possible to convert the character sets of columns that participate in a foreign key. Be sure to convert all tables before modifying any data! (Bug #9802)

  • InnoDB: When the maximum length of SHOW INNODB STATUS output would be exceeded, truncate the beginning of the list of active transactions, instead of truncating the end of the output. (Bug #5436)

  • When the server cannot read a table because it cannot read the .frm file, print a message that the table was created with a different version of MySQL. (This can happen if you create tables that use new features and then downgrade to an older version of MySQL.) (Bug #10435)

  • Added the cp932 Japanese character set.

  • Previously in MySQL 4.1, an Illegal mix of collations error occurred when mixing strings from same character set when one had a nonbinary collation and the other a binary collation. Now the binary collation takes precedence, so that both strings are treated as having the binary collation. This restores compatibility with MySQL 4.0 behavior.

  • InnoDB: If innodb_locks_unsafe_for_binlog is enabled and the isolation level of the transaction is not set to SERIALIZABLE, InnoDB uses a consistent read for select in clauses such as INSERT INTO ... SELECT and UPDATE ... (SELECT) that do not specify FOR UPDATE or LOCK IN SHARE MODE. Thus, no locks are set to rows read from selected table.

Bugs Fixed

  • Security Fix: mysql_install_db created the mysql_install_db.X file with a predictable file name and insecure permissions, which permitted local users to execute arbitrary SQL statements by modifying the file's contents. (CVE-2005-1636)

  • Security Fix: Starting mysqld with --user=non_existent_user caused it to run using the privileges of the account from which it was invoked, including the root account. (Bug #9833)

  • Performance: InnoDB: At shutdown, the latest lsn is now written only to the first pages of the ibdata files of the system tablespace, and not to the .ibd files, saving up to several minutes in some cases.

  • MySQL Cluster: AUTO_INCREMENT did not work with INSERT..SELECT on NDB tables. (Bug #9675)

  • Queries containing CURRENT_USER() incorrectly were registered in the query cache. (Bug #9796)

  • Concurrent inserts were permitted into the tables in the SELECT part of INSERT ... SELECT ... UNION .... This could result in the incorrect order of queries in the binary log. (Bug #9922)

  • myisampack run on 64-bit systems resulted in segmentation violations. (Bug #9487)

  • InnoDB: Assertion failures of types ut_a(cursor->old_stored == BTR_PCUR_OLD_STORED) and prebuilt->template_type == 0 could occur when performing multi-table updates. This bug was introduced in 4.1.10 and 4.0.24. (Bug #9670)

  • mysqld was not checking whether the PID file was successfully created. (Bug #5843)

  • awk script portability problems were found in cmd-line-utils/libedit/makelist.sh . (Bug #9954)

  • SELECT ROUND(expr) produced a different result from CREATE TABLE ... SELECT ROUND(expr). (Bug #9837)

  • INSERT ... ON DUPLICATE KEY UPDATE incorrectly updated a TIMESTAMP column to the current timestamp, even if the update list included col_name = col_name for that column to prevent the update. (Bug #7806)

  • The --delimiter option for the nds_select program was nonfunctional. (Bug #10287)

  • An error in the implementation of the MyISAM compression algorithm caused myisampack to fail with very large sets of data (total size of all the records in a single column needed to be at least 3 GB to trigger this issue). (Bug #8321)

  • The error message for exceeding MAX_CONNECTIONS_PER_HOUR mistakenly referred to max_connections. (Bug #9947)

  • A problem with readlinecaused the mysql client to crash when the user pressed Control+R.. (Bug #9568)

  • The warning message from GROUP_CONCAT() did not always indicate the correct number of lines. (Bug #8681)

  • Additional fix for mysql_server_init() and mysql_server_end() C API functions so that stopping and restarting the embedded server would not cause a crash. (Bug #7344)

  • The latin2_croatian_ci collation was not sorted correctly. After upgrading to MySQL 4.1.12, all tables that have indexes using this collation are treated as crashed; for each such table, you must use CHECK TABLE and possibly repair the table.

    Support for the cp1250_croatian_ci collation was also added as part of the fix for this bug. (Bug #6505)

  • A deadlock resulted from using FLUSH TABLES WITH READ LOCK while an INSERT DELAYED statement was in progress. (Bug #7823)

  • InnoDB: Prevent ALTER TABLE from changing the storage engine if there are foreign key constraints on the table. (Bug #5574, Bug #5670)

  • The optimizer did not compute the union of two ranges for the OR operator correctly. (Bug #9348)

  • ENUM and SET columns in InnoDB tables were treated incorrectly as character strings. This bug did not manifest itself with latin1 collations, but it caused malfunction with utf8. Old tables will continue to work. In new tables, ENUM and SET will be stored internally as unsigned integers. (Bug #9526)

  • MySQL no longer automatically blocks IP addresses for which gethostbyname_r() fails when the reason is that the DNS server is down. Thanks to Jeremy Cole for patch. (Bug #8467)

  • Setting the initial AUTO_INCREMENT value for an InnoDB table using CREATE TABLE ... AUTO_INCREMENT = n did not work, and ALTER TABLE ... AUTO_INCREMENT = n did not reset the current value. (Bug #7061)

  • MAX() for an INT UNSIGNED (unsigned 4-byte integer) column could return negative values if the column contained values larger than 231. (Bug #9298)

  • Floats and doubles were not handled correctly when using the prepared statement API in the embedded server. (Bug #10443)

  • For a user-defined function invoked from within a prepared statement, the UDF's initialization routine was invoked for each execution of the statement, but the deinitialization routine was not. (It was invoked only when the statement was closed.) For UDFs that have an expensive deinit function (such as myperl), this fix has negative performance consequences. (Bug #9913)

  • Use of a subquery that used WITH ROLLUP in the FROM clause of the main query sometimes resulted in a Column cannot be null error. (Bug #9681)

  • CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. Now this function and CAST(string_argument AS SIGNED) also produces warnings for wrong string arguments. (Bug #7036)

  • Memory block allocation did not function correctly for the query cache in the embedded server. (Bug #9549)

  • Multiple-table updates could produce spurious data-truncation warnings if they used a join across columns that are indexed using a column prefix. (Bug #9103)

  • A deadlock could occur on an update followed by a SELECT on an InnoDB table without any explicit locks being taken. InnoDB now takes an exclusive lock when INSERT ON DUPLICATE KEY UPDATE is checking duplicate keys. (Bug #7975)

  • mysql.cc did not compile correctly using VC++ on Windows. (Bug #10245)

  • CREATE TABLE ... LIKE did not work correctly when lower_case_table_names was set on a case-sensitive file system and the source table name was not given in lowercase. (Bug #9761)

  • Changed metadata for result of SHOW KEYS: Data type for Sub_part column now is SMALLINT rather than TINYINT because key part length can be longer than 255. (Bug #9439)

  • In the client/server protocol for prepared statements, reconnection failed when the connection was killed with reconnection enabled. (Bug #8866)

  • my_print_defaults was ignoring the --defaults-extra-file option or crashing when the option was given. (Bug #9851, Bug #9136)

  • mysql.server no longer uses nonportable alias command or LSB functions. (Bug #9852)

  • InnoDB: Crash recovery of .ibd files on Windows did not work correctly if lower_case_table_names = 0or lower_case_table_names = 2 had been used; the directory scan used in crash recovery failed to force all paths to lowercase, so that the tablespace name was consistent with the InnoDB internal data dictionary.

  • mysqldump dumped core when invoked with --tmp and --single-transaction options and a nonexistent table name. (Bug #9175)

  • InnoDB: Add fault tolerance in the scan of .ibd files at a crash recovery; formerly a single failure of readdir_get_next caused the rest of the directory to be skipped.

  • An InnoDB test suite failure was caused by a locking conflict between two server instances at server shutdown or startup. This conflict on advisory locks appears to be the result of a bug in the operating system; these locks should be released when the files are closed, but somehow that does not always happen immediately in Linux. (Bug #9381)

  • When SELECT constant was the final SELECT in a UNION, a trailing LIMIT ... worked, but a trailing ORDER BY ... or ORDER BY ... LIMIT ... did not. (Bug #10032)

  • CHAR and VARCHAR columns that used the sjis character set were not being saved correctly, causing the following columns to be corrupted. (Bug #10493)

  • A server installed as a Windows service and started with --shared-memory could not be stopped. (Bug #9665)

  • Extraneous comparisons between NULL values in indexed columns were performed by the optimzer for operators such as = that are never true for NULL. (Bug #8877)

  • In some cases, concurrent DELETE and INSERT...SELECT queries could crash the MySQL server. The issue was a problem in the key cache. (Bug #10167)

  • For MERGE tables, avoid writing absolute path names in the .MRG file for the names of the constituent MyISAM tables so that if the data directory is moved, MERGE tables will not break. For mysqld, write just the MyISAM table name if it is in the same database as the MERGE table, and a path relative to the data directory otherwise. For the embedded servers, absolute path names may still be used. (Bug #5964)

  • Indexes on MyISAM tables could sometimes be corrupted; this was the result of padding values with spaces for comparison: Dumping a table with mysqldump, reloading it, and then re-running the binary log against it crashed the index and required a repair. (Bug #9188)

  • With DISTINCT, CONCAT(col_name,...) returned incorrect results when the arguments to CONCAT() were columns with an integer data type declared with a display width narrower than the values in the column. (For example, if an INT(1) column contained 1111.) (Bug #4082)

  • RENAME TABLE for an ARCHIVE table failed if the .arn file was not present. (Bug #9911)

  • An error occurred if you specified a default value of TRUE or FALSE for a BOOL column. (Bug #9666)

  • Starting mysqld with the --skip-innodb and --default-storage-engine=innodb (or --default-table-type=innodb caused a server crash. (Bug #9815)

  • MERGE tables could fail on Windows due to incorrect interpretation of path name separator characters for file names in the .MRG file. (Bug #10687)

  • net_read_timeout and net_write_timeout were not being respected on Windows. (Bug #9721)

  • TIMEDIFF() with a negative time first argument and positive time second argument produced incorrect results. (Bug #8068)

  • A segmentation fault in mysqlcheck occurred when the last table checked in --auto-repair mode returned an error (such as the table being a MERGE table). (Bug #9492)

  • Remove extra slashes in --tmpdir value (for example, convert /var//tmp to /var/tmp, because they caused various errors. (Bug #8497)

  • Corrected some failures of prepared statements for SQL (PREPARE plus EXECUTE) to return all rows for some SELECT statements. (Bug #9777, Bug #9096)

  • The server did not compile correctly with MinGW. Our thanks to Nils Durner for the patch. (Bug #8872)

  • configure did not properly recognize whether NPTL was available on Linux. (Bug #2173)

  • configure did not check the system for atomic operations capabilities. (Bug #7970)

C.1.15 Changes in MySQL 4.1.11 (2005-04-01)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • MySQL Cluster; Replication: Added a new global system variable slave_transaction_retries: If the replication slave SQL thread fails to execute a transaction because of an InnoDB deadlock or exceeded InnoDB's innodb_lock_wait_timeout or NDBCLUSTER's TransactionDeadlockDetectionTimeout or TransactionInactiveTimeout, it automatically retries slave_transaction_retries times before stopping with an error. The default is 0, and you must explicitly set the value greater than 0 to enable the retry behavior. (Bug #8325)

  • MySQL Cluster: More informative error messages are provided when a query is issued against an NDB table that has been modified by another mysqld server. (Bug #6762)

  • Replication: For slave replication servers started with --replicate-* options, statements that should not be replicated according those options no longer are written to the slave's general query log. (Bug #8297)

  • NULL now is considered more coercible than string constants. This resolves some Illegal mix of collations conflicts.

  • Added configuration directives !include and !includedir for including option files and searching directories for option files. See Section 4.2.3.3, “Using Option Files”, for usage.

  • Modified the parser to permit SELECT statements following the UNION keyword to be subqueries in parentheses. (Bug #2435)

  • Added sql_notes session variable to cause Note-level warnings not to be recorded. (Bug #6662)

  • The coercibility for the return value of functions such as USER() or VERSION() now is system constant rather than implicit. This makes these functions more coercible than column values so that comparisons of the two do not result in Illegal mix of collations errors. COERCIBILITY() was modified to accommodate this new coercibility value. See Section 11.13, “Information Functions”.

  • Added --with-big-tables compilation option to configure. (Previously it was necessary to pass -DBIG_TABLES to the compiler manually to enable large table support.) See Section 2.9.3, “MySQL Source-Configuration Options”, for details.

  • User variable coercibility has been changed from coercible to implicit. That is, user variables have the same coercibility as column values.

  • The use of SESSION or GLOBAL is no longer permitted for user variables. (Bug #9286)

  • InnoDB: Commit after every 10,000 copied rows when executing CREATE INDEX, DROP INDEX or OPTIMIZE TABLE, which are internally implemented as ALTER TABLE. This makes it much faster to recover from an aborted operation.

  • mysqld_safe will create the directory where the UNIX socket file is to be located if the directory does not exist. This applies only to the last component of the directory path name. (Bug #8513)

  • ONLY_FULL_GROUP_BY no longer is included in the ANSI composite SQL mode. (Bug #8510)

Bugs Fixed

  • Replication: If multiple semicolon-separated statements were received in a single packet, they were written to the binary log as a single event rather than as separate per-statement events. For a server serving as a replication master, this caused replication to fail when the event was sent to slave servers. (Bug #8436)

  • Replication: A replication master stamped a generated statement (such as a SET statement) with an error code intended only for another statement. This could happen, for example, when a statement generated a duplicate key error on the master but still had be to replicated to the slave. (Bug #8412)

  • Replication: Treat user variables as having IMPLICIT derivation (coercibility) to avoid Illegal mix of collations errors when replicating user variables. (Bug #6676)

  • Replication: If the slave was running with --replicate-*-table options which excluded one temporary table and included another, and the two tables were used in a single DROP TEMPORARY TABLE IF EXISTS statement, as the ones the master automatically writes to its binary log upon client's disconnection when client has not explicitly dropped these, the slave could forget to delete the included replicated temporary table. Only the slave needs to be upgraded. (Bug #8055)

  • The tee command could sometimes cause the mysql client to crash. (Bug #8499)

  • MATCH ... AGAINST in natural language mode could cause a server crash if the FULLTEXT index was not used in a join (that is, EXPLAIN did not show fulltext join mode) and the search query matched no rows in the table. (Bug #8522)

  • Unions between binary and nonbinary columns failed due to a collation coercibility problem. (Bug #6519)

  • Conversion of strings to doubles is now more accurate for floating point values that can be represented by integers, such as 123.45E+02. (Bug #7840)

  • REPAIR TABLE did not invalidate query results in the query cache that were generated from the table. (Bug #8480)

  • Using NOW() in a subquery caused the server to crash. (Bug #8824)

  • InnoDB: Work around a problem in AIX 5.1 patched with ML7 security patch: InnoDB would refuse to open its ibdata files, complaining about an operating system error 0.

  • If the mysql prompt was configured to display the default database name, and that database was dropped, mysql did not update the prompt. (Bug #4802)

  • Use of GROUP_CONCAT(x) in a subquery, where x was an alias to a column in the outer query, resulted in a server crash. (Bug #8656)

  • For a query with both GROUP BY and COUNT(DISTINCT) clauses and a FROM clause with a subquery, NULL was returned for any VARCHAR column selected by the subquery. (Bug #8218)

  • Changed mysql_server_end() C API function to restore more variables to their initial state so that a subsequent call to mysql_server_init() would not cause a client program crash. (Bug #7344)

  • Setting the max_error_count system variable to 0 resulted in a setting of 1. (Bug #9072)

  • In prepared statements, subqueries containing parameters were erroneously treated as const tables during preparation, resulting in a server crash. (Bug #8807)

  • InnoDB: Honor the --tmpdir startup option when creating temporary files. Previously, InnoDB temporary files were always created in the temporary directory of the operating system. On Netware, InnoDB will continue to ignore --tmpdir. (Bug #5822)

  • The --set-character-set option for myisamchk was changed to --set-collation. The value needed for specifying how to sort indexes is a collation name, not a character set name. (Bug #8349)

  • With lower_case_table_names set to 1, mysqldump on Windows could write the same table name in different lettercase for different SQL statements. (Bug #8216)

  • A rare race condition could cause FLUSH TABLES WITH READ LOCK to hang. (Bug #8682)

  • Using a compariosn where the left expression of IN, ALL, or ANY was a subquery caused the server to crash (Bug #8888)

  • Neither SHOW ERRORS nor SHOW WARNINGS were displaying Error-level messages. (Bug #6572)

  • When the server was started with --skip-name-resolve, specifying host name values that included netmasks in GRANT statements did not work. (Bug #8471)

  • Table creation for a MyISAM table failed if DATA DIRECTORY or INDEX DIRECTORY options were given that specified the path name to the database directory where the table files would be created by default. (Bug #8707)

  • Matching of table names by mysqlhotcopy now accommodates DBD::mysql versions 2.9003 and up, which implement identifier quoting. (Bug #8136)

  • mysqldump misinterpreted _ and % characters in the names of tables to be dumped as wildcard characters. (Bug #9123)

  • On Windows, create shared memory objects with the proper access rights to make them usable when the client and server are running under different accounts. (Bug #8226)

  • InnoDB: If one used LOCK TABLES, created an InnoDB temp table, and did a multiple-table update where a MyISAM table was the update table and the temp table was a read table, then InnoDB asserted in row0sel.c because n_mysql_tables_in_use was 0. Also, we remove the assertion altogether and just print an error to the .err log if this important consistency check fails. (Bug #8677)

  • Accented letters were improperly treated as distinct by the utf_general_ci collation. (Bug #7878)

  • Using TIMESTAMP columns with no minute or second parts in GROUP BY clauses with the new system variable set to 1 caused the server to crash. (Bug #9401)

  • The utf8_spanish2_ci and ucs2_spanish2_ci collations no longer consider r equal to rr . If you upgrade to this version from an earlier version, you should rebuild the indexes of any affected tables. (Bug #9269)

  • Privileges could be escalated using database wildcards in GRANT statements. (CVE-2004-0957)

  • Made the relay_log_space_limit system variable show up in the output of SHOW VARIABLES. (Bug #7100)

  • my_print_defaults ignored the --defaults-extra-file and --defaults-file options.

  • Some user variables were not being handled with implicit coercibility. (Bug #9425)

  • mysqldump now avoids writing SET NAMES to the dump output if the server is older than version 4.1 and would not understand that statement. (Bug #7997)

  • Worked around a bug in support for NSS support in glibc when static linking is used and LDAP is one of the NSS sources. The workaround is to detect when the bug causes a segmentation fault and issue a diagnostic message with information about the problem. (Bug #4872, Bug #3037)

  • An expression that tested a case-insensitive character column against string constants that differed in lettercase could fail because the constants were treated as having a binary collation. (For example, WHERE city='London' AND city='london' could fail.) (Bug #7098, Bug #8690)

  • InnoDB: If InnoDB cannot allocate memory, keep retrying for 60 seconds before we intentionally crash mysqld; maybe the memory shortage is just temporary.

  • When using the cp1250_czech_cs collation, empty literal strings were not regarded as equal to empty character columns. (Bug #8840)

  • InnoDB: If MySQL wrote to its binlog, but for some reason trx->update_undo and trx->insert_undo were NULL in InnoDB, then trx->commit_lsn was garbage, and InnoDB could assert in the log flush of trx_commit_complete_for_mysql(). (Bug #9277)

  • When setting integer system variables to a negative value with SET VARIABLES, the value was treated as a positive value modulo 232. (Bug #6958)

  • Too many rows were returned from queries that combined ROLLUP and LIMIT if SQL_CALC_FOUND_ROWS was given. (Bug #8617)

  • A problem with static variables did not permit building the server on Fedora Core 3. (Bug #6554)

  • Platform and architecture information in version information produced for --version option on Windows was always Win95/Win98 (i32). More accurately determine platform as Win32 or Win64 for 32-bit or 64-bit Windows, and architecture as ia32 for x86, ia64 for Itanium, and axp for Alpha. (Bug #4445)

  • The use of XOR together with NOT ISNULL() erroneously resulted in some outer joins being converted to inner joins by the optimizer. (Bug #9017)

  • Subqueries using ALLor ANY that contained a HAVING clause did not work correctly. (Bug #9350)

  • The MAX_CONNECTIONS_PER_HOUR resource limit was not being reset hourly and thus imposed an absolute limit on number of connections per account until the server is restarted or the limits flushed. (Bug #8350)

  • LIKE pattern-matching for strings did not work correctly with the cp1251_bin collation. (Bug #8560)

  • Expressions involving nested CONCAT() calls and character set conversion of string constants could return an incorrect result. (Bug #8785)

  • Creating a table using a name containing a character that is illegal in character_set_client resulted in the character being stripped from the name and no error. The character now is considered an error. (Bug #8041)

  • Host name matching didn't work if a netmask was specified for table-specific privileges. (Bug #3309)

  • Binary data stored in BLOB or BINARY columns would be erroneously dumped if mysqldump was invoked with --hex-blob and --skip-extended-insert arguments. This happened if data contained characters larger then 0x7F . (Bug #8830)

  • Mixed-case database and table names in the grant tables were ignored for authentication if the lower_case_table_names system variable was set. GRANT will not create such privileges when lower_case_table_names is set, but it is possible to create them by direct manipulation of the grant tables, or that old grant records were present before setting the variable. (Bug #7989)

  • The bundled readline library caused a segmentation fault in mysql when the user entered Shift+Enter. (Bug #5672)

  • Killing a filesort could cause an assertion failure. (Bug #8799)

  • Permit extra HKSCS and cp950 characters (big5 extension characters) to be accepted in big5 columns. (Bug #9357)

  • Do not try to space-pad BLOB columns containing ucs2 characters. (Bug #8771)

    References: This bug was introduced by Bug #7350.

  • Incorrectly ordered results were returned from a query using a FULLTEXT index to retrieve rows and there was another index that was usable for ORDER BY. For such a query, EXPLAIN showed the fulltext join type, but showed the other (not FULLTEXT) index in the Key column. (Bug #6635)

  • The CHARSET(), COLLATION(), and COERCIBILITY() functions sometimes returned NULL. CHARSET() and COLLATION() returned NULL when given any of these arguments that evaluated to NULL: A system function such as DATABASE(); a column value; and a user variable. Now CHARSET() and COLLATION() return the system character set and collation; the column character set and collation; and binary. COERCIBILITY(NULL) now returns ignorable coercibility rather than NULL. (Bug #9129)

  • Fixed option-parsing code for the embedded server to understand K, M, and G suffixes for the net_buffer_length and max_allowed_packet options. (Bug #9472)

  • FOUND_ROWS() returned an incorrect value for preceding SELECT statements that used no table or view. (Bug #6089)

  • Incorrect results were returned from queries that combined SELECT DISTINCT, GROUP BY , and ROLLUP. (Bug #8616)

  • When performing boolean full-text searches on utf8 columns, a double-quote character in the search string caused the server to crash. (Bug #8351)

  • A problem in index cost calculation caused a USE INDEX or FORCE INDEX hint not to be used properly for a LEFT JOIN across indexed BLOB columns. (Bug #7520)

  • In string literals with an escape character (\) followed by a multi-byte character that has a second byte of \, the literal was not interpreted correctly. The next character now is escaped, not just the next byte. (Bug #8303)

  • perror was printing a spurious extra line of output ("Error code ###: Unknown error ###" printed directly before the correct line with the error message). (Bug #8517)

  • OPTIMIZE TABLE was written twice to the binary log when used on InnoDB tables. (Bug #9149)

  • Ordering by an unsigned expression (more complex than a column reference) was treating the value as signed, producing incorrectly sorted results. HAVING was also treating unsigned columns as signed. (Bug #7425)

  • The MEMORY storage engine did not properly increment an AUTO_INCREMENT column if there was a second composite index that included the column. (Bug #8489)

  • The output of the STATUS (\s) command in mysql had the values for the server and client character sets reversed. (Bug #7571)

  • ENUM and SET columns in privilege tables incorrectly had a case-sensitive collation, resulting in failure of assignments of values that did not have the same lettercase as given in the column definitions. The collation was changed to be case insensitive. (Bug #7617)

  • InnoDB: A table with a primary key that contained at least two column prefixes was prone to memory corruption. An example of an affected CREATE TABLE statement is shown here:

    CREATE TABLE t  (
        a CHAR(100),
        b TINYBLOB,
        PRIMARY KEY(a(5), b(10))
    );

  • If a MyISAM table on Windows had INDEX DIRECTORY or DATA DIRECTORY table options, mysqldump dumped the directory path names with single-backslash path name separators. This would cause syntax errors when importing the dump file. mysqldump now changes \ to / in the path names on Windows. (Bug #6660)

  • For a statement string that contained multiple slow queries, only the last one would be written to the slow query log. (Bug #8475)

  • MIN(col_name) and MAX(col_name) could fail to produce the correct result if col_name was contained in multiple indexes and the optimizer did not choose the first index that contained the column. (Bug #8893)

  • For MyISAM tables, REPAIR TABLE no longer discard rows that have incorrect checksum. (Bug #9824)

  • The data type for MAX(datetime_col) was returned as VARCHAR rather than DATETIME if the query included a GROUP BY clause. (Bug #5615)

  • Depending on index statistics, GROUP BY col1, col2, ... could return incorrect results if the first table processed for a join had several indexes that cover the grouped columns. (Bug #9213)

  • A join on two tables failed when each contained a BIGINT UNSIGNED column that were compared when their values exceeded 263 – 1. The match failed and the join returned no rows. (Bug #8562)

  • BLOB(M) and TEXT(M) columns, with M less than 256, were being created as BLOB and TEXT columns rather than TINYBLOB or TINYTEXT columns. (Bug #9303)

  • AES_DECRYPT(col_name,key) could fail to return NULL for invalid values in col_name, if col_name was declared as NOT NULL. (Bug #8669)

  • InnoDB: An error in mysqld caused InnoDB in MySQL 4.1.8 to 4.1.10 InnoDB to refuse to use a table created with MySQL 3.23.49 or earlier if it was in the new compact InnoDB table format of 5.0.3 or later.

    Workaround.  Upgrade to 4.1.11 or newer, or dump the table and re-create it with MySQL 3.23.50 or newer before upgrading.

  • If max_join_size was set, a query containing a subquery that exceeded the examined-rows limit could hang. (Bug #8726)

  • With a database was dropped with lower_case_table_names = 2, tables in the database also were dropped but not being flushed properly from the table cache. If the database was re-created, the tables also would appear to have been re-created. (Bug #8355)

  • Retrieving from a view defined as a SELECT that mixed UNION ALL and UNION DISTINCT resulted in a different result than retrieving from the original SELECT. (Bug #6565)

  • Corruption of MyISAM table indexes could occur with TRUNCATE TABLE if the table had already been opened. For example, this was possible if the table had been opened implicitly by selecting from a MERGE table that mapped to the MyISAM table. The server now issues an error message for TRUNCATE TABLE under these conditions. (Bug #8306)

  • The Cyrillic letters I (И) and SHORT I (Й) were treated as being the same character by the utf8_general_ci collation. (Bug #8385)

  • Queries that combined SELECT DISTINCT, SUM(), and ROLLUP could cause the MySQL server to crash. (Bug #8615)

  • The CHAR() function was not ignoring NULL arguments, contrary to the documentation. (Bug #6317)

  • Bundled zlib in the source distribution was upgraded to 1.2.2. (Bug #9118)

C.1.16 Changes in MySQL 4.1.10 (2005-02-12)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

The security improvements related to creation of table files and to user-defined functions were made after MySQL 4.1.10 was released and are present in MySQL 4.1.10a. We would like to thank Stefano Di Paola for making us aware of these.

Functionality Added or Changed

  • Setting the connection collation to a value different from the server collation followed by a CREATE TABLE statement that included a quoted default value resulted in a server crash. (Bug #8235)

  • Added mysql_library_init() and mysql_library_end() as synonyms for the mysql_server_init() and mysql_server_end() C API functions. mysql_library_init() and mysql_library_end() are #define symbols, but the names more clearly indicate that they should be called when beginning and ending use of a MySQL C API library no matter whether the application uses libmysqlclient or libmysqld. (Bug #6149)

  • InnoDB: A shared record lock (LOCK_REC_NOT_GAP) is now taken for a matching record in the foreign key check because inserts can be permitted into gaps.

  • Thread stack size was increased from 192KB to 256KB on Linux/IA-64 (too small stack size was causing server crashes on some queries). (Bug #8391)

  • The server now issues a warning when lower_case_table_names = 2 and the data directory is on a case-sensitive file system, just as when lower_case_table_names = 0 on a case-insensitive file system. (Bug #7887)

  • Security improvement: The server creates .frm, .MYD, .MYI, .MRG, .ISD, and .ISM table files only if a file with the same name does not already exist. Thanks to Stefano Di Paola for finding and informing us about this issue. (CVE-2005-0711)

  • Added back faster subquery execution from 4.1.8. This adds also back a bug from 4.1.8 in comparing NULL to the value of a subquery.

  • Security improvement: User-defined functions should have at least one symbol defined in addition to the xxx symbol that corresponds to the main xxx() function. These auxiliary symbols correspond to the xxx_init(), xxx_deinit(), xxx_reset(), xxx_clear(), and xxx_add() functions. mysqld by default no longer loads UDFs unless they have at least one auxiliary symbol defined in addition to the main symbol. The --allow-suspicious-udfs option controls whether UDFs that have only an xxx symbol can be loaded. By default, the option is off. mysqld also checks UDF file names when it reads them from the mysql.func table and rejects those that contain directory path name separator characters. (It already checked names as given in CREATE FUNCTION statements.) See Section 18.2.2.1, “UDF Calling Sequences for Simple Functions”, Section 18.2.2.2, “UDF Calling Sequences for Aggregate Functions”, and Section 18.2.2.6, “User-Defined Function Security Precautions”. Thanks to Stefano Di Paola for finding and informing us about this issue. (CVE-2005-0709, CVE-2005-0710)

  • InnoDB: When MySQL/InnoDB is compiled on Mac OS X 10.2 or earlier, detect the operating system version at run time and use the fcntl() file flush method on Mac OS X versions 10.3 and later. In Mac OS X, fsync() does not flush the write cache in the disk drive, but the special fcntl() does; however, the flush request is ignored by some external devices. Failure to flush the buffers may cause severe database corruption at power outages.

  • From the Windows distribution, predefined accounts without passwords for remote users ('root'@'%', ''@'%') were removed (other distributions never had them).

  • InnoDB: Relaxed locking in INSERT ... SELECT, single table UPDATE ... (SELECT) and single table DELETE ... (SELECT) clauses when innodb_locks_unsafe_for_binlog is used and isolation level of the transaction is not SERIALIZABLE. InnoDB uses consistent read in these cases for a selected table.

  • The server now issues a warning to the error log when it encounters older tables that contain character columns that might be interpreted by newer servers to have a different column length. See Section 2.11.1.1, “Upgrading from MySQL 4.0 to 4.1”, for a discussion of this problem and what to do about it. (Bug #6913)

Bugs Fixed

  • Replication: Multiple-table updates did not replicate properly to slave servers where --replicate-*-table options had been specified. (Bug #7011)

  • The CONVERT_TZ() function, when its second or third argument was from a const table, caused the server to crash. (See Section 12.7.2, “EXPLAIN Syntax”.) (Bug #7705)

  • FOUND_ROWS() returned an incorrect value after a SELECT SQL_CALC_FOUND_ROWS DISTINCT statement that selected constants and included GROUP BY and LIMIT clauses. (Bug #7945)

  • The CONV() function returned an unsigned BIGINT number, which does not fit in 32 bits. (Bug #7751)

  • TIMESTAMP columns with their display width so specified were not treated as identical to DATETIME columns when the server was run in MAXDB mode. (Bug #7418)

  • MySQL permitted concurrent updates (including inserts and deletes) to a table if binary logging was enabled. Now, all updates are executed in a serialized fashion, because they are executed serialized when the binary log is replayed. (Bug #7879)

  • The TIMEDIFF() function returned incorrect results if one of its arguments had a nonzero microsecond part. (Bug #7586)

  • InnoDB: ALTER TABLE ... ADD CONSTRAINT PRIMARY KEY ... complained about bad foreign key definition. (Bug #7831)

  • Updates were being written to the binary log when there were binlog-do-db or binlog-ignore-db options even when there was no current database, contrary to Section 14.9.1, “Evaluation of Database-Level Replication and Binary Logging Options”. (Bug #6749)

  • SHOW INDEX on a MERGE table could cause debug versions of the server to crash. (Bug #7377)

  • The number of columns in a row comparison against a subquery was calculated incorrectly. (Bug #8020)

  • Conversion of floating-point values to character values was not performed correctly when the absolute value of the float was less than 1 (including negative values). (Bug #7774)

  • For indexes, SHOW CREATE TABLE now displays the index type even if it is the default, for storage engines that support multiple index types. (Bug #7235)

  • A slave running MySQL 3.23.51 or newer hung while trying to connect to a master running MySQL 3.23.50 or older. (This occurred due to a bug in the old masters—SELECT @@unknown_var caused the server to hang—which was fixed in MySQL 3.23.50.) (Bug #7965)

  • mysqld had problems finding its language files if the --basedir value was specified as a very long path name. (Bug #8015)

  • InnoDB: A rare race condition could cause an assertion in DROP TABLE or in ALTER TABLE.

  • ALTER TABLE on a TEMPORARY table with a mixed-lettercase name could cause the table to disappear when lower_case_table_names was set to 2. (Bug #7261)

  • Multiple-table UPDATE statements could cause spurious Table '#sql_....' is full errors if the number of rows to update was sufficiently large. (Bug #7788)

  • LOAD INDEX statement now loads the index into memory. (Bug #8452)

  • Corrected a problem with references to DUAL where statements such as SELECT 1 AS a FROM DUAL would succeed but statements such as SELECT 1 AS a FROM DUAL LIMIT 1 would fail. (Bug #8023)

  • Strings that began with CHAR(31) were considered equal to the empty string. (Bug #8134)

  • Executing a multi-statement query more than once with the query cache active could yield incorrect result sets. (Bug #7966)

  • InnoDB: Fixed a bug introduced in 4.1.9, where, if you used innodb_file_per_table with the Windows version of MySQL, mysqld stopped with Windows error 87. (See the Bugs database or the MySQL 4.1.9 changelog for information about a workaround for the issue in 4.1.9). (Bug #8021)

  • If one used CONVERT_TZ() function in SELECT, which in its turn was used in CREATE TABLE statements, then system time zone tables were added to list of tables joined in SELECT and thus erroneous result was produced. (Bug #7899)

  • If multiple prepared statements were executed without retrieving their results, executing one of them again would cause the client program to crash. (Bug #8330)

  • The IN() operator did not return correct results if all values in the list were constants and some of them used substring functions such as LEFT(), RIGHT(), or MID(). (Bug #7716)

  • Nonnumeric values inserted into a YEAR column were being stored as 2000 rather than as 0000. (Bug #6067)

  • The combination of -not and trunc* operators in a full-text search did not work correctly. Using more than one truncated negative search term caused the result to be empty.

  • SHOW INDEX reported Sub_part values in bytes rather than characters for columns with a multi-byte character set. (Bug #7943)

  • Adding an ORDER BY clause for an indexed column caused a SELECT to return an empty result. (Bug #7331)

  • InnoDB: Use native tmpfile() function on Netware. All InnoDB temporary files are created under sys:\tmp. Previously, InnoDB temporary files were never deleted on Netware.

  • CREATE TABLE ... LIKE failed on Windows when the source or destination table was located in a symlinked database directory. (Bug #6607)

  • Re-execution of prepared statements containing subqueries caused the server to crash. (Bug #8125)

  • ALTER TABLE improperly accepted an index on a TIMESTAMP column that CREATE TABLE would reject. (Bug #7884)

  • Handling of trailing spaces was incorrect for the ucs2 character set. (Bug #7350)

  • Certain correlated subqueries with forward references (referring to an alias defined later in the outer query) could crash the server. (Bug #8025)

  • Key cache statistics were reported incorrectly by the server after receipt of a SIGHUP signal. (Bug #4285)

  • Correct a problem with mysql_config, which was failing to produce proper zlib option for linking under some circumstances. (Bug #6273)

  • Comparing a nested row expression (such as ROW(1,(2,3))) with a subquery caused the server to crash. (Bug #8022)

  • mysqlbinlog forgot to add backquotes around the collation of user variables (causing later parsing problems as BINARY is a reserved word). (Bug #7793)

  • A symlink vulnerability in the mysqlaccess script was reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CVE-2005-0004)

  • A HAVING clause that referred to RAND() or a user-defined function in the SELECT part of a query through an alias could cause MySQL to crash or to return an incorrect value. (Bug #5185)

  • Erroneous output resulted from SELECT DISTINCT combined with a subquery and GROUP BY. (Bug #7946)

  • Column headers in query results retrieved from the query cache could be corrupted when a non-4.1 client was served a result originally generated for a 4.1 client. The query cache was not keeping track of which client/server protocol was being used. (Bug #6511)

  • Modify SET statements produced by mysqldump to write quoted strings using single quotation marks rather than double quotation marks. This avoids problems if the dump file is reloaded while the ANSI_QUOTES SQL mode is in effect. (Bug #8148)

  • Changed mysql client so that including \p as part of a prompt command uses the name of the shared memory connection when the connection is using shared memory. (Bug #7922)

  • Cardinality estimates for HASH indexes of TEMPORARY tables created using MEMORY storage engine were inaccurate. As a result, queries that were using this index (as shown by EXPLAIN) could returned incorrect results. (Bug #8371)

  • Add description of debug command to mysqladmin help output. (Bug #8207)

  • A problem with UNION statements resulted in the wrong number of examined rows being reported in the slow query log.

  • DELETE FROM tbl_name ... WHERE ... ORDER BY tbl_name.col_name when the ORDER BY column was qualified with the table name caused the server to crash. (Bug #8392)

  • mysql_stmt_close() C API function was not clearing an error indicator when a previous prepare call failed, causing subsequent invocations of error-retrieving calls to indicate spurious error values. (Bug #7990)

  • mysql_stmt_prepare() was very slow when used in client programs on Windows. (Bug #5787)

  • A Table is full error occurred when the table was still smaller than max_heap_table_size. (Bug #7791)

  • perror.exe was always returning Unknown error on Windows. See Section 4.8.1, “perror — Explain Error Codes”. (Bug #7390)

  • Removed a dependence of boolean full-text search on --default-character-set option. (Bug #8159)

  • Comparing the result of a subquery to a nonexistent column caused the server to crash. This issue affected MySQL on Windows platforms only. (Bug #7885)

  • Use of GROUP_CONCAT() with HAVING caused the server to crash. (Bug #7769)

  • Certain joins used with boolean full-text search could cause the server to crash. (Bug #8234)

  • Ensured that mysqldump --single-transaction sets its transaction isolation level to REPEATABLE READ before proceeding (otherwise if the MySQL server was configured to run with a default isolation level lower than REPEATABLE READ it could give an inconsistent dump). (Bug #7850)

C.1.17 Changes in MySQL 4.1.9 (2005-01-11)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • mysqld_safe no longer tests for the presence of the data directory when using a relatively located server binary. It just assumes the directory is there, and fails to start up if it is not. This permits the data directory location to be specified on the command line, and avoids running a server binary that was not intended. (Bug #7249)

    References: See also Bug #7518.

  • The MySQL server aborts immediately instead of simply issuing a warning if it is started with the --log-bin option but cannot initialize the binary log at startup (that is, an error occurs when writing to the binary log file or binary log index file).

  • The platform suffix was changed from -win to -win32

  • InnoDB: Print a more descriptive error and refuse to start InnoDB if the size of ibdata files is smaller than what is stored in the tablespace header; innodb_force_recovery overrides this.

  • The MySQL-shared-compat Linux RPM now includes the 3.23 as well as the 4.0 libysqlclient.so shared libraries. (Bug #6342)

  • The product descriptions -noinstall and -essential have been moved in front of the version number

  • The binary log file and binary log index file now behave like MyISAM when there is a "disk full" or "quota exceeded" error. See Section B.5.4.3, “How MySQL Handles a Full Disk”.

  • InnoDB: Do not acquire an internal InnoDB table lock in LOCK TABLES if autocommit = 1. This helps in porting old MyISAM applications to InnoDB. InnoDB table locks in that case caused deadlocks very easily.

  • Seconds_Behind_Master is NULL (which means unknown) if the slave SQL thread is not running, or if the slave I/O thread is not running or not connected to master. It is zero if the SQL thread has caught up with the I/O thread. It no longer grows indefinitely if the master is idle.

  • The naming scheme of the Windows installation packages has changed slightly:

    • The platform suffix was changed from -win to -win32

    • The product descriptions -noinstall and -essential have been moved in front of the version number

    Examples: mysql-essential-4.1.9-win32.msi, mysql-noinstall-4.1.9-win32.zip See Section 2.3, “Installing MySQL on Microsoft Windows”.

  • The Mac OS X 10.3 installation disk images now include a MySQL Preference Pane for the Mac OS X Control Panel that enables the user to start and stop the MySQL server using the GUI and activate and deactivate the automatic MySQL server startup on bootup.

Bugs Fixed

  • Replication: A replication slave could crash after replicating many ANALYZE TABLE, OPTIMIZE TABLE, or REPAIR TABLE statements from the master. (Bug #6461, Bug #7658)

  • FLOAT values were not truncated correctly. (Bug #7361)

  • When encountering a disk full or quota exceeded write error, MyISAM sometimes failed to sleep and retry the write, resulting in a corrupted table. (Bug #7714)

  • Include compression library flags in the output from mysql_config --lib_r. (Bug #7021)

  • Made the MySQL server accept executing SHOW CREATE DATABASE even if the connection has an open transaction or locked tables. Refusing it made mysqldump --single-transaction sometimes fail to print a complete CREATE DATABASE statement for some dumped databases. (Bug #7358)

  • Corrected a problem with mysql_config not producing all relevant flags from CFLAGS. (Bug #6964)

  • mysqladmin password now checks whether the server has the old_passwords enabled or predates 4.1 and uses the old-format password if so. (Bug #7451)

  • Running mysql_fix_privilege_tables could result in grant table columns with lengths that were too short if the server character set had been set to a multi-byte character set first. (Bug #7539)

  • Incorrect results were obtained for complex datetime expressions containing casts of datetime values to TIME or DATE values. (Bug #6914)

  • InnoDB: InnoDB failed to drop a table in the background drop queue if the table was referenced by a FOREIGN KEY constraint.

  • PROCEDURE ANALYSE() did not quote some ENUM values properly. (Bug #2813)

  • Using INSERT DELAYED with prepared statements could lead to table corruption.

  • InnoDB: When DISCARD TABLESPACE failed because the table was referenced by a foreign key, the error code returned did not indicate that this was the case.

  • InnoDB: Dropping a table where an INSERT was waiting for a lock to check a FOREIGN KEY constraint caused an assertion.

  • InnoDB: The storgae of an SQL NULL value in some rare cases took more space than should have been required.

  • Corrected a problem with mysqld_safe not properly capturing output from ps. (Bug #5878)

  • --expire-logs-days was not honored if using only transactions. (Bug #7236)

  • Microseconds were dropped from the string result of the STR_TO_DATE function, when there was some other specifier in the format string following %f. (Bug #7458)

  • InnoDB: Use the fcntl(F_FULLFSYNC) flush method on Mac OS X versions 10.3 and up instead of fsync() that could cause corruption at power outages.

  • Added a --default-character-set option to mysqladmin to avoid problems when the default character set is not latin1. (Bug #7524)

  • Linking both the MySQL client library and IMAP library in the same build failed. (Bug #7428)

  • InnoDB: When innodb_file_per_table was enabled in my.cnf, records could disappear from the secondary indexes of a table after mysqld was killed.

    Note

    This fix introduced a new Bug #8021, affecting Windows and users of innodb_file_per_table only. If you are using innodb_file_per_table on Windows, you can work around this new issue by adding the line innodb_flush_method= unbuffered to the my.cnf or my.ini file.

    (Bug #7496)

  • InnoDB: 32-bit mysqld binaries built on HP-UX 11 did not work with InnoDB files greater than 2 GB in size. (Bug #6189)

C.1.18 Changes in MySQL 4.1.8 (2004-12-14)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

Due to a libtool-related bug in the source distribution, the creation of shared libmysqlclient libraries was not possible (the resulting files were missing the .so file name extension). The file ltmain.sh was updated to fix this problem and the resulting source distribution was released as mysql-4.1.8a.tar.gz. This modification did not affect the binary packages. (Bug #7401)

Functionality Added or Changed

  • MySQL Cluster: Added support for a [mysql_cluster] section to the my.cnf file for configuration settings specific to MySQL Cluster. The ndb-connectstring variable was moved here.

  • Replication: mysqldump --single-transaction --master-data is now able to take an online (nonblocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See Section 4.5.4, “mysqldump — A Database Backup Program”.

  • Added mysql_hex_string() C API function that hex-encodes a string.

  • InnoDB: Do not periodically write SHOW INNODB STATUS information to a temporary file unless the configuration option innodb-status-file = 1 is set.

  • FULLTEXT index block size is changed to be 1024 instead of 2048.

  • InnoDB: Commit after every 10,000 copied rows when executing ALTER TABLE. This makes it much faster to recover from an aborted ALTER TABLE or OPTIMIZE TABLE.

  • Added --order-by-primary to mysqldump, to sort each table's data in a dump file. This may be useful when dumping a MyISAM table which will be loaded into an InnoDB table. Dumping a MyISAM table with this option is considerably slower than without.

  • Added --hex-blob option to mysqldump for dumping binary string columns using hexadecimal notation.

  • The --master-data option for mysqldump now takes an optional argument of 1 or 2 to produce a noncommented or commented CHANGE MASTER TO statement. The default is 1 for backward compatibility.

  • The statements CREATE TABLE, TRUNCATE TABLE, DROP DATABASE, and CREATE DATABASE cause an implicit commit.

  • Added WITH CONSISTENT SNAPSHOT clause to START TRANSACTION to begin a transaction with a consistent read.

  • For ALTER DATABASE, the database name now can be omitted to apply the change to the default database.

  • Automatic character set conversion formerly was done for operations that mix a column and a string such as assigning a string to a column, when this was possible without loss of information. Automatic conversion for operations that mix columns and strings has been expanded to cover many functions (such as CONCAT()) and assignment operators. This reduces the frequency of Illegal mix of collations errors.

  • Added --disable-log-bin option to mysqlbinlog. Using this option you can disable binary logging for the statements produced by mysqlbinlog. That is, mysqlbinlog --disable-log-bin <file_name> | mysql won't write any statements to the MySQL server binary log.

  • mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, and so forth) before each LOAD DATA INFILE, like it does for other queries; unless --short-form is used.

  • In the normal log MySQL now prints the log position for Binlog Dump requests.

  • Added --lock-all-tables to mysqldump to lock all tables by acquiring a global read lock.

  • A connection doing a rollback now displays "Rolling back" in the State column of SHOW PROCESSLIST.

Bugs Fixed

  • Replication: OPTIMIZE TABLE, REPAIR TABLE, and ANALYZE TABLE are now replicated without any error code in the binary log. (Bug #5551)

  • Replication: LOAD DATA INFILE now works with option replicate-rewrite-db. (Bug #6353)

  • Replication: Changed semantics of CREATE/ALTER/DROP DATABASE statements so that replication of CREATE DATABASE is possible when using --binlog-do-db and --binlog-ignore-db. (Bug #6391)

  • Replication: InnoDB: If one used INSERT IGNORE to insert several rows at a time, and the first inserts were ignored because of a duplicate key collision, then InnoDB in a replication slave assigned AUTO_INCREMENT values 1 bigger than in the master. This broke the MySQL replication. (Bug #6287)

  • Using a modified client library, a malicious user could take advantage of an issue in MySQL authentication code to crash the server with specially crafted packets. (Bug #7187)

  • Prevent adding CREATE TABLE .. SELECT query to the binary log when the insertion of new records partially failed. (Bug #6682)

  • Server warnings now are reset when you execute a prepared statement.

  • InnoDB: Do not intentionally crash mysqld if the buffer pool is exhausted by the lock table; return error 1206 instead. Do not intentionally crash mysqld if we cannot allocate the memory for the InnoDB buffer pool. (Bug #6817, Bug #6827)

  • If a connection was interrupted by a network error and did a rollback, the network error code got stored into the BEGIN and ROLLBACK binary log events; that caused superfluous slave stops. (Bug #6522)

  • InnoDB: innodb_data_file_path was not handled correctly in some cases. This bug was introduced in MySQL 4.1.1.

  • InnoDB: Let the InnoDB FOREIGN KEY parser remove the latin1 character 0xA0 from the end of an unquoted identifier. The EMS MySQL Manager in ALTER TABLE adds that character after a table name, which caused error 121 when we tried to add a new constraint.

  • A spurious "duplicate key" error resulted from executing a REPLACE or INSERT ... ON DUPLICATE KEY UPDATE statement performing a multiple-row insert on a table having unique and full-text indexes. (Bug #6784)

  • InnoDB: Made the foreign key parser better aware of quotation marks. (Bug #6340)

  • mysqlbinlog did not print SET PSEUDO_THREAD_ID statements in front of LOAD DATA INFILE statements inserting into temporary tables, thus causing potential problems when rolling forward these statements after restoring a backup. (Bug #6671)

  • A reference to a column by name from a WHERE subquery to an outer query, with use of a temporary table by the outer query. (Bug #7079)

  • A spurious Record has changed since last read in table error could be raised by some queries on HEAP tables containing only one row. (Bug #6748)

  • Improved performance of identifier comparisons (if many tables or columns are specified).

  • Execution of subqueries in SET and DO statements caused wrong results to be returned from subsequent queries. (Bug #6462)

  • A multiple-table DELETE could cause MySQL to crash when using InnoDB tables. (Bug #6378, Bug #5837)

  • If a connection had an open transaction but had done no updates to transactional tables (for example if had just done a SELECT FOR UPDATE then executed a nontransactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714)

  • INSERT on a table with FULLTEXT indexes, could under rare circumstances result in a corrupted table if words of different lengths could be considered equal. This is possible in some collations such as utf8_general_ci and latin1_german2_ci. (Bug #6265)

  • mysqld_safe was in many cases ignoring any --no-defaults, --defaults-file, or --defaults-extra-file arguments. Those arguments are now honored, and this may change what options are passed to mysqld in some installations.

  • A prepared statement using SELECT ... PROCEDURE could cause the server to crash.

  • A prepared statement using a subquery could cause the server to crash.

  • Starting and stopping the slave thread (only) could in some circumstance cause the server to crash. (Bug #6148)

  • NULL was not always processed correctly in subqueries using ALL or SOME. (Bug #6247)

  • MySQL required explicit privileges on system time zone description tables for implicit access to them (that is, if one set the time_zone variable or used the CONVERT_TZ() function) in cases where some table-level or column-level privileges already existed. (Bug #6765)

  • mysql_stmt_data_seek(stmt,0) now rewinds a counter and enables buffered rows to be re-fetched on the client side. (Bug #6996)

  • NULL were not handled caorrectly in cases of empty results in subqueries. (Bug #6806)

  • Some internal structures were not initialized correctly prior to first execution. (Bug #6517)

  • InnoDB: innodb_locks_unsafe_for_binlog still uses next-key locking, which is unnecessary next-key. Such locks are now removed when the innodb_locks_unsafe_for_binlog option is enabled. (Bug #6747)

  • Some complex queries did not work correctly with subqueries. (Bug #6841, Bug #6406)

  • If STMT_ATTR_UPDATE_MAX_LENGTH is set for a prepared statement, mysql_stmt_store_result() updates field->max_length for numeric columns as well. (Bug #6096)

  • InnoDB: FOREIGN KEY constraints treated table and database names as case-insensitive, so that RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. The server would also hang if one tried using an ALTER TABLE or RENAME TABLE statement to create a foreign key constraint name that collided with existing one. (Bug #3478)

  • A prepared statement using SELECT * FROM t1 NATURAL JOIN t2... could cause the server to crash.

  • InnoDB: Do not call rewind() when displaying SHOW INNODB STATUS information on stderr.

  • Using the string function LEFT as part of the expression used as GROUP BY column caused the server to crash. (Bug #7101)

  • The server was interpreting CHAR BINARY and VARCHAR BINARY columns from 4.0 tables as having the BINARY and VARBINARY data types. Now they are interpreted as CHAR and VARCHAR columns that have the binary collation of the column's character set. (This is the same way that CHAR BINARY and VARCHAR BINARY are handled for new tables created in 4.1.)

  • GROUP_CONCAT(...ORDER BY) when used with prepared statements gave wrong sorting order.

  • INSERT ... SELECT no longer reports spurious "column truncated" warnings (Bug #6284)

  • The server accepted datetime values with an invalid year part. The server now also performs the same checks for datetime values passed through MYSQL_TIME structures as for datetime values passed as strings. (Bug #6266)

  • Prepared statements now handle ZEROFILL when converting integer to string.

  • CREATE TABLE created_table didn't signal when table was created. This could cause a DROP TABLE created_table in another thread to wait "forever".

  • A sequence of BEGIN (or SET autocommit = 0), FLUSH TABLES WITH READ LOCK, transactional update, COMMIT, FLUSH TABLES WITH READ LOCK could hang the connection forever and possibly the MySQL server itself. This happened for example when running the innobackup script several times. (Bug #6732)

  • A rare memory corruption problem could cause MATCH ... AGAINST on columns using multi-byte character sets to crash the server. (Bug #6269)

  • A call to mysql_stmt_store_result() occurred without a preceding call to mysql_stmt_bind_result() caused the server to crash.

  • Insufficient privilege checks were made for SHOW CREATE TABLE. (Bug #7043)

  • InnoDB: Refuse to open new-style tables created with MySQL 5.0.3 or later. (Bug #7089)

  • Backported a fix for the full-text interface from MySQL 5.0. (Bug #6523)

C.1.19 Changes in MySQL 4.1.7 (2004-10-23, Production)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Added a startup option and settable system variable innodb_table_locks for making LOCK TABLE acquire locks on InnoDB tables. The default value is 1, which means that LOCK TABLES also causes InnoDB to take a table lock internally. In applications using autocommit = 1 and LOCK TABLES, InnoDB's internal table locks (added in MySQL 4.0.20 and 4.1.2) can cause deadlocks. You can set innodb_table_locks = 0 in my.cnf to remove that problem.

    In addition, SHOW TABLE STATUS now shows the creation time of InnoDB tables. That this timestamp might not always be correct because (for example) it was changed by ALTER TABLE. See Section 13.2.15, “Restrictions on InnoDB Tables”. (Bug #3299, Bug #5998)

  • InnoDB: If innodb_thread_concurrency would be exceeded, let a thread sleep 10 ms before entering the FIFO queue; previously, the value was 50 ms.

  • MOD() no longer rounds arguments with a fractional part to integers. Now it returns exact remainder after division. (Bug #6138)

Bugs Fixed

  • Security Fix: A missing UPDATE privilege could be circumvented by a user having INSERT and SELECT privileges for table with a primary key. (Bug #6173)

  • Replication: A problem introduced in MySQL 4.0.21 caused replication slaves to stop (error 1223) where a connection started a transaction, performed updates, then issued a FLUSH TABLES WITH READ LOCK followed by a COMMIT. This issue occurred when using the InnoDB innobackup script. (Bug #5949)

  • DATE, TIME, and DATETIME columns were not handled correctly by the binary protocol. The problem was compiler-specific and could have been observed on HP-UX, AIX, and Solaris 9, when using native compilers. (Bug #6025)

  • Selecting from a HEAP table with key_column IS NOT NULL could cause the server to crash. The crash could also occur even if all index parts were not used. (Bug #6082)

  • FOUND_ROWS() did not work correctly with LIMIT clause in prepared statements. (Bug #6088)

  • libmysqlclient did not convert zero date values (0000-00-00) to strings correctly. (Bug #6058)

  • Invoking the deprecated libmysqlclient function mysql_create_db() caused the server to crash. (Bug #6081)

  • MyISAM indexes could be corrupted when key values started with character codes below BLANK. This was caused by the new key sort order instroduced in MySQL 4.1. (Bug #6151)

  • InnoDB: Release the dictionary latch during a long cascaded FOREIGN KEY operation, so that we do not starve other users doing CREATE TABLE or other DDL operation. This caused a notorious 'Long semaphore wait' message to be printed to the .err log. (Bug #5961)

  • Now implicit access to system time zone description tables (which happens when you set the time_zone variable or use CONVERT_TZ() function) does not require any privileges. (Bug #6116)

  • TINYINT columns were not handled correctly in the binary protocol. The problem was specific to platforms where the C compiler has the char data type unsigned by default. (Bug #6024)

  • libmysqlclient did not convert negative time values to strings correctly. (Bug #6049)

  • InnoDB: LOAD DATA INFILE…REPLACE printed duplicate key errors when executing the same LOAD statement several times. (Bug #5835)

  • Attempting to prepare a statement with RAND(?) caused the server to crash. (Bug #5985)

  • Bad metadata was sent for SELECT statements not returning a result set (such as SELECT ... INTO OUTFILE) by the prepared statements protocol. (Bug #6059)

  • NATURAL JOIN did not work correctly in prepared statements. . (Bug #6046)

  • REVOKE ALL PRIVILEGES, GRANT OPTION FROM user did not remove all privileges correctly. (Bug #5831)

  • Join of tables from different databases having columns with identical names did not work correctly, returning the error Column 'xxx' in field list is ambiguous. (Bug #6050)

C.1.20 Changes in MySQL 4.1.6 (2004-10-10)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Now if ALTER TABLE converts one AUTO_INCREMENT column to another AUTO_INCREMENT column it preserves zero values (this includes the case that we don't change such column at all).

  • On Windows, the MySQL configuration files included in the package now use .ini instead of .cnf as the file name suffix.

  • If a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it now prints a message to the error log every 10 minutes, and waits until disk space becomes available. (Bug #3248)

  • InnoDB: The innodb_autoextend_increment startup option that was introduced in release 4.1.5 was made a settable global variable. (Bug #5736)

  • InnoDB: If DROP TABLE is invoked on an InnoDB table for which the .ibd file is missing, print to error log that the table was removed from the InnoDB data dictionary, and enable MySQL to delete the .frm file. Maybe DROP TABLE should issue a warning in this case.

  • InnoDB: Added the startup option and settable global variable innodb_max_purge_lag for delaying INSERT, UPDATE and DELETE operations when the purge operations are lagging. The default value of this parameter is zero, meaning that there are no delays. See Section 13.2.10, “InnoDB Multi-Versioning”.

  • Added option --sigint-ignore to the mysql command line client to make it ignore SIGINT signals (typically the result of the user pressing Control+C).

  • Now if ALTER TABLE converts some column to TIMESTAMP NOT NULL column it converts NULL values to current timestamp value (One can still get old behavior by setting system TIMESTAMP variable to zero).

  • TIMESTAMP columns now can store NULL values. To create such a column, you must explicitly specify the NULL attribute in the column specification. (Unlike all other data types, TIMESTAMP columns are NOT NULL by default.)

Bugs Fixed

  • Replication: SET COLLATION_SERVER... statements replicated by the slave SQL thread no longer advance its position. This is so that, if the thread is interrupted before the update is completed, it later performs the SET again. (Bug #5705)

  • The server sometimes chose a nonoptimal execution plan for a prepared statement executed with changed placeholder values. (Bug #6042)

  • Behavior of ALTER TABLE converting column containing NULL values to AUTO_INCREMENT column is no longer affected by NO_AUTO_VALUE_ON_ZERO mode. . (Bug #5915)

  • InnoDB: CREATE TEMPORARY TABLE ... ENGINE=InnoDB terminated mysqld when running in innodb_file_per_table mode. Now, per-table for temporary tables are created in the temporary directory used by mysqld. (Bug #5137)

  • InnoDB: The FOREIGN KEY parser did not permit ALTER TABLE on tables whose names contained # characters. (Bug #5856)

  • InnoDB: ALTER TABLE t DISCARD TABLESPACE did not work correctly. (Bug #5851)

  • InnoDB: Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table referenced by a FOREIGN KEY constraint; this error number is less misleading than the previous number HA_ERR_CANNOT_ADD_FOREIGN, but misleading still. (Bug #6202)

  • An attempt to execute a prepared statement with a subquery inside a boolean expression caused the server to crash. (Bug #5987)

  • The server crashed when character set conversion was implicitly used in prepared mode, as in 'abc' LIKE CONVERT('abc' as utf8). (Bug #5688)

  • The mysql_change_user() C API function now frees all prepared statements associated with the connection. (Bug #5315)

  • InnoDB: SHOW CREATE TABLE now obeys the SET sql_mode = ANSI and SET sql_quote_show_create = 0 settings. (Bug #5292)

  • InnoDB: If one updated a column so that its size changed, or updated it to an externally stored (TEXT or BLOB) value, then ANOTHER externally stored column would show up as 512 bytes of good data + 20 bytes of garbage in a consistent read that fetched the old version of the row. (Bug #5960)

  • InnoDB: UTF-8 characters were not always handled correctly in column prefix indexes. (Bug #5975)

  • If the slave SQL thread finds a syntax error in a query (which should be rare, as the master parsed it successfully), it now stops immediately. (Bug #5711)

  • Inserting NULL into an AUTO_INCREMENT column failed when using prepared statements. (Bug #5510)

  • InnoDB: Make the check for excessive semaphore waits tolerate glitches in the system clock (do not crash the server if the system time is adjusted while InnoDB is under load.). (Bug #5898)

C.1.21 Changes in MySQL 4.1.5 (2004-09-16)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • InnoDB: Added the configuration option innodb_autoextend_increment for setting the size in megabytes by which InnoDB tablespaces are extended when they become full. The default value is 8, corresponding to the fixed increment of 8MB in previous versions of MySQL.

  • InnoDB: The new Windows installation wizard of MySQL makes InnoDB as the MySQL default table type on Windows, unless explicitly specified otherwise. Note that it places the my.ini file in the installation directory of the MySQL server. See Section 2.3.4.14, “The Location of the my.ini File”.

Bugs Fixed

  • Providing '0000-00-00' date as a prepared statement parameter value led to a server crash. (Bug #4231, Bug #4562)

  • Detection of using the same table for updating and selecting in multi-update queries was not done correctly. (Bug #5455)

  • The internal field length of integer user variables was incorrect. This showed up when creating a table as SELECT @var_name. (Bug #4788)

  • After reaching a certain limit of prepared statements per connection (97), statement IDs began to overlap, so occasionally wrong statements were chosen for execution. (Bug #5399)

  • The syntax analyzer did not handle the IGNORE_SPACE server SQL mode correctly, using (for example) default.07 in place of default .07. (Bug #5318)

  • OPTIMIZE TABLE could cause table corruption on FULLTEXT indexes. (Bug #5327)

  • Executing a prepared statement with BETWEEN ? AND ? and a datetime column caused the server to crash. (Bug #5748)

  • Executing a statement containing thousands of placeholders caused a buffer overflow in the prepared statements API (libmysqlclient). (Bug #5194)

  • Name resolution of external columns of subqueries was done correctly if the subquery was placed in the select list of the outer query and used grouping. (Bug #5326)

  • A prepared statement using LIKE and called with arguments in different character sets caused the server to crash. (Bug #4368)

  • InnoDB: A maximum of 1000 connections could occur inside InnoDB at the same time, a higher number causing an assertion failure. Now the maximum can be much higher, and depends on the buffer pool size. (Bug #5414)

  • The values of the max_sort_length, sql_mode, and group_concat_max_len system variables now are stored in the query cache with other query information to avoid returning an incorrect result from the query cache. (Bug #5394, Bug #5515)

C.1.22 Changes in MySQL 4.1.4 (2004-08-26, Gamma)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

To fix a compile problem on systems that do not have automake 1.7 installed, an updated 4.1.4a source tarball has been published. In addition to resolving this automake dependency (Bug #5319), it also fixes some reported libedit compile errors when using a non-gcc compiler (Bug #5353).

Functionality Added or Changed

  • Made internal representation of TIMESTAMP values in InnoDB in 4.1 to be the same as in 4.0. This difference resulted in incorrect datetime values in TIMESTAMP columns in InnoDB tables after an upgrade from 4.0 to 4.1. Warning: extra steps during upgrade required! Unfortunately this means that if you are upgrading from 4.1.x, where x <= 3, to 4.1.4 you should use mysqldump for saving and then restoring your InnoDB tables with TIMESTAMP columns. (Bug #4492)

  • The mysqld-opt Windows server was renamed to mysqld. This completes the Windows server renaming begun in MySQL 4.1.2. See Section 2.3.8, “Selecting a MySQL Server Type”.

  • Added --start-datetime, --stop-datetime, --start-position, and --stop-position options to mysqlbinlog. These make point-in-time recovery easier.

  • Killing a CHECK TABLE statement does not result in the table being marked as corrupted any more; the table remains as if CHECK TABLE had not even started. See Section 12.4.6.3, “KILL Syntax”.

  • Added the CSV storage engine.

  • Added Latin language collations for the ucs2 and utf8 Unicode character sets. These are called ucs2_roman_ci and utf8_roman_ci.

  • Corrected the name of the Mac OS X StartupItem script (it must match the name of the subdirectory, which was renamed to MySQLCOM in MySQL 4.1.2). Thanks to Bryan McCormack for reporting this.

  • Made the MySQL server ignore SIGHUP and SIGQUIT on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals. (Bug #2030)

  • Support of usage of column aliases qualified by table name or alias in ORDER BY and GROUP BY was dropped. For example the following query SELECT a AS b FROM t1 ORDER BY t1.b is not permitted. One should use SELECT a AS b FROM t1 ORDER BY t1.a or SELECT a AS b FROM t1 ORDER BY b instead. This was nonstandard (since aliases are defined on query level not on table level) and caused problems with some queries.

Bugs Fixed

  • Replication: When the slave SQL thread was replicating a LOAD DATA INFILE statement, it didn't show the statement in the output of SHOW PROCESSLIST. (Bug #4326)

  • Replication: When a multiple-table DROP TABLE failed to drop a table on the master server, the error was not written to the binary log. (Bug #4553)

  • Replication: A CREATE TABLE ... TYPE=HEAP ... AS SELECT... statement caused the replication slave to stop. (Bug #4971)

  • libmysqlclient crashed when attempting to fetch the value of a MEDIUMINT column. (Bug #5126)

  • Executing UNHEX(NULL) caused the server to crash. (Bug #4441)

  • The .err extension was omitted from the error log file (--log-error) when the host name contained a domain name. The domain name is now replaced by the extension. (Bug #4997)

  • myisasmchk --extend-check crashed when run on a list of files. (Bug #4901)

  • disable-local-infile option had no effect if the client read it from a configuration file using mysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073)

  • The MySQL server crashed when attempting to execute a prepared statement with SELECT ... INTO @var for the second time. (Bug #5034)

  • mysqlbinlog --position --read-from-remote-server had incorrect output for # at log_pos. (Bug #4506)

  • An error was reported when a column from an ORDER BY clause was present in two tables participating in a SELECT, even if the second instance of column in select list was renamed. (For example, SELECT t1.a AS c FROM t1, t2 ORDER BY a produced an error if both t1 and t2 tables contain column a).

    Now MySQL does not prefer columns, mentioned in a select list but renamed, over columns from other tables participating in a FROM clause when it resolves the ORDER BY clause. (Bug #4302)

  • FLUSH TABLES WITH READ LOCK now blocks COMMIT statements if the server is running with binary logging enabled; this ensures that the binary log position is trustable when doing a full backup of tables and the binary log. (Bug #4953)

  • Concurrent accesses to more than one MERGE table, or to one MERGE table and a MyISAM tables, could result in a crash or hang of the server. (Bug #2408)

  • mysql-test-run failed the rpl_trunc_binlog test when running the test from the installation directory. (Bug #5050)

  • A deadlock could happen under certain rare circumstances when using KILL. (Bug #4810)

  • Support for %T, %r, %V, %v and %X, %x format specifiers was added to STR_TO_DATE() function. (Bug #4756)

  • MATCH ... AGAINST now works in a subquery. (Bug #4769)

  • mysql-test-run failed the grant_cache test when run as Unix root user. (Bug #4678)

  • Prohibited resolving of table fields in inner queries if fields do not take part in grouping for queries with grouping (inside aggregate function arguments, all table fields are still permitted). (Bug #4814)

  • SET GLOBAL SYNC_BINLOG did not work on some platforms (Mac OS X). (Bug #5064)

  • If CREATE TEMPORARY TABLE t SELECT failed while loading the data, the temporary table was not dropped. (Bug #4551)

  • An assertion failure could occur when reading the grant tables (Bug #4407)

  • Using the CONVERT_TZ() function with a time zone described in the database as parameter where this time zone had not been used before caused the server to crash. (Bug #4508)

  • Fixed a crash after STOP SLAVE if the IO replication thread is in the state Waiting to reconnect after a failed master event read. (Bug #4629)

  • NATURAL JOIN where the joined tables had no common column caused the server to hang. (Bug #4807)

  • mysql_fix_privilege_tables did not handle the --password=password_val option correctly. (Bug #4240, Bug #4543)

  • mysqlbinlog --read-from-remote-server sometimes could not accept 2 binary logs in a single invocation. (Bug #4507)

  • The counter for an AUTO_INCREMENT column was not reset by TRUNCATE TABLE if the table was a temporary one. (Bug #5033)

  • KILLing a connection while it was performing START SLAVE caused the server to crash. (Bug #4827)

  • Execution IN subqueries that use compound indexes was better optimized. (Bug #4435)

  • mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...) failed to disable LOAD DATA LOCAL INFILE. (Bug #5038)

  • Attempting to execute for a second time a prepared statement with NOT in an WHERE or ON clause caused the server to crash. (Bug #4912)

C.1.23 Changes in MySQL 4.1.3 (2004-06-28, Beta)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

The initial release of MySQL 4.1.3 for Windows was accidentally compiled without support for the Spatial Extensions (OpenGIS). This was fixed by rebuilding from the same 4.1 code snapshot with the missing option and releasing those packages as version 4.1.3a.

To enable compiling the newly released PHP 5 against MySQL 4.1.3 on Windows, the Windows packages had to be rebuilt once more to add a few missing symbols to the MySQL client library. These packages were released as MySQL 4.1.3b.

Functionality Added or Changed

  • Incompatible Change: The timezone system variable has been removed and replaced by system_time_zone. See Section 5.1.3, “Server System Variables”.

  • Incompatible Change: C API change: mysql_shutdown() now requires a second argument. This is a source-level incompatibility that affects how you compile client programs; it does not affect the ability of compiled clients to communicate with older servers. See Section 17.6.6.63, “mysql_shutdown()”.

  • Replication: Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See Section 14.7, “Replication Features and Issues”.

  • Replication: DROP DATABASE IF EXISTS, DROP TABLE IF EXISTS, single-table DELETE and single-table UPDATE are now written to the binary log even if they changed nothing on the master (for example, even if the DELETE matched no row). The old behavior sometimes caused bad surprises in replication setups.

  • Added SQL syntax for prepared statements. See Section 12.6, “SQL Syntax for Prepared Statements”.

  • Added the sync_binlog=N global variable and startup option, which makes the MySQL server synchronize its binary log to disk (fdatasync()) after every Nth write to the binary log.

  • CHECK TABLE now can be killed. It then marks the table as corrupted. See Section 12.4.6.3, “KILL Syntax”.

  • OPTIMIZE TABLE for InnoDB tables is now mapped to ALTER TABLE instead of ANALYZE TABLE.

  • Added the ARCHIVE storage engine.

  • Added --innodb-safe-binlog server option, which adds consistency guarantees between the content of InnoDB tables and the binary log. See Section 5.3.4, “The Binary Log”.

  • sync_frm is now a settable global variable (not only a startup option).

  • Support for per-connection time zones was added. Now you can set the current time zone for a connection by setting the @@time_zone system variable to a value such as '+10:00' or 'Europe/Moscow' (where 'Europe/Moscow' is the name of one of the time zones described in the system tables). Functions like CURRENT_TIMESTAMP, UNIX_TIMESTAMP, and so forth honor this time zone. Values of TIMESTAMP type are also interpreted as values in this time zone. So now our TIMESTAMP type behaves similar to Oracle's TIMESTAMP WITH LOCAL TIME ZONE. That is, values stored in such a column are normalized toward UTC and converted back to the current connection time zone when they are retrieved from such a column. To set up the tables that store time zone information, see Section 2.10, “Postinstallation Setup and Testing”.

  • LIKE now supports the use of a prepared statement parameter or delimited constant expression as the argument to ESCAPE . (Bug #4200)

  • Language-specific collations were added for the ucs2 and utf8 Unicode character sets: Icelandic, Latvian, Romanian, Slovenian, Polish, Estonian, Swedish, Turkish, Czech, Danish, Lithuanian, Slovak, Spanish, Traditional Spanish.

  • Changed the slave SQL thread to print fewer useless error messages (no more message duplication; no more messages when an error is skipped (because of slave-skip-errors).

  • Basic time zone conversion function CONVERT_TZ() was added. It assumes that its first argument is a datetime value in the time zone specified by its second argument and returns the equivalent datetime value in the time zone specified by its third argument.

Bugs Fixed

  • Replication: Complex expressions using AND, OR, or both could result in a crash if the query containing the expression query was ignored, either by a replication server due to --replicate-*-table rules, or by any MySQL server due to a syntax error. (Bug #3969, Bug #4494)

  • Replication: The slave SQL thread refused to replicate INSERT ... SELECT if it examined more than 4 billion rows. (Bug #3871)

  • Re-execution of optimized COUNT(*), MAX(), and MIN() functions is now handled correctly for prepared statements. (Bug #2687)

  • Different numbers of warnings were generated when an invalid datetime (as a string or as a number) was inserted into a DATETIME or TIMESTAMP column. (Bug #2336)

  • During the installation process of the server RPM on Linux, if mysqld was run as the root system user and with --log-bin pointing to a directory outside of /var/lib/mysql, it created binary log files owned by root in this directory, which remained owned by root after the installation. Now mysqld is started as the mysql system user instead. (Bug #4038)

  • A potential memory overrun could occur in mysql_real_connect() (which required a compromised DNS server and certain operating systems). (Bug #4017)

  • CREATE DATABASE IF NOT EXISTS caused an error on Win32 platforms if the database existed. (Bug #4378)

  • Attempt to prepare a statement containing a character set introducer caused the server to crash. (Bug #4105)

  • Attempting to execute a nonprepared statement could cause the server to crash. (Bug #4236)

  • mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug #3875)

  • UNION returned incorrect results if the display length of columns for numeric types was set to less than the actual length of values in them. (Bug #4067)

  • Conversion of a client-side string column to a MYSQL_TIME application buffer was not handled correctly by the prepared statements API. (Bug #4030)

  • Prepared EXPLAIN statements could lead to a server crash. (Bug #4271)

  • A malicious user could bypass password verification with specially crafted packets, using a modified client library. (CVE-2004-0627, CVE-2004-0628)

  • NULL was not handled correctly with derived tables. (Bug #4097)

  • MERGE tables created with INSERT_METHOD=LAST were not able to report a key number, causing Duplicate entry errors for UNIQUE keys in INSERT statements. As a result, the error message was not precise enough (error 1022 instead of error 1062) and INSERT ... ON DUPLICATE KEY UPDATE did not work. (Bug #4008)

  • Parameters in some prepared statements were not handled correctly. (Bug #4280)

  • Prepared statements did not always work correctly on big-endian platforms. (Bug #4173)

  • CONCAT(?, col_name), when used in prepared statements, returned incorrect results. (Bug #3796)

  • Tables were unlocked too early in cases of a subquery in a query's HAVING clause. (Bug #3984)

  • The range optimizer did not perform correctly when using many IN() queries on different key parts. (Bug #4157)

  • Performance of COUNT(DISTINCT) degraded in cases like COUNT(DISTINCT a TEXT, b CHAR(1)) (no index used). (Bug #3904)

  • In rare circumstances, DELETE from a table with FULLTEXT indexes resulted in a corrupted table, if words of different lengths could be considered equal. This is possible with some collations, for example, utf8_general_ci and latin1_german2_ci. (Bug #3808)

  • mysql_stmt_close() hung when attempting to close a statement after failed mysql_stmt_fetch() call. (Bug #4079)

  • Using --with-charset with configure did not affect the MySQL client library. (Bug #3990)

  • Added missing root account to Windows version of mysqld. (Bug #4242)

  • The microseconds part of MYSQL_TYPE_TIME/MYSQL_TYPE_DATETIME columns was not sent to the client by prepared statements. (Bug #4026)

  • mysqldump when it did not return any error if the output device was full. (Bug #1851)

  • Made DROP DATABASE honor the value of lower_case_table_names. (Bug #4066)

  • Under rare circumstances, MATCH ... AGAINST(... IN BOOLEAN MODE) could yield incorrect results if, in the collation used for the data, one byte could match many (as in utf8_general_ci and latin1_german2_ci.) (Bug #3964)

C.1.24 Changes in MySQL 4.1.2 (2004-05-28)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Security Fix: The --defaults-file=file_name option now requires that the file name must exist. (Bug #3413)

  • Incompatible Change: The signature of the mysql_stmt_prepare() function was changed to int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, unsigned long length). To create a MYSQL_STMT handle, you should use the mysql_stmt_init() function, not mysql_stmt_prepare().

  • Incompatible Change: Renamed prepared statements C API functions:

    Old NameNew Name
    mysql_bind_param()mysql_stmt_bind_param()
    mysql_bind_result()mysql_stmt_bind_result()
    mysql_prepare()mysql_stmt_prepare()
    mysql_execute()mysql_stmt_execute()
    mysql_fetch()mysql_stmt_fetch()
    mysql_fetch_column()mysql_stmt_fetch_column()
    mysql_param_count()mysql_stmt_param_count()
    mysql_param_result()mysql_stmt_param_metadata()
    mysql_get_metadata()mysql_stmt_result_metadata()
    mysql_send_long_data()mysql_stmt_send_long_data()

    Now all functions that operate with a MYSQL_STMT structure begin with the prefix mysql_stmt_.

  • Incompatible Change: Added support for DEFAULT CURRENT_TIMESTAMP and for ON UPDATE CURRENT_TIMESTAMP specifications for TIMESTAMP columns. Now you can explicitly say that a TIMESTAMP column should be set automatically to the current timestamp for INSERT or UPDATE statements, or even prevent the column from updating automatically. Only one column with such an auto-set feature per table is supported. TIMESTAMP columns created with earlier versions of MySQL behave as before. Behavior of TIMESTAMP columns that were created without explicit specification of default/on as earlier depends on its position in table: If it is the first TIMESTAMP column, it be treated as having been specified as TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP. In other cases, it would be treated as a TIMESTAMP DEFAULT 0 column. NOW is supported as an alias for CURRENT_TIMESTAMP.

    Unlike in previous versions, explicit specification of default values for TIMESTAMP column is never ignored and turns off the auto-set feature (unless you have CURRENT_TIMESTAMP as the default).

  • Incompatible Change: String comparison now works according to the SQL standard. Because we have that 'a' = 'a ' then from it must follow that 'a' > 'a\t'. (The latter was not the case before MySQL 4.1.2.) To implement it, we had to change how storage engines compare strings internally. As a side effect, if you have a table where a CHAR or VARCHAR column in some row has a value with the last character less than ASCII(32), you have to repair this table. CHECK TABLES tells you if this problem exists. (Bug #3152)

  • Incompatible Change: Handling of the FLOAT and DOUBLE floating-point data types is more strict to follow standard SQL. For example, a data type of FLOAT(3,1) stores a maximum value of 99.9. Previously, the server permitted larger numbers to be stored. That is, it stored a value such as 100.0 as 100.0. Now the server clips 100.0 to the maximum permissible value of 99.9. If you have tables that were created before MySQL 4.1.2 and that contain floating-point data not strictly legal for the column type, you should alter the data types of those columns. For example:

    ALTER TABLE tbl_name MODIFY col_name FLOAT(4,1);
    
  • Incompatible Change: The Type output column for SHOW TABLE STATUS now is labeled Engine.

  • Replication: For replication of MEMORY (HEAP) tables: Made the master automatically write a DELETE FROM statement to its binary log when a MEMORY table is opened for the first time since the master's startup. This is for the case where the slave has replicated a nonempty MEMORY table, and then the master is shut down and restarted: the table is now empty on the master; the DELETE FROM empties it on the slave as well.

    Even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. However, if you use the --init-file option to populate the MEMORY table on the master at startup, it ensures that the failing time interval is zero. (Bug #2477)

  • Replication: Added option --replicate-same-server-id.

  • Replication: UUID() function implemented. Note that it does not work with replication yet. See Section 11.14, “Miscellaneous Functions”.

  • MySQL now issues a warning when a SET or ENUM column with duplicate values in the list is created. (Bug #1427)

  • The ft_boolean_syntax variable now can be changed while the server is running. See Section 5.1.3, “Server System Variables”.

  • MyISAM tables now support keys up to 1000 bytes long.

  • mysql command-line client now supports multiple -e options. (Bug #591)

  • CHAR BYTE is an alias for the BINARY data type. (Previously, it was an alias for CHAR BINARY.)

  • mysqlhotcopy now works on NetWare.

  • Prepared statements now work with all types of subqueries.

  • Added the --default-storage-engine server option as a synonym for --default-table-type.

  • MyISAM and InnoDB tables now support index prefix lengths up to 1000 bytes long.

  • The mysqld Windows server was renamed to mysqld-debug. See Section 2.3.8, “Selecting a MySQL Server Type”.

  • The MySQL server now returns an error if SET sql_log_bin or SET sql_log_update is issued by a user without the SUPER privilege (in previous versions it just silently ignored the statement in this case).

  • Added init_connect and init_slave system variables. The values should be SQL statements to be executed when each client connects or each time a slave's SQL thread starts, respectively.

  • Added the mysql_set_local_infile_handler() and mysql_set_local_infile_default() C API functions.

  • Added Handler_discover status variable.

  • C API enhancement: SERVER_QUERY_NO_INDEX_USED and SERVER_QUERY_NO_GOOD_INDEX_USED flags are now set in the server_status field of the MYSQL structure. It is these flags that make the query to be logged as slow if mysqld was started with --log-slow-queries --log-queries-not-using-indexes.

  • The FLOAT and DECIMAL types now obey (precision,scale) settings. (Bug #10897)

  • The mysql command-line client no longer stores in the history file multiple copies of identical queries that are run consecutively.

  • If you try to create a key with a key part that is too long, and it is safe to auto-truncate it to a smaller length, MySQL now does so. A warning is generated, rather than an error.

  • The improved character set support introduced in MySQL 4.1.0 for the MyISAM and HEAP storage engines is now available for InnoDB as well.

  • Added latin1_spanish_ci (Modern Spanish) collation for the latin1 character set.

  • Added Binlog_cache_use and Binlog_cache_disk_use status variables that count the number of transactions that used transaction binary log and that had to flush this temporary binary log to disk instead of using only the in-memory buffer. They can be used for tuning the binlog_cache_size system variable.

  • Added the storage_engine system variable as a synonym for table_type.

  • Added explanation of hidden SELECT of UNION in output of EXPLAIN SELECT statement.

  • Added the EXAMPLE storage engine.

  • Internal string-to-number conversion now supports only SQL:2003 compatible syntax for numbers. In particular, '0x10'+0 does not work anymore. (Actually, it worked only on some systems before, such as Linux. It did not work on others, such as FreeBSD or Solaris. Making these queries OS-independent was the goal of this change.) Use CONV() to convert hexadecimal numbers to decimal. Example: CONV(MID('0x10',3),16,10)+0.

  • The --log-warnings server option now is enabled by default. Disable with --log-warnings=0.

  • Added the ENGINE table option as a synonym for the TYPE option for CREATE TABLE and ALTER TABLE.

  • UNHEX() function implemented. See Section 11.5, “String Functions”.

  • Multi-line statements in the mysql command-line client now are stored in the history file as a single line.

  • ALTER TABLE DROP PRIMARY KEY no longer drops the first UNIQUE index if there is no primary index. (Bug #2361)

  • The Mac OS X Startup Item has been moved from the directory /Library/StartupItems/MySQL to /Library/StartupItems/MySQLCOM to avoid a file name collision with the MySQL Startup Item installed with Mac OS X Server. See Section 2.12.2, “Mac OS X Notes”.

  • MySQL now supports up to 64 indexes per table.

  • New myisam_data_pointer_size system variable. See Section 5.1.3, “Server System Variables”.

  • A name of Primary no longer can be specified as an index name. (That name is reserved for the PRIMARY KEY if the table has one.) (Bug #856)

  • Now sql_select_limit variable has no influence on subqueries. (Bug #2600)

  • REVOKE ALL PRIVILEGES, GRANT FROM user_list is changed to a more consistent REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_list. (Bug #2642)

  • Added option --to-last-log to mysqlbinlog, for use in conjunction with --read-from-remote-server.

  • When a session having open temporary tables terminates, the statement automatically written to the binary log is now DROP TEMPORARY TABLE IF EXISTS instead of DROP TEMPORARY TABLE, for more robustness.

  • Added support for character set conversion and MYSQL_TYPE_BLOB type code in prepared statement protocol.

  • Changed that when the MySQL server has binary logging disabled (that is, no --log-bin option was used), then no transaction binary log cache is allocated for connections. This should save binlog_cache_size bytes of memory (32KB by default) for every connection.

  • mysqld_multi now creates the log in the directory named by datadir (from the [mysqld] section in my.cnf or compiled in), not in /tmp. Thanks to Christian Hammers from Debian Security Team for reporting this. (CVE-2004-0388)

  • SHOW GRANTS with no FOR clause or with FOR CURRENT_USER() shows the privileges for the current session.

Bugs Fixed

  • Packaging: In the Mac OS DMG postinstall script, mysql_install_db was invoked with an invalid argument.

  • Replication: Replication: a rare race condition in the slave SQL thread that could lead to an incorrect complaint that the relay log is corrupted. (Bug #2011)

  • Replication: Removed a misleading "check permissions on master.info" from a replication error message, because the cause of the problem could be different from permissions. (Bug #2121)

  • Replication: A MySQL slave server built using --with-debug, and replicating itself, crashed. (Bug #3568)

  • Replication: Multiple-table DELETE statements were never replicated by the slave if there were any --replicate-*-table options. (Bug #2527)

  • Replication: If server-id was not set using startup options but with SET GLOBAL, the replication slave still complained that it was not set. (Bug #3829)

  • Replication: If a replication slave was unable to create the first relay log, it crashed. (Bug #2145)

  • Replication: In some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug #3357)

  • Replication: Memory could be corrupted by replicating a LOAD DATA INFILE from a MySQL 3.23 master. Some less critical issues remain; see Section 14.7, “Replication Features and Issues”. (Bug #3422)

  • Replication: Replication: in the slave SQL thread, a multiple-table UPDATE could produce an incorrect complaint that some record was not found in one table, if the UPDATE was preceded by a INSERT ... SELECT. (Bug #1701)

  • Replication: Multiple-table DELETE statements were always replicated by the slave if there were some --replicate-*-ignore-table options and no --replicate-*-do-table options. (Bug #3461)

  • Replication: Following a nonfatal error during the execution of a statement that later succeeded, the master failed to reset the error code to 0, so the error code was written into the binary log. This caused false Did not get the same error as on master errors on the slave. (Bug #2083)

  • Replication: Corrected the master's binary log position that InnoDB reports when it is doing a crash recovery on a slave server. (Bug #3015)

  • Replication: Changed that when a thread handling INSERT DELAYED (also known as a delayed_insert thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug #3081)

  • Replication: CREATE TABLE ... LIKE ... statements were not always written to the binary log. (Bug #2557)

  • Replication: Replication: If a client connects to a slave server and issues an administrative statement for a table (for example, OPTIMIZE TABLE or REPAIR TABLE), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must use START SLAVE to get replication going again. (Bug #1858)

  • Replication: --replicate-wild-*-table rules now apply to ALTER DATABASE when the table pattern is %, as is the case for CREATE DATABASE and DROP DATABASE. (Bug #3000)

  • Replication: Statements did not raise errors on the slave, if the slave was excluded given the --replicate-* options in use at the time. The effect of this problem was: when a statement was killed on the master, the slave stopped. (Bug #2983)

  • A rare error condition caused the slave SQL thread spuriously to print the message Binlog has bad magic number and stop when it was not necessary to do so. (Bug #3401)

  • Queries with subqueries in the FROM clause now lock all tables at once. EXPLAIN of subqueries in FROM output was also not handled correctly. (Bug #2120)

  • Prepare statements parameter do not cause error message as fields used in select list but not included in ORDER BY list.

  • Attempting to bind a negative value bind to unsigned caused an Unknown error. (Bug #3223)

  • UNION statements did not consult sql_select_limit value when set. This is now fixed properly, which means that this limit is applied to the top level query, unless LIMIT for entire UNION is used.

  • The GROUP_CONCAT() had a number of issues with ORDER BY and DISTINCT, and with GROUP BY in subqueries. (Bug #2695, Bug #3319, Bug #3381)

  • Full-text indexing of strings in multi-byte (all besides utf8) charsets could sometimes hang. (Bug #2065)

  • SHOW GRANTS and EXPLAIN SELECT did not always perform character set conversion correctly. (Bug #3403)

  • REPAIR TABLE could corrupt a table containing FULLTEXT indexes and many words of different lengths that are considered equal (which is possible in certain collations, such as latin1_german2_ci or utf8_general_ci). (Bug #3835)

  • Processing of RAND() in subqueries with static tables was not always handled correctly. (Bug #2645)

  • When a Rotate event was found by the slave SQL thread in the middle of a transaction, the value of Relay_Log_Pos in SHOW SLAVE STATUS was incorrectly altered. (Bug #3017)

  • Index_length in HEAP table status for BTREE indexes was not calculated correctly. (Bug #2719)

  • The Exec_master_log_pos column and its disk image in the relay-log.info were not handled correctly if the master had version 3.23. (The value was too big by six bytes.) This bug does not exist in MySQL 5.0. (Bug #3400)

  • mysql_stmt_fetch() and mysql_stmt_store_result() could hang if they were called without a prior call to mysql_stmt_execute(). Now they give an error instead. (Bug #2248)

  • CHECK TABLE sometimes produced a spurious error Found key at page ... that points to record outside datafile for a table with a FULLTEXT index. (Bug #2190)

  • myisamchk and CHECK TABLE that sometimes a spurious error Found key at page ... that points to record outside datafile for a table with a FULLTEXT index. (Bug #1977)

  • Optimization of ALL and SOME subqueries was not performed well (key field present in subquery). (Bug #3646)

  • Starting mysqld with binary logging disabled, but with a nonzero value for the expire_logs_days system variable caused the server to crash. (Bug #3807)

  • Full-text search on multi-byte character sets (such as UTF8) that appeared when a search word was shorter than a matching word from the index (for example, searching for Uppsala when the table contains Uppsa*la). (Bug #3011)

  • On Linux platforms, setting the character_set_results variable to NULL and then attempting to retrieve it using SELECT @@character_set_results caused the server to crash. (Bug #3296)

  • The output of mysqldump --tab was not correct. (Bug #2705)

  • Added support for unsigned integer types to prepared statement API . (Bug #3035)

  • An issue with the range optimizer caused a segmentation fault on some very rare queries. (Bug #2698)

  • The INTERVAL() function did not work correctly when 8 or more comparison arguments were used. (Bug #1561)

  • Made clearer the error message that one gets when an update is refused because of the --read-only option. (Bug #2757)

  • UTF8 charset breaks joins with mixed column/string constant. (Bug #2959)

  • Prepared statements are supported for INSERT, REPLACE, CREATE, DELETE, SELECT, DO, SET and SHOW statements. All other statements are now prohibited by the prepared statement interface. (Bug #3406, Bug #3398, Bug #2811)

  • Running LOAD DATA FROM MASTER after RESET SLAVE caused a segmentation fault. (Bug #2922)

  • EXPLAIN should now work correctly with UNION queries. (Bug #3639)

  • UNION operations with the InnoDB storage engine, when some columns from one table were used in one SELECT statement and some were used in another SELECT statement, were not handled correctly. (Bug #2552)

  • Incorrect error message when wrong table used in multiple-table DELETE statement in prepared statements. (Bug #3411)

  • SHOW CREATE TABLE ... did not properly double quotation marks. (Bug #2593)

  • CREATE ... SELECT sometimes created a string column with a multi-byte character set (such as UTF8) of insufficient length for holding the data.

  • The second execution of a prepared statement using UNION caused the server to crash. (Bug #3577)

  • Removed try to check NULL if index built on column where NULL is impossible in IN subquery optimization. (Bug #2393)

  • Using the GROUP_CONCAT() function on an expression with ORDER BY as well as an external ORDER BY in a query caused the server to crash. (Bug #3752)

  • Changed that when a DROP TEMPORARY TABLE statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing a SELECT on the master does not result in a superfluous error on the slave). (Bug #3063)

  • Short-form IP addresses used as arguments to INET_ATON() were not parsed correctly. (Bug #2310)

  • Results of aggregate functions used in subqueries with empty result sets were incorrect. (Bug #3505)

  • mysqlbinlog --read-from-remote-server now print the exact positions of events in lines beginning with at # in the log. (Bug #3214)

  • Compiling the server using the --with-pstack options did not work with binutils 2.13.90. (Bug #1661)

  • Changed the column Seconds_Behind_Master in SHOW SLAVE STATUS to never show a value of -1. (Bug #2826)

  • Packaging: Added missing file mysql_create_system_tables to the server RPM package. This bug was fixed for the 4.1.1 RPMs by updating the MySQL-server RPM from MySQL-server-4.1.1-0 to MySQL-server-4.1.1-1. The other RPMs were not affected by this change.

  • A memory leak could occur with INSERT ... ON DUPLICATE KEY UPDATE. (Bug #2438)

  • Privileges were not checked correctly for ALTER TABLE RENAME. (Bug #3270)

  • The MySQL server did not report any error if a statement (submitted through mysql_real_query() or mysql_stmt_prepare()) was terminated by garbage characters. This can happen if you pass a wrong length parameter to these functions. The result was that the garbage characters were written into the binary log. (Bug #2703)

  • Max_used_connections was less than the actual maximum number of connections in use simultaneously.

  • Aggregate functions could lead to server crashes when used in prepared statements. (Bug #3360)

  • mysqlbinlog --read-from-remote-server read all binary logs following the one that was requested. It now stops at the end of the requested file, the same as it does when reading a local binary log. There is an option --to-last-log to get the old behavior. (Bug #3204)

  • Full-text indexing of UTF8 data did not work correctly. (Bug #2033)

  • The --local-load option of mysqlbinlog now requires an argument.

  • CONCAT_WS() makes the server die in case of illegal mix of collations. (Bug #3087)

  • The mysql client program crashed when passed a database name that was longer then expected. (Bug #2221)

  • Table names in were quoted in mysqldump when using values for the server SQL mode where this was not appropriate. (Bug #2591)

  • ANALYZE TABLE on a BDB table inside a transaction caused the server to hang. (Bug #2342)

  • DROP DATABASE now reports the number of tables deleted.

  • Using an impossible WHERE with PROCEDURE ANALYSE() caused the server to hang. (Bug #2238)

  • Parallel repair (myisamchk -p, myisam_repair_threads) sometimes failed to repair a table. (Bug #1334)

  • Added optimization that enables prepared statements using a large number of tables or tables with a large number of columns to be re-executed significantly faster. (Bug #2050)

  • A memory leak occurred in the client library when a statement handle was freed on a closed connection (call to mysql_stmt_close() after mysql_close()). (Bug #3073)

  • Invalid results were returned when CAST() was applied to NULL to obtain a signed or unsigned integer value. (Bug #2219)

  • FLUSH TABLES sometimes corrupted table resolution for statements which were prepared before the FLUSH TABLES but which were being executed repeatedly afterward. (Bug #3307)

  • GRANT did not handle table-level privileges correctly. (Bug #2178)

  • Invoking mysql_set_server_option() caused client/server communications to be broken. (Bug #2207)

  • A multiple-table UPDATE statement resulted in an error when one of the tables was not updated but was used in the nested query contained therein.

  • Subqueries in the FROM clause were not always parsed correctly. (Bug #2421)

  • There was a symlink vulnerability in the mysqlbug script. (Bug #3284)

  • Table and column privileges were not loaded on startup. (Bug #2546)

  • UNION operations did not handle NULL columns properly, when a column in the first SELECT node was NOT NULL. (Bug #2508)

  • vio_timeout() virtual function was not set for all protocols. This lead to crashes on Windows. (Bug #2025)

  • You can now call mysql_stmt_attr_set(..., STMT_ATTR_UPDATE_MAX_LENGTH) to tell the client library to update MYSQL_FIELD->max_length when doing mysql_stmt_store_result(). . (Bug #1647)

  • A deadlock ocurred when two START SLAVE statements were run at the same time. (Bug #2921)

  • Comparison of table and database names when using the --lower_case_table_names option was not always performed correctly. (Bug #2880)

  • A query that uses both UNION [DISTINCT] and UNION ALL now works correctly. (Bug #1428)

  • mysql_stmt_send_long_data() misbehaved on the second execution of a prepared statement when long data had zero length. (Bug #1664)

  • Table default character set affects LONGBLOB columns. (Bug #2821)

  • Requiring UPDATE privilege for tables which are not updated in multiple-table UPDATE statement in prepared statements.

  • Segmentation faults could occur when processing malformed prepared statements. (Bug #2795, Bug #2274)

  • mysqldump did not quote names containing backtick characters (`) correctly. (Bug #2592)

  • The results of a query that used DISTINCT and ORDER BY by a column's real name, while the column had an alias specified in the SELECT clause, were not returned in the correct order. (Bug #3681)

  • Compile the MySQL-client RPM package against libreadline instead of libedit. (Bug #2289)

  • A password was not checked for changes in GRANT accounts until FLUSH PRIVILEGES was executed. (Bug #3404)

  • Subqueries with OR and AND did not always work correctly. (Bug #2838)

  • ALTER DATABASE caused the client to hang if the database did not exist. (Bug #2333)

  • ORDER BY did not always work correctly with SMALLINT columns. (Bug #2147)

  • When a password was assigned to an account at the global level and then privileges were granted at the database level (without specifying any password), the existing password was replaced temporarily in memory until the next FLUSH PRIVILEGES operation or the server was restarted. (Bug #2953)

  • DOUBLE and FLOAT columns could store out of range values. (Bug #2082)

  • A prepared statement using parameters and having a subquery in the FROM clause could cause the server to crash. (Bug #3020)

  • MATCH ... AGAINST() on a phrase search operator with a missing closing double quote caused the server to crash. (Bug #2708)

  • mysql_stmt_affected_rows() now always returns the number of rows affected by a given statement. (Bug #2247)

  • When ALTER TABLE RENAME, was used to rename a table with the same name in another database, it silently dropped the destination table if it existed. (Bug #2628)

  • The syntax CONVERT(expr,type) is now supported again.

  • mysqld could crash when a table was altered and used at the same time. This was a 4.1.2-specific bug. . (Bug #3643)

  • Write operations on a column hvaing a FULLTEXT index could under some rare circumstances lead to table file corruption. (Bug #2417)

  • mysqlbinlog failed to print a USE statement under those rare circumstances where the binary log contained a LOAD DATA INFILE statement. (Bug #3415)

C.1.25 Changes in MySQL 4.1.1 (2003-12-01)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This release includes all fixes in MySQL 4.0.16 and most of the fixes in MySQL 4.0.17.

Functionality Added or Changed

  • Incompatible Change: Renamed the C API mysql_prepare_result() function to mysql_get_metadata() because the old name was confusing.

  • Incompatible Change: Client authentication now is based on 41-byte passwords in the user table, not 45-byte passwords as in 4.1.0. Any 45-byte passwords created for 4.1.0 must be reset after running the mysql_fix_privilege_tables script.

  • Replication: Replication over SSL now works.

  • Replication: ANALYZE TABLE, OPTIMIZE TABLE, REPAIR TABLE, and FLUSH statements are now stored in the binary log and thus replicated to slaves. This logging does not occur if the optional NO_WRITE_TO_BINLOG keyword (or its alias LOCAL) is given. Exceptions are that FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and FLUSH TABLES WITH READ LOCK are not logged in any case. For a syntax example, see Section 12.4.6.2, “FLUSH Syntax”.

  • Added SQLSTATE codes for all server errors.

  • New CHECKSUM TABLE statement for reporting table checksum values.

  • Added new type values DAY_MICROSECOND, HOUR_MICROSECOND, MINUTE_MICROSECOND, SECOND_MICROSECOND, and MICROSECOND for DATE_ADD(), DATE_SUB(), and EXTRACT().

  • TIME columns with hour values greater than 24 were returned incorrectly to the client.

  • Added new syntax for ADDDATE() and SUBDATE(). The second argument now may be a number representing the number of days to be added to or subtracted from the first date argument.

  • Disabled the PURGE LOGS statement that was added in version 4.1.0. The statement now should be issued as PURGE MASTER LOGS or PURGE BINARY LOGS.

  • Added the OLAP (On-Line Analytical Processing) function ROLLUP, which provides summary rows for each GROUP BY level.

  • You can revoke all privileges from a user with REVOKE ALL PRIVILEGES, GRANT FROM user_list.

  • LIMIT no longer accepts negative arguments (they used to be treated as very big positive numbers before).

  • New COERCIBILITY() function to return the collation coercibility of a string.

  • Added DROP USER 'user_name'@'host_name' statement to drop an account that has no privileges.

  • Added new COMPRESS(), UNCOMPRESS(), and UNCOMPRESSED_LENGTH() functions.

  • New global system variable relay_log_purge to enable or disable automatic relay log purging.

  • CREATE TABLE tbl_name (...) TYPE=storage_engine now generates a warning if the named storage engine is not available. The table is still created as a MyISAM table, as before.

  • Added new ADDTIME(), DATE(), DATEDIFF(), LAST_DAY(), MAKEDATE(), MAKETIME(), MICROSECOND(), SUBTIME(), TIME(), TIMEDIFF(), TIMESTAMP(), UTC_DATE(), UTC_TIME(), UTC_TIMESTAMP(), and WEEKOFYEAR() functions.

  • It is now possible to create a MERGE table from MyISAM tables in different databases. Formerly, all the MyISAM tables had to be in the same database, and the MERGE table had to be created in that database as well.

  • All queries in which at least one SELECT does not use indexes properly now are written to the slow query log when long log format is used.

  • MyISAM tables now use a better checksum algorithm (if checksum is enabled with CREATE TABLE ... CHECKSUM = 1). Old tables will appear to have incorrect checksum, and should be repaired.

  • Added PURGE BINARY LOGS as an alias for PURGE MASTER LOGS.

  • Produce warnings even for single-row INSERT statements, not just for multiple-row INSERT statements. Previously, it was necessary to set sql_warnings = 1 to generate warnings for single-row statements.

  • The --quote-names option for mysqldump now is enabled by default.

  • Table aliases are not case sensitive if lower_case_table_names is nonzero.

  • Changed that the relay log is flushed to disk by the slave I/O thread every time it reads a relay log event. This reduces the risk of losing some part of the relay log in case of brutal crash.

  • Added secure_auth global server system variable and --secure-auth server option that disallow authentication for accounts that have old (pre-4.1.1) passwords.

  • Added new %f microseconds format specifier for DATE_FORMAT() and TIME_FORMAT().

  • Phrase search in MATCH ... AGAINST ( ... IN BOOLEAN MODE) no longer matches partial words.

  • mysqldump now includes a statement in the dump output to set foreign_key_checks to 0 to avoid problems with tables having to be reloaded in a particular order when the dump is reloaded. The existing foreign_key_checks value is saved and restored.

  • Added delimiter (\d) command to the mysql command-line client for changing the statement delimiter (terminator). The default delimiter is semicolon.

  • Added preload_buffer_size system variable.

  • The interface to aggregate user-defined functions has changed a bit. You must now declare a xxx_clear() function for each aggregate function XXX(). xxx_clear() is used instead of xxx_reset().

  • Added MATCH ... AGAINST( ... WITH QUERY EXPANSION) and the ft_query_expansion_limit system variable.

  • Added mysql_set_server_option() C API client function to enable multiple statement handling in the server to be enabled or disabled.

  • Added Slave_IO_State and Seconds_Behind_Master columns to the output of SHOW SLAVE STATUS. Slave_IO_State indicates the state of the slave I/O thread, and Seconds_Behind_Master indicates the number of seconds by which the slave is late compared to the master.

  • MySQL source distributions now also include the MySQL Internals Manual internals.texi.

  • Most subqueries are now much faster than before.

  • The START SLAVE statement now supports an UNTIL clause for specifying that the slave SQL thread should be started but run only until it reaches a given position in the master's binary logs or in the slave's relay logs.

  • Added support for syntax CREATE TABLE table2 (LIKE table1) that creates an empty table table2 with a definition that is exactly the same as table1, including any indexes.

  • LOAD DATA now produces warnings that can be fetched with SHOW WARNINGS.

  • The --lower-case-table-names=1 server option now also makes aliases case insensitive. (Bug #534)

  • Renamed bdb_version system variable to version_bdb.

  • Added mysql_sqlstate() and mysql_stmt_sqlstate() C API client functions that return the SQLSTATE error code for the last error.

  • Added IGNORE option for DELETE statement.

  • EXPLAIN now supports an EXTENDED option. When given, EXPLAIN generates extra information that may be viewed with the SHOW WARNINGS statement.

  • Full-text search now supports multi-byte character sets and the Unicode utf8 character set. (The Unicode ucs2 character set is not yet supported.)

  • Added SHOW MASTER LOGS as an alias for SHOW BINARY LOGS. (In 4.1.0, SHOW MASTER LOGS was renamed to SHOW BINARY LOGS. Now you can use either one.)

  • Added --sql-mode=NO_AUTO_VALUE_ON_ZERO option to suppress the usual behavior of generating the next sequence number when zero is stored in an AUTO_INCREMENT column. With this mode enabled, zero is stored as zero; only storing NULL generates a sequence number.

  • Require DEFAULT before table and database default character set. This enables us to use ALTER TABLE tbl_name ... CHARACTER SET=... to change the character set for all CHAR, VARCHAR, and TEXT columns in a table.

  • Added aggregate function BIT_XOR() for bitwise XOR operations.

  • Removed unused ft_max_word_len_for_sort system variable.

  • Removed unused ft_max_word_len_for_sort variable from myisamchk.

  • The DATABASE() function now returns NULL rather than the empty string if there is no database selected.

  • Added character_set_client, character_set_connection, character_set_database, character_set_results, character_set_server, character_set_system, collation_connection, collation_database, and collation_server system variables to provide information about character sets and collations.

  • Added SHOW BDB LOGS as an alias for SHOW LOGS.

  • It is now possible to create multiple key caches, assign table indexes to particular caches, and to preload indexes into caches. See Section 12.4.6.1, “CACHE INDEX Syntax”. See Section 12.4.6.4, “LOAD INDEX INTO CACHE Syntax”. Structured system variables are introduced as a means of grouping related key cache parameters. See Section 5.1.4.1, “Structured System Variables”.

  • The mysql_next_result() C API function now returns -1 if there are no more result sets.

  • Added --secure-auth option to mysql command-line client. If this option is set, the client refuses to send passwords in old (pre-4.1.1) format.

  • Renamed CLIENT_MULTI_QUERIES connect option flag to CLIENT_MULTI_STATEMENTS. To permit a transition period, the old option continues to be recognized for a while.

  • CHAR, VARCHAR, and TEXT columns now have lengths measured in characters rather than in bytes. The character size depends on the column's character set. This means, for example, that a CHAR(n) column for a multi-byte character set takes more storage than before. Similarly, index values on such columns are measured in characters, not bytes.

  • When using SET sql_mode='mode' for a complex mode (such as ANSI), we now update the sql_mode variable to include all the individual options implied by the complex mode.

  • The --old-protocol option for mysqld is no longer supported and has been removed.

Bugs Fixed

  • Security Fix: A server compiled without SSL support still permitted connections by users who had the REQUIRE SSL option specified for their accounts.

  • Security Fix: Connections from some IP addresses were assigned incorrect database-level privileges. A connection could be assigned the database privileges of the previous successful authentication from one of those IP addresses, even if the IP address user name and database name were different. (Bug #1636)

  • Replication: The new PASSWORD() function in 4.1 is now properly replicated. (Bug #344)

  • Replication: When an undefined user variable was used in a updating query on the master (such as INSERT INTO t VALUES(@a), where @a had never been set by this connection before), the slave could replicate the query incorrectly if a previous transaction on the master used a user variable of the same name. (Bug #1331)

  • Replication: CONNECTION_ID() now is properly replicated. (Bug #177)

  • Replication: Replication failed between a 3.23 master and a 4.0 slave. The slave lost replicated temporary tables if FLUSH LOGS was issued on the master. (Bug #254)

  • Replication: When a transaction spanned two or more relay logs, and the slave was stopped while executing the part of the transaction that was in the second or later relay log, replication resumed at the beginning of the second or later relay log, which was incorrect. (It should resume at BEGIN, in the first relay log.) (Bug #53)

  • LAST_INSERT_ID() now returns 0 if the last INSERT statement didn't insert any rows.

  • HASH, BTREE, RTREE, ERRORS, and WARNINGS no longer are reserved words. (Bug #724)

  • A memory overrun could occur due to in subqueries in the SELECT list with WHERE clause larger than that of the outer query's WHERE clause. (Bug #726)

  • Using the ? prepared statement parameter as the argument to certain functions or statement clauses caused a server crash when mysql_prepare() was invoked. (Bug #1500)

  • Error-handling functions were not called properly when an error resulted from [CREATE | REPLACE| INSERT] ... SELECT statements.

  • REPAIR TABLE ... USE_FRM could cause data loss when used with tables that contained TIMESTAMP columns and were created in 4.0.x.

  • A SELECT that required a temporary table (marked by Using temporary in EXPLAIN output) and was used as a derived table in EXPLAIN statement caused the server to crash. (Bug #251)

  • Using EXPLAIN on a derived table with a join caused the server to crash.

  • The USER() function occasionally failed due an error in the size of the string allocated to it.

  • mysql parser erroneously interpreted a ; character within a multi-line comment (/* ... */) as a statement terminator.

  • The types and lengths of result set columns for UNION operations are now determined taking into account values for all SELECT statements in the UNION, and not just the first SELECT.

  • ROLLUP did not work correctly when all tables in the join were const tables. (Bug #714)

  • The final character was omitted from the output of USER(). (Bug #447)

  • DELETE with ORDER BY and LIMIT could cause the server to crash.

  • Subqueries in ORDER BY and GROUP BY clauses were not processed correctly. (Bug #442)

  • Under certain, rare circumstances table corruption was caused by a DELETE from a large table with a new (created by MySQL-4.1) full-text index.

  • UNION with an empty select list and a nonexistent column being used in some of the individual SELECT statements could cause the server to crash.

  • SLAVE START (which is a deprecated syntax, START SLAVE should be used instead) could crash the slave. (Bug #2516)

  • UNION operations that involved temporary tables could cause the server to crash.

  • Attempting to create a table containing a spatial (GIS) column using a storage engine that does not support spatial types cause the server to crash.

  • When no host name is specified in SET PASSWORD FOR user, it now defaults to % instead of the current host.

  • MyISAM tables with FULLTEXT indexes created in MySQL 4.0 were unreadable by MySQL 4.1.

  • CREATE FULLTEXT INDEX was not supported.

  • Double the required amount of memory was freed by the server.

  • Names of outer columns of subqueries in INSERT/REPLACE statements were not resolved correctly. (Bug #446)

  • Name resolution of columns of reduced subqueries in UNION statements was not always performed correctly. (Bug #745)

  • Columns of reduced subqueries were not always handled correctly. (Bug #679)

  • Following a call to mysql_prepare(), placeholders were permitted in all consequent statements, even if they were not prepared. (Bug #1946)

  • Privileges could be escalation using database wildcards in GRANT statements. (Bug #3924)

  • When ALTER TABLE RENAME, was used to rename a table with the same name in another database, it silently dropped the destination table if it existed. (Bug #2628)

  • A problem with UNION kept NULL values from being inserted into result set columns where the first SELECT of the UNION retrieved NOT NULL columns. The type and maximum length of the result column are now defined based on all parts of the UNION.

C.1.26 Changes in MySQL 4.1.0 (2003-04-03, Alpha)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality Added or Changed

  • Incompatible Change: TIMESTAMP is now returned as a string of type 'YYYY-MM-DD HH:MM:SS' and different timestamp lengths are not supported.

    This change was necessary for SQL standards compliance. In a future version, a further change will be made (backward compatible with this change), permitting the timestamp length to indicate the desired number of digits of fractions of a second.

  • Replication: Replication now works with RAND() and user variables @var.

  • The --opt option for mysqldump now is enabled by default, as are all the options implied by --opt.

  • SLAVE START and SLAVE STOP are no longer accepted by the query parser; use START SLAVE and STOP SLAVE instead.

  • On Windows, we are now using shared memory to communicate between server and client when they are running on the same machine and you are connecting to localhost.

  • If one creates a too long CHAR/VARCHAR it is now automatically changed to TEXT or BLOB; One get a warning in this case.

  • BTREE index on MEMORY (HEAP) tables.

  • New CRC32() function to compute cyclic redundancy check value.

  • Added new mysql_get_server_version() C API client function.

  • Character sets to be defined per column, table and database.

  • SHOW FULL COLUMNS FROM tbl_name shows column comments.

  • Permit empty index lists to be specified for USE INDEX, IGNORE INDEX, and FORCE INDEX.

  • Server side help for all MySQL functions. One can now type help week in the mysql client and get help for the WEEK() function.

  • EXPLAIN SELECT now can be killed. See Section 12.4.6.3, “KILL Syntax”.

  • SELECT ... FROM DUAL is an alias for SELECT .... (To be compatible with some other database systems).

  • New function IS_USED_LOCK() for determining the connection identifier of the client that holds a given advisory lock.

  • SERIAL DEFAULT VALUE added as an alias for AUTO_INCREMENT.

  • One can add a comment per column in CREATE TABLE.

  • One can create a table from the existing table using CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table (LIKE table). The table can be either normal or temporary.

  • SELECT .. LIMIT 0 did not return the proper row count for SQL_CALC_FOUND_ROWS.

  • DROP TEMPORARY TABLE now drops only temporary tables and doesn't end transactions.

  • Added --compatible option to mysqldump for producing output that is compatible with other database systems or with older MySQL servers.

  • Derived tables:

    SELECT a.col1, b.col2
           FROM (SELECT MAX(col1) AS col1 FROM root_table) a,
           other_table b
           WHERE a.col1=b.col1;
    
  • REPAIR TABLE of MyISAM tables now uses less temporary disk space when sorting char columns.

  • DATE/DATETIME checking is now a bit stricter to support the ability to automatically distinguish between date, datetime, and time with microseconds. For example, dates of type YYYYMMDD HHMMDD are no longer supported; you must either have separators between each DATE/TIME part or not at all.

  • TRUE and FALSE added as alias for 1 and 0, respectively.

  • New options --reconnect and --skip-reconnect for the mysql client, to reconnect automatically or not if the connection is lost.

  • START SLAVE (STOP SLAVE) no longer returns an error if the slave is started (stopped); it returns a warning instead.

  • Subqueries: SELECT * from t1 where t1.a=(SELECT t2.b FROM t2).

  • New more secure client authentication based on 45-byte passwords in the user table. (CVE-2000-0981)

  • One can specify the different BLOB/TEXT types with the syntax BLOB(length) and TEXT(length). MySQL automatically changes it to one of the internal BLOB/TEXT types.

  • The mysql command-line client attempted to interpret quotation marks within comments. (Bug #539)

  • In CREATE TABLE the attribute SERIAL is now an alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.

  • Added old-password command to mysqladmin for changing password but storing it using the old password-hashing format.

  • ALTER DATABASE.

  • New CONVERT(... USING ...) syntax for converting string values between character sets.

  • Multi-line queries: You can now issue several queries at once and then read the results in one go.

  • expr SOUNDS LIKE expr same as SOUNDEX(expr)=SOUNDEX(expr).

  • One can specify a data type for a column in CREATE TABLE ... SELECT by defining the column in the CREATE TABLE part.

    CREATE TABLE foo (a TINYINT NOT NULL) SELECT b+1 AS a FROM bar;
    
  • New operators integer MOD integer and integer DIV integer. DIV is now a reserved word.

  • SHOW [COUNT(*)] WARNINGS shows warnings from the last command.

  • Added support for UNION in derived tables.

  • VARCHARACTER is an alias for VARCHAR.

  • CHAR BYTE is an alias for the CHAR BINARY data type.

  • In CREATE TABLE foo (a INT not null primary key) the PRIMARY word is now optional.

  • Added new VARIANCE(expr) function that returns the variance of expr

  • New CHARSET() and COLLATION() functions to return the character set and collation of a string.

  • Added record_in_range() method to MERGE tables to be able to choose the correct index when there are many to choose from.

  • REPAIR TABLE and OPTIMIZE TABLE now can be killed. See Section 12.4.6.3, “KILL Syntax”.

  • Support for GIS (Geometrical data). See Chapter 16, Spatial Extensions.

  • libmysqlclient did not always fetch column default values correctly.

  • Aliases are now forced in derived tables, as per standard SQL.

  • New faster client/server protocol that supports prepared statements, bound parameters, and bound result columns, binary transfer of data, warnings.

  • One can specify many temporary directories to be used in a round-robin fashion with: --tmpdir=dirname1:dirname2:dirname3.

  • Faster embedded server (new internal communication protocol).

  • Permit the ANSI_QUOTES SQL mode to be changed on the fly.

  • Unicode (UTF8) support.

  • Renamed SHOW MASTER LOGS statement to SHOW BINARY LOGS.

  • Added database and real table name (in case of alias) to the MYSQL_FIELD structure.

  • Permit DEFAULT(col_name) in expressions; it produces the column's default value.

  • Permit index type to be specified explicitly for some storage engines using USING type_name syntax in index definition.

C.2 Changes in Release 4.0.x (Lifecycle Support Ended)

C.2.1 Changes in Release 4.0.31 (Not released)
C.2.2 Changes in Release 4.0.30 (12 February 2007)
C.2.3 Changes in Release 4.0.29 (Not released)
C.2.4 Changes in Release 4.0.28 (Not released)
C.2.5 Changes in Release 4.0.27 (06 May 2006)
C.2.6 Changes in Release 4.0.26 (08 September 2005)
C.2.7 Changes in Release 4.0.25 (05 July 2005)
C.2.8 Changes in Release 4.0.24 (04 March 2005)
C.2.9 Changes in Release 4.0.23 (18 December 2004)
C.2.10 Changes in Release 4.0.22 (27 October 2004)
C.2.11 Changes in Release 4.0.21 (06 September 2004)
C.2.12 Changes in Release 4.0.20 (17 May 2004)
C.2.13 Changes in Release 4.0.19 (04 May 2004)
C.2.14 Changes in Release 4.0.18 (12 February 2004)
C.2.15 Changes in Release 4.0.17 (14 December 2003)
C.2.16 Changes in Release 4.0.16 (17 October 2003)
C.2.17 Changes in Release 4.0.15 (03 September 2003)
C.2.18 Changes in Release 4.0.14 (18 July 2003)
C.2.19 Changes in Release 4.0.13 (16 May 2003)
C.2.20 Changes in Release 4.0.12 (15 March 2003: Production)
C.2.21 Changes in Release 4.0.11 (20 February 2003)
C.2.22 Changes in Release 4.0.10 (29 January 2003)
C.2.23 Changes in Release 4.0.9 (09 January 2003)
C.2.24 Changes in Release 4.0.8 (07 January 2003)
C.2.25 Changes in Release 4.0.7 (20 December 2002)
C.2.26 Changes in Release 4.0.6 (14 December 2002: Gamma)
C.2.27 Changes in Release 4.0.5 (13 November 2002)
C.2.28 Changes in Release 4.0.4 (29 September 2002)
C.2.29 Changes in Release 4.0.3 (26 August 2002: Beta)
C.2.30 Changes in Release 4.0.2 (01 July 2002)
C.2.31 Changes in Release 4.0.1 (23 December 2001)
C.2.32 Changes in Release 4.0.0 (October 2001: Alpha)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

The following list summarizes the features in MySQL Server 4.0 that are not present in previous versions. For a full list of changes, please refer to the changelog sections for individual 4.0 releases.

For a full list of changes, please refer to the changelog sections for each individual 4.0.x release.

C.2.1 Changes in Release 4.0.31 (Not released)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.0 release family.

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 (http://www.mysql.com/products/enterprise).

Bugs fixed:

  • Security Fix: Using 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 #321111, CVE-2007-5969)

  • Error returns from the time() system call were ignored. (Bug #27198)

C.2.2 Changes in Release 4.0.30 (12 February 2007)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.0 release family.

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 (http://www.mysql.com/products/enterprise).

Bugs fixed:

  • Idle connections were not killed during timeout when using the Native POSIX Thread Library (NPTL) and mysqld. In the course of this fix, code to detect and handle the NPTL has been backported from 4.1 to 4.0. (Bug #16995)

C.2.3 Changes in Release 4.0.29 (Not released)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.0 release family.

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 (http://www.mysql.com/products/enterprise).

Bugs fixed:

  • InnoDB exhibited thread thrashing with more than 50 concurrent connections under an update-intensive workload. (Bug #22868)

  • InnoDB showed substandard performance with multiple queries running concurrently. (Bug #15815)

  • 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)

C.2.4 Changes in Release 4.0.28 (Not released)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a bugfix release for the MySQL 4.0 release family.

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 (http://www.mysql.com/products/enterprise).

Functionality added or changed:

  • The mysqldumpslow script has been moved from client RPM packages to server RPM packages. This corrects a problem where mysqldumpslow could not be used with a client-only RPM install, because it depends on my_print_defaults which is in the server RPM. (Bug #20216)

Bugs fixed:

  • Deleting entries from a large MyISAM index could cause index corruption when it needed to shrink. Deletes from an index can happen when a record is deleted, when a key changes and must be moved, and when a key must be un-inserted because of a duplicate key. This can also happen in REPAIR TABLE when a duplicate key is found and in myisamchk when sorting the records by an index. (Bug #22384)

  • Transient errors in replication from master to slave may trigger multiple Got fatal error 1236: 'binlog truncated in the middle of event' errors on the slave. (Bug #4053)

  • A server or network failure with an open client connection would cause the client to hang even though the server was no longer available. (Bug #9678)

  • mysqlhotcopy did not copy RAID directories with names that contained nondecimal hex digits. (It copied only directories containing the characters 0 through 9 and ignored those containing a through f.) (Bug #18777)

  • Using SELECT and a table join while running a concurrent INSERT operation would join incorrect rows. (Bug #14400)

  • A query with a WHERE clause containing column = ELT(int_value_1, value_list) OR column = ELT(int_value_2, value_list) could return unexpected results. (Bug #12728)

C.2.5 Changes in Release 4.0.27 (06 May 2006)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

This is a security fix release and bugfix release for the MySQL 4.0 release family.

This release includes the patches for recently reported security vulnerabilites in the MySQL client/server protocol. We would like to thank Stefano Di Paola for finding and reporting these to us.

Functionality added or changed:

  • The MySQL-server RPM now explicitly assigns the mysql system user to the mysql user group during the postinstallation process. This corrects an issue with upgrading the server on some Linux distributions whereby a previously existing mysql user was not changed to the mysql group, resulting in wrong groups for files created following the installation. (Bug #12823)

  • Better detection of connection timeout for replication servers on Windows enables elimination of extraneous Lost connection errors in the error log. (Bug #5588)

Bugs fixed:

  • Security fix: A malicious client, using specially crafted invalid login or COM_TABLE_DUMP packets was able to read uninitialized memory, which potentially, though unlikely in MySQL, could have led to an information disclosure. (CVE-2006-1516, CVE-2006-1517) Thanks to Stefano Di Paola for finding and reporting this bug.

  • MySQL-shared-compat-4.0.26-0.i386.rpm incorrectly depend on glibc 2.3 and cannot not be installed on a glibc 2.2 system. For MySQL 4.0, use the older MySQL-shared-compat-4.0.25-0.i386.rpm package. (Bug #16539)

  • Running myisampack followed by myisamchk with the --unpack option would corrupt the auto_increment key. (Bug #12633)

  • When myisamchk needed to rebuild a table, AUTO_INCREMENT information was lost. (Bug #10405)

  • Avoid trying to include <asm/atomic.h> when it doesn't work in C++ code. (Bug #13621)

  • BIT_COUNT() could return an incorrect value for right table columns in a LEFT JOIN. (Bug #13044)

  • MySQL would not compile on Linux distributions that use the tinfo library. (Bug #18912)

  • An UPDATE statement which tried to update a column with a name beginning with an asterisk would cause the server to crash. This was because the server would wrongly expand the * character to the list of all table columns, causing the list of columns to become longer than the list of values. Now the server performs this expansion only if the * character is followed by a space. (Bug #16510)

  • An INSERT ... SELECT statement between tables in a MERGE set can return errors when statement involves insert into child table from merge table or vice-versa. (Bug #5390)

  • Fixed problems with static variables to allow building on Fedora Core 3. (Bug #6554)

  • A LIMIT-related optimization failed to take into account that MyISAM table indexes can be disabled, causing Error 124 when it tried to use such an index. (Bug #14616)

  • For a table that had been opened with HANDLER OPEN, issuing OPTIMIZE TABLE, ALTER TABLE, or REPAIR TABLE caused a server crash. (Bug #14397)

  • Queries of the form (SELECT ...) ORDER BY ... were being treated as a UNION. This improperly resulted in only distinct values being returned (because UNION by default eliminates duplicate results). Also, references to column aliases in ORDER BY clauses following parenthesized SELECT statements were not resolved properly. (Bug #7672)

  • SELECT DISTINCT with a GROUP BY clause caused a server crash. (Bug #13855)

  • SHOW CREATE TABLE did not display any FOREIGN KEY clauses if a temporary file could not be created. Now SHOW CREATE TABLE displays an error message in an SQL comment if this occurs. (Bug #13002)

  • MySQL programs in binary distributions for Solaris 8/9/10 x86 systems would not run on Pentium III machines. (Bug #6772)

  • Queries against a MERGE table that has a composite index could produce incorrect results. (Bug #9112)

  • The counters for the Key_read_requests, Key_reads, Key_write_requests, and Key_writes status variables were changed from unsigned long to unsigned longlong to accommodate larger values before the variables roll over and restart from 0. (Bug #12920)

  • A concurrency problem for CREATE ... SELECT could cause a server crash. (Bug #12845)

  • On HP-UX 11.x (PA-RISC), the -L option caused mysqlimport to crash. (Bug #12958)

  • The server crashed when one thread resized the query cache while another thread was using it. (Bug #12848)

C.2.6 Changes in Release 4.0.26 (08 September 2005)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Added the mysql_get_client_version() C API function to the embedded server library. (It was present in the regular client library but inadvertently omitted from the embedded library.) (Bug #10266)

Bugs fixed:

  • An optimizer estimate of zero rows for a nonempty InnoDB table used in a left or right join could cause incomplete rollback for the table. (Bug #12779)

  • Query cache is switched off if a thread (connection) has tables locked. This prevents invalid results where the locking thread inserts values between a second thread connecting and selecting from the table. (Bug #12385)

  • For DMG installs on Mac OS X, the preinstallation and postinstallation scripts were being run only for new installations and not for upgrade installations, resulting in an incomplete installation process. (Bug #11380)

  • On Windows, applications that used the embedded server made it not possible to remove certain files in the data directory, even after the embedded server had been shut down. This occurred because a file descriptor was being held open. (Bug #12177)

  • Creation of the mysql group account failed during the RPM installation. (Bug #12348)

  • Attempting to repair a table having a fulltext index on a column containing words whose length exceeded 21 characters and where myisam_repair_threads was greater than 1 would crash the server. (Bug #11684)

  • When two threads compete for the same table, a deadlock could occur if one thread has also a lock on another table through LOCK TABLES and the thread is attempting to remove the table in some manner and the other thread want locks on both tables. (Bug #10600)

C.2.7 Changes in Release 4.0.25 (05 July 2005)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Security improvement: Applied a patch to fix a UDF library-loading vulnerability that could result in a buffer overflow and code execution. (CVE-2005-2558)

  • Added --with-big-tables compilation option to configure. (Previously it was necessary to pass -DBIG_TABLES to the compiler manually in order to enable large table support.) See Section 2.9.3, “MySQL Source-Configuration Options”, for details.

Bugs fixed:

  • On Mac OS X, libmysqlclient_r.a now is built with --fno-common to make it possible to link a shared two-level namespace library against libmysqlclient_r.a. (Bug #10638)

  • An error in the implementation of the MyISAM compression algorithm caused myisampack to fail with very large sets of data (total size of all the records in a single column needed to be >= 3 GB to trigger this issue). (Bug #8321)

  • A problem with the my_global.h file caused compilation of MySQL to fail on single-processor Linux systems running 2.6 kernels. (Bug #10364)

  • Fixed a portability problem testing for crypt() support that caused compilation problems when using OpenSSL/yaSSL on HP-UX and Mac OS X. (Bug #10675, Bug #11150)

  • MyISAM table corruption could occur with ANALYZE TABLE if a write lock was acquired with LOCK TABLES and then an INSERT or DELETE was done prior to analyzing the table. (Bug #10901)

  • Fixed a server crash resulting from CREATE TABLE ... SELECT that selected from a table being altered by ALTER TABLE. (Bug #10224)

  • InnoDB: In DROP DATABASE, check for all referencing tables from other databases before dropping any tables. (Bug #10335)

  • Fixed a problem with incorrect constant propagation resulting in incorrect evaluation of AND or OR queries. (Bug #10095)

  • Fixed wrong buffer usage for auto-increment key with blob part that caused CHECK TABLE to report that the table was wrong. (Bug #10045)

  • No error was raised for BOOLEAN full-text searches for storage engines that do not support full-text. (Bug #7709)

  • The test in configure to see whether CXX specified gcc failed if gcc was specified as a full path name. (Bug #9690)

  • In the mysql_real_escape_string() C API function, when a multi-byte character is encountered that is illegal in the current character set, escape only the first byte, not each byte. This avoids creating a valid character from an invalid one. (Bug #9864; this is a backport of Bug #8378 from MySQL 4.1.11 to 4.0.25)

  • Fixed a deadlock resulting from use of FLUSH TABLES WITH READ LOCK while an INSERT DELAYED statement is in progress. (Bug #7823)

  • Fixed a segmentation fault in mysqlcheck that occurred when the last table checked in --auto-repair mode returned an error (such as the table being a MERGE table). (Bug #9492)

  • Fixed faulty display of TIMESTAMP columns retrieved as col_name+0 while the new system variable is set to 1. (Bug #8894)

  • Queries containing CURRENT_USER() incorrectly were registered in the query cache. (Bug #9796)

  • An UPDATE that updated only some of the columns in a multiple-column index could result in a loop. (Bug #8942)

  • REPAIR TABLE did not invalidate query results in the query cache that were generated from the table. (Bug #8480)

  • Fixed a bug that caused concurrent inserts to be permitted into the tables in the SELECT ... UNION ... part of INSERT ... SELECT ... UNION .... This could result in the incorrect order of queries in the binary log. (Bug #9922)

  • Fixed a bug that under certain circumstances could allow a privilege escalation using database wildcards in GRANT. (Bug #3924, CVE-2004-0957)

  • <=> was not properly comparing NULL values in the WHERE clause of outer joins. (Bug #8711)

  • InnoDB: Fixed a bug: MySQL-4.0.23 and 4.0.24 could complain that an InnoDB table created with MySQL-3.23.49 or earlier was in the new compact InnoDB table format of 5.0.3 or later, and InnoDB would refuse to use that table. (The same bug exists in 4.1.8 - 4.1.10.) There is nothing wrong with the table, it is mysqld that is in error. Workaround: wait that 4.0.25 or 4.1.11 is released before doing an upgrade, or dump the table and re-create it with any MySQL version >= 3.23.50 before upgrading to 4.0.23 or 4.0.24.

C.2.8 Changes in Release 4.0.24 (04 March 2005)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Security improvement: The server creates .frm, .MYD, .MYI, .MRG, .ISD, and .ISM table files only if a file with the same name does not already exist. Thanks to Stefano Di Paola for finding and informing us about this issue. (CVE-2005-0711)

  • Security improvement: User-defined functions should have at least one symbol defined in addition to the xxx symbol that corresponds to the main xxx() function. These auxiliary symbols correspond to the xxx_init(), xxx_deinit(), xxx_reset(), xxx_clear(), and xxx_add() functions. mysqld by default no longer loads UDFs unless they have at least one auxiliary symbol defined in addition to the main symbol. The --allow-suspicious-udfs option controls whether UDFs that have only an xxx symbol can be loaded. By default, the option is off. mysqld also checks UDF file names when it reads them from the mysql.func table and rejects those that contain directory path name separator characters. (It already checked names as given in CREATE FUNCTION statements.) See Section 18.2.2.1, “UDF Calling Sequences for Simple Functions”, Section 18.2.2.2, “UDF Calling Sequences for Aggregate Functions”, and Section 18.2.2.6, “User-Defined Function Security Precautions”. Thanks to Stefano Di Paola for finding and informing us about this issue. (CVE-2005-0709, CVE-2005-0710)

  • InnoDB: Added configuration option and settable global variable innodb_autoextend_increment for setting the size in megabytes by which InnoDB tablespaces are extended when they become full. The default value is 8, corresponding to the fixed increment of 8MB in previous versions of MySQL.

  • InnoDB: Do not acquire an internal InnoDB table lock in LOCK TABLES if autocommit = 1. This helps in porting old MyISAM applications to InnoDB. InnoDB table locks in that case caused deadlocks very easily.

Bugs fixed:

  • AES_DECRYPT(col_name,key) could fail to return NULL for invalid values in col_name, if col_name was declared as NOT NULL. (Bug #8669)

  • FOUND_ROWS() returned an incorrect value after a SELECT SQL_CALC_FOUND_ROWS DISTINCT statement that selected constants and included GROUP BY and LIMIT clauses. (Bug #7945)

  • Index cardinality was not being updated properly for TEMPORARY tables under some circumstances, such as CREATE TABLE ... SELECT followed by ANALYZE TABLE. (Bug #7519)

  • Fixed a server crash caused by DELETE FROM tbl_name ... WHERE ... ORDER BY tbl_name.col_name when the ORDER BY column was qualified with the table name. (Bug #8392)

  • Fixed a bug in MATCH ... AGAINST in natural language mode that could cause a server crash if the FULLTEXT index was not used in a join (EXPLAIN did not show fulltext join mode) and the search query matched no rows in the table (Bug #8522).

  • Platform and architecture information in version information produced for --version option on Windows was always Win95/Win98 (i32). More accurately determine platform as Win32 or Win64 for 32-bit or 64-bit Windows, and architecture as ia32 for x86, ia64 for Itanium, and axp for Alpha. (Bug #4445)

  • Fixed an optimization problem that permitted a negative number to be stored in a DOUBLE UNSIGNED column when it was assigned a value from a signed DOUBLE column. (Bug #7700)

  • Fixed a failure of multiple-table updates to replicate properly on slave servers when --replicate-*-table options had been specified. (Bug #7011)

  • Renamed set_bit() and clear_bit() functions in source code to avoid a conflict with functions of the same names in Linux kernel header files. (Bug #7971)

  • Part of the information being used to cache access-permission lookups was not always reinitialized properly, particularly for connections from localhost on Windows. The result was connection failures that appeared to occur randomly. (Bug #5569)

  • Corrected a problem with the QUOTE() function returning bad results. (Bug #8248)

  • Fixed a problem where INSERT INTO ...SELECT failed when the source and target table were the same. (Bug #6034)

  • Fixed a problem where RPM installation on Linux as a nonprivileged user would result in incomplete installation. (Bug #7347)

  • Change thread stack size used for building Linux RPM distributions to avoid warnings about stack size during server startup. (Bug #6226)

  • Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CVE-2005-0004)

  • Fixed support for C API function mysql_list_fields(), which was accidentally broken in 4.0.22 (Bug #6761)

  • Make query_cache_wlock_invalidate system variable visible in SHOW VARIABLES output. (Bug #7594)

  • Fixed a bug which caused FROM_UNIXTIME() function to return NULL for zero argument instead of the Epoch. (Bug #7515)

  • Now in datetime values two digit year is interpreted as year in 20th or 21st century even with zero month and day. (Bug #7297)

  • Fixed a bug in QUOTE function when used in conjunction with some other string functions. This lead to severe buffer overflow and server crashing. (Bug #7495)

  • InnoDB: Work around a problem in AIX 5.1 patched with ML7 security patch: InnoDB would refuse to open its ibdata files, complaining about an operating system error 0.

  • InnoDB: Fixed a memory corruption bug if one created a table with a primary key that contained at least two column prefixes. An example: CREATE TABLE t(a char(100), b tinyblob, PRIMARY KEY(a(5), b(10))).

  • InnoDB: Use native tmpfile() function on Netware. All InnoDB temporary files are created under sys:\tmp. Previously, InnoDB temporary files were never deleted on Netware.

  • InnoDB: Honor the --tmpdir startup option when creating temporary files. Previously, InnoDB temporary files were always created in the temporary directory of the operating system. On Netware, InnoDB will continue to ignore --tmpdir. (Bug #5822)

  • InnoDB: Fix a theoretical hang over the adaptive hash latch in InnoDB if one runs INSERT ... SELECT ... (binlog not enabled), or a multiple-table UPDATE or DELETE, and only the read tables are InnoDB type, the rest are MyISAM; this also fixes bug #7879 for InnoDB type tables. (Bug #7879)

  • InnoDB: Fixed a bug: 32-bit mysqld binaries built on HP-UX-11 did not work with InnoDB files greater than 2 GB in size. (Bug #6189)

  • InnoDB: Fixed a bug: InnoDB failed to drop a table in the background drop queue if the table was referenced by a foreign key constraint.

  • InnoDB: Fixed a bug: if we dropped a table where an INSERT was waiting for a lock to check a FOREIGN KEY constraint, then an assertion would fail in lock_reset_all_on_table(), since that operation assumes no waiting locks on the table or its records.

  • Fixed that, when encountering a disk full or quota exceeded write error, MyISAM sometimes didn't sleep and retry the write, thus resulting in a corrupted table. (Bug #7714)

  • Fixed that a slave could crash after replicating many ANALYZE TABLE, OPTIMIZE TABLE, or REPAIR TABLE statements from the master. (Bug #6461, Bug #7658)

  • Fixed a bug where MySQL was allowing concurrent updates (inserts, deletes) to a table if binary logging is enabled. Changed to ensure that all updates are executed in a serialized fashion, because they are executed serialized when binlog is replayed. (Bug #7879)

  • Fixed a bug in replication that caused the master to stamp generated statements (such as SET statements) with an error_code intended only for another statement. This could happen, for example, when a statements generates a duplicate key error on the master but must be replicated. (Bug #8412)

  • Documented problem with using mysqldump in 4.0.x to dump TIMESTAMP(2) and TIMESTAMP(4) data types. (Bug #6530)

C.2.9 Changes in Release 4.0.23 (18 December 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

Due to a libtool-related bug in the source distribution, the creation of shared libmysqlclient libraries was not possible (the resulting files were missing the .so file name extension). The file ltmain.sh was updated to fix this problem and the resulting source distribution was released as mysql-4.0.23a.tar.gz. This modification did not affect the binary packages. (Bug #7401)

Functionality added or changed:

  • Added --hex-blob option to mysqldump for dumping binary string columns using hexadecimal notation.

  • Added mysql_hex_string() C API function that hex-encodes a string.

  • InnoDB: Do not periodically write SHOW INNODB STATUS information to a temporary file unless the configuration option innodb-status-file = 1 is set.

  • InnoDB: Made the foreign key parser better aware of quotation marks. (Bug #6340)

  • mysqlbinlog now prints an informative commented line (thread id, timestamp, server id, and so forth) before each LOAD DATA INFILE, like it does for other queries; unless --short-form is used.

Bugs fixed:

  • A multiple-table DELETE could cause MySQL to crash when using InnoDB tables. (Bug #5837, Bug #6378)

  • Corrected accounts in the mysql.user table in Windows distributions that had been created with a Host value of build rather than %. (Bug #6000)

  • Prevent adding CREATE TABLE .. SELECT query to the binary log when the insertion of new records partially failed. (Bug #6682)

  • Fixed bug which caused FROM_UNIXTIME() function to return wrong result if the argument was too big. (Bug #6439)

  • Fixed bug which caused MySQL server to store wrong values in TIMESTAMP columns and give wrong results for UNIX_TIMESTAMP() function if it was run in time zone with leap seconds. (Bug #6387)

  • InnoDB: Fixed a bug in LOAD DATA INFILE…REPLACE printing duplicate key error when executing the same load query several times. (Bug #5835)

  • InnoDB: Refuse to open new-style tables created with MySQL 5.0.3 or later. (Bug #7089)

  • InnoDB: Do not call rewind() when displaying SHOW INNODB STATUS information on stderr.

  • InnoDB: If one used INSERT IGNORE to insert several rows at a time, and the first inserts were ignored because of a duplicate key collision, then InnoDB in a replication slave assigned AUTO_INCREMENT values 1 bigger than in the master. This broke the MySQL replication. (Bug #6287)

  • InnoDB: Fix two hangs: FOREIGN KEY constraints treated table and database names as case-insensitive. RENAME TABLE t TO T would hang in an endless loop if t had a foreign key constraint defined on it. Fix also a hang over the dictionary mutex that would occur if one tried in ALTER TABLE or RENAME TABLE to create a foreign key constraint name that collided with another existing name. (Bug #3478)

  • InnoDB: Treat character 0xA0 as space in InnoDB's FOREIGN KEY parser if MySQL treats it as space in the default charset. EMS MySQL Manager inserts character 0xA0 after the table name in an ALTER, which confused InnoDB's parser.

  • Fixed a bug which caused a crash when only the slave I/O thread was stopped and restarted. (Bug #6148)

  • If a connection had an open transaction but had done no updates to transactional tables (for example, if had just done a SELECT FOR UPDATE then executed a nontransactional update, that update automatically committed the transaction (thus releasing InnoDB's row-level locks etc). (Bug #5714)

  • If a connection was interrupted by a network error and did a rollback, the network error code got stored into the BEGIN and ROLLBACK binary log events; that caused superfluous slave stops. (Bug #6522)

  • A sequence of BEGIN (or SET autocommit = 0), FLUSH TABLES WITH READ LOCK, transactional update, COMMIT, FLUSH TABLES WITH READ LOCK could hang the connection forever and possibly the MySQL server itself. This happened for example when running the innobackup script several times. (Bug #6732)

C.2.10 Changes in Release 4.0.22 (27 October 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • The --with-openssl option for configure now accepts a path prefix as an argument. --with-openssl-includes and --with-openssl-libs are still supported, but are needed only to override the default values. (Bug #5494)

  • Added new --without-man option to configure to suppress building/installing the manual pages. (Bug #5379)

  • InnoDB: New mysqld option session variable innodb_table_locks (on by default). In applications using autocommit = 1 and MySQL's LOCK TABLES statement, InnoDB's internal table locks that were added in 4.0.20 can cause deadlocks. You can set innodb_table_locks = 0 in my.cnf to remove that problem. See Section 13.2.15, “Restrictions on InnoDB Tables”. (Bug #3299, Bug #5998)

  • InnoDB: Added the startup option and settable global variable innodb_max_purge_lag for delaying INSERT, UPDATE and DELETE operations when the purge operations are lagging. The default value of this parameter is zero, meaning that there are no delays. See Section 13.2.10, “InnoDB Multi-Versioning”.

  • InnoDB: Change error code to HA_ERR_ROW_IS_REFERENCED if we cannot DROP a parent table because it is referenced by a FOREIGN KEY constraint.

Bugs fixed:

  • Fixed bug in server which caused connection stall when one of deprecated libmysqlclient functions mysql_create_db() and mysql_rm_db() were called and were going to return error. (Bug #6081)

  • Fixed returning wrong query result from query cache if a temporary table was hiding a real table after putting results to query cache. (Bug #6084)

  • Fixed ENABLE KEYS, which failed if tmpdir ran out of space. Now, a full repair is done in this case. (Bug #5625)

  • Fixed an improper error message when trying to drop a table which is referenced by a FOREIGN KEY constraint. (Bug #5784)

  • Fixed a bug that permitted FLUSH TABLES to close HANDLER tables. HANDLER tables are now reopened after a FLUSH TABLES the next time they are used. However, they lose their file position if this happens. (Bug #4286)

  • Fixed a bug that permitted HANDLER tables with the same alias to be opened multiple times. HANDLER aliases must now be unique, even though it is syntactically correct in versions below 4.1 to qualify them with their base table's database name (for example, test_db.handler_tbl now conflicts with another_db.handler_tbl). (Bug #4335)

  • Fixed crash when using MySQL 4.0 with privilege tables from MySQL 5.0.

  • mysqlimport now reads input files locally from the client host only if the --local option is given. Previously, it assumed incorrectly in some cases that files were local even without --local. (Bug #5829)

  • InnoDB: Make the check for excessive semaphore waits to tolerate glitches in the system clock (do not crash the server if the system time is adjusted while InnoDB is under load.). (Bug #5898)

  • InnoDB: Fixed a bug in the InnoDB FOREIGN KEY parser that prevented ALTER TABLE of tables containing # in their names. (Bug #5856)

  • InnoDB: Fixed problem introduced in 4.0.21 where a connection starting a transaction, doing updates, then FLUSH TABLES WITH READ LOCK, then COMMIT, would cause replication slaves to stop (complaining about error 1223). Bug surfaced when using the InnoDB innobackup script. (Bug #5949)

  • InnoDB: If one updated a column so that its size changed, or updated it to an externally stored (TEXT or BLOB) value, then ANOTHER externally stored column would show up as 512 bytes of good data + 20 bytes of garbage in a consistent read that fetched the old version of the row. (Bug #5960)

  • InnoDB: Release the dictionary latch during a long cascaded FOREIGN KEY operation, so that we do not starve other users doing CREATE TABLE or other DDL operations. This caused a notorious 'Long semaphore wait' message to be printed to the .err log. (Bug #5961)

  • InnoDB: Let InnoDB remember row locking type (X or S) inside LOCK TABLES, also over plain consistent read SELECTs.

  • InnoDB: Fixed a bug introduced in 4.0.21. An assertion failed if one used mysqldump with the option -l or --opt, or if one used LOCK TABLES ... LOCAL. (Workaround in 4.0.21: use --quick and --single-transaction. (Bug #5538)

  • InnoDB: Having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref(). (Bug #5180)

  • Fixed a bug which resulted in an erroneously calculated number of examined rows in UNIONs. This value is printed in the slow query log. (Bug #5879)

  • Fixed bug with crash of server on some values of read_rnd_buffer_size (Bug #5492)

  • Fixed bug which caused truncation of values read from or into TIMESTAMP fields if --new mode was enabled. (Bug #4131)

  • mysqladmin now returns a status of 0 even when the server denies access; such an error means the server is running. (Bug #3120)

  • Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug #5711)

  • Fixed that if a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it prints a message to the error log every 10 minutes, and waits until disk becomes free. (Bug #3248)

  • Fixed problem with symlinked databases on Windows being shown with SHOW DATABASES even if the database name doesn't match the given wildcard (Bug #5539)

C.2.11 Changes in Release 4.0.21 (06 September 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Print version_comment (from ./configure --comment during compilation) when starting the server. Example: Version: '4.0.21-debug' socket: '/tmp/mysql.sock' port: 0 Official MySQL Binary

  • Made the MySQL server not react to signals SIGHUP and SIGQUIT on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals (reported as Bug #2030).

  • On Windows, the mysqld-nt and mysqld-max-nt servers now write error messages to the Windows event log in addition to the MySQL error log.

Bugs fixed:

  • Fixed an old bug in concurrent accesses to MERGE tables (even one MERGE table and MyISAM tables), that could've resulted in a crash or hang of the server. (Bug #2408, CVE-2004-0837)

  • Fixed a bug that caused incorrect results from GROUP BY queries with expression in HAVING clause that refers to a columns such as BLOB, TEXT, or TINYBLOB. (Bug #4358)

  • Fixed a bug when memory was not released when HEAP table is dropped. It could only happen on Windows when a symlink file (.sym) is used and if that symlink file contained double backslashes (\\). (Bug #4973)

  • Fixed a bug which prevented TIMESTAMP(19) fields from being created. (Bug #4491)

  • Fixed a bug that caused wrong results in queries that were using index to search for NULL values in BLOB (TINYBLOB, TEXT, TINYTEXT, etc) columns of MyISAM tables. (Bug #4816)

  • Fixed a bug in the function ROUND() reporting incorrect metadata (number of digits after the decimal point). It can be seen, for example, in CREATE TABLE t1 SELECT ROUND(1, 34). (Bug #4393)

  • Fixed precision loss bug in some mathematical functions such as SQRT() and LOG(). (Bug #4356)

  • Fixed a long-standing problem with LOAD DATA with the LOCAL option. The problem occurs when an error happens during the LOAD DATA operation. Previously, the connection was broken. Now the error message is returned and connection stays open.

  • Optimizer now treats col IN (val) the same way it does for col = val.

  • Fixed a problem with net_buffer_length when building the DBD::mysql Perl module. (Bug #4206)

  • lower_case_table_names = 2 (keep case for table names) was not honored with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)

  • Fixed a crash on declaration of DECIMAL(0,...) column. (Bug #4046)

  • Fixed a bug in IF() function incorrectly determining the result type if aggregate functions were involved. (Bug #3987)

  • Fixed bug in privilege checking where, under some conditions, one was able to grant privileges on the database, he has no privileges on. (Bug #3933)

  • Fixed crash in MATCH ... AGAINST() on a phrase search operator with a missing closing double quote. (Bug #3870, CVE-2004-0956)

  • Values greater than 4294967295 of system variables were truncated on 64-bit platforms. (Bug #3754)

  • If server-id was not set using startup options but with SET GLOBAL, the replication slave still complained that it was not set. (Bug #3829)

  • Fixed potential memory overrun in mysql_real_connect() (which required a compromised DNS server and certain operating systems). (Bug #4017, CVE-2004-0836)

  • During the installation process of the server RPM on Linux, mysqld was run as the root system user, and if you had --log-bin=somewhere_out_of_var_lib_mysql it created binary log files owned by root in this directory, which remained owned by root after the installation. This is now fixed by starting mysqld as the mysql system user instead. (Bug #4038)

  • Made DROP DATABASE honor the value of lower_case_table_names. (Bug #4066)

  • The slave SQL thread refused to replicate INSERT ... SELECT if it examined more than 4 billion rows. (Bug #3871)

  • Fixed incorrect destruction of expression which led to crash of server on complex AND/OR expressions if query was ignored (either by a replication server because of --replicate-*-table rules, or by any MySQL server because of a syntax error). (Bug #3969, Bug #4494)

  • Fixed that mysqlbinlog --position --read-from-remote-server had wrong # at lines. (Bug #4506)

  • If CREATE TEMPORARY TABLE t SELECT failed while loading the data, the temporary table was not dropped. (Bug #4551)

  • Fixed that when a multiple-table DROP TABLE failed to drop a table on the master server, the error code was not written to the binary log. (Bug #4553)

  • When the slave SQL thread was replicating a LOAD DATA INFILE statement, it didn't show the statement in the output of SHOW PROCESSLIST. (Bug #4326)

  • Fixed that CREATE TABLE ... TYPE=HEAP ... AS SELECT... caused replication slave to stop. (Bug #4971)

  • Fixed that disable-local-infile option had no effect if client read it from a configuration file using mysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073)

  • Fixed that mysql-test-run failed on the rpl_trunc_binlog test if running test from the installed (the target of 'make install') directory. (Bug #5050)

  • Fixed an unlikely deadlock which could happen when using KILL. (Bug #4810)

  • Fixed a crash when one connection got KILLed while it was doing START SLAVE. (Bug #4827)

  • Made FLUSH TABLES WITH READ LOCK block COMMIT if server is running with binary logging; this ensures that the binary log position is trustable when doing a full backup of tables and the binary log. (Bug #4953)

  • Fixed that the counter of an auto_increment column was not reset by TRUNCATE TABLE is the table was a temporary one. (Bug #5033)

  • Made database names to compare case-insensitively in fully qualified column names (database.table.column) when lower_case_table_names = 1. (Bug #4792)

  • Fixed that SET CHARACTER SET was not replicated correctly. MySQL 4.1 does not have that bug. (Bug #4500)

  • Fixed a symlink vulnerability in the mysqlhotcopy script. (CVE-2004-0457)

C.2.12 Changes in Release 4.0.20 (17 May 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

The windows packages had to be repackaged and re-released several times to resolve packaging issues (such as missing files). This did not affect the binaries included (they have not been recompiled), therefore the installation packages are of version 4.0.20d, while the binaries included still identify themselves as version 4.0.20b.

Functionality added or changed:

  • From the Windows distribution, predefined accounts without passwords for remote users ("root@%", "@%") were removed (other distributions never had them).

  • Phrase search in MATCH ... AGAINST ( ... IN BOOLEAN MODE) no longer matches partial words.

Bugs fixed:

  • A crashing bug (race condition) was fixed in InnoDB diagnostic logging. It was introduced in 4.0.19. (Bug #3596)

  • Fixed a bug in division / reporting incorrect metadata (number of digits after the decimal point). It can be seen, for example, in CREATE TABLE t1 SELECT "0.01"/"3". (Bug #3612)

  • Fixed a problem with nonworking DROP DATABASE on some configurations (in particular, Linux 2.6.5 with ext3 are known to expose this bug). (Bug #3594)

  • Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug #3357)

C.2.13 Changes in Release 4.0.19 (04 May 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Note

The MySQL 4.0.19 binaries were uploaded to the download mirrors on May, 10th. However, a potential crashing bug was found just before the 4.0.19 release was publicly announced and published from the 4.0 download pages at http://dev.mysql.com/.

A fix for the bug was pushed into the MySQL source tree shortly after it could be reproduced and is included in MySQL 4.0.20. Users upgrading from MySQL 4.0.18 should upgrade directly to MySQL 4.0.20 or later.

See (Bug #3596) for details (it was reported against MySQL-4.1, but was confirmed to affect 4.0.19 as well).

Functionality added or changed:

  • If length of a timestamp field is defined as 19, the timestamp is displayed as "YYYY-MM-DD HH:MM:SS. This is done to make it easier to use tables created in MySQL 4.1 to be used in MySQL 4.0.

  • If you use RAID_CHUNKS with a value > 255 it is set to 255. This was made to ensure that all raid directories are always 2 hex bytes. (Bug #3182)

  • Changed that the optimizer now considers the index specified in FORCE INDEX clause as a candidate to resolve ORDER BY as well.

  • The --log-warnings server option now is enabled by default. Disable with --log-warnings=0.

  • Until now, in SELECT ... UNION SELECT ... ORDER BY ..., it was possible to qualify a column name in the ORDER BY clause with a table name. This is no longer possible. Column names in ORDER BY should refer to names established in the first SELECT of the UNION. (Bug #3064)

  • Added max_insert_delayed_threads system variable as a synonym for max_delayed_threads.

  • Added query_cache_wlock_invalidate system variable. It enables emulation of MyISAM table write-locking behavior, even for queries in the query cache. (Bug #2693)

  • The keyword MASTER_SERVER_ID is not reserved anymore.

  • The following is relevant mainly for Mac OS X users who use a case-insensitive file system. This is not relevant for Windows users as InnoDB in this case always stores file names in lower case:

    You can now force lower_case_table_names to 0 from the command line or a configuration file. This is useful with case-insensitive file systems when you have previously not used lower_case_table_names = 1 or lower_case_table_names = 2 and you have created InnoDB tables. With lower_case_table_names = 0, InnoDB tables were stored in mixed case while setting lower_case_table_names to a nonzero value now forces it to lower case (to make the table names case insensitive).

    Because it is possible to crash MyISAM tables by referring to them with different case on a case-insensitive file system, use lower_case_table_names or lower_case_table_names = 2 on such file systems.

    The easiest way to convert to use lower_case_table_names = 2 is to dump all your InnoDB tables with mysqldump, drop them and then restore them.

  • Changed that the relay log is flushed to disk by the slave I/O thread every time it reads a relay log event. This reduces the risk of losing some part of the relay log in case of brutal crash.

  • When a session having open temporary tables terminates, the statement automatically written to the binary log is now DROP TEMPORARY TABLE IF EXISTS instead of DROP TEMPORARY TABLE, for more robustness.

  • Added option --replicate-same-server-id.

Bugs fixed:

  • Added missing full-text variable ft_stopword_file to myisamchk.

  • Do not allow stray ',' at the end of field specifications. (Bug #3481)

  • INTERVAL now can handle big values for seconds, minutes and hours. (Bug #3498)

  • Blank host name did not work as documented for table and column privileges. Now it works the same way as '%'. (Bug #3473)

  • Fixed a harmless buffer overflow in replace utility. (Bug #3541)

  • Fixed SOUNDEX() to ignore nonalphabetic characters also in the beginning of the string. (Bug #3556)

  • Fixed a bug in MATCH ... AGAINST() searches when another thread was doing concurrent inserts into the MyISAM table in question. The first --- full-text search --- query could return incorrect results in this case (for example, phantom rows or not all matching rows, even an empty result set). The easiest way to check whether you are affected is to start mysqld with --skip-concurrent-insert switch and see whether it helps.

  • Fixed bug when doing DROP DATABASE on a directory containing non- MySQL files. Now a proper error message is returned.

  • Fixed bug in ANALYZE TABLE on a BDB table inside a transaction that hangs server thread. (Bug #2342)

  • Fixed a symlink vulnerability in the mysqlbug script. (Bug #3284, CVE-2004-0381)

  • Fixed core dump bug in SELECT DISTINCT where all selected parts where constants and there were hidden columns in the created temporary table. (Bug #3203)

  • Fixed core dump bug in COUNT(DISTINCT) when there was a lot of values and one had a big value for max_heap_table_size.

  • Fixed problem with multiple-table-update and BDB tables. (Bug: #3098)

  • Fixed memory leak when dropping database with RAID tables. (Bug #2882)

  • Fixed core dump crash in replication during relay-log switch when the relay log went over max_relay_log_size and the slave thread did a flush_io_cache() at the same time.

  • Fixed hangup bug when issuing multiple SLAVE START from different threads at the same time. (Bug #2921)

  • Fixed bug when using DROP DATABASE with lower_case_table_names = 2.

  • Fixed wrong result in UNION when using lower_case_table_names = 2. (Bug #2858)

  • One can now kill threads that is 'stuck' in the join optimizer (can happen when there is MANY tables in the join in which case the optimizer can take really long time). (Bug #2825)

  • Rollback DELETE and UPDATE statements if thread is killed. (Bug #2422)

  • Ensure that all rows in an INSERT DELAYED statement is written at once if binary logging is enabled. (Bug #2491).

  • Fixed bug in query cache statistic, more accurate formula linked statistic variables mentioned in the manual.

  • Fixed a bug in parallel repair (myisamchk -p, myisam_repair_threads) - sometimes repair process failed to repair a table. (Bug #1334)

  • Fixed bugs with names of tables, databases, and columns that end to space (Bug #2985)

  • Fixed a bug in multiple-table UPDATE statements involving at least one constant table. Bug was exhibited in allowing non matching row to be updated. (Bug #2996).

  • Fixed all bugs in scripts for creating/upgrading system database (Bug #2874) Added tests which guarantee against such bugs in the future.

  • Fixed bug in mysql command-line client in interpreting quotation marks within comments. (Bug #539)

  • --set-character-set and --character-sets-dir options in myisamchk now work.

  • Fixed a bug in mysqlbinlog that caused one pointer to be free'd twice in some cases.

  • Fixed a bug in boolean full-text search, that sometimes could lead to false matches in queries with several levels of subexpressions using + operator (for example, MATCH ... AGAINST('+(+(word1 word2)) +word3*' IN BOOLEAN MODE).

  • Fixed Windows-specific portability bugs in myisam_ftdump.

  • Fixed a bug in multiple-table DELETE that was caused by foreign key constraints. If the order of the tables established by MySQL optimizer did not match parent-child order, no rows were deleted and no error message was provided. (Bug #2799)

  • Fixed a few years old bug in the range optimizer that caused a segmentation fault on some very rare queries. (Bug #2698)

  • Replication: If a client connects to a slave server and issues an administrative statement for a table (for example, OPTIMIZE TABLE or REPAIR TABLE), this could sometimes stop the slave SQL thread. This does not lead to any corruption, but you must use START SLAVE to get replication going again. (Bug #1858) The bug was accidentally not fixed in 4.0.17 as it was unfortunately earlier said.

  • Fixed that when a Rotate event is found by the slave SQL thread in the middle of a transaction, the value of Relay_Log_Pos in SHOW SLAVE STATUS remains correct. (Bug #3017)

  • Corrected the master's binary log position that InnoDB reports when it is doing a crash recovery on a slave server. (Bug #3015)

  • Changed that when a DROP TEMPORARY TABLE statement is automatically written to the binary log when a session ends, the statement is recorded with an error code of value zero (this ensures that killing a SELECT on the master does not result in a superfluous error on the slave). (Bug #3063)

  • Changed that when a thread handling INSERT DELAYED (also known as a delayed_insert thread) is killed, its statements are recorded with an error code of value zero (killing such a thread does not endanger replication, so we thus avoid a superfluous error on the slave). (Bug #3081)

  • Fixed deadlock when two START SLAVE statements were run at the same time. (Bug #2921)

  • Fixed that a statement never triggers a superfluous error on the slave, if it must be excluded given the --replicate-* options. The bug was that if the statement had been killed on the master, the slave would stop. (Bug #2983)

  • The --local-load option of mysqlbinlog now requires an argument.

  • Fixed a segmentation fault when running LOAD DATA FROM MASTER after RESET SLAVE. (Bug #2922)

  • Fixed a rare error condition that caused the slave SQL thread spuriously to print the message Binlog has bad magic number and stop when it was not necessary to do so. (Bug #3401)

  • Fixed bug in privilege checking of ALTER TABLE RENAME. (Bug #3270, CVE-2004-0835)

  • Fixed the column Exec_master_log_pos (and its disk image in the relay-log.info file) to be correct if the master had version 3.23 (it was too big by 6 bytes). This bug does not exist in the 5.0 version. (Bug #3400)

  • Fixed that mysqlbinlog does not forget to print a USE statement under rare circumstances where the binary log contained a LOAD DATA INFILE statement. (Bug #3415)

  • Fixed a memory corruption when replicating a LOAD DATA INFILE when the master had version 3.23. Some smaller problems remain in this setup, See Section 14.7, “Replication Features and Issues”. (Bug #3422)

  • Multiple-table DELETE statements were always replicated by the slave if there were some --replicate-*-ignore-table options and no --replicate-*-do-table options. (Bug #3461)

  • Fixed a crash of the MySQL slave server when it was built with --with-debug and replicating itself. (Bug #3568)

C.2.14 Changes in Release 4.0.18 (12 February 2004)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Fixed processing of LOAD DATA by mysqlbinlog in remote mode. (Bug #1378)

  • The ft_dump utility program was renamed to myisam_ftdump, and is included in binary distributions.

  • ENGINE is now a synonym for the TYPE option for CREATE TABLE and ALTER TABLE.

  • lower_case_table_names system variable now can take a value of 2, to store table names in mixed case on case-insensitive file systems. It is forced to 2 if the database directory is located on a case-insensitive file system.

  • For replication of MEMORY (HEAP) tables: Made the master automatically write a DELETE FROM statement to its binary log when a MEMORY table is opened for the first time since master's startup. This is for the case where the slave has replicated a nonempty MEMORY table, then the master is shut down and restarted: the table is now empty on master; the DELETE FROM empties it on slave too. Note that even with this fix, between the master's restart and the first use of the table on master, the slave still has out-of-date data in the table. But if you use the init-file option to populate the MEMORY table on the master at startup, it ensures that the failing time interval is zero. (Bug #2477)

  • Optimizer is now better tuned for the case where the first used key part (of many) is a constant. (Bug #1679)

  • Removed old nonworking --old-rpl-compat server option, which was a holdover from the very first 4.0.x versions. (Bug #2428)

  • Added sync_frm system variable. It is enabled by default, to instruct MySQL to sync to disk each time an .frm file is created. Disable it to suppress these sync operations.

Bugs fixed:

  • mysqlhotcopy now works on NetWare.

  • DROP DATABASE could not drop databases with RAID tables that had more than nine RAID_CHUNKS. (Bug #2627)

  • Fixed bug in range optimizer when using overlapping ranges. (Bug #2448)

  • Limit wait_timeout to 2147483 on Windows (OS limit). (Bug #2400)

  • Fixed bug when --init-file crashes MySQL if it contains a large SELECT. (Bug #2526)

  • SHOW KEYS now shows NULL in the Sub_part column for FULLTEXT indexes.

  • The signal thread's stack size was increased to enable mysqld to run on Debian/IA-64 with a TLS-enabled glibc. (Bug #2599)

  • Now only the SELECT privilege is needed for tables that are only read in multiple-table UPDATE statements. (Bug #2377)

  • Give proper error message if one uses LOCK TABLES ... ; INSERT ... SELECT and one used the same table in the INSERT and SELECT part. (Bug #2296)

  • SELECT INTO ... DUMPFILE now deletes the generated file on error.

  • Fixed foreign key reference handling to allow references to column names that contain spaces. (Bug #1725)

  • Fixed problem with index reads on character columns with BDB tables. The symptom was that data could be returned in the wrong lettercase. (Bug #2509)

  • Fixed a spurious table corruption problem that could sometimes appear on tables with indexed TEXT columns if these columns happened to contain values having trailing spaces. This bug was introduced in 4.0.17.

  • Fixed a problem where some queries could hang if a condition like indexed_TEXT_column = expr was present and the column contained values having trailing spaces. This bug was introduced in 4.0.17.

  • Fixed a bug that could cause incorrect results from a query that involved range conditions on indexed TEXT columns that happened to contain values having trailing spaces. This bug was introduced in 4.0.17. (Bug #2295)

  • Fixed incorrect path names in some of the manual pages. (Bug #2270)

  • Fixed spurious table corrupted errors in parallel repair operations. See Section 5.1.3, “Server System Variables”.

  • Fixed a crashing bug in parallel repair operations. See Section 5.1.3, “Server System Variables”.

  • Fixed bug in updating MyISAM tables for BLOB values longer than 16MB. (Bug #2159)

  • Fixed bug in mysqld_safe when running multiple instances of MySQL. (Bug #2114)

  • Fixed a bug in using HANDLER statement with tables not from a current database. (Bug #2304)

  • Fixed a crashing bug that occurred due to the fact that multiple-table UPDATE statements did not check that there was only one table to be updated. (Bug #2103)

  • Fixed a crashing bug that occurred due to BLOB data type index size being calculated incorrectly in MIN() and MAX() optimizations. (Bug #2189)

  • Fixed a bug with incorrect syntax for LOCK TABLES in mysqldump. (Bug #2242)

  • Fixed a bug in mysqld_safe that caused mysqld to generate a warning about duplicate user=xxx options if this option was specified in the [mysqld] or [server] sections of my.cnf. (Bug #2163)

  • INSERT DELAYED ... SELECT ... could cause table corruption because tables were not locked properly. This is now fixed by ignoring DELAYED in this context. (Bug #1983)

  • Replication: Sometimes the master gets a nonfatal error during the execution of a statement that does not immediately succeed. (For example, a write to a MyISAM table may first receive no space left on device, but later complete when disk space becomes available. See Section B.5.4.3, “How MySQL Handles a Full Disk”.) The bug was that the master forgot to reset the error code to 0 after success, so the error code got into its binary log, thus causing the slave to issue false alarms such as did not get the same error as on master. (Bug #2083)

  • Removed a misleading check permissions on master.info from a replication error message, because the cause of the problem could be something other than permissions. (Bug #2121)

  • Fixed a crash when the replication slave was unable to create the first relay log. (Bug #2145)

  • Replication of LOAD DATA INFILE for an empty file from a 3.23 master to a 4.0 slave caused the slave to print an error. (Bug #2452)

  • When automatically forcing lower_case_table_names to 1 if the file system was case insensitive, mysqld could crash. This bug existed only in MySQL 4.0.17. (Bug #2481)

  • Restored ability to specify default values for TIMESTAMP columns that was erroneously disabled in previous release. (Bug #2539) Fixed SHOW CREATE TABLE to reflect these values. (Bug #1885) Note that because of the auto-update feature for the first TIMESTAMP column in a table, it makes no sense to specify a default value for the column. Any such default is silently ignored (unless another TIMESTAMP column is added before this one). Also fixed the meaning of the DEFAULT keyword when it is used to specify the value to be inserted into a TIMESTAMP column other than the first. (Bug #2464)

  • Fixed bug for out-of-range arguments on QNX platform that caused UNIX_TIMESTAMP() to produce incorrect results or that caused nonzero values to be inserted into TIMESTAMP columns. (Bug #2523) Also, current time zone now is taken into account when checking if datetime values satisfy both range boundaries for TIMESTAMP columns. The range permitted for a TIMESTAMP column is time zone-dependent and equivalent to a range of 1970-01-01 00:00:01 UTC to 2037-12-31 23:59:59 UTC.

  • Multiple-table DELETE statements were never replicated by the slave if there were any --replicate-*-table options. (Bug #2527)

  • Changes to session counterparts of variables query_prealloc_size, query_alloc_block_size, trans_prealloc_size, trans_alloc_block_size now have an effect. (Bug #1948)

  • Fixed bug in ALTER TABLE RENAME, when rename to the table with the same name in another database silently dropped destination table if it existed. (Bug #2628)

C.2.15 Changes in Release 4.0.17 (14 December 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • mysqldump no longer dumps data for MERGE tables. (Bug #1846)

  • lower_case_table_names is now forced to 1 if the database directory is located on a case-insensitive file system. (Bug #1812)

  • Symlink creation is now disabled on systems where realpath() doesn't work. (Before one could use CREATE TABLE .. DATA DIRECTORY=.. even if HAVE_BROKEN_REALPATH was defined. This is now disabled to avoid problems when running ALTER TABLE).

  • Inserting a negative AUTO_INCREMENT value in a MyISAM table no longer updates the AUTO_INCREMENT counter to a big unsigned value. (Bug #1366)

  • Added four new modes to WEEK(..., mode) function. (Bug #1178)

  • Permit UNION DISTINCT syntax.

  • MySQL now syncs to disk each time .frm file is created.

  • mysql_server_init() now returns 1 if it can't initialize the environment. (Previously mysql_server_init() called exit(1) if it could not create a key with pthread_key_create(). (Bug #2062)

  • Permit spaces in Windows service names.

  • Changed the default Windows service name for mysqld from MySql to MySQL. This should not affect usage, because service names are not case sensitive.

  • When you install mysqld as a service on Windows systems, mysqld reads startup options in option files from the option group with the same name as the service name. (Except when the service name is MySQL).

Bugs fixed:

  • Sending SIGHUP to mysqld crashed the server if it was running with --log-bin. (Bug #2045)

  • One can now configure MySQL as a Windows service as a normal user. (Bug #1802). Thanks to Richard Hansen for fixing this.

  • Database names are now compared in lowercase in ON clauses when lower_case_table_names is set. (Bug #1736)

  • IGNORE ... LINES option to LOAD DATA INFILE didn't work when used with fixed length rows. (Bug #1704)

  • Fixed problem with UNIX_TIMESTAMP() for timestamps close to 0. (Bug #1998)

  • Fixed problem with character values greater than 128 in the QUOTE() function. (Bug #1868)

  • Fixed searching of TEXT with endspace. (Bug #1651)

  • Fixed caching bug in multiple-table updates where same table was used twice. (Bug #1711)

  • Fixed directory permissions for the MySQL-server RPM documentation directory. (Bug #1672)

  • Fixed server crash when updating an ENUM column that is set to the empty string (for example, with REPLACE()). (Bug #2023)

  • mysql client program now correctly prints connection identifier returned by mysql_thread_id() as unsigned integer rather than as signed integer. (Bug #1951)

  • FOUND_ROWS() could return incorrect number of rows after a query with an impossible WHERE condition. (Bug #1468)

  • SHOW DATABASES no longer shows .sym files (on Windows) that do not point to a valid directory. (Bug #1385)

  • Fixed a possible memory leak on Mac OS X when using the shared libmysql.so library. (from pthread_key_create()). (Bug #2061)

  • Fixed bug in UNION statement with alias *. (Bug #1249)

  • Fixed a bug in DELETE ... ORDER BY ... LIMIT where the rows were not deleted in the proper order. (Bug #1024, Bug #1697).

  • Fixed serious problem with multi-threaded programs on Windows that used the embedded MySQL libraries. (Locks of tables were not handled correctly between different threads).

  • Code cleanup: Fixed a few code defects (potential memory leaks, null pointer dereferences, uninitialized variables). Thanks to Reasoning Inc. for informing us about these findings.

  • Fixed a buffer overflow error that occurred with prepended 0 characters in some columns of type DECIMAL. (Bug #2128)

  • Filesort was never shown in EXPLAIN if query contained an ORDER BY NULL clause. (Bug #1335)

  • Fixed invalidation of whole query cache on DROP DATABASE. (Bug #1898)

  • Fixed bug in range optimizer that caused wrong results for some unlikely AND/OR queries. (Bug #1828)

  • Fixed a crash in ORDER BY when ordering by expression and identifier. (Bug #1945)

  • Fixed a crash in an open HANDLER when an ALTER TABLE was executed in a different connection. (Bug #1826)

  • Fixed a bug in trunc* operator of full-text search which sometimes caused MySQL not to find all matched rows.

  • Fixed bug in prepending 0 characters to DECIMAL column values.

  • Fixed optimizer bug, introduced in 4.0.16, when REF access plan was preferred to more efficient RANGE on another column.

  • Fixed problem when installing a MySQL server as a Windows service using a command of the form mysqld --install mysql --defaults-file=path-to-file. (Bug #1643)

  • Fixed an incorrect result from a query that uses only const tables (such as one-row tables) and nonconstant expression (such as RAND()). (Bug #1271)

  • Fixed bug when the optimizer did not take SQL_CALC_FOUND_ROWS into account if LIMIT clause was present. (Bug #1274)

  • mysqlbinlog now asks for a password at the console when the -p or --password option is used with no argument. This is consistent with the way that other clients such mysqladmin and mysqldump behave.

    Note

    A consequence of this change is that it is no longer possible to invoke mysqlbinlog as mysqlbinlog -p pass_val (with a space between the -p option and the following password value). (Bug #1595)

  • Fixed bug accidentally introduced in 4.0.16 where the slave SQL thread deleted its replicated temporary tables when STOP SLAVE was issued.

  • In a chain replication setup A->B->C, if 2 sessions on A updated temporary tables of the same name at the same time, the binary log of B became incorrect, resulting in C becoming confused. (Bug #1686)

  • In a chain replication setup A->B->C, if STOP SLAVE was issued on B while it was replicating a temporary table from A, then when START SLAVE was issued on B, the binary log of B became incorrect, resulting in C becoming confused. (Bug #1240)

  • When MASTER_LOG_FILE and MASTER_LOG_POS were not specified, CHANGE MASTER TO used the coordinates of the slave I/O thread to set up replication, which broke replication if the slave SQL thread lagged behind the slave I/O thread. This caused the slave SQL thread to lose some events. The new behavior is to use the coordinates of the slave SQL thread instead. See Section 12.5.2.1, “CHANGE MASTER TO Syntax”. (Bug #1870)

  • Now if integer is stored or converted to TIMESTAMP or DATETIME value checks of year, month, day, hour, minute and second ranges are performed and numbers representing illegal timestamps are converted to 0 value. This behavior is consistent with manual and with behavior of string to TIMESTAMP/DATETIME conversion. (Bug #1448)

  • Fixed bug when BIT_AND() and BIT_OR() group functions returned incorrect value if SELECT used a temporary table and no rows were found. (Bug #1790).

  • BIT_AND() is now unsigned in all contexts. This means that it now returns 18446744073709551615 (= 0xffffffffffffffff) instead of -1 if there were no rows in the result.

  • Fixed bug with BIT_AND() still returning signed value for an empty set in some cases. (Bug #1972)

  • Fixed bug with ^ (XOR) and >> (bit shift) still returning signed value in some cases. (Bug #1993)

  • Replication: a rare race condition in the slave SQL thread, which could lead to a wrong complain that the relay log is corrupted. (Bug #2011)

  • Replication: in the slave SQL thread, a multiple-table UPDATE could produce a wrong complain that some record was not found in one table, if the UPDATE was preceded by a INSERT ... SELECT. (Bug #1701)

  • Fixed deficiency in MySQL code which is responsible for scanning directories. This deficiency caused SHOW TABLE STATUS to be very slow when a database contained a large number of tables, even if a single particular table were specified. (Bug #1952)

C.2.16 Changes in Release 4.0.16 (17 October 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Option values in option files now may be quoted. This is useful for values that contain whitespace or comment characters.

  • Write memory allocation information to error log when doing mysqladmin debug. This works only on systems that support the mallinfo() call (like newer Linux systems).

  • Added the following new system variables to allow more precise memory allocation: range_alloc_block_size, query_alloc_block_size, query_prealloc_size, transaction_alloc_block_size, and transaction_prealloc_size.

  • mysqlbinlog now reads option files. To make this work, you must now specify --read-from-remote-server when reading binary logs from a MySQL server. (Note that using a remote server is deprecated and may disappear in future mysqlbinlog versions).

  • Block SIGPIPE signals also for nonthreaded programs. The blocking is moved from mysql_init() to mysql_server_init(), which is automatically called on the first call to mysql_init().

  • Added --libs_r and --include options to mysql_config.

  • New `> prompt for mysql. This prompt is similar to the '> and "> prompts, but indicates that an identifier quoted with backticks was begun on an earlier line and the closing backtick has not yet been seen.

  • Updated mysql_install_db to be able to use the local machine's IP address instead of the host name when building the initial grant tables if skip-name-resolve has been specified. This option can be helpful on FreeBSD to avoid thread-safety problems with the FreeBSD resolver libraries. (Thanks to Jeremy Zawodny for the patch.)

  • A documentation change: Added a note that when backing up a slave, it is necessary also to back up the master.info and relay-log.info files, as well as any SQL_LOAD-* files located in the directory specified by the --slave-load-tmpdir option. All these files are needed when the slave resumes replication after you restore the slave's data.

Bugs fixed:

  • Fixed a spurious error ERROR 14: Can't change size of file (Errcode: 2) on Windows in DELETE FROM tbl_name without a WHERE clause or TRUNCATE TABLE tbl_name, when tbl_name is a MyISAM table. (Bug #1397)

  • Fixed a bug that resulted in thr_alarm queue is full warnings after increasing the max_connections variable with SET GLOBAL. (Bug #1435)

  • Made LOCK TABLES to work when Lock_tables_priv is granted on the database level and Select_priv is granted on the table level.

  • Fixed crash of FLUSH QUERY CACHE on queries that use same table several times (Bug #988).

  • Fixed core dump bug when setting an enum system variable (such as sql_warnings) to NULL.

  • Extended the default timeout value for Windows clients from 30 seconds to 1 year. (The timeout that was added in MySQL 4.0.15 was way too short). This fixes a bug that caused ERROR 2013: Lost connection to MySQL server during query for queries that lasted longer than 30 seconds, if the client didn't specify a limit with mysql_options(). Users of 4.0.15 on Windows should upgrade to avoid this problem.

  • More out of memory checking in range optimizer.

  • Fixed and documented a problem when setting and using a user variable within the same SELECT statement. (Bug #1194).

  • Fixed bug in overrun check for BLOB values with compressed tables. This was a bug introduced in 4.0.14. It caused MySQL to regard some correct tables containing BLOB values as corrupted. (Bug #770, Bug #1304, and maybe Bug #1295)

  • SHOW GRANTS showed USAGE instead of the real column-level privileges when no table-level privileges were given.

  • When copying a database from the master, LOAD DATA FROM MASTER dropped the corresponding database on the slave, thus erroneously dropping tables that had no counterpart on the master and tables that may have been excluded from replication using --replicate-*-table rules. Now LOAD DATA FROM MASTER no longer drops the database. Instead, it drops only the tables that have a counterpart on the master and that match the --replicate-*-table rules. --replicate-*-db rules can still be used to include or exclude a database as a whole from LOAD DATA FROM MASTER. A database also is included or excluded as a whole if there are some rules like --replicate-wild-do-table=db1.% or --replicate-wild-ignore-table=db1.%, as is the case for CREATE DATABASE and DROP DATABASE in replication. (Bug #1248)

  • Fixed a bug where mysqlbinlog crashed with a segmentation fault when used with the -h or --host option. (Bug #1258)

  • Fixed a bug where mysqlbinlog crashed with a segmentation fault when used on a binary log containing only final events for LOAD DATA. (Bug #1340)

  • mysqlbinlog does not reuse temporary file names from previous runs. Previously mysqlbinlog failed if was used several times on the same binary log file that contained a LOAD DATA statement.

  • Fixed compilation problem when compiling with OpenSSL 0.9.7 with disabled old DES support (If OPENSSL_DISABLE_OLD_DES_SUPPORT option was enabled).

  • Fixed a bug when two (or more) MySQL servers were running on the same machine, and they were both slaves, and at least one of them was replicating some LOAD DATA INFILE statement from its master. The bug was that one slave MySQL server sometimes deleted the SQL_LOAD-* files (used for replication of LOAD DATA INFILE and located in the slave-load-tmpdir directory, which defaults to tmpdir) belonging to the other slave MySQL server of this machine, if these slaves had the same slave-load-tmpdir directory. When that happened, the other slave could not replicate LOAD DATA INFILE and complained about not being able to open some SQL_LOAD-* file. (Bug #1357)

  • If LOAD DATA INFILE failed for a small file, the master forgot to write a marker (a Delete_file event) in its binary log, so the slave could not delete 2 files (SQL_LOAD-*.info and SQL_LOAD-*.data from its tmpdir. (Bug #1391)

  • On Windows, the slave forgot to delete a SQL_LOAD-*.info file from tmpdir after successfully replicating a LOAD DATA INFILE statement. (Bug #1392)

  • When a connection terminates, MySQL writes DROP TEMPORARY TABLE statements to the binary log for all temporary tables which the connection had not explicitly dropped. MySQL forgot to use backticks to quote the database and table names in the statement. (Bug #1345)

  • On some 64-bit machines (some HP-UX and Solaris machines), a slave installed with the 64-bit MySQL binary could not connect to its master (it connected to itself instead). (Bug #1256, Bug #1381)

  • Code was introduced in MySQL 4.0.15 for the slave to detect that the master had died while writing a transaction to its binary log. This code reported an error in a legal situation: When the slave I/O thread was stopped while copying a transaction to the relay log, the slave SQL thread would later pretend that it found an unfinished transaction. (Bug #1475)

C.2.17 Changes in Release 4.0.15 (03 September 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Important

If you are using this release on Windows, you should upgrade at least your clients (any program that uses libmysql.lib) to 4.0.16 or above. This is because the 4.0.15 release had a bug in the Windows client library that causes Windows clients using the library to die with a Lost connection to MySQL server during query error for queries that take more than 30 seconds. This problem is specific to Windows; clients on other platforms are unaffected.

Functionality added or changed:

  • mysqldump now correctly quotes all identifiers when communicating with the server. This assures that during the dump process, mysqldump never sends queries to the server that result in a syntax error. This problem is not related to the mysqldump program's output, which was not changed. (Bug #1148)

  • Change result set metadata information so that MIN() and MAX() report that they can return NULL (this is true because an empty set returns NULL). (Bug #324)

  • Produce an error message on Windows if a second mysqld server is started on the same TCP/IP port as a running mysqld server.

  • The mysqld system variables wait_timeout, net_read_timeout, and net_write_timeout now work on Windows. One can now also set timeouts for read and writes in Windows clients with mysql_options().

  • Added option --sql-mode=NO_DIR_IN_CREATE to make it possible for slaves to ignore INDEX DIRECTORY and DATA DIRECTORY options given to CREATE TABLE. When this is mode is on, SHOW CREATE TABLE does not show the given directories.

  • SHOW CREATE TABLE now shows the INDEX DIRECTORY and DATA DIRECTORY options, if they were specified when the table was created.

  • The open_files_limit system variable now shows the real open files limit.

  • MATCH ... AGAINST() in natural language mode now treats words that are present in more than 2,000,000 rows as stopwords.

  • The Mac OS X installation disk images now include an additional MySQLStartupItem.pkg package that enables the automatic startup of MySQL on system startup. See Section 2.5, “Installing MySQL on Mac OS X”.

  • Most of the documentation included in the binary tarball distributions (.tar.gz) has been moved into a subdirectory docs. See Section 2.1.5, “Installation Layouts”.

  • The manual is now included as an additional info file in the binary distributions. (Bug #1019)

  • The binary distributions now include the embedded server library (libmysqld.a) by default. Due to a linking problem with non-gcc compilers, it was not included in all packages of the initial 4.0.15 release. The affected packages were rebuilt and released as 4.0.15a. See Section 1.5, “MySQL 4.0 in a Nutshell”.

  • MySQL can now use range optimization for BETWEEN with nonconstant limits. (Bug #991)

  • Replication error messages now include the default database, so that users can check which database the failing query was run for.

  • A documentation change: Added a paragraph about how the binlog-do-db and binlog-ignore-db options are tested against the database on the master (see Section 5.3.4, “The Binary Log”), and a paragraph about how --replicate-do-db, --replicate-do-table and analogous options are tested against the database and tables on the slave (see Section 14.8, “Replication and Binary Logging Options and Variables”).

  • Now the slave does not replicate SET PASSWORD if it is configured to exclude the mysql database from replication (using for example --replicate-wild-ignore-table=mysql.%). This was the case for GRANT and REVOKE since version 4.0.13 (although there was Bug #980 in 4.0.13 & 4.0.14, which has been fixed in 4.0.15).

  • Rewrote the information shown in the State column of SHOW PROCESSLIST for replication threads and for MASTER_POS_WAIT() and added the most common states for these threads to the documentation, see Section 14.3, “Replication Implementation Details”.

  • Added a test in replication to detect the case where the master died in the middle of writing a transaction to the binary log; such unfinished transactions now trigger an error message on the slave.

  • A GRANT statement that creates an anonymous user (that is, an account with an empty user name) no longer requires FLUSH PRIVILEGES for the account to be recognized by the server. (Bug #473)

  • CHANGE MASTER TO now flushes relay-log.info. Previously this was deferred to the next run of START SLAVE, so if mysqld was shutdown on the slave after CHANGE MASTER TO without having run START SLAVE, the relay log's name and position were lost. At restart they were reloaded from relay-log.info, thus reverting to their old (incorrect) values from before CHANGE MASTER TO and leading to error messages (as the old relay log did not exist any more) and the slave threads refusing to start. (Bug #858)

Bugs fixed:

  • Fixed buffer overflow in password handling which could potentially be exploited by MySQL users with ALTER privilege on the mysql.user table to execute random code or to gain shell access with the UID of the mysqld process (thanks to Jedi/Sector One for spotting and reporting this bug). (CVE-2003-0780)

  • Fixed server crash on FORCE INDEX in a query that contained "Range checked for each record" in the EXPLAIN output. (Bug #1172)

  • Fixed table/column grant handling: The proper sort order (from most specific to less specific, see Section 5.5.5, “Access Control, Stage 2: Request Verification”) was not honored. (Bug #928)

  • Fixed rare bug in MYISAM introduced in 4.0.3 where the index file header was not updated directly after an UPDATE of split dynamic rows. The symptom was that the table had a corrupted delete-link if mysqld was shut down or the table was checked directly after the update.

  • Fixed Can't unlock file error when running myisamchk --sort-index on Windows. (Bug #1119)

  • Fixed possible deadlock when changing key_buffer_size while the key cache was actively used. (Bug #1088)

  • Fixed overflow bug in MyISAM and ISAM when a row is updated in a table with a large number of columns and at least one BLOB/TEXT column.

  • Fixed incorrect result when doing UNION and LIMIT #,# when braces were not used around the SELECT parts.

  • Fixed incorrect result when doing UNION and ORDER BY .. LIMIT # when one didn't use braces around the SELECT parts.

  • Fixed problem with SELECT SQL_CALC_FOUND_ROWS ... UNION ALL ... LIMIT # where FOUND_ROWS() returned incorrect number of rows.

  • Fixed unlikely stack bug when having a BIG expression of type 1+1-1+1-1... in certain combinations. (Bug #871)

  • Fixed the bug that sometimes prevented a table with a FULLTEXT index from being marked as "analyzed".

  • Fixed MySQL so that the column length (in C API) for the second column in SHOW CREATE TABLE is always larger than the data length. The only known application that was affected by the old behavior was Borland dbExpress, which truncated the output from the command. (Bug #1064)

  • Fixed crash in comparisons of strings using the tis620 character set. (Bug #1116)

  • Fixed ISAM bug in MAX() optimization.

  • myisamchk --sort-records=N no longer marks table as crashed if sorting failed because of an inappropriate key. (Bug #892)

  • Fixed a minor bug in MyISAM compressed table handling that sometimes made it impossible to repair compressed table in "Repair by sort" mode. "Repair with keycache" (myisamchk --safe-recover) worked, though. (Bug #1015)

  • Fixed bug in propagating the version number to the manual included in the distribution files. (Bug #1020)

  • Fixed key sorting problem (a PRIMARY key declared for a column that is not explicitly marked NOT NULL was sorted after a UNIQUE key for a NOT NULL column).

  • Fixed the result of INTERVAL when applied to a DATE value. (Bug #792)

  • Fixed compiling of the embedded server library in the RPM spec file. (Bug #959)

  • Added some missing files to the RPM spec file and fixed some RPM building errors that occurred on Red Hat Linux 9. (Bug #998)

  • Fixed incorrect XOR evaluation in WHERE clause. (Bug #992)

  • Fixed bug with processing in query cache merged tables constructed from more than 255 tables. (Bug #930)

  • Fixed incorrect results from outer join query (for example, LEFT JOIN) when ON condition is always false, and range search in used. (Bug #926)

  • Fixed a bug causing incorrect results from MATCH ... AGAINST() in some joins. (Bug #942)

  • MERGE tables do not ignore Using index (from EXPLAIN output) anymore.

  • Fixed a bug that prevented an empty table from being marked as "analyzed". (Bug #937)

  • Fixed myisamchk --sort-records crash when used on compressed table.

  • Fixed slow (as compared to 3.23) ALTER TABLE and related commands such as CREATE INDEX. (Bug #712)

  • Fixed segmentation fault resulting from LOAD DATA FROM MASTER when the master was running without the --log-bin option. (Bug #934)

  • Fixed a security bug: A server compiled without SSL support still permitted connections by users who had the REQUIRE SSL option specified for their accounts.

  • Fixed a random bug: Sometimes the slave would replicate GRANT or REVOKE queries even if it was configured to exclude the mysql database from replication (for example, using --replicate-wild-ignore-table=mysql.%). (Bug #980)

  • The Last_Errno and Last_Error fields in the output of SHOW SLAVE STATUS are now cleared by CHANGE MASTER TO and when the slave SQL thread starts. (Bug #986)

  • A documentation mistake: It said that RESET SLAVE does not change connection information (master host, port, user, and password), whereas it does. The statement resets these to the startup options (master-host etc) if there were some. (Bug #985)

  • SHOW SLAVE STATUS now shows correct information (master host, port, user, and password) after RESET SLAVE (that is, it shows the new values, which are copied from the startup options if there were some). (Bug #985)

  • Disabled propagation of the original master's log position for events because this caused unexpected values for Exec_Master_Log_Pos and problems with MASTER_POS_WAIT() in A->B->C replication setup. (Bug #1086)

  • Fixed a segmentation fault in mysqlbinlog when --position=x was used with x being between a Create_file event and its fellow Append_block, Exec_load or Delete_file events. (Bug #1091)

  • mysqlbinlog printed superfluous warnings when using --database, which caused syntax errors when piped to mysql. (Bug #1092)

  • Made mysqlbinlog --database filter LOAD DATA INFILE too (previously, it filtered all queries except LOAD DATA INFILE). (Bug #1093)

  • mysqlbinlog in some cases forgot to put a leading '#' in front of the original LOAD DATA INFILE (this command is displayed only for information, not to be run; it is later reworked to LOAD DATA LOCAL with a different file name, for execution by mysql). (Bug #1096)

  • binlog-do-db and binlog-ignore-db incorrectly filtered LOAD DATA INFILE (it was half-written to the binary log). This resulted in a corrupted binary log, which could cause the slave to stop with an error. (Bug #1100)

  • When, in a transaction, a transactional table (such as an InnoDB table) was updated, and later in the same transaction a nontransactional table (such as a MyISAM table) was updated using the updated content of the transactional table (with INSERT ... SELECT for example), the queries were written to the binary log in an incorrect order. (Bug #873)

  • When, in a transaction, INSERT ... SELECT updated a nontransactional table, and ROLLBACK was issued, no error was returned to the client. Now the client is warned that some changes could not be rolled back, as this was the case for normal INSERT. (Bug #1113)

  • Fixed a potential bug: When STOP SLAVE was run while the slave SQL thread was in the middle of a transaction, and then CHANGE MASTER TO was used to point the slave to some nontransactional statement, the slave SQL thread could get confused (because it would still think, from the past, that it was in a transaction).

C.2.18 Changes in Release 4.0.14 (18 July 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Added default_week_format system variable. The value is used as the default mode for the WEEK() function.

  • mysqld now reads an additional option file group having a name corresponding to the server's release series: [mysqld-4.0] for 4.0.x servers, [mysqld-4.1] for 4.1.x servers, and so forth. This enables options to be specified on a series-specific basis.

  • The CONCAT_WS() function no longer skips empty strings. (Bug #586).

  • InnoDB now supports indexing a prefix of a column. This means, in particular, that BLOB and TEXT columns can be indexed in InnoDB tables, which was not possible before.

  • A documentation change: Function INTERVAL(NULL, ...) returns -1.

  • Enabled INSERT from SELECT when the table into which the records are inserted is also a table listed in the SELECT.

  • Permit CREATE TABLE and INSERT from any UNION.

  • The SQL_CALC_FOUND_ROWS option now always returns the total number of rows for any UNION.

  • Removed --table option from mysqlbinlog to avoid repeating mysqldump functionality.

  • Comment lines in option files can now start from the middle of a line, too (like basedir=c:\mysql # installation directory).

  • Changed optimizer slightly to prefer index lookups over full table scans in some boundary cases.

  • Added thread-specific max_seeks_for_key variable that can be used to force the optimizer to use keys instead of table scans even if the cardinality of the index is low.

  • Added optimization that converts LEFT JOIN to normal join in some cases.

  • A documentation change: added a paragraph about failover in replication (how to use a surviving slave as the new master, how to resume to the original setup). See Section 14.10, “Replication FAQ”.

  • A documentation change: added warning notes about safe use of the CHANGE MASTER TO statement. See Section 12.5.2.1, “CHANGE MASTER TO Syntax”.

  • MySQL now issues a warning (not an error, as in 4.0.13) when it opens a table that was created with MySQL 4.1.

  • Added --nice option to mysqld_safe to allow setting the niceness of the mysqld process. (Thanks to Christian Hammers for providing the initial patch.) (Bug #627)

  • Added --read-only option to cause mysqld to allow no updates except from slave threads or from users with the SUPER privilege. (Original patch from Markus Benning).

  • SHOW BINLOG EVENTS FROM x where x is less than 4 now silently converts x to 4 instead of printing an error. The same change was done for CHANGE MASTER TO MASTER_LOG_POS=x and CHANGE MASTER TO RELAY_LOG_POS=x.

  • mysqld now only adds an interrupt handler for the SIGINT signal if you start it with the new --gdb option. This is done because some MySQL users encountered strange problems when they accidentally sent SIGINT to mysqld threads.

  • RESET SLAVE now clears the Last_Errno and Last_Error fields in the output of SHOW SLAVE STATUS.

  • Added max_relay_log_size variable; the relay log is rotated automatically when its size exceeds max_relay_log_size. But if max_relay_log_size is 0 (the default), max_binlog_size is used (as in older versions). max_binlog_size still applies to binary logs in any case.

  • FLUSH LOGS now rotates relay logs in addition to the other types of logs it rotates.

Bugs fixed:

  • Comparison/sorting for latin1_de character set was rewritten. The old algorithm could not handle cases like "sä" > "ßa". See Section 9.2, “Using the German Character Set”. In rare cases it resulted in table corruption.

  • Fixed a problem with the password prompt on Windows. (Bug #683)

  • ALTER TABLE ... UNION=(...) for MERGE table is now permitted even if some underlying MyISAM tables are read only. (Bug #702)

  • Fixed a problem with CREATE TABLE t1 SELECT x'41'. (Bug #801)

  • Removed some incorrect lock warnings from the error log.

  • Fixed memory overrun when doing REPAIR TABLE on a table with a multiple-part auto_increment key where one part was a packed CHAR.

  • Fixed a probable race condition in the replication code that could potentially lead to INSERT statements not being replicated in the event of a FLUSH LOGS command or when the binary log exceeds max_binlog_size. (Bug #791)

  • Fixed a crashing bug in INTERVAL and GROUP BY or DISTINCT. (Bug #807)

  • Fixed bug in mysqlhotcopy so it actually aborts for unsuccessful table copying operations. Fixed another bug so that it succeeds when there are thousands of tables to copy. (Bug #812)

  • Fixed problem with mysqlhotcopy failing to read options from option files. (Bug #808)

  • Fixed bugs in optimizer that sometimes prevented MySQL from using FULLTEXT indexes even though it was possible (for example, in SELECT * FROM t1 WHERE MATCH a,b AGAINST("index") > 0).

  • Fixed a bug with table is full in UNION operations.

  • Fixed a security problem that enabled users with no privileges to obtain information on the list of existing databases by using SHOW TABLES and similar commands.

  • Fixed a stack problem on UnixWare/OpenUnix.

  • Fixed a configuration problem on UnixWare/OpenUNIX and OpenServer.

  • Fixed a problem with max_user_connections.

  • HANDLER without an index now works properly when a table has deleted rows. (Bug #787)

  • Fixed a bug with LOAD DATA in mysqlbinlog. (Bug #670)

  • Fixed that SET CHARACTER SET DEFAULT works. (Bug #462)

  • Fixed MERGE table behavior in ORDER BY ... DESC queries. (Bug #515)

  • Fixed server crash on PURGE MASTER LOGS or SHOW MASTER LOGS when the binary log is off. (Bug #733)

  • Fixed password-checking problem on Windows. (Bug #464)

  • Fixed the bug in comparison of a DATETIME column and an integer constant. (Bug #504)

  • Fixed remote mode of mysqlbinlog. (Bug #672)

  • Fixed ERROR 1105: Unknown error that occurred for some SELECT queries, where a column that was declared as NOT NULL was compared with an expression that took NULL value.

  • Changed timeout in mysql_real_connect() to use poll() instead of select() to work around problem with many open files in the client.

  • Fixed incorrect results from MATCH ... AGAINST used with a LEFT JOIN query.

  • The maximum value for system variables was limited to 4294967295 when specified on the command line.

  • Fixed a bug that sometimes caused spurious Access denied errors in HANDLER ... READ statements, when a table is referenced through an alias.

  • Fixed a portability problem with safe_malloc, which caused MySQL to produce Freeing wrong aligned pointer errors on SCO 3.2.

  • ALTER TABLE ... ENABLE/DISABLE KEYS could cause a core dump when done after an INSERT DELAYED statement on the same table.

  • Fixed problem with conversion of localtime to GMT where some times resulted in different (but correct) timestamps. Now MySQL should use the smallest possible timestamp value in this case. (Bug #316)

  • Very small query cache sizes could crash mysqld. (Bug #549)

  • Fixed a bug (accidentally introduced by us but present only in version 4.0.13) that made INSERT ... SELECT into an AUTO_INCREMENT column not replicate well. This bug is in the master, not in the slave. (Bug #490)

  • Fixed a bug: When an INSERT ... SELECT statement inserted rows into a nontransactional table, but failed at some point (for example, due to a Duplicate key error), the query was not written to the binary log. Now it is written to the binary log, with its error code, as all other queries are. About the slave-skip-errors option for how to handle partially completed queries in the slave, see Section 14.8, “Replication and Binary Logging Options and Variables”. (Bug #491)

  • SET foreign_key_checks = 0 was not replicated properly. The fix probably will not be backported to 3.23.

  • On a slave, LOAD DATA INFILE which had no IGNORE or REPLACE clause on the master, was replicated with IGNORE. Although this is not a problem if the master and slave data are identical (a LOAD that produces no duplicate conflicts on the master produces none on the slave anyway), which is true in normal operation, it is better for debugging not to silently add the IGNORE. That way, you can get an error message on the slave and discover that for some reason, the data on master and slave are different and investigate why. (Bug #571)

  • On a slave, LOAD DATA INFILE printed an incomplete Duplicate entry '%-.64s' for key %d' message (the key name and value were not mentioned) in case of duplicate conflict (which does not happen in normal operation). (Bug #573)

  • When using a slave compiled with --debug, CHANGE MASTER TO RELAY_LOG_POS could cause a debug assertion failure. (Bug #576)

  • When doing a LOCK TABLES WRITE on an InnoDB table, commit could not happen, if the query was not written to the binary log (for example, if --log-bin was not used, or binlog-ignore-db was used). (Bug #578)

  • If a 3.23 master had open temporary tables that had been replicated to a 4.0 slave, and the binary log got rotated, these temporary tables were immediately dropped by the slave (which caused problems if the master used them subsequently). This bug had been fixed in 4.0.13, but in a manner which caused an unlikely inconvenience: If the 3.23 master died brutally (power failure), without having enough time to automatically write DROP TABLE statements to its binary log, then the 4.0.13 slave would not notice the temporary tables have to be dropped, until the slave mysqld server is restarted. This minor inconvenience is fixed in 3.23.57 and 4.0.14 (meaning the master must be upgraded to 3.23.57 and the slave to 4.0.14 to remove the inconvenience). (Bug #254)

  • If MASTER_POS_WAIT() was waiting, and the slave was idle, and the slave SQL thread terminated, MASTER_POS_WAIT() would wait forever. Now when the slave SQL thread terminates, MASTER_POS_WAIT() immediately returns NULL (slave stopped). (Bug #651)

  • After RESET SLAVE; START SLAVE;, the Relay_Log_Space value displayed by SHOW SLAVE STATUS was too big by four bytes. (Bug #763)

  • If a query was ignored on the slave (because of --replicate-ignore-table and other similar rules), the slave still checked if the query got the same error code (0, no error) as on the master. So if the master had an error on the query (for example, Duplicate entry in a multiple-row insert), then the slave stopped and warned that the error codes didn't match. (Bug #797)

C.2.19 Changes in Release 4.0.13 (16 May 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • PRIMARY KEY now implies NOT NULL. (Bug #390)

  • The Windows binary packages are now compiled with --enable-local-infile to match the Unix build configuration.

  • Removed timing of tests from mysql-test-run. time does not accept all required parameters on many platforms (for example, QNX) and timing the tests is not really required (it is not a benchmark anyway).

  • SHOW MASTER STATUS and SHOW SLAVE STATUS required the SUPER privilege; now they accept REPLICATION CLIENT as well. (Bug #343)

  • Added multi-threaded MyISAM repair optimization and myisam_repair_threads variable to enable it. See Section 5.1.3, “Server System Variables”.

  • Added innodb_max_dirty_pages_pct variable which controls amount of dirty pages permitted in InnoDB buffer pool.

  • CURRENT_USER() and Access denied error messages now report the host name exactly as it was specified in the GRANT statement.

  • Removed benchmark results from the source and binary distributions. They are still available in the BK source tree, though.

  • InnoDB tables now support ANALYZE TABLE.

  • MySQL now issues an error when it opens a table that was created with MySQL 4.1.

  • Option --new now changes binary items (0xFFDF) to be treated as binary strings instead of numbers by default. This fixes some problems with character sets where it is convenient to input the string as a binary item. After this change you have to convert the binary string to INTEGER with a CAST if you want to compare two binary items with each other and know which one is bigger than the other. SELECT CAST(0xfeff AS UNSIGNED) < CAST(0xff AS UNSIGNED). This is the default behavior in MySQL 4.1. (Bug #152)

  • Enabled delayed_insert_timeout on Linux (most modern glibc libraries have a fixed pthread_cond_timedwait()). (Bug #211)

  • Do not create more insert delayed threads than given by max_delayed_threads. (Bug #211)

  • Changed UPDATE ... LIMIT to apply the limit to rows that were matched, whether or not they actually were changed. Previously the limit was applied as a restriction on the number of rows changed.

  • Tuned optimizer to favor clustered index over table scan.

  • BIT_AND() and BIT_OR() now return an unsigned 64-bit value.

  • Added warnings to error log indicating why a secure connection failed (when running with --log-warnings).

  • Deprecated the options --skip-symlink and --use-symbolic-links and replaced them with --symbolic-links.

  • The default option for innodb_flush_log_at_trx_commit was changed from 0 to 1 to make InnoDB tables ACID by default. See Section 13.2.4, “InnoDB Startup Options and System Variables”.

  • Added a feature to SHOW KEYS to display keys that are disabled by ALTER TABLE DISABLE KEYS statement.

  • When using a nonexistent table type with CREATE TABLE, first try if the default table type exists before falling back to MyISAM.

  • Added MEMORY as an alias for HEAP.

  • Renamed function rnd to my_rnd as the name was too generic and is an exported symbol in libmysqlclient (thanks to Dennis Haney for the initial patch).

  • Portability fix: renamed include/dbug.h to include/my_dbug.h.

  • mysqldump no longer silently deletes the binary logs when invoked with the --master-data or --first-slave option; while this behavior was convenient for some users, others may suffer from it. Now you must explicitly ask for binary logs to be deleted by using the new --delete-master-logs option.

  • If the slave is configured (using for example --replicate-wild-ignore-table=mysql.%) to exclude mysql.user, mysql.host, mysql.db, mysql.tables_priv and mysql.columns_priv from replication, then GRANT and REVOKE are not replicated.

Bugs fixed:

  • Logged Access denied error message had incorrect Using password value. (Bug #398)

  • Fixed bug with NATURAL LEFT JOIN, NATURAL RIGHT JOIN and RIGHT JOIN when using many joined tables. The problem was that the JOIN method was not always associated with the tables surrounding the JOIN method. If you have a query that uses many RIGHT JOIN or NATURAL ... JOINS you should verify that they work as you expected after upgrading MySQL to this version. (Bug #291)

  • Fixed mysql parser not to erroneously interpret ' or " characters within /* ... */ comment as beginning a quoted string.

  • mysql command-line client no longer looks for \* commands inside backtick-quoted strings.

  • Fixed Unknown error when using UPDATE ... LIMIT. (Bug #373)

  • Fixed problem with ANSI mode and GROUP BY with constants. (Bug #387)

  • Fixed bug with UNION and OUTER JOIN. (Bug #386)

  • Fixed bug if one used a multiple-table UPDATE and the query required a temporary table bigger than tmp_table_size. (Bug #286)

  • Run mysql_install_db with the -IN-RPM option for the Mac OS X installation to not fail on systems with improperly configured host name configurations.

  • LOAD DATA INFILE now reads 000000 as a zero date instead of "2000-00-00".

  • Fixed bug that caused DELETE FROM table WHERE const_expression always to delete the whole table (even if expression result was false). (Bug #355)

  • Fixed core dump bug when using FORMAT('nan',#). (Bug #284)

  • Fixed name resolution bug with HAVING ... COUNT(DISTINCT ...).

  • Fixed incorrect result from truncation operator (*) in MATCH ... AGAINST() in some complex joins.

  • Fixed a crash in REPAIR ... USE_FRM command, when used on a read-only table, nonexistent table, or a table with a crashed index file.

  • Fixed a crashing bug in mysql monitor program. It occurred if program was started with --no-defaults, with a prompt that contained the host name and a connection to a nonexistent database was requested.

  • Fixed problem when comparing a key for a multi-byte character set. (Bug #152)

  • Fixed bug in LEFT, RIGHT and MID when used with multi-byte character sets and some GROUP BY queries. (Bug #314)

  • Fix problem with ORDER BY being discarded for some DISTINCT queries. (Bug #275)

  • Fixed that SET sql_big_selects = 1 works as documented (This corrects a new bug introduced in 4.0)

  • Fixed some serious bugs in UPDATE ... ORDER BY. (Bug #241)

  • Fixed unlikely problem in optimizing WHERE clause with constant expression like in WHERE 1 AND (a=1 AND b=1).

  • Fixed that SET sql_big_selects = 1 works again.

  • Introduced proper backtick quoting for db.table in SHOW GRANTS.

  • FULLTEXT index stopped working after ALTER TABLE that converts TEXT column to CHAR. (Bug #283)

  • Fixed a security problem with SELECT and wildcarded select list, when user only had partial column SELECT privileges on the table.

  • Mark a MyISAM table as "analyzed" only when all the keys are indeed analyzed.

  • Only ignore world-writable my.cnf files that are regular files (and not, for example, named pipes or character devices).

  • Fixed few smaller issues with SET PASSWORD.

  • Fixed error message which contained deprecated text.

  • Fixed a bug with two NATURAL JOINs in the query.

  • SUM() didn't return NULL when there was no rows in result or when all values was NULL.

  • On Unix, symbolic link handling was not enabled by default and there was no way to turn this on.

  • Added missing dashes to parameter --open-files-limit in mysqld_safe. (Bug #264)

  • Fixed incorrect host name for TCP/IP connections displayed in SHOW PROCESSLIST.

  • Fixed a bug with NAN in FORMAT(...) function ...

  • Fixed a bug with improperly cached database privileges.

  • Fixed a bug in ALTER TABLE ENABLE / DISABLE KEYS which failed to force a refresh of table data in the cache.

  • Fixed bugs in replication of LOAD DATA INFILE for custom parameters (ENCLOSED, TERMINATED and so on) and temporary tables. (Bug #183, Bug #222)

  • Fixed a replication bug when the master is 3.23 and the slave 4.0: the slave lost the replicated temporary tables if FLUSH LOGS was issued on the master. (Bug #254)

  • Fixed a bug when doing LOAD DATA INFILE IGNORE: When reading the binary log, mysqlbinlog and the replication code read REPLACE instead of IGNORE. This could make the slave's table become different from the master's table. (Bug #218)

  • Fixed a deadlock when relay_log_space_limit was set to a too small value. (Bug #79)

  • Fixed a bug in HAVING clause when an alias is used from the select list.

  • Fixed overflow bug in MyISAM when a row is inserted into a table with a large number of columns and at least one BLOB/TEXT column. Bug was caused by incorrect calculation of the needed buffer to pack data.

  • Fixed a bug when SELECT @non_existent_variable caused an error in the client/server protocol due to net_printf() output being sent to the client twice.

  • Fixed a bug in setting the sql_big_selects option.

  • Fixed a bug in SHOW PROCESSLIST which only displayed a localhost in the "Host" column. This was caused by a glitch that used only current thread information instead of information from the linked list of threads.

  • Removed unnecessary Mac OS X helper files from server RPM. (Bug #144)

  • Permit optimization of multiple-table update for InnoDB tables as well.

  • Fixed a bug in multiple-table updates that caused some rows to be updated several times.

  • Fixed a bug in mysqldump when it was called with --master-data: the CHANGE MASTER TO statements appended to the SQL dump had incorrect coordinates. (Bug #159)

  • Fixed a bug when an updating query using USER() was replicated on the slave; this caused a segmentation fault on the slave. (Bug #178). USER() is still badly replicated on the slave (it is replicated to "").

C.2.20 Changes in Release 4.0.12 (15 March 2003: Production)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • mysqld no longer reads options from world-writable config files. (CVE-2003-0150)

  • Integer values between 9223372036854775807 and 9999999999999999999 are now regarded as unsigned longlongs, not as floats. This makes these values work similar to values between 10000000000000000000 and 18446744073709551615.

  • SHOW PROCESSLIST now includes the client TCP port after the host name to make it easier to know from which client the request originated.

  • The --new option can be used to make a 4.0 server return TIMESTAMP as a string in 'YYYY-MM-DD HH:MM:SS' format, the way that 4.1 servers do. This is also a new system variable that can be set for the same effect. See Section 10.3.1.1, “TIMESTAMP Properties Prior to MySQL 4.1”.

Bugs fixed:

  • Fixed mysqld crash on extremely small values of sort_buffer variable.

  • INSERT INTO u SELECT ... FROM t was written too late to the binary log if t was very frequently updated during the execution of this query. This could cause a problem with mysqlbinlog or replication. The master must be upgraded, not the slave. (Bug #136)

  • Fixed checking of random part of WHERE clause. (Bug #142)

  • Fixed a bug with multiple-table updates with InnoDB tables. This bug occurred as, in many cases, InnoDB tables cannot be updated on the fly, but offsets to the records have to be stored in a temporary table.

  • Added missing file mysql_secure_installation to the server RPM subpackage. (Bug #141)

  • Fixed MySQL (and myisamchk) crash on artificially corrupted .MYI files.

  • Do not allow BACKUP TABLE to overwrite existing files.

  • Fixed a bug with multiple-table UPDATE statements when user had all privileges on the database where tables are located and there were any entries in tables_priv table, that is, grant_option was true.

  • Fixed a bug that permitted a user with table or column grants on some table, TRUNCATE TABLE any table in the same database.

  • Fixed deadlock when doing LOCK TABLE followed by DROP TABLE in the same thread. In this case one could still kill the thread with KILL.

  • LOAD DATA LOCAL INFILE was not properly written to the binary log (hence not properly replicated). (Bug #82)

  • RAND() entries were not read correctly by mysqlbinlog from the binary log which caused problems when restoring a table that was inserted with RAND(). INSERT INTO t1 VALUES(RAND()). In replication this worked okay.

  • SET sql_log_bin = 0 was ignored for INSERT DELAYED queries. (Bug #104)

  • SHOW SLAVE STATUS reported too old positions (columns Relay_Master_Log_File and Exec_Master_Log_Pos) for the last executed statement from the master, if this statement was the COMMIT of a transaction. The master must be upgraded for that, not the slave. (Bug #52)

  • LOAD DATA INFILE was not replicated by the slave if replicate_*_table was set on the slave. (Bug #86)

  • After RESET SLAVE, the coordinates displayed by SHOW SLAVE STATUS looked un-reset (although they were, but only internally). (Bug #70)

  • Fixed query cache invalidation on LOAD DATA.

  • Fixed memory leak on ANALYZE procedure with error.

  • Fixed a bug in handling CHAR(0) columns that could cause incorrect results from the query.

  • Fixed rare bug with incorrect initialization of AUTO_INCREMENT column, as a secondary column in a multi-column key (see Section 3.6.9, “Using AUTO_INCREMENT”), when data was inserted with INSERT ... SELECT or LOAD DATA into an empty table.

  • On Windows, STOP SLAVE didn't stop the slave until the slave got one new command from the master (this bug has been fixed for MySQL 4.0.11 by releasing updated 4.0.11a Windows packages, which include this individual fix on top of the 4.0.11 sources). (Bug #69)

  • Fixed a crash when no database was selected and LOAD DATA statement was issued with full table name specified, including database prefix.

  • Fixed a crash when shutting down replication on some platforms (for example, Mac OS X).

  • Fixed a portability bug with pthread_attr_getstacksize on HP-UX 10.20 (Patch was also included in 4.0.11a sources).

  • Fixed the bigint test to not fail on some platforms (for example, HP-UX and Tru64) due to different return values of the atof() function.

  • Fixed the rpl_rotate_logs test to not fail on certain platforms (such as Mac OS X) due to a too-long file name (changed slave-master-info.opt to .slave-mi).

C.2.21 Changes in Release 4.0.11 (20 February 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • NULL is now sorted LAST if you use ORDER BY ... DESC (as it was before MySQL 4.0.2). This change was required to comply with the SQL standard. (The original change was made because we thought that standard SQL required NULL to be always sorted at the same position, but this was incorrect).

  • Added START TRANSACTION (standard SQL syntax) as alias for BEGIN. This is recommended to use instead of BEGIN to start a transaction.

  • Added OLD_PASSWORD() as a synonym for PASSWORD().

  • Permit keyword ALL in group functions.

  • Added support for some new INNER JOIN and JOIN syntaxes. For example, SELECT * FROM t1 INNER JOIN t2 didn't work before.

  • Novell NetWare 6.0 porting effort completed, Novell patches merged into the main source tree.

Bugs fixed:

  • Fixed problem with multiple-table delete and InnoDB tables.

  • Fixed a problem with BLOB NOT NULL columns used with IS NULL.

  • Re-added missing pre- and post(un)install scripts to the Linux RPM packages (they were missing after the renaming of the server subpackage).

  • Fixed that table locks are not released with multiple-table updates and deletes with InnoDB storage engine.

  • Fixed bug in updating BLOB columns with long strings.

  • Fixed integer-wraparound when giving big integer (>= 10 digits) to function that requires an unsigned argument, like CREATE TABLE (...) AUTO_INCREMENT=N.

  • MIN(key_column) could in some cases return NULL on a column with NULL and other values.

  • MIN(key_column) and MAX(key_column) could in some cases return incorrect values when used in OUTER JOIN.

  • MIN(key_column) and MAX(key_column) could return incorrect values if one of the tables was empty.

  • Fixed rare crash in compressed MyISAM tables with blobs.

  • Fixed bug in using aggregate functions as argument for INTERVAL(), CASE, FIELD(), CONCAT_WS(), ELT() and MAKE_SET() functions.

  • When running with --lower-case-table-names (default on Windows) and you had tables or databases with mixed case on disk, then executing SHOW TABLE STATUS followed with DROP DATABASE or DROP TABLE could fail with Errcode 13.

C.2.22 Changes in Release 4.0.10 (29 January 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • Added option --log-error[=file_name] to mysqld_safe and mysqld. This option forces all error messages to be put in a log file if the option --console is not given. On Windows --log-error is enabled as default, with a default name of host_name.err if the name is not specified.

  • Changed some messages from Warning: to Note: in the log files.

  • The mysqld server should now compile on NetWare.

  • Added optimization that if one does GROUP BY ... ORDER BY NULL then result is not sorted.

  • New ft_stopword_file system variable for mysqld to replace/disable the built-in stopword list that is used in full-text searches. See Section 5.1.3, “Server System Variables”.

  • Changed default stack size from 64KB to 192KB; This fixes a core dump problem on Red Hat 8.0 and other systems with a glibc that requires a stack size larger than 128K for gethostbyaddr() to resolve a host name. You can fix this for earlier MySQL versions by starting mysqld with --thread-stack=192K.

  • Added mysql_waitpid to the binary distribution and the MySQL-client RPM subpackage (required for mysql-test-run).

  • Renamed the main MySQL RPM package to MySQL-server. When updating from an older version, MySQL-server.rpm simply replaces MySQL.rpm.

  • If a slave is configured with replicate_wild_do_table=db.% or replicate_wild_ignore_table=db.%, these rules are applied to CREATE/DROP DATABASE, too.

  • Added timeout value for MASTER_POS_WAIT().

Bugs fixed:

  • Fixed initialization of the random seed for newly created threads to give a better rand() distribution from the first call.

  • Fixed a bug that caused mysqld to hang when a table was opened with the HANDLER statement and then dropped without being closed.

  • Fixed bug in logging to binary log (which affects replication) a query that inserts a NULL in an AUTO_INCREMENT column and also uses LAST_INSERT_ID().

  • Fixed an unlikely bug that could cause a memory overrun when using ORDER BY constant_expression.

  • Fixed a table corruption in myisamchk parallel repair mode.

  • Fixed bug in query cache invalidation on simple table renaming.

  • Fixed bug in mysqladmin --relative.

  • On some 64-bit systems, show status reported a strange number for Open_files and Open_streams.

  • Fixed incorrect number of columns in EXPLAIN on empty table.

  • Fixed bug in LEFT JOIN that caused zero rows to be returned in the case the WHERE condition was evaluated as FALSE after reading const tables. (Unlikely condition).

  • FLUSH PRIVILEGES didn't correctly flush table/column privileges when mysql.tables_priv is empty.

  • Fixed bug in replication when using LOAD DATA INFILE one a file that updated an AUTO_INCREMENT column with NULL or 0. This bug only affected MySQL 4.0 masters (not slaves or MySQL 3.23 masters).

    Note

    If you have a slave that has replicated a file with generated AUTO_INCREMENT columns, the slave data is corrupted and you should reinitialize the affected tables from the master.

  • Fixed possible memory overrun when sending a BLOB value larger than 16M to the client.

  • Fixed incorrect error message when setting a NOT NULL column to an expression that returned NULL.

  • Fixed core dump bug in str LIKE "%other_str%" where str or other_str contained characters >= 128.

  • Fixed bug: When executing on master LOAD DATA and InnoDB failed with table full error the binary log was corrupted.

C.2.23 Changes in Release 4.0.9 (09 January 2003)

End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.

Functionality added or changed:

  • OPTIMIZE TABLE for MyISAM tables treats all NULL values as different when calculating cardinality. This helps in optimizing joins between tables where one of the tables has a lot of NULL values in a indexed column:

    SELECT * from t1, t2 where t1.a=t2.key_with_a_lot_of_null;
    
  • Added join operator FORCE INDEX (index_list). This acts likes USE INDEX (index_list) but with the addition that a table scan is assumed to be VERY expensive. One bad thing with this is that it makes FORCE a reserved word.

  • Reset internal row buffer in MyISAM after each query. This reduces memory in case you have a lot of big blobs in a table.

Bugs fixed:

  • A security patch in 4.0.8 causes the mysqld server to die if the remote host name can't be resolved. This is now fixed.

  • Fixed crash when replication big LOAD DATA