Íîâîñòè
Äîêóìåíòàöèÿ
Download
Webboard
Ïîèñê
FAQ/×àÂî
Îáðàòíàÿ ñâÿçü




Appendix C. MySQL Change History

Table of Contents

C.1. Changes in Release 5.1.x (Production)
C.1.1. Changes in MySQL 5.1.45 (Not yet released)
C.1.2. Changes in MySQL 5.1.44 (Not yet released)
C.1.3. Changes in MySQL 5.1.43 (15 January 2010)
C.1.4. Changes in MySQL 5.1.42 (15 December 2009)
C.1.5. Changes in MySQL 5.1.41 (05 November 2009)
C.1.6. Release Notes for MySQL Enterprise 5.1.40sp1 [QSP] (25 November 2009)
C.1.7. Changes in MySQL 5.1.40 (06 October 2009)
C.1.8. Changes in MySQL 5.1.39 (04 September 2009)
C.1.9. Changes in MySQL 5.1.38 (01 September 2009)
C.1.10. Release Notes for MySQL Enterprise 5.1.37sp1 [QSP] (10 October 2009)
C.1.11. Changes in MySQL 5.1.37 (13 July 2009)
C.1.12. Changes in MySQL 5.1.36 (16 June 2009)
C.1.13. Changes in MySQL 5.1.35 (13 May 2009)
C.1.14. Release Notes for MySQL Enterprise 5.1.34sp1 [QSP] (25 June 2009)
C.1.15. Changes in MySQL 5.1.34 (02 April 2009)
C.1.16. Changes in MySQL 5.1.33 (13 March 2009)
C.1.17. Changes in MySQL 5.1.32 (14 February 2009)
C.1.18. Release Notes for MySQL Enterprise 5.1.31sp1 [QSP] (19 March 2009)
C.1.19. Changes in MySQL 5.1.31 (19 January 2009)
C.1.20. Changes in MySQL 5.1.30 (14 November 2008 General Availability)
C.1.21. Changes in MySQL 5.1.29 (11 October 2008)
C.1.22. Changes in MySQL 5.1.28 (28 August 2008)
C.1.23. Changes in MySQL 5.1.27 (Not released)
C.1.24. Changes in MySQL 5.1.26 (30 June 2008)
C.1.25. Changes in MySQL 5.1.25 (28 May 2008)
C.1.26. Changes in MySQL 5.1.24 (08 April 2008)
C.1.27. Changes in MySQL 5.1.23 (29 January 2008)
C.1.28. Changes in MySQL 5.1.22 (24 September 2007 Release Candidate)
C.1.29. Changes in MySQL 5.1.21 (16 August 2007)
C.1.30. Changes in MySQL 5.1.20 (25 June 2007)
C.1.31. Changes in MySQL 5.1.19 (25 May 2007)
C.1.32. Changes in MySQL 5.1.18 (08 May 2007)
C.1.33. Changes in MySQL 5.1.17 (04 April 2007)
C.1.34. Changes in MySQL 5.1.16 (26 February 2007)
C.1.35. Changes in MySQL 5.1.15 (25 January 2007)
C.1.36. Changes in MySQL 5.1.14 (05 December 2006)
C.1.37. Changes in MySQL 5.1.13 (Not released)
C.1.38. Changes in MySQL 5.1.12 (24 October 2006)
C.1.39. Changes in MySQL 5.1.11 (26 May 2006)
C.1.40. Changes in MySQL 5.1.10 (Not released)
C.1.41. Changes in MySQL 5.1.9 (12 April 2006)
C.1.42. Changes in MySQL 5.1.8 (Not released)
C.1.43. Changes in MySQL 5.1.7 (27 February 2006)
C.1.44. Changes in MySQL 5.1.6 (01 February 2006)
C.1.45. Changes in MySQL 5.1.5 (10 January 2006)
C.1.46. Changes in MySQL 5.1.4 (21 December 2005)
C.1.47. Changes in MySQL 5.1.3 (29 November 2005)
C.1.48. Changes in MySQL 5.1.2 (Not released)
C.1.49. Changes in MySQL 5.1.1 (Not released)
C.2. MySQL Enterprise Monitor Change History
C.2.1. Changes in MySQL Enterprise Monitor 2.0.7 (Not yet released)
C.2.2. Changes in MySQL Enterprise Monitor 2.0.6 (27th August 2009)
C.2.3. Changes in MySQL Enterprise Monitor 2.0.5 (18th March 2009)
C.2.4. Changes in MySQL Enterprise Monitor 2.0.4 (5th February 2009)
C.2.5. Changes in MySQL Enterprise Monitor 2.0.3 (23rd January 2009)
C.2.6. Changes in MySQL Enterprise Monitor 2.0.2 (14th January 2009)
C.2.7. Changes in MySQL Enterprise Monitor 2.0.1 (15th December 2008)
C.2.8. Changes in MySQL Enterprise Monitor 2.0.0 (11th December 2008)
C.3. MySQL Connector/ODBC (MyODBC) Change History
C.3.1. Changes in MySQL Connector/ODBC 5.1.7 (Not yet released)
C.3.2. Changes in MySQL Connector/ODBC 5.1.6 (09 November 2009)
C.3.3. Changes in MySQL Connector/ODBC 5.1.5 (18 August 2008)
C.3.4. Changes in MySQL Connector/ODBC 5.1.4 (15 April 2008)
C.3.5. Changes in MySQL Connector/ODBC 5.1.3 (26 March 2008)
C.3.6. Changes in MySQL Connector/ODBC 5.1.2 (13 February 2008)
C.3.7. Changes in MySQL Connector/ODBC 5.1.1 (13 December 2007)
C.3.8. Changes in MySQL Connector/ODBC 5.1.0 (10 September 2007)
C.3.9. Changes in MySQL Connector/ODBC 5.0.12 (Never released)
C.3.10. Changes in MySQL Connector/ODBC 5.0.11 (31 January 2007)
C.3.11. Changes in MySQL Connector/ODBC 5.0.10 (14 December 2006)
C.3.12. Changes in MySQL Connector/ODBC 5.0.9 (22 November 2006)
C.3.13. Changes in MySQL Connector/ODBC 5.0.8 (17 November 2006)
C.3.14. Changes in MySQL Connector/ODBC 5.0.7 (08 November 2006)
C.3.15. Changes in MySQL Connector/ODBC 5.0.6 (03 November 2006)
C.3.16. Changes in MySQL Connector/ODBC 5.0.5 (17 October 2006)
C.3.17. Changes in Connector/ODBC 5.0.3 (Connector/ODBC 5.0 Alpha 3) (20 June 2006)
C.3.18. Changes in Connector/ODBC 5.0.2 (Never released)
C.3.19. Changes in Connector/ODBC 5.0.1 (Connector/ODBC 5.0 Alpha 2) (05 June 2006)
C.3.20. Changes in MySQL Connector/ODBC 3.51.28 (Not yet released)
C.3.21. Changes in MySQL Connector/ODBC 3.51.27 (20 November 2008)
C.3.22. Changes in MySQL Connector/ODBC 3.51.26 (07 July 2008)
C.3.23. Changes in MySQL Connector/ODBC 3.51.25 (11 April 2008)
C.3.24. Changes in MySQL Connector/ODBC 3.51.24 (14 March 2008)
C.3.25. Changes in MySQL Connector/ODBC 3.51.23 (09 January 2008)
C.3.26. Changes in MySQL Connector/ODBC 3.51.22 (13 November 2007)
C.3.27. Changes in MySQL Connector/ODBC 3.51.21 (08 October 2007)
C.3.28. Changes in MySQL Connector/ODBC 3.51.20 (10 September 2007)
C.3.29. Changes in MySQL Connector/ODBC 3.51.19 (10 August 2007)
C.3.30. Changes in MySQL Connector/ODBC 3.51.18 (08 August 2007)
C.3.31. Changes in MySQL Connector/ODBC 3.51.17 (14 July 2007)
C.3.32. Changes in MySQL Connector/ODBC 3.51.16 (14 June 2007)
C.3.33. Changes in MySQL Connector/ODBC 3.51.15 (07 May 2007)
C.3.34. Changes in MySQL Connector/ODBC 3.51.14 (08 March 2007)
C.3.35. Changes in MySQL Connector/ODBC 3.51.13 (Never released)
C.3.36. Changes in MySQL Connector/ODBC 3.51.12 (11 February 2005)
C.3.37. Changes in MySQL Connector/ODBC 3.51.11 (28 January 2005)
C.4. MySQL Connector/NET Change History
C.4.1. Changes in MySQL Connector/NET Version 6.3.x
C.4.2. Changes in MySQL Connector/NET Version 6.2.x
C.4.3. Changes in MySQL Connector/NET Version 6.1.x
C.4.4. Changes in MySQL Connector/NET Version 6.0.x
C.4.5. Changes in MySQL Connector/NET Version 5.3.x
C.4.6. Changes in MySQL Connector/NET Version 5.2.x
C.4.7. Changes in MySQL Connector/NET Version 5.1.x
C.4.8. Changes in MySQL Connector/NET Version 5.0.x
C.4.9. Changes in MySQL Connector/NET Version 1.0.x
C.4.10. Changes in MySQL Connector/NET Version 0.9.0 (30 August 2004)
C.4.11. Changes in MySQL Connector/NET Version 0.76
C.4.12. Changes in MySQL Connector/NET Version 0.75
C.4.13. Changes in MySQL Connector/NET Version 0.74
C.4.14. Changes in MySQL Connector/NET Version 0.71
C.4.15. Changes in MySQL Connector/NET Version 0.70
C.4.16. Changes in MySQL Connector/NET Version 0.68
C.4.17. Changes in MySQL Connector/NET Version 0.65
C.4.18. Changes in MySQL Connector/NET Version 0.60
C.4.19. Changes in MySQL Connector/NET Version 0.50
C.5. MySQL Visual Studio Plugin Change History
C.5.1. Changes in MySQL Visual Studio Plugin 1.0.3 (Not yet released)
C.5.2. Changes in MySQL Visual Studio Plugin 1.0.2 (Not yet released)
C.5.3. Changes in MySQL Visual Studio Plugin 1.0.1 (4 October 2006)
C.5.4. Changes in MySQL Visual Studio Plugin 1.0.0 (4 October 2006)
C.6. MySQL Connector/J Change History
C.6.1. Changes in MySQL Connector/J 5.1.x
C.6.2. Changes in MySQL Connector/J 5.0.x
C.6.3. Changes in MySQL Connector/J 3.1.x
C.6.4. Changes in MySQL Connector/J 3.0.x
C.6.5. Changes in MySQL Connector/J 2.0.x
C.6.6. Changes in MySQL Connector/J 1.2b (04 July 1999)
C.6.7. Changes in MySQL Connector/J 1.2.x and lower
C.7. MySQL Connector/MXJ Change History
C.7.1. Changes in MySQL Connector/MXJ 5.0.11 (24th November 2009)
C.7.2. Changes in MySQL Connector/MXJ 5.0.10 (Never released)
C.7.3. Changes in MySQL Connector/MXJ 5.0.9 (19 August 2008)
C.7.4. Changes in MySQL Connector/MXJ 5.0.8 (06 August 2007)
C.7.5. Changes in MySQL Connector/MXJ 5.0.7 (27 May 2007)
C.7.6. Changes in MySQL Connector/MXJ 5.0.6 (04 May 2007)
C.7.7. Changes in MySQL Connector/MXJ 5.0.5 (14 March 2007)
C.7.8. Changes in MySQL Connector/MXJ 5.0.4 (28 January 2007)
C.7.9. Changes in MySQL Connector/MXJ 5.0.3 (24 June 2006)
C.7.10. Changes in MySQL Connector/MXJ 5.0.2 (15 June 2006)
C.7.11. Changes in MySQL Connector/MXJ 5.0.1 (Never released)
C.7.12. Changes in MySQL Connector/MXJ 5.0.0 (09 December 2005)
C.8. MySQL Connector/C++ Change History
C.8.1. Changes in MySQL Connector/C++ 1.1.x
C.8.2. Changes in MySQL Connector/C++ 1.0.x
C.9. MySQL Proxy Change History
C.9.1. Changes in MySQL Proxy 0.8.0 (Not Yet Released)
C.9.2. Changes in MySQL Proxy 0.7.3 (Not Yet Released)
C.9.3. Changes in MySQL Proxy 0.7.2 (30 June 2009)
C.9.4. Changes in MySQL Proxy 0.7.1 (15 May 2009)
C.9.5. Changes in MySQL Proxy 0.7.0 (Never Released)
C.9.6. Changes in MySQL Proxy 0.6.1 (06 February 2008)
C.9.7. Changes in MySQL Proxy 0.6.0 (11 September 2007)
C.9.8. Changes in MySQL Proxy 0.5.1 (30 June 2007)
C.9.9. Changes in MySQL Proxy 0.5.0 (19 June 2007)

This appendix lists the changes from version to version in the MySQL source code through the latest version of MySQL 5.1, which is currently MySQL 5.1.45. We offer a version of the Manual for each series of MySQL releases (5.0, 5.1, and so forth). For information about changes in another release series of the MySQL database software, see the corresponding version of this Manual.

We update this section as we add new features in the 5.1 series, so that everybody can follow the development process.

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 ChangeSet 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 5.1.x (Production)

C.1.1. Changes in MySQL 5.1.45 (Not yet released)
C.1.2. Changes in MySQL 5.1.44 (Not yet released)
C.1.3. Changes in MySQL 5.1.43 (15 January 2010)
C.1.4. Changes in MySQL 5.1.42 (15 December 2009)
C.1.5. Changes in MySQL 5.1.41 (05 November 2009)
C.1.6. Release Notes for MySQL Enterprise 5.1.40sp1 [QSP] (25 November 2009)
C.1.7. Changes in MySQL 5.1.40 (06 October 2009)
C.1.8. Changes in MySQL 5.1.39 (04 September 2009)
C.1.9. Changes in MySQL 5.1.38 (01 September 2009)
C.1.10. Release Notes for MySQL Enterprise 5.1.37sp1 [QSP] (10 October 2009)
C.1.11. Changes in MySQL 5.1.37 (13 July 2009)
C.1.12. Changes in MySQL 5.1.36 (16 June 2009)
C.1.13. Changes in MySQL 5.1.35 (13 May 2009)
C.1.14. Release Notes for MySQL Enterprise 5.1.34sp1 [QSP] (25 June 2009)
C.1.15. Changes in MySQL 5.1.34 (02 April 2009)
C.1.16. Changes in MySQL 5.1.33 (13 March 2009)
C.1.17. Changes in MySQL 5.1.32 (14 February 2009)
C.1.18. Release Notes for MySQL Enterprise 5.1.31sp1 [QSP] (19 March 2009)
C.1.19. Changes in MySQL 5.1.31 (19 January 2009)
C.1.20. Changes in MySQL 5.1.30 (14 November 2008 General Availability)
C.1.21. Changes in MySQL 5.1.29 (11 October 2008)
C.1.22. Changes in MySQL 5.1.28 (28 August 2008)
C.1.23. Changes in MySQL 5.1.27 (Not released)
C.1.24. Changes in MySQL 5.1.26 (30 June 2008)
C.1.25. Changes in MySQL 5.1.25 (28 May 2008)
C.1.26. Changes in MySQL 5.1.24 (08 April 2008)
C.1.27. Changes in MySQL 5.1.23 (29 January 2008)
C.1.28. Changes in MySQL 5.1.22 (24 September 2007 Release Candidate)
C.1.29. Changes in MySQL 5.1.21 (16 August 2007)
C.1.30. Changes in MySQL 5.1.20 (25 June 2007)
C.1.31. Changes in MySQL 5.1.19 (25 May 2007)
C.1.32. Changes in MySQL 5.1.18 (08 May 2007)
C.1.33. Changes in MySQL 5.1.17 (04 April 2007)
C.1.34. Changes in MySQL 5.1.16 (26 February 2007)
C.1.35. Changes in MySQL 5.1.15 (25 January 2007)
C.1.36. Changes in MySQL 5.1.14 (05 December 2006)
C.1.37. Changes in MySQL 5.1.13 (Not released)
C.1.38. Changes in MySQL 5.1.12 (24 October 2006)
C.1.39. Changes in MySQL 5.1.11 (26 May 2006)
C.1.40. Changes in MySQL 5.1.10 (Not released)
C.1.41. Changes in MySQL 5.1.9 (12 April 2006)
C.1.42. Changes in MySQL 5.1.8 (Not released)
C.1.43. Changes in MySQL 5.1.7 (27 February 2006)
C.1.44. Changes in MySQL 5.1.6 (01 February 2006)
C.1.45. Changes in MySQL 5.1.5 (10 January 2006)
C.1.46. Changes in MySQL 5.1.4 (21 December 2005)
C.1.47. Changes in MySQL 5.1.3 (29 November 2005)
C.1.48. Changes in MySQL 5.1.2 (Not released)
C.1.49. Changes in MySQL 5.1.1 (Not released)

An overview of which features were added in MySQL 5.1 can be found here: Section 1.5, “What Is New in MySQL 5.1”.

For a full list of changes, please refer to the changelog sections for each individual 5.1 release.

For discussion of upgrade issues that you many encounter for upgrades to MySQL 5.1 from MySQL 5.0, see Section 2.4.1.1, “Upgrading from MySQL 5.0 to 5.1”.

For changes relating to MySQL Cluster NDB 6.x, see Section 17.7, “Changes in MySQL Cluster NDB 6.X and 7.X”.

C.1.1. Changes in MySQL 5.1.45 (Not yet released)

InnoDB Plugin Notes:

  • This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.

C.1.2. Changes in MySQL 5.1.44 (Not yet released)

InnoDB Plugin Notes:

  • This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.

Functionality added or changed:

  • Replication: Introduced the --binlog-direct-non-transactional-updates server option. This option causes updates using the statement-based logging format to tables using non-transactional engines to be written directly to the binary log, rather than to the transaction cache.

    Before using this option, be certain that you have no dependencies between transactional and non-transactional tables. A statement that both selects from an InnoDB table and inserts into a MyISAM table is an example of such a dependency. For more information, see Section 16.1.3.4, “Binary Log Options and Variables”. (Bug#46364)

    See also Bug#28976, Bug#40116.

Bugs fixed:

  • Partitioning: When an ALTER TABLE ... REORGANIZE PARTITION statement on an InnoDB table failed due to innodb_lock_wait_timeout expiring while waiting for a lock, InnoDB did not clean up any temporary files or tables which it had created. Attempting to reissue the ALTER TABLE statement following the timeout could lead to storage engine errors, or possibly a crash of the server. (Bug#47343)

  • Replication: In some cases, inserting into a table with many columns could cause the binary log to become corrupted. (Bug#50018)

    See also Bug#42749.

  • Replication: When using row-based replication, setting a BIT or CHAR column of a MyISAM table to NULL, then trying to delete from the table, caused the slave to fail with the error Can't find record in table. (Bug#49481, Bug#49482)

  • Replication: When logging in row-based mode, DDL statements are actually logged as statements; however, statements that affected temporary tables and followed DDL statements failed to reset the binary log format to ROW, with the result that these statements were logged using the statement-based format. Now the state of binlog_format is restored after a DDL statement has been written to the binary log. (Bug#49132)

  • Replication: When using row-based logging, the statement CREATE TABLE t IF NOT EXIST ... SELECT was logged as CREATE TEMPORARY TABLE t IF NOT EXIST ... SELECT when t already existed as a temporary table. This was caused by the fact that the temporary table was opened and the results of the SELECT were inserted into it when a temporary table existed and had the same name.

    Now, when this statement is executed, t is created as a base table, the results of the SELECT are inserted into it — even if there already exists a temporary table having the same name — and the statement is logged correctly. (Bug#47418)

    See also Bug#47442.

  • Replication: Due to a change in the size of event representations in the binary log, when replicating from a MySQL 4.1 master to a slave running MySQL 5.0.60 or later, the START SLAVE UNTIL statement did not function correctly, stopping at the wrong position in the log. Now the slave detects that the master is using the older version of the binary log format, and corrects for the difference in event size, so that the slave stops in the correct position. (Bug#47142)

  • The SSL certificates in the test suite were about to expire. They have been updated with expiration dates in the year 2015. (Bug#50642)

  • The printstack function does not exist ong Solaris 8 or earlier, which would lead to a compilation failure. (Bug#50409)

  • A user could see tables in INFORMATION_SCHEMA.TABLES without appropriate privileges for them. (Bug#50276)

  • Debug output for join structures was garbled. (Bug#50271)

  • The filesort sorting method applied to a CHAR(0) column could lead to a server crash. (Bug#49897)

  • sql_buffer_result had an effect on non-SELECT statements, contrary to the documentation. (Bug#49552)

  • In some cases a subquery need not be evaluated because it returns only aggregate values that can be calculated from table metadata. This sometimes was not handled by the enclosing subquery, resulting in a server crash. (Bug#49512)

  • The method for comparing INFORMATION_SCHEMA names and database names was nonoptimal and an improvement was made: When the database name length is already known, a length check is made first and content comparison skipped if the lengths are unequal. (Bug#49501)

  • The MD5() and SHA1() functions had excessive overhead for short strings. (Bug#49491)

  • Mixing full-text searches and row expressions caused a crash. (Bug#49445)

  • Creating or dropping a table with 1023 transactions active caused an assertion failure. (Bug#49238)

  • mysql-test-run.pl now recognizes the MTR_TESTCASE_TIMEOUT, MTR_SUITE_TIMEOUT, MTR_SHUTDOWN_TIMEOUT, and MTR_START_TIMEOUT environment variables. If they are set, their values are used to set the --testcase-timeout, --suite-timeout, --shutdown-timeout, and --start-timeout options, respectively. (Bug#49210)

C.1.3. Changes in MySQL 5.1.43 (15 January 2010)

InnoDB Plugin Notes:

  • This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.

Functionality added or changed:

  • Partitioning: The UNIX_TIMESTAMP() function is now supported in partitioning expressions using TIMESTAMP columns. For example, it now possible to create a partitioned table such as this one:

    CREATE TABLE t (c TIMESTAMP) 
    PARTITION BY RANGE ( UNIX_TIMESTAMP(c) ) (
        PARTITION p0 VALUES LESS THAN (631148400),
        PARTITION p1 VALUES LESS THAN (946681200),
        PARTITION p2 VALUES LESS THAN (MAXVALUE)
    );
    

    All other expressions involving TIMESTAMP values are now rejected with an error when attempting to create a new partitioned table or to alter an existing partitioned table.

    When accessing an existing partitioned table having a timezone-dependent partitioning function (where the table was using a previous version of MySQL), a warning rather than an error is issued. In such cases, you should fix the table. One way of doing this is to alter the table's partitioning expression so that it uses UNIX_TIMESTAMP(). (Bug#42849)

Bugs fixed:

  • Security Fix: For servers built with yaSSL, a preauthorization buffer overflow could cause memory corruption or a server crash. We thank Evgeny Legerov from Intevydis for providing us with a proof-of-concept script that allowed us to reproduce this bug. (Bug#50227, CVE-2009-4484)

  • Important Change: Replication: The RAND() function is now marked as unsafe for statement-based replication. Using this function now generates a warning when binlog_format=STATEMENT and causes the the format to switch to row-based logging when binlog_format=MIXED.

    This change is being introduced because, when RAND() was logged in statement mode, the seed was also written to the binary log, so the replication slave generated the same sequence of random numbers as was generated on the master. While this could make replication work in some cases, the order of affected rows was still not guaranteed when this function was used in statements that could update multiple rows, such as UPDATE or INSERT ... SELECT; if the master and the slave retrieved rows in different order, they began to diverge. (Bug#49222)

  • Partitioning: When used on partitioned tables, the records_in_range handler call checked all partitions, rather than the unpruned partitions only. (Bug#48846)

    See also Bug#37252, Bug#47261.

  • Partitioning: A query that searched on a ucs2 column failed if the table was partitioned. (Bug#48737)

  • Replication: A LOAD DATA INFILE statement that loaded data into a table having a column name that had to be escaped (such as `key` INT) caused replication to fail when logging in mixed or statement mode. In such cases, the master wrote the LOAD DATA event into the binary log without escaping the column names. (Bug#49479)

    See also Bug#47927.

  • Replication: Spatial data types caused row-based replication to crash. (Bug#48776)

  • Replication: A flaw in the implementation of the purging of binary logs could result in orphaned files being left behind in the following circumstances:

    • If the server failed or was killed while purging binary logs.

      If the server failed or was killed after creating of a new binary log when the new log file was opened for the first time.

    In addition, if the slave was not connected during the purge operation, it was possible for a log file that was in use to be removed; this could lead data loss and possible inconsistencies between the master and slave. (Bug#45292)

  • Replication: When using the STATEMENT or MIXED logging format, the statements LOAD DATA CONCURRENT LOCAL INFILE and LOAD DATA CONCURRENT INFILE were logged as LOAD DATA LOCAL INFILE and LOAD DATA LOCAL INFILE, respectively (in other words, the CONCURRENT keyword was omitted). As a result, when using replication with either of these logging modes, queries on the slaves were blocked by the replication SQL thread while trying to execute the affected statements. (Bug#34628)

  • Replication: Manually removing entries from the binary log index file on a replication master could cause the server to repeatedly send the same binary log file to slaves. (Bug#28421)

  • Cluster Replication: When expire_logs_days was set, the thread performing the purge of the log files could deadlock, causing all binary log operations to stop. (Bug#49536)

  • Within a stored routine, selecting the result of CONCAT_WS() with a routine parameter argument into a user variable could return incorrect results. (Bug#50096)

  • The IBMDB2I storage engine was missing from the i5os 64-bit distribution of MySQL 5.1.42. It is now included again. (Bug#50059)

  • EXPLAIN EXTENDED UNION ... ORDER BY caused a crash when the ORDER BY referred to a nonconstant or full-text function or a subquery. (Bug#49734)

  • The push_warning_printf() function was being called with an invalid error level MYSQL_ERROR::WARN_LEVEL_ERROR, causing an assertion failure. To fix the problem, MYSQL_ERROR::WARN_LEVEL_ERROR has been replaced by MYSQL_ERROR::WARN_LEVEL_WARN. (Bug#49638)

  • Some prepared statements could raise an assertion when re-executed. (Bug#49570)

  • A Valgrind error in make_cond_for_table_from_pred() was corrected. Thanks to Sergey Petrunya for the patch to fix this bug. (Bug#49506)

  • When compiling on Windows, an error in the CMake definitions for InnoDB would cause the engine to be built incorrectly. (Bug#49502)

  • Valgrind warnings for CHECKSUM TABLE were corrected. (Bug#49465)

  • Specifying an index algorithm (such as BTREE) for SPATIAL or FULLTEXT indexes caused a server crash. These index types do not support algorithm specification, and it is now disallowed to do so. (Bug#49250)

  • The optimizer sometimes incorrectly handled conditions of the form WHERE col_name='const1' AND col_name='const2'. (Bug#49199)

  • Execution of DECODE() and ENCODE() could be inefficient because multiple executions within a single statement reinitialized the random generator multiple times even with constant parameters. (Bug#49141)

  • MySQL 5.1 does not support 2-byte collation numbers, but did not check the number and crashed for out-of-range values. (Bug#49134)

  • With binary logging enabled, REVOKE ... ON {PROCEDURE|FUNCTION} FROM ... could cause a crash. (Bug#49119)

  • The LIKE operator did not work correctly when using an index for a ucs2 column. (Bug#49028)

  • check_key_in_view() was missing a DBUG_RETURN in one code branch, causing a crash in debug builds. (Bug#48995)

  • Several strmake() calls had an incorrect length argument (too large by one). (Bug#48983)

  • On Fedora 12, strmov() did not guarantee correct operation for overlapping source and destination buffer. Calls were fixed to use an overlap-safe version instead. (Bug#48866)

  • Incomplete reset of internal TABLE structures could cause a crash with eq_ref table access in subqueries. (Bug#48709)

  • Re-execution of a prepared statement could cause a server crash. (Bug#48508)

  • The error message for ER_UPDATE_INFO was subject to buffer overflow or truncation. (Bug#48500)

  • SHOW BINLOG EVENTS could fail with a error: Wrong offset or I/O error. (Bug#48357)

  • Valgrind warnings related to binary logging of LOAD DATA INFILE statements were corrected. (Bug#48340)

  • An aliasing violation in the C API could lead to a crash. (Bug#48284)

  • With one thread waiting for a lock on a table, if another thread dropped the table and created a new table with the same name and structure, the first thread would not notice that the table had been re-created and would try to used cached metadata that belonged to the old table but had been freed. (Bug#48157)

  • The InnoDB Monitor could fail to print diagnostic information after a long lock wait. (Bug#47814)

  • Queries containing GROUP BY ... WITH ROLLUP that did not use indexes could return incorrect results. (Bug#47650)

  • If an invocation of a stored procedure failed in the table-open stage, subsequent invocations that did not fail in that stage could cause a crash. (Bug#47649)

  • On Solaris, no stack trace was printed to the error log after a crash. (Bug#47391)

  • A crash occurred when a user variable that was assigned to a subquery result was used as a result field in a SELECT statement with aggregate functions. (Bug#47371)

  • The first execution of STOP SLAVE UNTIL stopped too early. (Bug#47210)

  • When the mysql client was invoked with the --vertical option, it ignored the --skip-column-names option. (Bug#47147)

  • It was possible for init_available_charsets() not to initialize correctly. (Bug#45058)

  • Comparison with NULL values sometimes did not produce a correct result. (Bug#42760)

  • Crash recovery did not work for InnoDB temporary tables. (Bug#41609)

  • The mysql_upgrade command would create three additional fields to the mysql.proc table (character_set_client, collation_connection, and db_collation), but did not populate the fields with correct values. This would lead to error messages reported during stored procedure execution. (Bug#41569)

  • When compressed MyISAM files were opened, they were always memory mapped, sometimes causing memory-swapping problems. To deal with this, a new system variable, myisam_mmap_size, was added to limit the amount of memory used for memory mapping of MyISAM files. (Bug#37408)

  • A race condition on the privilege hash tables allowed one thread to try to delete elements that had already been deleted by another thread. A consequence was that SET PASSWORD or FLUSH PRIVILEGES could cause a crash. (Bug#35589, Bug#35591)

  • ALTER TABLE with both DROP COLUMN and ADD COLUMN clauses could crash or lock up the server. (Bug#31145)

C.1.4. Changes in MySQL 5.1.42 (15 December 2009)

InnoDB Plugin Notes:

  • InnoDB Plugin has been upgraded to version 1.0.6. This version is considered of Release Candidate (RC) quality. The InnoDB Plugin Change History may contain information in addition to those changes reported here.

Release availability:

  • MySQL Server 5.1 is available on the following new platforms starting with the 5.1.42 release:

    • Mac OS X 10.6 x86/x64

    • HP-UX 11.31 IA64

    • SLES 11 x86/x64

Bugs fixed:

  • Performance: When the query cache is fragmented, the size of the free block lists in the memory bins grows, which causes query cache invalidation to become slow. There is now a 50ms timeout for a SELECT statement waiting for the query cache lock. If the timeout expires, the statement executes without using the query cache. (Bug#39253)

    See also Bug#21074.

  • Important Change: Replication: The following functions have been marked unsafe for statement-based replication:

    None of the functions just listed are guaranteed to replicate correctly when using the statement-based format, because they can produce different results on the master and the slave. The use of any of these functions while binlog_format is set to STATEMENT is logged with the warning, Statement is not safe to log in statement format. When binlog_format is set to MIXED, the binary logging format is automatically switched to the row-based format whenever one of these functions is used. (Bug#47995)

  • Partitioning: In some cases, it was not possible to add a new column to a table that had subpartitions. (Bug#48276)

  • Partitioning: SELECT COUNT(*) from a partitioned table failed when using the ONLY_FULL_GROUP_BY SQL mode. (Bug#46923)

    This regression was introduced by Bug#45807.

  • Partitioning: SUBPARTITION BY KEY failed with DEFAULT CHARSET=utf8. (Bug#45904)

  • Replication: When using row-based logging, TRUNCATE TABLE was written to the binary log even if the affected table was temporary, causing replication to fail. (Bug#48350)

  • Replication: Replicating TEXT or VARCHAR columns declared as NULL on the master but NOT NULL on the slave caused the slave to crash. (Bug#43789)

    See also Bug#38850, Bug#43783, Bug#43785, Bug#47741, Bug#48091.

  • Replication: When using row-based format, replication failed with the error Could not execute Write_rows event on table ...; Field '...' doesn't have a default value when an INSERT was made on the master without specifying a value for a column having no default, even if strict server SQL mode was not in use and the statement would otherwise have succeeded on the master. Now the SQL mode is checked, and the statement is replicated unless strict mode is in effect. For more information, see Section 5.1.8, “Server SQL Modes”. (Bug#38173)

    See also Bug#38262, Bug#43992.

  • The result of comparison between nullable BIGINT and INT columns was inconsistent. (Bug#49517)

  • Incorrect cache initialization prevented storage of converted constant values and could produce incorrect comparison results. (Bug#49489)

  • Comparisons involving YEAR values could produce incorrect results. (Bug#49480)

    See also Bug#43668.

  • InnoDB did not reset table AUTO_INCREMENT values to the last used values after a server restart. (Bug#49032)

  • If a query involving a table was terminated with KILL, a subsequent SHOW CREATE TABLE for that table caused a server crash. (Bug#48985)

  • Privileges for stored routines were ignored for mixed-case routine names. (Bug#48872)

    See also Bug#41049.

  • Building MySQL on Fedora Core 12 64-bit would due to errors in comp_err. (Bug#48864)

  • Concurrent ALTER TABLE operations on an InnoDB table could raise an assertion. (Bug#48782)

  • Certain INTERVAL expressions could cause a crash on 64-bit systems. (Bug#48739)

  • During query execution, ranges could be merged incorrectly for OR operations and return an incorrect result. (Bug#48665)

  • The InnoDB Table Monitor reported the FLOAT and DOUBLE data types incorrectly. (Bug#48526)

  • With row-based binary logging, the server crashed for statements of the form CREATE TABLE IF NOT EXISTS existing_view LIKE temporary_table. This occurred because the server handled the existing view as a table when logging the statement. (Bug#48506)

  • DISTINCT was ignored for queries with GROUP BY WITH ROLLUP and only const tables. (Bug#48475)

  • Loose index scan was inappropriately chosen for some WHERE conditions. (Bug#48472)

  • If the InnoDB tablespace was configured with too small a value, the server could crash and corrupt the tablespace. (Bug#48469)

  • Parts of the range optimizer could be initialized incorrectly, resulting in Valgrind errors. (Bug#48459)

  • A bad typecast could cause query execution to allocate large amounts of memory. (Bug#48458)

  • On Windows, InnoDB could not be built as a statically linked library. (Bug#48317)

  • mysql_secure_installation did not work on Solaris. (Bug#48086)

  • When running mysql_secure_installation, the command would fail if the root password contained multiple spaces, \, # or quote characters. (Bug#48031)

  • MATCH IN BOOLEAN MODE searches could return too many results inside a subquery. (Bug#47930)

  • Using REPLACE to update a previously inserted negative value in an AUTO_INCREMENT coumn in an InnoDB table caused the table auto-increment value to be updated to 2147483647. (Bug#47720)

  • If a session held a global read lock acquired with FLUSH TABLES WITH READ LOCK, a lock for one table acquired with LOCK TABLES, and issued an INSERT DELAYED statement for another table, deadlock could occur. (Bug#47682)

  • The mysql client status command displayed an incorrect value for the server character set. (Bug#47671)

  • Connecting to a 4.1.x server from a 5.1.x or higher mysql client resulted in a memory-free error when disconnecting. (Bug#47655)

  • Assignment of a system variable sharing the same base name as a declared stored program variable in the same context could lead to a crash. (Bug#47627)

  • mysqladmin debug could crash on 64-bit systems. (Bug#47382)

  • The innodb_file_format_check system variable could not be set at runtime to DEFAULT or to the value of a user-defined variable. (Bug#47167)

  • After a binary upgrade to MySQL 5.1 from a MySQL 5.0 installation that contains ARCHIVE tables, accessing those tables caused the server to crash, even if you had run mysql_upgrade or CHECK TABLE ... FOR UPGRADE.

    To work around this problem, use mysqldump to dump all ARCHIVE tables before upgrading, and reload them into MySQL 5.1 after upgrading. The same problem occurs for binary downgrades from MySQL 5.1 to 5.0. (Bug#47012)

  • The Mac OS X MySQL Preference Pane component was not built for 64-bit, which would trigger the System Preferences application to restart into 32-bit mode. (Bug#46935)

  • The IGNORE clause on a DELETE statement masked an SQL statement error that occurred during trigger processing. (Bug#46425)

  • On 64-bit systems, --skip-innodb did not skip InnoDB startup. (Bug#46043)

  • Valgrind errors for InnoDB Plugin were corrected. (Bug#45992, Bug#46656)

  • The return value was not checked for some my_hash_insert() calls. (Bug#45613)

  • Truncation of DECIMAL values could lead to assertion failures; for example, when deducing the type of a table column from a literal DECIMAL value. (Bug#45261)

    See also Bug#48370.

  • For YEAR(2) values, MIN(), MAX(), and comparisons could yield incorrect results. (Bug#43668)

  • The server could crash when attempting to access a non-conformant mysql.proc system table. For example, the server could crash when invoking stored procedure-related statements after an upgrade from MySQL 5.0 to 5.1 without running mysql_upgrade. (Bug#41726)

  • Use of InnoDB monitoring (SHOW ENGINE INNODB STATUS or one of the InnoDB Monitor tables) could cause a server crash due to invalid access to a shared variable in a concurrent environment. This is a further fix for a regression introduced in MySQL 5.1.38 to the original fix in MySQL 5.1.31. (Bug#38883)

  • When running mysql_secure_installation on Windows, the command would fail to load a required module, Term::ReadKey, which was required for correct operation. (Bug#35106)

  • If the --log-bin server option was set to a directory name with a trailing component separator character, the basename of the binary log files was empty so that the created files were named .000001 and .index. The same thing occurred with the --log-bin-index, --relay-log, and --relay-log-index options. Now the server reports and error and exits. (Bug#34739)

  • If a comparison involved a constant value that required type conversion, the converted value might not be cached, resulting in repeated conversion and poorer performance. (Bug#34384)

  • Using the SHOW ENGINE INNODB STATUS statement when using partitions in InnoDB tables caused Invalid (old?) table or database name errors to be logged. (Bug#32430)

  • On some Windows systems, InnoDB could report Operating system error number 995 in a file operation due to transient driver or hardware problems. InnoDB now retries the operation and adds Retry attempt is made to the error message. (Bug#3139)

C.1.5. Changes in MySQL 5.1.41 (05 November 2009)

InnoDB Plugin Notes:

  • InnoDB Plugin has been upgraded to version 1.0.5. This version is considered of Release Candidate (RC) quality. The InnoDB Plugin Change History may contain information in addition to those changes reported here.

Functionality added or changed:

  • The InnoDB buffer pool is divided into two sublists: A new sublist containing blocks that are heavily used by queries, and an old sublist containing less-used blocks and from which candidates for eviction are taken. In the default operation of the buffer pool, a block when read in is loaded at the midpoint and then moved immediately to the head of the new sublist as soon as an access occurs. In the case of a table scan (such as performed for a mysqldump operation), each block read by the scan ends up moving to the head of the new sublist because multiple rows are accessed from each block. This occurs even for a one-time scan, where the blocks are not otherwise used by other queries. Blocks may also be loaded by the read-ahead background thread and then moved to the head of the new sublist by a single access. These effects can be disadvantageous because they push blocks that are in heavy use by other queries out of the new sublist to the old sublist where they become subject to eviction.

    InnoDB Plugin now provides two system variables that enable LRU algorithm tuning:

    • innodb_old_blocks_pct

      Specifies the approximate percentage of the buffer pool used for the old block sublist. The range of values is 5 to 95. The default value is 37 (that is, 3/8 of the pool).

    • innodb_old_blocks_time

      Specifies how long in milliseconds (ms) a block inserted into the old sublist must stay there after its first access before it can be moved to the new sublist. The default value is 0: A block inserted into the old sublist moves immediately to the new sublist the first time it is accessed, no matter how soon after insertion the access occurs. If the value is greater than 0, blocks remain in the old sublist until an access occurs at least that many ms after the first access. For example, a value of 1000 causes blocks to stay in the old sublist for 1 second after the first access before they become eligible to move to the new sublist. See Section 7.4.6, “The InnoDB Buffer Pool”

    For additional information, see Section 7.4.6, “The InnoDB Buffer Pool”. (Bug#45015)

  • For InnoDB Plugin, two status variables have been added to SHOW STATUS output. Innodb_buffer_pool_read_ahead and Innodb_buffer_pool_read_ahead_evicted indicate the number of pages read in by the InnoDB read-ahead background thread, and the number of such pages evicted without ever being accessed, respectively. Also, the status variables Innodb_buffer_pool_read_ahead_rnd and Innodb_buffer_pool_read_ahead_seq status variables have been removed.

    The built-in version of InnoDB is not affected by these changes. (Bug#42885)

  • The server now supports a Debug Sync facility for thread synchronization during testing and debugging. To compile in this facility, configure MySQL with the --enable-debug-sync option. The debug_sync system variable provides the user interface Debug Sync. mysqld and mysql-test-run.pl support a --debug-sync-timeout option to enable the facility and set the default synchronization point timeout.

Bugs fixed:

  • Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.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)

    See also Bug#39277.

  • Security Fix: MySQL clients linked against OpenSSL can be tricked not to check server certificates. (Bug#47320, CVE-2009-4028)

  • Partitioning: An ALTER TABLE ... ADD PARTITION statement that caused open_files_limit to be exceeded led to a crash of the MySQL server. (Bug#46922)

    See also Bug#47343.

  • Partitioning: The cardinality of indexes on partitioned tables was calculated using the first partition in the table, which could result in suboptimal query execution plans being chosen. Now the partition having the most records is used instead, which should result in better use of indexes and thus improved performance of queries against partitioned tables in many if not most cases. (Bug#44059)

  • Replication: This issue occurred in MySQL 5.1.40 only. (Bug#48297)

  • Replication: When a session was closed on the master, temporary tables belonging to that session were logged with the wrong database names when either of the following conditions was true:

    1. The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.

    2. The current database was not set.

    (Bug#48216)

    See also Bug#46861, Bug#48297.

  • Replication: When using row-based replication, changes to non-transactional tables that occurred early in a transaction were not immediately flushed upon committing a statement. This behavior could break consistency since changes made to non-transactional tables become immediately visible to other connections. (Bug#47678)

    See also Bug#47287, Bug#46864, Bug#43929, Bug#46129.

  • Replication: When mysqlbinlog --verbose was used to read a binary log that had been recorded using the row-based format, the output for events that updated some but not all columns of tables was not correct. (Bug#47323)

  • Replication: When using the row-based format to replicate a transaction involving both transactional and non-transactional engines, which contained a DML statement affecting multiple rows, the statement failed; if this transaction was followed by a COMMIT, the master and the slave could diverge, because the statement was correctly rolled back on the master, but was applied on the slave. (Bug#47287)

    See also Bug#46864.

  • Replication: A problem with the BINLOG statement in the output of mysqlbinlog could break replication; statements could be logged with the server ID stored within events by the BINLOG statement rather than the ID of the running server. With this fix, the server ID of the server executing the statements can no longer be overridden by the server ID stored in the binary log's format description statement. (Bug#46640)

    This regression was introduced by Bug#32407.

  • Replication: When using statement-based replication and the transaction isolation level was set to READ COMMITTED or a less strict level, InnoDB returned an error even if the statement in question was filtered out according to the --binlog-do-db or --binlog-ignore-db rules in effect at the time. (Bug#42829)

  • Replication: FLUSH LOGS did not actually close and reopen the binary log index file. (Bug#34582)

    See also Bug#5.0.90.

  • SUM() artificially increased the precision of a DECIMAL argument, which was truncated when a temporary table was created to hold the results. (Bug#48370)

    See also Bug#45261.

  • If an outer query was invalid, a subquery might not even be set up. EXPLAIN EXTENDED did not expect this and caused a crash by trying to dereference improperly set up information. (Bug#48295)

  • A query containing a view using temporary tables and multiple tables in the FROM clause and PROCEDURE ANALYSE() caused a server crash.

    As a result of this bug fix, PROCEDURE ANALYSE() is legal only in a top-level SELECT. (Bug#48293)

    See also Bug#46184.

  • Error handling was missing for SELECT statements containing subqueries in the WHERE clause and that assigned a SELECT result to a user variable. The server could crash as a result. (Bug#48291)

  • An assertion could fail if the optimizer used a SPATIAL index. (Bug#48258, Bug#47019)

  • Memory-allocation failures were handled incorrectly in the InnoDB os_mem_alloc_large() function. (Bug#48237)

  • WHERE clauses with outer_value_list NOT IN subquery were handled incorrectly if the outer value list contained multiple items at least one of which could be NULL. (Bug#48177)

  • A combination of GROUP BY WITH ROLLUP, DISTINCT and the const join type in a query caused a server crash when the optimizer chose to employ a temporary table to resolve DISTINCT. (Bug#48131)

  • In some cases, using a null microsecond part in a WHERE condition (for example, WHERE date_time_field <= 'YYYY-MM-DD HH:MM:SS.0000') could lead to incorrect results due to improper DATETIME comparison. (Bug#47963)

  • A build configured using the --without-server option did not compile the yaSSL code, so if --with-ssl was also used, the build failed. (Bug#47957)

  • When a query used a DATE or DATETIME value formatted using any separator characters other than hyphen ('-') and a >= condition matching only the greatest value in an indexed column, the result was empty if an index range scan was employed. (Bug#47925)

  • mysys/mf_keycache.c requires threading, but no test was made for thread support. (Bug#47923)

  • For debug builds, an assertion could fail during the next statement executed for a temporary table after a multiple-table UPDATE involving that table and modified an AUTO_INCREMENT column with a user-supplied value. (Bug#47919)

  • The mysys/mf_strip.c file, which defines the strip_sp() function, has been removed from the MySQL source. The function was no longer used within the main build, and the supplied function was causing symbol errors on Windows builds. (Bug#47857)

  • The Windows build for MySQL would compile the split.c and debug.c files unnecessarily, causing additional symbols to be included in mysqld. (Bug#47850)

  • When building storage engines on Windows it was not possible to specify additional libraries within the CMake file required for the build. An ${engine}_LIBS macro has been added to the files to support these additional storage-engine specific libraries. (Bug#47797)

  • When building a pluggable storage engine on Windows, the engine name could be based on the directory name where the engine was located, rather than the configured storage engine name. (Bug#47795)

  • During cleanup of a stored procedure's internal structures, the flag to ignore the errors for INSERT IGNORE or UPDATE IGNORE was not cleaned up, which could result in a server crash. (Bug#47788)

  • If the first argument to GeomFromWKB() function was a geometry value, the function just returned its value. However, it failed to preserve the argument's null_value flag, which caused an unexpected NULL value to be returned to the caller, resulting in a server crash. (Bug#47780)

  • InnoDB could crash when updating spatial values. (Bug#47777)

  • On WIndows, when an idle named pipe connection was forcibly closed with a KILL statement or because the server was being shut down, the thread that was closing the connection would hang infinitely. (Bug#47571, Bug#31621)

  • A function call could end without throwing an error or setting the return value. For example, this could happen when an error occurred while calculating the return value. This is fixed by setting the value to NULL when an error occurs during evaluation of an expression. (Bug#47412)

  • A simple SELECT with implicit grouping could return many rows rather than a single row if the query was ordered by the aggregated column in the select list. (Bug#47280)

  • An assertion could be raised for CREATE TABLE if there was a pending INSERT DELAYED or REPLACE DELAYED for the same table. (Bug#47274)

  • InnoDB raised errors in some cases in a manner not compatible with SIGNAL and RESIGNAL. (Bug#47233)

  • If an InnoDB table was created with the AUTO_INCREMENT table option to specify an initial auto-increment value, and an index was added in a separate operation later, the auto-increment value was lost (subsequent inserts began at 1 rather than the specified value). (Bug#47125)

  • Incorrect handling of predicates involving NULL by the range optimizer could lead to an infinite loop during query execution. (Bug#47123)

  • Repair by sort or parallel repair of MyISAM tables could fail to fail over to repair with key cache. (Bug#47073)

  • InnoDB Plugin did not compile on some Solaris systems. (Bug#47058)

  • On WIndows, when a failed I/O operation occurred with return code of ERROR_WORKING_SET_QUOTA, InnoDB intentionally crashed the server. Now InnoDB sleeps for 100ms and retries the failed operation. (Bug#47055)

  • InnoDB now ignores negative values supplied by a user for an AUTO_INCREMENT column when calculating the next value to store in the data dictionary. Setting AUTO_INCREMENT columns to negative values is undefined behavior and this change should bring the behavior of InnoDB closer to what users expect. (Bug#46965)

  • When MySQL crashed (or a snapshot was taken that simulates a crash), it was possible that internal XA transactions (used to synchronize the binary log and InnoDB) could be left in a PREPARED state, whereas they should be rolled back. This occurred when the server_id value changed before the restart, because that value was used to construct XID values.

    Now the restriction is relaxed that the server_id value be consistent for XID values to be considered valid. The rollback phase should then be able to clean up all pending XA transactions. (Bug#46944)

  • InnoDB Plugin did not compile using gcc 4.1 on PPC systems. (Bug#46718)

  • If InnoDB Plugin reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#46672)

    See also Bug#18828.

  • A Valgrind error during index creation by InnoDB Plugin was corrected. (Bug#46657)

  • Concurrent INSERT INTO ... SELECT statements for an InnoDB table could cause an AUTO_INCREMENT assertion failure. (Bug#46650)

  • If a transaction was rolled back inside InnoDB due to a deadlock or lock wait timeout, and a statement in the transaction had an IGNORE clause, the server could crash at the end of the statement or on shutdown. (Bug#46539)

  • Trailing spaces were not ignored for user-defined collations that mapped spaces to a character other than 0x20. (Bug#46448)

    See also Bug#29468.

  • The GPL and commercial license headers had different sizes, so that error log, backtrace, core dump, and cluster trace file line numbers could be off by one if they were not checked against the version of the source used for the build. (For example, checking a GPL build backtrace against commercial sources.) (Bug#46216)

  • InnoDB did not disallow creation of an index with the name GEN_CLUST_INDEX, which is used internally. (Bug#46000)

  • During the build of the Red Hat IA64 MySQL server RPM, the system library link order was incorrect. This made the resulting Red Hat IA64 RPM depend on "libc.so.6.1(GLIBC_PRIVATE)(64bit)", thus preventing installation of the package. (Bug#45706)

  • The caseinfo member of the CHARSET_INFO structure was not initialized for user-defined Unicode collations, leading to a server crash. (Bug#45645)

  • With InnoDB Plugin, renaming a table column and then creating an index on the renamed column caused a server crash to the .frm file and the InnoDB data directory going out of sync. Now InnoDB Plugin 1.0.5 returns an error instead: ERROR 1034 (HY000): Incorrect key file for table 'tbl_name'; try to repair it. To work around the problem, create another table with the same structure and copy the original table to it. (Bug#44571)

  • An InnoDB error message incorrectly referred to the nonexistent innodb_max_files_open variable rather than to innodb_open_files. (Bug#44338)

  • For ALTER TABLE, renaming a DATETIME or TIMESTAMP column unnecessarily caused a table copy operation. (Bug#43508)

  • The weekday names for the Romanian lc_time_names locale 'ro_RO' were incorrect. Thanks to Andrei Boros for the patch to fix this bug. (Bug#43207)

  • XA START could cause an assertion failure or server crash when it is called after a unilateral rollback issued by the Resource Manager (both in a regular transaction and after an XA transaction). (Bug#43171)

  • The FORCE INDEX FOR ORDER BY index hint was ignored when join buffering was used. (Bug#43029)

  • Incorrect handling of range predicates combined with OR operators could yield incorrect results. (Bug#42846)

  • Failure to treat BIT values as unsigned could lead to unpredictable results. (Bug#42803)

  • For the embedded server on Windows, InnoDB crashed when innodb_file_per_table was enabled and a table name was in full path format. (Bug#42383)

  • Some queries with nested outer joins could lead to crashes or incorrect results because an internal data structure was handled improperly. (Bug#42116)

  • In a replication scenario with innodb_locks_unsafe_for_binlog enabled on the slave, where rows were changed only on the slave (not through replication), in some rare cases, many messages of the following form were written to the slave error log: InnoDB: Error: unlock row could not find a 4 mode lock on the record. (Bug#41756)

  • After renaming a user, granting that user privileges could result in the user having additional privileges other than those granted. (Bug#41597)

  • With a nonstandard InnoDB page size, some error messages became inaccurate.

    Note

    Changing the page size is not a supported operation and there is no guarantee that InnoDB will function normally with a page size other than 16KB. Problems compiling or running InnoDB may occur. In particular, ROW_FORMAT=COMPRESSED in the InnoDB Plugin assumes that the page size is at most 16KB and uses 14-bit pointers.

    A version of InnoDB built for one page size cannot use data files or log files from a version built for a different page size.

    (Bug#41490)

  • In some cases, the server did not recognize lettercase differences between GRANT attributes such as table name or user name. For example, a user was able to perform operations on a table with privileges of another user with the same user name but in a different lettercase.

    In consequence of this bug fix, the collation for the Routine_name column of the mysql.proc table is changed from utf8_bin to utf8_general_ci. (Bug#41049)

    See also Bug#48872.

  • Simultaneous ANALYZE TABLE operations for an InnoDB tables could be subject to a race condition. (Bug#38996)

  • Previously, InnoDB performed REPLACE INTO T SELECT ... FROM S WHERE ... by setting shared next-key locks on rows from S. Now InnoDB selects rows from S with shared locks or as a consistent read, as for INSERT ... SELECT. This reduces lock contention between sessions. (Bug#37232)

  • When an InnoDB tablespace filled up, an error was logged to the client, but not to the error log. Also, the error message was misleading and did not indicate the real source of the problem. (Bug#31183)

  • In mysql, using Control-C to kill the current query resulted in a ERROR 1053 (08S01): Server shutdown in progress" message if the query was waiting for a lock. (Bug#28141)

C.1.6. Release Notes for MySQL Enterprise 5.1.40sp1 [QSP] (25 November 2009)

This is a Service Pack release of the MySQL Enterprise Server 5.1.

Bugs fixed:

  • Replication: When using statement-based or mixed-format replication, the database name was not written to the binary log when executing a LOAD DATA statement. This caused problems when the table being loaded belonged to a database other than the current database; data could be loaded into the wrong table (if a table having the same name existed in the current database) or replication could fail (if no table having that name existed in the current database). Now a table referenced in a LOAD DATA statement is always logged using its fully qualified name when the database to which it belongs is not the current database. (Bug#48297)

  • Replication: When a session was closed on the master, temporary tables belonging to that session were logged with the wrong database names when either of the following conditions was true:

    1. The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.

    2. The current database was not set.

    (Bug#48216)

    See also Bug#46861, Bug#48297.

  • SUM() artificially increased the precision of a DECIMAL argument, which was truncated when a temporary table was created to hold the results. (Bug#48370)

    See also Bug#45261.

  • If an outer query was invalid, a subquery might not even be set up. EXPLAIN EXTENDED did not expect this and caused a crash by trying to dereference improperly set up information. (Bug#48295)

  • A query containing a view using temporary tables and multiple tables in the FROM clause and PROCEDURE ANALYSE() caused a server crash.

    As a result of this bug fix, PROCEDURE ANALYSE() is legal only in a top-level SELECT. (Bug#48293)

    See also Bug#46184.

  • Error handling was missing for SELECT statements containing subqueries in the WHERE clause and that assigned a SELECT result to a user variable. The server could crash as a result. (Bug#48291)

  • An assertion could fail if the optimizer used a SPATIAL index. (Bug#48258, Bug#47019)

  • A combination of GROUP BY WITH ROLLUP, DISTINCT and the const join type in a query caused a server crash when the optimizer chose to employ a temporary table to resolve DISTINCT. (Bug#48131)

  • In some cases, using a null microsecond part in a WHERE condition (for example, WHERE date_time_field <= 'YYYY-MM-DD HH:MM:SS.0000') could lead to incorrect results due to improper DATETIME comparison. (Bug#47963)

  • When a query used a DATE or DATETIME value formatted using any separator characters other than hyphen ('-') and a >= condition matching only the greatest value in an indexed column, the result was empty if an index range scan was employed. (Bug#47925)

  • During cleanup of a stored procedure's internal structures, the flag to ignore the errors for INSERT IGNORE or UPDATE IGNORE was not cleaned up, which could result in a server crash. (Bug#47788)

  • If the first argument to GeomFromWKB() function was a geometry value, the function just returned its value. However, it failed to preserve the argument's null_value flag, which caused an unexpected NULL value to be returned to the caller, resulting in a server crash. (Bug#47780)

  • InnoDB could crash when updating spatial values. (Bug#47777)

  • Incorrect handling of predicates involving NULL by the range optimizer could lead to an infinite loop during query execution. (Bug#47123)

  • InnoDB now ignores negative values supplied by a user for an AUTO_INCREMENT column when calculating the next value to store in the data dictionary. Setting AUTO_INCREMENT columns to negative values is undefined behavior and this change should bring the behavior of InnoDB closer to what users expect. (Bug#46965)

  • In a replication scenario with innodb_locks_unsafe_for_binlog enabled on the slave, where rows were changed only on the slave (not through replication), in some rare cases, many messages of the following form were written to the slave error log: InnoDB: Error: unlock row could not find a 4 mode lock on the record. (Bug#41756)

C.1.7. Changes in MySQL 5.1.40 (06 October 2009)

InnoDB Plugin Notes:

  • In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages. It also does not work for FreeBSD 6 and HP-UX or for Linux on S/390, PowerPC, and generic ia64.

Bugs fixed:

  • Incompatible Change: In binary installations of MySQL, the supplied binary-configure script would start and configure MySQL, even when command help was requested with the --help command-line option. The --help, if provided, will no longer start and install the server. (Bug#30954)

  • Partitioning: When reorganizing partitions, not all affected subpartitions were removed prior to renaming. One way in which the issue was visible was that attempting to reorganize two partitions into a single partition having the same name as one of the original partitions could lead to a crash of the server. (Bug#47029)

    See also Bug#45961, Bug#43729.

  • Partitioning: An online or fast ALTER TABLE of a partitioned table could leave behind temporary files in the database directory.

    This issue was observed in MySQL 5.1.31 and later only. (Bug#46483)

  • Partitioning: When performing an INSERT ... SELECT into a partitioned table, read_buffer_size bytes of memory were allocated for every partition in the target table, resulting in consumption of large amounts of memory when the table had many partitions (more than 100).

    This fix changes the method used to estimate the buffer size required for each partition and limits the total buffer size to a maximum of approximately 10 times read_buffer_size. (Bug#45840)

  • Partitioning: Inserting negative values into an AUTO_INCREMENT column of a partitioned table could lead to apparently unrelated errors or a crash of the server. (Bug#45823)

  • Partitioning: Unnecessary calls were made in the server code for performing bulk inserts on partitions for which no inserts needed to be made. (Bug#35845)

    See also Bug#35843.

  • Replication: Performing ALTER TABLE ... DISABLE KEYS on a slave table caused row-based replication to fail. (Bug#47312)

  • Replication: BEGIN statements were not included in the output of mysqlbinlog. (Bug#46998)

  • Replication: When using row-based replication, DROP TEMPORARY TABLE IF EXISTS was written to the binary log if the table named in the statement did not exist, even though a DROP TEMPORARY TABLE statement should never be logged in row-based logging mode, whether the table exists or not. (Bug#46572)

  • Replication: When using row-based replication, importing a dump made with mysqldump and replicating a row with an AUTO_INCREMENT column set to 0, with NO_AUTO_VALUE_ON_ZERO active on the master, the row was inserted successfully on the master; however any setting for NO_AUTO_VALUE_ON_ZERO was ignored on the slave. When the AUTO_INCREMENT column was incremented, this caused replication to fail on the slave due to a duplicate key error. In some cases it could also cause the slave to crash. (Bug#45999)

  • Replication: Concurrent transactions that inserted rows into a table with an AUTO_INCREMENT column could break statement-based or mixed-format replication error 1062 Duplicate entry '...' for key 'PRIMARY' on the slave. This was especially likely to happen when one of the transactions activated a trigger that inserted rows into the table with the AUTO_INCREMENT column, although other conditions could also cause the issue to manifest. (Bug#45677)

  • Replication: By default, all statements executed by the mysql_upgrade program on the master are written to the binary log, then replicated to the slave. In some cases, this can result in problems; for example, it attempted to alter log tables on replicated databases (this failed due to logging being enabled).

    As part of this fix, a mysql_upgrade option, --write-binlog, is added. Its inverse, --skip-write-binlog, can be used to disable binary logging while the upgrade is in progress. (Bug#43579)

  • Replication: On the master, if a binary log event is larger than max_allowed_packet, the error message ER_MASTER_FATAL_ERROR_READING_BINLOG is sent to a slave when it requests a dump from the master, thus leading the I/O thread to stop. On a slave, the I/O thread stops when receiving a packet larger than max_allowed_packet.

    In both cases, however, there was no Last_IO_Error reported, which made it difficult to determine why the slave had stopped in such cases. Now, Last_IO_Error is reported when max_allowed_packet is exceeded, and provides the reason for which the slave I/O thread stopped. (Bug#42914)

    See also Bug#14068, Bug#47200, Bug#47303.

  • API: The fix for Bug#24507 could lead in some cases to client application failures due to a race condition. Now the server waits for the “dummy” thread to return before exiting, thus making sure that only one thread can initialize the POSIX threads library. (Bug#42850)

  • The pthread_cond_wait() implementations for Windows could deadlock in some rare circumstances. (Bug#47768)

  • On Mac OS X or Windows, sending a SIGHUP signal to the server or an asynchronous flush (triggered by flush_time) caused the server to crash. (Bug#47525)

  • Debug builds could not be compiled with the Sun Studio compiler. (Bug#47474)

  • A multiple-table UPDATE involving a natural join and a mergeable view raised an assertion. (Bug#47150)

  • Solaris binary packages now are compiled with -g0 rather than -g. (Bug#47137)

  • EXPLAIN caused a server crash for certain valid queries. (Bug#47106)

  • The configure option --without-server did not work. (Bug#46980)

  • The ARCHIVE storage engine lost records during a bulk insert. (Bug#46961)

  • Failed multiple-table DELETE statements could raise an assertion. (Bug#46958)

  • When creating a new instance on Windows using mysqld-nt and the --install parameter, the value of the service would be set incorrectly, resulting in a failure to start the configured service. (Bug#46917)

  • CONCAT_WS() could return incorrect results due to an argument buffer also being used as a result buffer. (Bug#46815)

  • The server crashed when re-using outer column references in correlated subqueries when the enclosing query used a temp table. (Bug#46791)

  • For InnoDB tables, an unnecessary table rebuild for ALTER TABLE could sometimes occur for metadata-only changes. (Bug#46760)

  • Assertion failure could result from repeated execution of a stored procedure containing an incorrect query with a subselect. (Bug#46629)

  • The server ignored the setting of sync_frm for CREATE TABLE ... LIKE. (Bug#46591)

  • An attempt to create a table with the same name as an existing view could cause a server crash. (Bug#46384)

  • A parser problem prevented properly stripping backquotes from an argument to a user-defined function (UDF). If the UDF was in an ORDER BY clause, its name would not be properly resolved against an alias with the same name in the select list. (Bug#46259)

  • Dropping an InnoDB table that used an unknown collation (created on a different server, for example) caused a server crash. (Bug#46256)

  • Certain SELECT statements containing DISTINCT, GROUP BY, and HAVING clauses could hang in an infinite loop. (Bug#46159)

  • InnoDB did not disallow creation of an index with the name GEN_CLUST_INDEX, which is used internally. (Bug#46000)

  • CREATE TEMPORARY TABLE failed for InnoDB tables on systems with case-insensitive file systems when lower_case_table_names = 2 and the pathname of the temporary file directory contained uppercase characters. (Bug#45638)

  • Appending values to an ENUM or SET definition is a metadata change for which ALTER TABLE need not rebuild the table, but it was being rebuilt anyway. (Bug#45567)

  • The socket system variable was unavailable on Windows. (Bug#45498)

  • When re-installing MySQL on Windows on a server that has a data directory from a previous MySQL installation, the installer would fail to identify the existence of the installation and the password configured for the root user. (Bug#45200)

  • Client flags were incorrectly initialized for the embedded server, causing several tests in the jp test suite to fail. (Bug#45159)

  • InnoDB did not always disallow creating tables containing columns with names that match the names of internal columns, such as DB_ROW_ID, DB_TRX_ID, DB_ROLL_PTR, and DB_MIX_ID. (Bug#44369)

  • SELECT ... WHERE ... IN (NULL, ...) was executed using a full table scan, even if the same query without the NULL used an efficient range scan. (Bug#44139)

    See also Bug#18360.

  • InnoDB use of SELECT MAX(autoinc_column) could cause a crash when MySQL data dictionaries went out of sync. (Bug#44030)

  • LOAD DATA INFILE statements were written to the binary log in such a way that parsing problems could occur when re-executing the statement from the log. (Bug#43746)

  • Selecting from the process list in the embedded server caused a crash. (Bug#43733)

    See also Bug#47304.

  • Attempts to enable large_pages with a shared memory segment larger than 4GB caused a server crash. (Bug#43606)

  • A test for stack growth failed on some platforms, leading to server crashes. (Bug#42213)

  • The server used the wrong lock type (always TL_READ instead of TL_READ_NO_INSERT when appropriate) for tables used in subqueries of UPDATE statements. This led in some cases to replication failure because statements were written in the wrong order to the binary log. (Bug#42108)

  • The mysql-stress-test.pl test script was missing from the noinstall packages on Windows. (Bug#41546)

  • Privileges for SHOW CREATE VIEW were not being checked correctly. (Bug#35996)

  • Different invocations of CHECKSUM TABLE could return different results for a table containing columns with spatial data types. (Bug#35570)

  • Concurrent execution of FLUSH TABLES along with SHOW FUNCTION STATUS or SHOW PROCEDURE STATUS could cause a server crash. (Bug#34895)

  • myisamchk performed parameter value casting at startup that generated unnecessary warning messages. (Bug#33785)

  • When using the ARCHIVE storage engine, SHOW TABLE STATUS displayed incorrect information for Max_data_length, Data_length and Avg_row_length. (Bug#29203)

  • When building MySQL on Windows from source, the WITH_BERKELEY_STORAGE_ENGINE option would fail to configure BDB support correctly. (Bug#27693)

C.1.8. Changes in MySQL 5.1.39 (04 September 2009)

Bugs fixed:

  • Performance: For MyISAM tables with bulk_insert_buffer_size values larger than 256KB, the performance of bulk insert operations such as multiple-row INSERT and INSERT ... SELECT operations has been improved greatly when up to a hundred rows are inserted at the same time. (Bug#44723)

  • Partitioning: An INSERT ... SELECT statement on an empty partition of a partitioned table failed with ERROR 1030 (HY000): Got error 124 from storage engine. This issue also caused queries run against a partitioned table while a LOAD DATA CONCURRENT INFILE statement was in progress to fail with the same error. (Bug#46639)

    See also Bug#35845, Bug#44657, Bug#45840.

  • Partitioning: A partitioned table having a TIMESTAMP column with a default value of CURRENT_TIMESTAMP and this column was not defined using an ON UPDATE option, an ALTER TABLE ... REORGANIZE PARTITION statement on the table caused the TIMESTAMP column value to be set to CURRENT_TIMESTAMP regardless. (Bug#46478)

  • Partitioning: Partition pruning did not always work correctly when the table's partitioning key used the TO_DAYS() function. (Bug#46362)

  • Partitioning: Attempting to access a partitioned table when partitioning support was disabled in a MySQL server binary that had been compiled with partitioning support caused the server to crash. (Bug#39893)

  • Partitioning: The use of TO_DAYS() in the partitioning expression led to selection failures when the column having the date value contained invalid dates. This occurred because the function returns NULL in such cases, and the partition containing NULL values was pruned away. For example, this problem occurred if '2001-02-00' was inserted into a DATE column of such a table, and a subsequent query on this table used WHERE date_col < '2001-02-00' — while '2001-01-01' is less than '2001-02-00', TO_DAYS('2001-02-00') evaluates as NULL, and so the row containing '2001-01-01' was not returned. Now, for tables using RANGE or LIST partitioning and having TO_DAYS() in the partitioning expression, the NULL partition is also scanned instead of being ignored.

    The fix for this issue also corrects misbehavior such that a query of the form SELECT * FROM table WHERE date_col < date_val on a table partitioned by RANGE or LIST was handled as though the server SQL mode included ALLOW_INVALID_DATES even if this was not actually part of the server SQL mode at the time the query was issued. (Bug#20577)

    See also Bug#18198, Bug#32021, Bug#46362.

  • Replication: Performing a multi-row update of the AUTO_INCREMENT column of a transactional table could result in an inconsistency between master and slave when there was a trigger on the transactional table that updated a non-transactional table. When such an update failed on the master, no rows were updated on the master, but some rows could (erroneously) be updated on the slave. (Bug#46864)

  • Replication: When using the --replicate-rewrite-db option and the database referenced by this option on the master was the current database when the connection to the slave was closed, any temporary tables existing in this database were not properly dropped. (Bug#46861)

  • Replication: When a statement that changed both transactional and non-transactional tables failed, the transactional changes were automatically rolled back on the master but the slave ignored the error and did not roll them back, thus leading to inconsistencies between master and slave.

    This issue is fixed by automatically rolling back a statement that fails on the slave; however, the transaction is not rolled back unless a corresponding ROLLBACK statement is found in the relay log file. (Bug#46130)

    See also Bug#33864.

  • Replication: When slave_transaction_retries is set, a statement that replicates, but is then rolled back due to a deadlock on the slave, should be retried. However, in certain cases, replication was stopped with error 1213 (Deadlock found when trying to get lock; try restarting transaction) instead, even when this variable was set. (Bug#45694)

  • Replication: The binary logging behavior (and thus, the replication behavior) of CREATE DATABASE IF NOT EXISTS, CREATE TABLE IF NOT EXISTS, and CREATE EVENT IF NOT EXISTS was not consistent among these statements, nor with that of DROP DATABASE IF EXISTS, DROP TABLE IF EXISTS, and DROP EVENT IF EXISTS: A DROP ... IF EXISTS statement is always logged even if the database object named in the statement does not exist. However, of the CREATE ... IF NOT EXISTS statements, only the CREATE EVENT IF NOT EXISTS statement was logged when the database object named in the statement already existed.

    Now, every CREATE ... IF NOT EXISTS statement is written to the binary log (and thus replicated), whether the database object named in the statement exists or not. For more information, see Section 16.3.1.3, “Replication of CREATE ... IF NOT EXISTS Statements”.

    Exception.  Replication and logging of CREATE TABLE IF NOT EXISTS ... SELECT continues to be handled according to existing rules. See Section 16.3.1.4, “Replication of CREATE TABLE ... SELECT Statements”, for more information.

    (Bug#45574)

  • Replication: When using statement-based replication, database-level character sets were not always honored by the replication SQL thread. This could cause data inserted on the master using LOAD DATA to be replicated using the wrong character set.

    Note

    This was not an issue when using row-based replication.

    (Bug#45516)

  • Replication: In some cases, a STOP SLAVE statement could cause the replication slave to crash. This issue was specific to MySQL on Windows or Macintosh platforms. (Bug#45238, Bug#45242, Bug#45243, Bug#46013, Bug#46014, Bug#46030)

    See also Bug#40796.

  • Replication: Creating a scheduled event whose DEFINER clause was either set to CURRENT_USER or not set explicitly caused the master and the slave to become inconsistent. This issue stems from the fact that, in both cases, the DEFINER is set to the CURRENT_USER of the current thread. (On the master, the CURRENT_USER is the mysqld user; on the slave, the CURRENT_USER is empty.)

    This behavior has been modified as follows:

    • If CURRENT_USER is used as the DEFINER, it is replaced with the value of CURRENT_USER before the CREATE EVENT statement is written to the binary log.

    • If the definer is not set explicitly, a DEFINER clause using the value of CURRENT_USER is added to the CREATE EVENT statement before it is written to the binary log.

    (Bug#44331)

    See also Bug#42217.

  • Replication: When using the statement-based logging format, the only possible safe combination of transactional and non-transactional statements within the same transaction is to perform any updates on non-transactional tables (such as MyISAM tables) first, before updating any transactional tables (such as those using the InnoDB storage engine). This is due to the fact that, although a modification made to a non-transactional table is immediately visible to other connections, the update is not immediately written to the binary log, which can lead to inconsistencies between master and slave. (Other combinations may hide a causal dependency, thus making it impossible to write statements updating non-transactional tables to the binary log in the correct order.)

    However, in some cases, this situation was not handled properly, and the determination whether a given statement was safe or not under these conditions was not always correct. In particular, a multi-table update that affected both transactional and non-transactional tables or a statement modifying data in a non-transactional table having a trigger that operated on a transactional table (or the reverse) was not determined to be unsafe when it should have been.

    With this fix, the following determinations regarding replication safety are made when combining updates to transactional and non-transactional tables within the same transaction in statement-based logging mode:

    1. Any statement modifying data in a non-transactional table within a given transaction is considered safe if it is issued prior to any data modification statement accessing a transactional table within the same transaction.

    2. A statement that updates transactional tables only is always considered safe.

    3. A statement affecting both transactional and non-transactional tables within a transaction is always considered unsafe. It is not necessary that both tables be modified for this to be true; for example, a statement such as INSERT INTO innodb_table SELECT * FROM myisam_table is also considered unsafe.

    Note

    The current fix is valid only when using statement-based logging mode; we plan to address similar issues occurring when using the MIXED or ROW format in a future MySQL release.

    (Bug#28976)

  • Stack overflow checking did not account for the size of the structure stored in the heap. (Bug#46807)

  • The server could crash for queries with the following elements: 1. An “impossible where” in the outermost SELECT; 2. An aggregate in the outermost SELECT; 3. A correlated subquery with a WHERE clause that includes an outer field reference as a top-level WHERE sargable predicate; (Bug#46749)

  • CREATE TABLE ... SELECT could cause assertion failure if a table already existed with the same name and contained an AUTO_INCREMENT column. (Bug#46616)

  • SHOW CREATE TRIGGER for a MERGE table trigger caused an assertion failure. (Bug#46614)

  • In queries for which the loose index scan access method was chosen, using a condition of the form col_name rather than the equivalent col_name <> 0 caused an assertion failure. (Bug#46607)

  • TRUNCATE TABLE for a table that was opened with HANDLER did not close the handler and left it in an inconsistent state that could lead to a server crash. Now TRUNCATE TABLE for a table closes all open handlers for the table. (Bug#46456)

  • A query containing a subquery in the FROM clause and PROCEDURE ANALYSE() caused a server crash. (Bug#46184)

    See also Bug#48293.

  • Killing a query that was performing a sort could result in a memory leak. (Bug#45962)

  • Truncation of DECIMAL values could lead to assertion failures; for example, when deducing the type of a table column from a literal DECIMAL value. (Bug#45261)

    See also Bug#48370.

  • A buffer overflow could occur during handling of IS NULL ranges. (Bug#37044)

  • mysqladmin --wait ping crashed on Windows systems. (Bug#35132)

  • Installation of MySQL on Windows would fail to set the correct location for the character set files, which could lead to mysqld and mysql failing to initialize properly. (Bug#17270)

C.1.9. Changes in MySQL 5.1.38 (01 September 2009)

InnoDB Plugin Notes:

  • As of MySQL 5.1.38, the InnoDB Plugin is included in MySQL 5.1 releases, in addition to the built-in version of InnoDB that has been included in previous releases. The version of the InnoDB Plugin in this release is 1.0.4 and is considered of Beta quality.

    The InnoDB Plugin offers new features, improved performance and scalability, enhanced reliability and new capabilities for flexibility and ease of use. Among the features of the InnoDB Plugin are “Fast index creation,” table and index compression, file format management, new INFORMATION_SCHEMA tables, capacity tuning, multiple background I/O threads, and group commit.

    For information about these features, see the InnoDB Plugin Manual at http://www.innodb.com/products/innodb_plugin/plugin-documentation. For general information about using InnoDB in MySQL, see Section 13.6, “The InnoDB Storage Engine”.

    The InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic Linux RPM packages.

    To use the InnoDB Plugin, you must disable the built-in version of InnoDB that is also included and instruct the server to use InnoDB Plugin instead. To accomplish this, use the following lines in your my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
    

    For the plugin-load option, innodb is the name to associate with the plugin and ha_innodb_plugin.so is the name of the shared object library that contains the plugin code. The extension of .so applies for Unix (and similar) systems. For HP-UX on HPPA (11.11) or Windows, the extension should be .sl or .dll, respectively, rather than .so.

    If the server has problems finding the plugin when it starts up, specify the pathname to the plugin directory. For example, if plugins are located in the lib/mysql/plugin directory under the MySQL installation directory and you have installed MySQL at /usr/local/mysql, use these lines in your my.cnf file:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
    plugin_dir=/usr/local/mysql/lib/mysql/plugin
    

    The previous examples show how to activate the storage engine part of InnoDB Plugin, but the plugin also implements several InnoDB-related INFORMATION_SCHEMA tables. (For information about these tables, see http://www.innodb.com/doc/innodb_plugin-1.0/innodb-information-schema.html.) To enable these tables, include additional name=library pairs in the value of the plugin-load option:

    [mysqld]
    ignore-builtin-innodb
    plugin-load=innodb=ha_innodb_plugin.so
      ;innodb_trx=ha_innodb_plugin.so
      ;innodb_locks=ha_innodb_plugin.so
      ;innodb_lock_waits=ha_innodb_plugin.so
      ;innodb_cmp=ha_innodb_plugin.so
      ;innodb_cmp_reset=ha_innodb_plugin.so
      ;innodb_cmpmem=ha_innodb_plugin.so
      ;innodb_cmpmem_reset=ha_innodb_plugin.so
    

    The plugin-load option value as shown here is formatted on multiple lines for display purposes but should be written in my.cnf using a single line without spaces in the option value. On Windows, substitute .dll for each instance of the .so extension.

    After the server starts, verify that InnoDB Plugin has been loaded by using the SHOW PLUGINS statement. For example, if you have loaded the storage engine and the INFORMATION_SCHEMA tables, the output should include lines similar to these:

    mysql> SHOW PLUGINS;
    +---------------------+--------+--------------------+---------------------...
    | Name                | Status | Type               | Library             ...
    +---------------------+--------+--------------------+---------------------...
    ...
    | InnoDB              | ACTIVE | STORAGE ENGINE     | ha_innodb_plugin.so ...
    | INNODB_TRX          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_LOCKS        | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_LOCK_WAITS   | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP          | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMP_RESET    | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM       | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
    +---------------------+--------+--------------------+---------------------...
    

    An alternative to using the plugin-load option at server startup is to use the INSTALL PLUGIN statement at runtime. First start the server with the ignore-builtin-innodb option to disable the built-in version of InnoDB:

    [mysqld]
    ignore-builtin-innodb
    

    Then issue an INSTALL PLUGIN statement for each plugin that you want to load:

    mysql> INSTALL PLUGIN InnoDB SONAME 'ha_innodb_plugin.so';
    mysql> INSTALL PLUGIN INNODB_TRX SONAME 'ha_innodb_plugin.so';
    mysql> INSTALL PLUGIN INNODB_LOCKS SONAME 'ha_innodb_plugin.so';
    ...
    

    INSTALL PLUGIN need be issued only once for each plugin. Installed plugins will be loaded automatically on subsequent server restarts.

    If you build MySQL from a source distribution, InnoDB Plugin is one of the storage engines that is built by default. Build MySQL the way you normally do; for example, by using the instructions at Section 2.3, “MySQL Installation Using a Source Distribution”. After the build completes, you should find the plugin shared object file under the storage/innodb_plugin directory, and make install should install it in the plugin directory. Configure MySQL to use InnoDB Plugin as described earlier for binary distributions.

    If you use gcc, InnoDB Plugin cannot be compiled with gcc 3.x; you must use gcc 4.x instead.

    Note

    In MySQL 5.4, the InnoDB Plugin is also included, but it becomes the built-in version of InnoDB in MySQL Server, replacing the version previously included as the built-in InnoDB engine. This means that if you use InnoDB Plugin in MySQL 5.1 using the instructions just given, you will need to remove ignore-builtin-innodb and plugin-load from your startup options after an upgrade to MySQL 5.4 or the server will fail to start.

Functionality added or changed:

  • Replication: With statement-based logging (SBL), repeatedly calling statements that are unsafe for SBL caused a warning message to be written to the error log for each statement, and there was no way to disable this behavior. Now the server logs messages about statements that are unsafe for statement-based logging only if the log_warnings variable is greater than 0. (Bug#46265)

  • The undocumented TRANSACTIONAL and PAGE_CHECKSUM keywords were removed from the grammar. (Bug#45829)

  • Previously, mysqldump would not dump the INFORMATION_SCHEMA database and ignored it if it was named on the command line. Now, mysqldump will dump INFORMATION_SCHEMA if it is named on the command line. Currently, this requires that the --skip-lock-tables (or --skip-opt) option be given. (Bug#33762)

  • Previously, SELECT ... INTO OUTFILE dumped column values without character set conversion, which could produce data files that cannot be imported without error if different columns used different character sets. A consequence of this is that mysqldump ignored the --default-character-set option if the --tab option was given (which causes SELECT ... INTO OUTFILE to be used to dump data.)

    INTO OUTFILE now can be followed by a CHARACTER SET clause indicating the character set to which dumped values should be converted. Also, mysqldump adds a CHARACTER SET clause to the SELECT ... INTO OUTFILE statement used to dump data, so that --default-character-set is no longer ignored if --tab is given.

    Other changes are that SELECT ... INTO OUTFILE enforces that ENCLOSED BY and ESCAPED BY arguments must be a single character, and SELECT ... INTO OUTFILE and LOAD DATA INFILE produce warnings if non-ASCII field or line separators are specified. (Bug#30946)

  • Pluggable storage engines now can be built for Windows.

  • The MySQL euckr character set now can store extended codes [81...FE][41..5A,61..7A,81..FE], which makes euckr compatible with the Microsoft cp949 character set.

Bugs fixed:

  • Performance: The table cache lock (LOCK_open) is now an adaptive mutex, which should improve performance in workloads where this lock is heavily contended. (Bug#43435)

  • Partitioning: Attempting to create a table using an invalid or inconsistent subpartition definition caused the server to crash. An example of such a statement is shown here:

    CREATE TABLE t2 (s1 INT, s2 INT)
    PARTITION BY LIST (s1) SUBPARTITION BY HASH (s2) SUBPARTITIONS 1
    (
        PARTITION p1 VALUES IN (1),
        PARTITION p2 VALUES IN (2) (SUBPARTITION p3)  
    );
    

    (Bug#46354)

  • Partitioning: When using a debug build of MySQL, if a query against a partitioned table having an index on one or more DOUBLE columns used that index, the server failed with an assertion. (Bug#45816)

  • Partitioning: A failed RENAME TABLE operation on a table with user-defined partitioning left the table in an unusable state, due to only some of the table files having been renamed. (Bug#30102)

  • Replication: When a statement that changes a non-transactional table failed, the transactional cache was flushed, causing a mismatch between the execution and logging histories. Now we avoid flushing the transactional cache unless a COMMIT or ROLLBACK is issued. (Bug#46129)

  • Replication: The internal function get_master_version_and_clock() (defined in sql/slave.cc) ignored errors and passed directly when queries failed, or when queries succeeded but the result retrieved was empty. Now this function tries to reconnect the master if a query fails due to transient network problems, and to fail otherwise. The I/O thread now prints a warning if the same system variables do not exist on master (in the event the master is a very old version of MySQL, compared to the slave.) (Bug#45214)

  • Replication: When using the MIXED logging format, after creating a temporary table and performing an update that switched the logging format to ROW, the format switch persisted following the update. This prevented any subsequent DDL statements on temporary tables from being written to the binary log until the temporary table was dropped. (Bug#43046)

    See also Bug#40013.

    This regression was introduced by Bug#20499.

  • Replication: If the --log-bin-trust-function-creators option is not enabled, CREATE FUNCTION requires one of the modifiers DETERMINISTIC, NO SQL, or READS SQL DATA. When using statement-based mode, the execution of a stored function should follow the same rules; however, only functions defined with DETERMINISTIC could actually be executed. In addition, the wrong error was generated (ER_BINLOG_ROW_RBR_TO_SBR instead of ER_BINLOG_UNSAFE_ROUTINE).

    Now execution of stored functions is compatible with creation in this regard; when a stored function without one of the modifiers above is executed in STATEMENT mode, the correct error is raised, and functions defined using NO SQL, READS SQL DATA, or both (that is, without using DETERMINISTIC) can be excuted. (Bug#41166)

  • The test suite was missing from RPM packages. (Bug#46834)

  • Incorrect index optimization could lead to incorrect results or server crashes. (Bug#46454)

  • The server printed warnings at startup about adjusting the value of the max_join_size system variable. (These were harmless, but might be seen by users as significant.) (Bug#46385)

  • mysql did not handle backspace properly for multi-byte characters. This has been fixed now if mysql is linked with the readline library. It is not fixed if mysql is linked with libedit, which does not contain the necessary support for multi-byte character sets. (Bug#46310)

  • After an error such as a table-full condition, INSERT IGNORE could cause an assertion failure for debug builds. (Bug#46075)

  • An optimization that moved an item from a subquery to an outer query could cause a server crash. (Bug#46051)

  • Several Valgrind warnings were corrected. (Bug#46003, Bug#46034, Bug#46042)

  • CREATE TABLE ... SELECT could cause a server crash if no default database was selected. (Bug#45998)

  • The MySQL Server crashed when performing a REPLACE into a MERGE table if there was a duplicate. (Bug#45800)

  • An infinite hang and 100% CPU usage occurred after handler tried to open a merge table.

    If the command mysqladmin shutdown was executed during the hang, the debug server generated the following assert:

    mysqld: table.cc:407: void free_table_share(TABLE_SHARE*): Assertion `share->ref_count ==
    0' failed.
    090610 14:54:04 - mysqld got signal 6 ;
    

    (Bug#45781)

  • For problems reading SSL files during SSL initialization, the server wrote error messages to stderr rather than to the error log. (Bug#45770)

  • The vendor name change from MySQL AB to Sun Microsystems, Inc. in RPM packages was not handled gracefully when upgrading MySQL using an RPM package. (Bug#45534)

  • A Windows Installation using the GUI installer would fail with:

    MySQL Server 5.1 Setup Wizard ended prematurely
    
    The wizard was interrupted before MySQL Server 5.1. could be completely installed.
    
    Your system has not been modified. To complete installation at another time, please run
    setup again.
    
    Click Finish to exit the wizard

    This was due to an step in the MSI installer that could fail to execute correctly on some environments. (Bug#45418)

  • Invalid memory reads could occur using the compressed client/server protocol. (Bug#45031)

  • The mysql_real_connect() C API function only attempted to connect to the first IP address returned for a hostname. This could be a problem if a hostname mapped to multiple IP address and the server was not bound to the first one returned. Now mysql_real_connect() attempts to connect to all IPv4 or IPv6 addresses that a domain name maps to. (Bug#45017)

    See also Bug#47757.

  • Invalid input could cause invalid memory reads by the parser. (Bug#45010)

  • Some files in an AIX tar file distribution unpacked with incorrect permissions. (Bug#44647)

  • For debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug#44521)

  • Using mysql_stmt_execute() to call a stored procedure could cause a server crash. (Bug#44495)

  • Creating a new instance after previously removing an instance would fail to complete the installation properly because the security settings could not be applied correctly. (Bug#44428)

  • mysqlslap ignored the --csv option if it was given without an argument. (Bug#44412)

  • Enabling the event scheduler from within the file specified by --init-file caused a server crash. (Bug#43587)

  • The server did not always check the return value of calls to the hash_init() function. (Bug#43572)

  • mysqladmin --count=X --sleep=Y incorrectly delayed Y seconds after the last iteration before exiting. (Bug#42639)

  • A test for stack growth failed on some platforms, leading to server crashes. (Bug#42213)

  • mysqladmin did not have enough space allocated for tracking all variables when using --vertical or --relative with extended-status. (Bug#40395)

  • Partitioning a log table caused a server crash. (Bug#40281)

  • When using quick access methods to search for rows in UPDATE and DELETE statements, there was no check whether a fatal error had already been sent to the client while evaluating the quick condition. Consequently, a false OK (following the error) was sent to the client, causing the error to be incorrectly transformed into a warning. (Bug#40113)

  • SHOW PROCESSLIST could access freed memory of a stored procedure run in a concurrent session. (Bug#38816)

  • During installation on Windows, the MySQL Instance Configuration Wizard window could be opened at a size too small to be usable. (Bug#38723)

  • make_binary_distribution did not always generate correct distribution names. (Bug#37808)

  • The server crashed when executing a prepared statement containing a duplicated MATCH() function call in the select list and ORDER BY clause; for example, SELECT MATCH(a) AGAINST('test') FROM t1 ORDER BY MATCH(a) AGAINST('test'). (Bug#37740)

  • The output of mysqldump --tab for views included a DROP TABLE statement without the IF EXISTS qualifier. (Bug#37377)

  • mysql_upgrade silently ignored the --basedir and --datadir options, which it accepts for backward compatibility. Now it prints a warning. (Bug#36558)

  • mysqlimport was not always compiled correctly to enable thread support, which is required for the --use-threads option. (Bug#32991)

  • mysqlcheck failed to fix table names when the --fix-table-names and --all-in-1 options were both specified. (Bug#31821)

  • If the MySQL server was killed without the PID file being removed, attempts to stop the server with mysql.server stop waited 900 seconds before giving up. (Bug#31785)

  • When performing an installation on Windows using the GUI installer, the installer would fail to wait long enough during installation for the MySQL service to be installed, which would cause the installation to fail and may cause security settings, such as the root password to not be applied correctly. (Bug#30525)

  • mysql included extra spaces at the end of some result set lines. (Bug#29622)

  • The mysql client inconsistently handled NUL bytes in column data in various output formats. (Bug#28203)

  • mysqlimport did not correctly quote and escape table identifiers and file names. (Bug#28071)

  • When installing the Windows service, using quotes around command-line configuration parameters could cause the quotes to incorrectly placed around the entire command-line option, and not just the value. (Bug#27535)

  • If the mysql client was built with the readline library and the .inputrc file mapped Space to the magic-space function, it became impossible to enter spaces. (Bug#27439)

  • If InnoDB reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#18828)

    See also Bug#46672.

C.1.10. Release Notes for MySQL Enterprise 5.1.37sp1 [QSP] (10 October 2009)

This is a Service Pack release of the MySQL Enterprise Server 5.1.

Bugs fixed:

  • The test suite was missing from RPM packages. (Bug#46834)

  • The server could crash for queries with the following elements: 1. An “impossible where” in the outermost SELECT; 2. An aggregate in the outermost SELECT; 3. A correlated subquery with a WHERE clause that includes an outer field reference as a top-level WHERE sargable predicate; (Bug#46749)

  • SHOW CREATE TRIGGER for a MERGE table trigger caused an assertion failure. (Bug#46614)

  • Incorrect index optimization could lead to incorrect results or server crashes. (Bug#46454)

  • A query containing a subquery in the FROM clause and PROCEDURE ANALYSE() caused a server crash. (Bug#46184)

    See also Bug#48293.

  • CREATE TABLE ... SELECT could cause a server crash if no default database was selected. (Bug#45998)

  • A Windows Installation using the GUI installer would fail with:

    MySQL Server 5.1 Setup Wizard ended prematurely
    
    The wizard was interrupted before MySQL Server 5.1. could be completely installed.
    
    Your system has not been modified. To complete installation at another time, please run
    setup again.
    
    Click Finish to exit the wizard

    This was due to an step in the MSI installer that could fail to execute correctly on some environments. (Bug#45418)

  • For debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug#44521)

  • Using mysql_stmt_execute() to call a stored procedure could cause a server crash. (Bug#44495)

C.1.11. Changes in MySQL 5.1.37 (13 July 2009)

Functionality added or changed:

Bugs fixed:

  • Performance: With InnoDB tables, MySQL used a less-selective secondary index to avoid a filesort even if a prefix of the primary key was much more selective.

    The fix for this problem might cause other queries to run more slowly. (Bug#45828)

  • Partitioning: Security Fix: Accessing a table having user-defined partitioning when the server SQL mode included ONLY_FULL_GROUP_BY caused the MySQL server to crash. For example, the following sequence of statements crashed the server:

    DROP TABLE IF EXISTS t1;
    
    SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
    
    CREATE TABLE t1 (id INT, KEY(id))
        PARTITION BY HASH(id) PARTITIONS 2;
    

    (Bug#45807)

  • Security Fix: The strxnmov() library function could write a null byte after the end of the destination buffer. (Bug#44834)

  • Important Change: Replication: When using STATEMENT or MIXED binary logging format, a statement that changes both non-transactional and transactional tables must be written to the binary log whenever there are changes to non-transactional tables. This means that the statement goes into the binary log even when the changes to the transactional tables fail. In particular, in the event of a failure such statement is annotated with the error number and wrapped inside a pair of BEGIN and ROLLBACK statements.

    On the slave, while applying the statement, it is expected that the same failure and the rollback prevent the transactional changes from persisting. However, statements that fail due to concurrency issues such as deadlocks and timeouts are logged in the same way, causing the slave to stop since the statements are applied sequentially by the SQL thread.

    To address this issue, we ignore concurrency failures on the slave. Specifically, the following failures are now ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK, and ER_XA_RBDEADLOCK. (Bug#44581)

  • Partitioning: Truncating a partitioned MyISAM table did not reset the AUTO_INCREMENT value. (Bug#35111)

  • Replication: The SHOW SLAVE STATUS connection thread competed with the slave SQL thread for use of the error message buffer. As a result, the connection thread sometimes received incomplete messages. This issue was uncovered with valgrind when message strings were passed without NULL terminators, causing the error Conditional jump or move depends on uninitialised value(s). (Bug#45511)

    See also Bug#43076.

  • Replication: For replication of a stored procedure that uses the gbk character set, the result on the master and slave differed. (Bug#45485)

  • Replication: The internal function purge_relay_logs() did not propagate an error occurring in another internal function count_relay_log_space(). (Bug#44115)

  • Replication: Large transactions and statements could corrupt the binary log if the size of the cache (as set by max_binlog_cache_size) was not large enough to store the changes.

    Now, for transactions that do not fit into the cache, the statement is not logged, and the statement generates an error instead.

    For non-transactional changes that do not fit into the cache, the statement is also not logged — an incident event is logged after committing or rolling back any pending transaction, and the statement then raises an error.

    Note

    If a failure occurs before the incident event is written the binary log, the slave does not stop, and the master does not report any errors.

    (Bug#43929)

    See also Bug#37148.

  • Replication: The --database option for mysqlbinlog was ignored when using the row-based logging format. (Bug#42941)

  • Replication: Statements using LIMIT generated spurious Statement is not safe to log in statement format warnings in the error log, causing the log to grow rapidly in size. (Bug#42851)

    See also Bug#46265, Bug#42415.

    This regression was introduced by Bug#34768.

  • Replication: Shutting down the slave while executing FLUSH LOGS, CHANGE MASTER TO, or STOP SLAVE could sometimes cause it to crash. (Bug#38240)

  • Replication: When reading a binary log that was in use by a master or that had not been properly closed (possibly due to a crash), the following message was printed: Warning: this binlog was not closed properly. Most probably mysqld crashed writing it. This message did not take into account the possibility that the file was merely in use by the master, which caused some users concern who were not aware that this could happen.

    To make this clear, the original message has been replaced with Warning: this binlog is either is use or was not closed properly. (Bug#34687)

  • The server crashed if evaluation of GROUP_CONCAT(... ORDER BY) required allocation of a sort buffer but allocation failed. (Bug#46080)

  • When creating tables using the IBMDB2I storage engine with the ibmdb2i_create_index_option option set to 1, creating an IBMDB2I table with a primary key should produce an additional index that uses EBCDIC hexadecimal sorting, but this index was not created. (Bug#45983)

  • The server crashed for attempts to use REPLACE or INSERT ... ON DUPLICATE KEY UPDATE with a view defined using a join. (Bug#45806)

  • Some collations were causing IBMDB2I to report inaccurate key range estimations to the optimizer for LIKE clauses that select substrings. This can be seen by running EXPLAIN. This problem primarily affects multi-byte and unicode character sets. (Bug#45803)

  • Invalid memory reads and writes were generated when altering merge and base tables. This could lead to a crash or Valgrind errors:

    ==28038== Invalid write of size 1
    at: memset (mc_replace_strmem.c:479)
    by: myrg_attach_children (myrg_open.c:433)
    by: ha_myisammrg::attach_children() (ha_myisammrg.cc:546)
    by: ha_myisammrg::extra(ha_extra_function) (ha_myisammrg.cc:944)
    by: attach_merge_children(TABLE_LIST*) (sql_base.cc:4147)
    by: open_tables(THD*, TABLE_LIST**, unsigned*, unsigned) (sql_base.cc:4709)
    by: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool) (sql_base.cc:4977)
    by: open_n_lock_single_table (mysql_priv.h:1550)
    by: mysql_alter_table(sql_table.cc:6428)
    by: mysql_execute_command(THD*) (sql_parse.cc:2860)
    by: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5933)
    by: dispatch_command (sql_parse.cc:1213)

    (Bug#45796)

  • Inserting data into a table using the macce character set with the IBMDB2I storage engine would fail. (Bug#45793)

  • There was a race condition when changing innodb_commit_concurrency at runtime to the value DEFAULT. (Bug#45749)

    See also Bug#42101.

  • Performing an empty XA transaction caused the server to crash for the next XA transaction. (Bug#45548)

  • SHOW CREATE TRIGGER requires the TRIGGER privilege but was not checking privileges. (Bug#45412)

  • An assertion failure could occur if InnoDB tried to unlock a record when the clustered index record was unknown. (Bug#45357)

  • --enable-plugin_name options (for example, --enable-innodb) did not work correctly. (Bug#45336)

    See also Bug#19027.

  • If autocommit was enabled, InnoDB did not roll back DELETE or UPDATE statements if the statement was killed. (Bug#45309)

  • The optimizer mishandled “impossible range” conditions and returned empty results due to an uninitialized variable. (Bug#45266)

  • Use of DECIMAL constants with more than 65 digits in CREATE TABLE ... SELECT statements led to spurious errors or assertion failures. (Bug#45262)

  • The mysql client could misinterpret some character sequences as commands under some circumstances. (Bug#45236)

  • Use of CONVERT() with an empty SET value could cause an assertion failure. (Bug#45168)

  • InnoDB recovery could hang due to redo logging of doublewrite buffer pages. (Bug#45097)

  • When reading binary data, the concatenation function for geometry data collections did not rigorously check for available data, leading to invalid reads and server crashes. (Bug#44684)

  • If an error occurred during the creation of a table (for example, the table already existed) having an AUTO_INCREMENT column and a BEFORE trigger that used the INSERT ... SELECT construct, an internal flag was not reset properly. This led to a crash the next time the table was opened again. (Bug#44653)

  • configure.in contained references to literal instances of nm and libc, rather than to variables parameterized for the proper values on the current platform. (Bug#42721)

  • configure.in did not properly check for the pthread_setschedprio() function. (Bug#42599)

  • SHOW ERRORS returned an empty result set after an attempt to drop a nonexistent table. (Bug#42364)

  • A workaround for a Sun Studio bug was instituted. (Bug#41710)

  • For queries with a sufficient number of subqueries in the FROM clause of this form:

    SELECT * FROM (SELECT 1) AS t1,
                  (SELECT 2) AS t2,
                  (SELECT 3) AS t3, ...
    

    The query failed with a Too high level of nesting for select error, as though the query had this form:

    SELECT * FROM (SELECT 1 FROM (SELECT 2 FROM (SELECT 3 FROM ...
    

    (Bug#41156)

  • Some UPDATE statements that affected no rows returned a rows-affected count of one. (Bug#40565)

  • Valgrind warnings that occurred for SHOW TABLE STATUS with InnoDB tables were silenced. (Bug#38479)

  • In the mysql client, if the server connection was lost during repeated status commands, the client would fail to detect this and command output would be inconsistent. (Bug#37274)

  • A Valgrind error during subquery execution was corrected. (Bug#36995)

  • When invoked to start multiple server instances, mysqld_multi sometimes would fail to start them all due to not changing location into the base directory for each instance. (Bug#36654)

  • Rows written to the slow query log could have an indeterminate Rows_examined value due to improper initialization. (Bug#34002)

  • Renaming a column that appeared in a foreign key definition did not update the foreign key definition with the new column name. (Bug#21704)

C.1.12. Changes in MySQL 5.1.36 (16 June 2009)

Functionality added or changed:

  • Important Change: Replication: Previously, incident log events were represented as comments in the output from mysqlbinlog, making them effectively silent when playing back the binlog.

    (An incident log event represents an incident that could cause the contents of the database to change without that event being recorded in the binary log.)

    This meant that, if the SQL were applied to a server, it could potentially lead to the master and the slave having different data. To make it possible to handle incident log events without breaking applications that expect the previous behavior, the nonsense statement RELOAD DATABASE is added to the SQL output for that incident log event, which causes an error.

    To use this functionality currently requires hand editing of the dump file and handling of each case on an individual basis by a database administrator before applying the output to a server. (Bug#44442)

  • mysql_upgrade now displays a message indicating the connection parameters it uses when invoking mysqlcheck. (Bug#44638)

  • The time zone tables for Windows available at http://dev.mysql.com/downloads/timezones.html have been updated. (Bug#39923)

  • The mysqltest program now has a move_file from_file to_file command for renaming files. This should be used in test cases rather than invoking an external command that might be platform specific. (Bug#39542)

  • The maximum value for max_binlog_cache_size has been increased from 232 – 1 to 264 – 1 (even on 32-bit platforms), which enables transactions 4GB and larger to be performed when binary logging is enabled. (Bug#10206)

Bugs fixed:

  • Performance: The InnoDB adaptive hash latch is released (if held) for several potentially long-running operations. This improves throughput for other queries if the current query is removing a temporary table, changing a temporary table from memory to disk, using CREATE TABLE ... SELECT, or performing a MyISAM repair on a table used within a transaction. (Bug#32149)

  • Security Fix: The server crashed if an account with the CREATE ROUTINE privilege but not the EXECUTE privilege attempted to create a stored procedure. (Bug#44798)

  • Security Fix: The server crashed if an account without the proper privileges attempted to create a stored procedure. (Bug#44658)

  • Security Fix: Four potential format string vulnerabilities were fixed (discovered by the Veracode code analysis). (Bug#44166)

  • Incompatible Change: The server can load plugins under the control of startup options. For example, many storage engines can be built in pluggable form and loaded when the server starts. In the following descriptions, plugin_name stands for a plugin name such as innodb.

    Previously, plugin options were handled like other boolean options (see Section 4.2.3.2, “Program Option Modifiers”). That is, any of these options enabled the plugin:

    --plugin_name
    --plugin_name=1
    --enable-plugin_name
    

    And these options disabled the plugin:

    --plugin_name=0
    --disable-plugin_name
    --skip-plugin_name
    

    However, use of a boolean option for plugin loading did not provide control over what to do if the plugin failed to start properly: Should the server exit, or start with the plugin disabled? The actual behavior has been that the server starts with the plugin disabled, which can be problematic. For example, if InnoDB fails to start, existing InnoDB tables become inaccessible, and attempts to create new InnoDB tables result in tables that use the default storage engine unless the NO_ENGINE_SUBSTITUTION SQL mode has been enabled to cause an error to occur instead.

    Now, there is a change in the options used to control plugin loading, such that they have a tristate format:

    • --plugin_name=OFF

      Do not enable the plugin.

    • --plugin_name[=ON]

      Enable the plugin. If plugin initialization fails, start the server anyway, but with the plugin disabled. Specifying the option as --plugin_name without a value also enables the plugin.

    • --plugin_name=FORCE

      Enable the plugin. If plugin initialization fails, do not start the server. In other words, force the server to run with the plugin or not at all.

    The values OFF, ON, and FORCE are not case sensitive.

    Suppose that CSV and InnoDB have been built as pluggable storage engines and that you want the server to load them at startup, subject to these conditions: The server is allowed to run if CSV initialization fails, but must require that InnoDB initialization succeed. To accomplish that, use these lines in an option file:

    [mysqld]
    csv=ON
    innodb=FORCE
    

    This change is incompatible with the previous implementation if you used options of the form --plugin_name=0 or --plugin_name=1, which should be changed to --plugin_name=OFF or --plugin_name=ON, respectively.

    --enable-plugin_name is still supported and is the same as --plugin_name=ON. --disable-plugin_name and --skip-plugin_name are still supported and are the same as --plugin_name=OFF. (Bug#19027)

    See also Bug#45336.

  • Important Change: Replication: BEGIN, COMMIT, and ROLLBACK statements are no longer affected by --replicate-do-db or --replicate-ignore-db rules. (Bug#43263)

  • Partitioning: Queries using DISTINCT on multiple columns or GROUP BY on multiple columns did not return correct results with partitioned tables. (Bug#44821)

    See also Bug#41136.

  • Replication: When using row-based logging, the length of an event for which the field metadata exceeded 255 bytes in size was incorrectly calculated. This could lead to corruption of the binary log, or cause the server to hang. (Bug#42749)

    See also Bug#44548, Bug#44672, Bug#44752.

  • Replication: The warning Statement is not safe to log in statement format, issued in situations when it cannot be determined that a statement or other database event can be written reliably to the binary log using the statement-based format, has been changed to Statement may not be safe to log in statement format. (Bug#42415)

  • Replication: The Query_log_event used by replication to transfer a query to the slave has been refactored. Query_log_event also stores and sends the error code resulting from the execution since it, in some cases, is necessary to execute the statement on the slave as well, which should result in the same error code. The Query_log_event constructor previously worked out for itself the error code using a complex routine, the result of which was often set aside within the constructor itself. This was also involved with at least 2 known bugs relating to invalid errors, and taken as a clear sign that the constructor was not well-designed and needed to be re-written. (Bug#41948)

    See also Bug#37145.

  • Replication: When stopping and restarting the slave while it was replicating temporary tables, the slave server could crash or raise an assertion failure. This was due to the fact that, although temporary tables were saved between slave thread restarts, the reference to the thread being used (table->in_use) was not being properly updated when restarting, continuing to reference the old thread instead of the new one. This issue affected statement-based replication only. (Bug#41725)

  • The combination of MIN() or MAX() in the select list with WHERE and GROUP BY clauses could lead to incorrect results. (Bug#45386)

  • Linker failures with libmysqld on VC++ 2008 were fixed. (Bug#45326)

  • Compiler warnings on Mac OS X were fixed. (Bug#45286)

  • Running a SELECT query over an IBMDB2I table using the cp1250 character set would produce an error

    ibmdb2i error 2027: Error converting single-byte sort sequence to UCS-2 

    (Bug#45197)

  • Use of ROUND() on a LONGTEXT or LONGBLOB column of a derived table could cause a server crash. (Bug#45152)

  • DROP USER could fail to drop all privileges for an account if the PAD_CHAR_TO_FULL_LENGTH SQL mode was enabled. (Bug#45100)

  • GROUP BY on a constant (single-row) InnoDB table joined to other tables caused a server crash. (Bug#44886)

  • ALTER TABLE on a view crashed the server. (Bug#44860)

  • When using partitioning with the IBMDB2I storage engine, the engine could report that a valid character set was not supported. (Bug#44856)

  • Running queries on tables with the IBMDB2I storage engine using the utf8 character would fail when using the 64-bit version of MySQL. (Bug#44811)

  • Index Merge followed by a filesort could result in a server crash if sort_buffer_size was not large enough for all sort keys. (Bug#44810)

    See also Bug#40974.

  • UNCOMPRESSED_LENGTH() returned a garbage result when passed a string shorter than 5 bytes. Now UNCOMPRESSED_LENGTH() returns NULL and generates a warning. (Bug#44796)

  • Several Valgrind warnings were silenced. (Bug#44774, Bug#44792)

  • Selecting RAND(N) function where N is a column of a constant table (table with a single row) failed with a SIGFPE signal. (Bug#44768)

  • The PASSWORD() and OLD_PASSWORD() functions could read memory outside of an internal buffer when used with BLOB arguments. (Bug#44767)

  • Conversion of a string to a different character set could use the same buffer for input and output, leading to incorrect results or warnings. (Bug#44743, Bug#44766)

  • mysqld_safe could fail to find the logger program. (Bug#44736)

  • Code that optimized a read-only XA transaction failed to reset the XID once the transaction was no longer active. (Bug#44672)

  • A Valgrind warning related to transaction processing was silenced. (Bug#44664)

  • Some Perl scripts in AIX packages contained an incorrect path to the perl executable. (Bug#44643)

  • When creating tables using the IBMDB2I storage engine, the RCDFMT (record format) that would be applied to the corresponding files within the IBM i would be set according to the table name. During whole table operations, the name could get modified to a value inconsistent with the table name. In addition, the record format would be inconsistent compared to the file content. The IBMDB2I storage engine now adds an explicit RCDFMT clause to the CREATE TABLE statement passed down to the DB2 storage engine layer. (Bug#44610)

  • innochecksum could incorrectly determine the input file name from the arguments. (Bug#44484)

  • Incorrect time was reported at the end of mysqldump output. (Bug#44424)

  • Caching of GROUP BY expressions could lead to mismatches between compile-time and runtime calculations and cause a server crash. (Bug#44399)

  • Lettercase conversion in multibyte cp932 or sjis character sequences could produce incorrect results. (Bug#44352)

  • InnoDB was missing DB_ROLL_PTR information in Table Monitor COLUMNS output. (Bug#44320)

  • Assertion failure could occur for duplicate-key errors in INSERT INTO ... SELECT statements. (Bug#44306)

  • Trying to use an unsupported character set on an IBMDB2I table would produce DB2 error 2501 or 2511. The error has been updated to produce Error 2504 (Character set is unsupported). (Bug#44232)

  • On 64-bit Windows systems, myisamchk did not handle key_buffer_size values larger than 4GB. (Bug#43940)

  • For user-defined utf8 collations, attempts to store values too long for a column could cause a server crash. (Bug#43827)

  • Invalidation of query cache entries due to table modifications could cause threads to hang inside the query cache with state “freeing items”. (Bug#43758)

  • EXPLAIN EXTENDED could crash for UNION queries in which the last SELECT was not parenthesized and included an ORDER BY clause. (Bug#43612)

  • Multiple-table updates for InnoDB tables could produce unexpected results. (Bug#43580)

  • If the client lost the connection to the MySQL server after mysql_stmt_prepare(), the first call to mysql_stmt_execute() returned an error (as expected) but consecutive calls to mysql_stmt_execute() or mysql_stmt_close() crashed the client. (Bug#43560)

  • For DELETE statements with ORDER BY var, where var was a global system variable with a NULL value, the server could crash. (Bug#42778)

  • Builds linked against OpenSSL had a memory leak in association with use of X509 certificates. (Bug#42158)

  • There was a race condition when changing innodb_commit_concurrency at runtime from zero to nonzero or from nonzero to zero. Now this variable cannot be changed at runtime from zero to nonzero or vice versa. The value can still be changed from one nonzero value to another. (Bug#42101)

    See also Bug#45749.

  • SELECT ... INTO @var could produce values different from SELECT ... without the INTO clause. (Bug#42009)

  • mysql_zap did not work on Mac OS X. (Bug#41883)

  • A crash occurred due to a race condition between the merge table and table_cache evictions.

    00000001403C452F    mysqld.exe!memcpy()[memcpy.asm:151]
    00000001402A275F    mysqld.exe!ha_myisammrg::info()[ha_myisammrg.cc:854]
    00000001402A2471    mysqld.exe!ha_myisammrg::attach_children()[ha_myisammrg.cc:488]
    00000001402A2788    mysqld.exe!ha_myisammrg::extra()[ha_myisammrg.cc:863]
    000000014015FC5D    mysqld.exe!attach_merge_children()[sql_base.cc:4135]
    000000014016A4C1    mysqld.exe!open_tables()[sql_base.cc:4697]
    000000014016A898    mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:4956]
    000000014018BB54    mysqld.exe!mysql_insert()[sql_insert.cc:613]
    000000014019EDD3    mysqld.exe!mysql_execute_command()[sql_parse.cc:3066]
    00000001401A2F06    mysqld.exe!mysql_parse()[sql_parse.cc:5791]
    00000001401A3C1A    mysqld.exe!dispatch_command()[sql_parse.cc:1202]
    00000001401A4CD7    mysqld.exe!do_command()[sql_parse.cc:857]
    0000000140246327    mysqld.exe!handle_one_connection()[sql_connect.cc:1115]
    00000001402B82C5    mysqld.exe!pthread_start()[my_winthread.c:85]
    00000001403CAC37    mysqld.exe!_callthreadstart()[thread.c:295]
    00000001403CAD05    mysqld.exe!_threadstart()[thread.c:275]
    0000000077D6B69A    kernel32.dll!BaseThreadStart()
    Trying to get some variables.
    Some pointers may be invalid and cause the dump to abort...

    (Bug#41212)

  • Shared-memory connections did not work in Vista if mysqld was started from the command line. (Bug#41190)

  • For views created with a column list clause, column aliases were not substituted when selecting through the view using a HAVING clause. (Bug#40825)

  • A multiple-table DELETE involving a table self-join could cause a server crash. (Bug#39918)

  • Creating an InnoDB table with a comment containing a '#' character caused foreign key constraints to be omitted. (Bug#39793)

  • ALTER TABLE neglected to preserve ROW_FORMAT information from the original table, which could cause subsequent ALTER TABLE and OPTIMIZE TABLE statements to lose the row format for InnoDB tables. (Bug#39200)

  • The mysql option --ignore-spaces was nonfunctional. (Bug#39101)

  • If a query was such as to produce the error 1054 Unknown column '...' in 'field list', using EXPLAIN EXTENDED with the query could cause a server crash. (Bug#37362)

  • In the mysql client, using a default character set of binary caused internal commands such as DELIMITER to become case sensitive. (Bug#37268)

  • mysqldump --tab dumped triggers to stdout rather than to the .sql file for the corresponding table. (Bug#34861)

  • If the MYSQL_HISTFILE environment variable was set to /dev/null, the mysql client overwrote the /dev/null device file as a normal file. (Bug#34224)

  • mysqld_safe mishandled certain parameters if they contained spaces. (Bug#33685)

  • mysqladmin kill did not work for thread IDs larger than 32 bits. (Bug#32457)

  • Several client programs failed to interpret --skip-password as “send no password.” (Bug#28479)

  • Output from mysql --html did not encode the <, >, or & characters. (Bug#27884)

  • mysql_convert_table_format did not prevent conversion of tables to MEMORY or BLACKHOLE tables, which could result in data loss. (Bug#27149)

C.1.13. Changes in MySQL 5.1.35 (13 May 2009)

Windows Notes:

  • This release of MySQL has two known outstanding issues for Windows:

    • The .msi installer does not detect an existing root password on the initial configuration attempt. To work around this, install and configure MySQL as normal, but skip any changes to security. (There is a checkbox that allows this on the security screen of the configuration wizard.) Then check your settings:

      • If the old root password and security settings are okay, you are done and can proceed to use MySQL.

      • Otherwise, reconfigure with the wizard and make any changes on the second configuration attempt. The wizard will properly prompt for the existing root password and allow changes to be made.

      This issue has been filed as Bug#45200 for correction in a future release.

    • The Windows configuration wizard allows changes to InnoDB settings during a reconfiguration operation. For an upgrade, this may cause difficulties. To work around this, use one of the following alternatives:

      • Do not change InnoDB settings.

      • Copy files from the old InnoDB location to the new one.

      This issue has been filed as Bug#45201 for correction in a future release.

Bugs fixed:

  • Performance: InnoDB uses random numbers to generate dives into indexes for calculating index cardinality. However, under certain conditions, the algorithm did not generate random numbers, so ANALYZE TABLE did not update cardinality estimates properly. A new algorithm has been introduced with better randomization properties, together with a system variable, innodb_use_legacy_cardinality_algorithm, that controls which algorithm to use. The default value of the variable is 1 (ON), to use the original algorithm for compatibility with existing applications. The variable can be set to 0 (OFF) to use the new algorithm with improved randomness. (Bug#43660)

  • Performance: If the character set for a column being compared was neither the default server character set nor latin1, InnoDB was slower than necessary due to excessive contention for a character set mutex.

    As a workaround for earlier versions, set the default server character set to the character set other than latin1 that is most often used in indexed columns. (Bug#42649)

  • Important Change: Replication: The transactional behavior of STOP SLAVE has changed. Formerly, it took effect immediately, even inside a transaction; now, it waits until the current replication event group (if any) has finished executing, or until the user issues a KILL QUERY or KILL CONNECTION statement.

    This was done in order to solve the problem encountered when replication was stopped while a nontransactional slave was replicating a transaction on the master. (It was impossible to roll back a mixed-engines transaction when one of the engines was nontransactional, which meant that the slave could not safely re-apply any transaction that had been interrupted by STOP SLAVE.) (Bug#319, Bug#38205)

    See also Bug#43217.

  • Partitioning: When a value was equal to a PARTITION ... VALUES LESS THAN (value) value other than MAXVALUE, the corresponding partition was not pruned. (Bug#42944)

  • Replication: Unrelated errors occurring during the execution of RESET SLAVE could cause the slave to crash. (Bug#44179)

  • Replication: The --slave-skip-errors option had no effect when using row-based logging format. (Bug#39393)

  • Replication: The following errors were not correctly reported:

    • Failures during slave thread initialization

    • Failures while initializing the relay log position (immediately following the starting of the slave thread)

    • Failures while processing queries passed through the --init_slave option.

    Information about these types of failures can now be found in the output of SHOW SLAVE STATUS. (Bug#38197)

  • Replication: Killing the thread executing a DDL statement, after it had finished its execution but before it had written the binlog event, caused the error code in the binlog event to be set (incorrectly) to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED, which caused replication to fail. (Bug#37145)

    See also Bug#27571, Bug#22725.

  • Replication: Column aliases used inside subqueries were ignored in the binary log. (Bug#35515)

  • Valgrind warnings for the DECODE(), ENCRYPT(), and FIND_IN_SET() functions were corrected. (Bug#44358, Bug#44365, Bug#44367)

  • On Windows, entries for build-vs9.bat and build-vs9_x64.bat were missing in win/Makefile.am. (Bug#44353)

  • Incomplete cleanup of JOIN_TAB::select during the filesort of rows for a GROUP BY clause inside a subquery caused a server crash. (Bug#44290)

  • Not all lock types had proper descriptive strings, resulting in garbage output from mysqladmin debug. (Bug#44164)

  • Use of HANDLER statements with INFORMATION_SCHEMA tables caused a server crash. Now HANDLER is prohibited with such tables. (Bug#44151)

  • MySQL Server allowed the creation of a merge table based on views but crashed when attempts were made to read from that table. The following example demonstrates this:

    #Create a test table
    CREATE TABLE tmp (id int, c char(2));                                           
    
    #Create two VIEWs upon it
    CREATE VIEW v1 AS SELECT * FROM tmp;                                            
    CREATE VIEW v2 AS SELECT * FROM tmp;                                            
    
    #Finally create a MERGE table upon the VIEWs
    CREATE TABLE merge (id int, c char(2))
    ENGINE=MERGE UNION(v1, v2);
    
    #Reading from the merge table lead to a crash
    SELECT * FROM merge;

    The final line of the code generated the crash. (Bug#44040)

  • Some schema names longer than 8 characters were not supported by IBMDB2I. The engine has been updated to allow digits and underscore characters to be used in names longer than 8 characters. (Bug#44025)

  • In some circumstances, when a table is created with the IBMDB2I engine, the CREATE TABLE statement will return successfully but the table will not exist. (Bug#44022)

  • The ucs2_swedish_ci and utf8_swedish_ci collations did not work with indexes using the IBMDB2I storage engine. Support is now provided for MySQL when running on IBM i 6.1 or higher. (Bug#44020)

  • Invoking SHOW TABLE STATUS from within a stored procedure could cause a Packets out of order error. (Bug#43962)

  • myisamchk could display a negative Max keyfile length value. (Bug#43950)

  • On 64-bit systems, a key_buffer_size value larger than 4GB could couse MyISAM index corruption. (Bug#43932)

  • mysqld_multi incorrectly passed --no-defaults to mysqld_safe. (Bug#43876)

  • SHOW VARIABLES did not properly display the value of slave_skip_errors. (Bug#43835)

  • On Windows, a server crash occurred for attempts to insert a floating-point value into a CHAR column with a maximum length less than the converted floating-point value length. (Bug#43833)

  • Incorrect initialization of MyISAM table indexes could cause incorrect query results. (Bug#43737)

  • libmysqld crashed when it was reinitialized. (Bug#43706, Bug#44091)

  • UNION of floating-point numbers did unnecessary rounding. (Bug#43432)

  • ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME failed when the database contained views. (Bug#43385)

  • Certain statements might open a table and then wait for an impending global read lock without noticing whether they hold a table being waiting for by the global read lock, causing a hang. Affected statements are SELECT ... FOR UPDATE, LOCK TABLES ... WRITE, TRUNCATE TABLE, and LOAD DATA INFILE. (Bug#43230)

  • Using an XML function such as ExtractValue() more than once in a single query could produce erroneous results. (Bug#43183)

    See also Bug#43937.

  • Full-text prefix searches could hang the connection and cause 100% CPU consumption. (Bug#42907)

  • Incorrect elevation of warning messages to error messages for unsafe statements caused a server crash. (Bug#42640)

  • CHECK TABLE suggested use of REPAIR TABLE for corrupt tables for storage engines not supported by REPAIR TABLE. Now CHECK TABLE suggests that the user dump and reload the table. (Bug#42563)

  • Compressing a table with the myisampack utility caused the server to produce Valgrind warnings when it opened the table. (Bug#41541)

  • For a MyISAM table with DELAY_KEY_WRITE enabled, the index file could be corrupted without the table being marked as crashed if the server was killed. (Bug#41330)

  • For some queries, an equality propagation problem could cause a = b and b = a to be handled differently. (Bug#40925)

  • Killing an INSERT ... SELECT statement for a MyISAM table could cause table corruption if the table had indexes. (Bug#40827)

  • A multiple-table DELETE IGNORE statement involving a foreign key constraint caused an assertion failure. (Bug#40127)

  • Multiple-table UPDATE statements did not properly activate triggers. (Bug#39953)

  • The mysql_setpermission operation for removing database privileges removed global privileges instead. (Bug#39852)

  • A stored routine contain a C-style comment could not be dumped and reloaded. (Bug#39559)

  • In an UPDATE or DELETE via a secondary index, InnoDB did not store the cursor position. This made InnoDB crash in semi-consistent read while attempting to unlock a nonmatching record. (Bug#39320)

  • The functions listed in Section 11.13.4.2.3, “Creating Geometry Values Using MySQL-Specific Functions”, previously accepted WKB arguments and returned WKB values. They now accept WKB or geometry arguments and return geometry values.

    The functions listed in Section 11.13.4.2.2, “Creating Geometry Values Using WKB Functions”, previously accepted WKB arguments and returned geometry values. They now accept WKB or geometry arguments and return geometry values. (Bug#38990)

  • On WIndows, running the server with myisam_use_mmap enabled caused MyISAM table corruption. (Bug#38848)

  • CHECK TABLE did not properly check whether MyISAM tables created by servers from MySQL 4.0 or older needed to be upgraded. This could cause problems upgrading to MySQL 5.1 or higher. (Bug#37631)

  • An UPDATE statement that updated a column using the same DES_ENCRYPT() value for each row actually updated different rows with different values. (Bug#35087)

  • For shared-memory connections, the read and write methods did not properly handle asynchronous close events, which could lead to the client locking up waiting for a server response. For example, a call to mysql_real_query() would block forever on the client side if the executed statement was aborted on the server side. Thanks to Armin Sch?ffmann for the bug report and patch. (Bug#33899)

  • CHECKSUM TABLE was not killable with KILL QUERY. (Bug#33146)

  • myisamchk and myisampack were not being linked with the library that enabled support for * filename pattern expansion. (Bug#29248)

  • For InnoDB tables that have their own .ibd tablespace file, a superfluous ibuf cursor restoration fails! message could be written to the error log. This warning has been suppressed. (Bug#27276)

  • COMMIT did not delete savepoints if there were no changes in the transaction. (Bug#26288)

  • Several memory allocation functions were not being checked for out-of-memory return values. (Bug#25058)

C.1.14. Release Notes for MySQL Enterprise 5.1.34sp1 [QSP] (25 June 2009)

This is a Service Pack release of the MySQL Enterprise Server 5.1.

This section documents all changes and bugfixes that have been applied since the last MySQL Enterprise Server release (5.1.34).

Note

The fix for Bug#40974 in MySQL 5.1.31 caused the regression problem reported in Bug#44810. Users for whom stability is of utmost priority should note that 5.1.34sp1 is affected by this problem because Bug#44810 is not fixed until MySQL 5.1.36.

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/advisors.html.

Bugs fixed:

C.1.15. Changes in MySQL 5.1.34 (02 April 2009)

RPM Notes:

  • Support Ending for AIX 5.2: Per the http://www.mysql.com/about/legal/lifecycle/ regarding ending support for OS versions that have reached vendor end of life, we plan to discontinue building or supporting MySQL binaries for AIX 5.2 as of April 30, 2009. This release of MySQL 5.1 (5.1.34) is the last MySQL 5.1 release with support for AIX 5.2. For more information, see the March 24, 2009 note at MySQL Product Support EOL Announcements.

Functionality added or changed:

Bugs fixed:

  • Replication: Important Note: Binary logging with --binlog-format=ROW failed when a change to be logged included more than 251 columns. This issue was not known to occur with mixed-format or statement-based logging. (Bug#42977)

    See also Bug#42914.

  • Replication: Assigning an invalid directory for the --slave-load-tmpdir caused the replication slave to crash. (Bug#42861)

  • Replication: The mysql.procs_priv system table was not replicated. (Bug#42217)

  • Replication: An INSERT DELAYED into a TIMESTAMP column issued concurrently with an insert on the same column not using DELAYED, but applied after the other insert, was logged using the same timestamp as generated by the other (non-DELAYED) insert. (Bug#41719)

  • Replication: The MIXED binary logging format did not switch to row-based mode for statements containing the LOAD_FILE() function. (Bug#39701)

  • Replication: When the server SQL mode included IGNORE_SPACE, statement-based replication of LOAD DATA INFILE ... INTO tbl_name failed because the statement was read incorrectly from the binary log; a trailing space was omitted, causing the statement to fail with a syntax error when run on the slave. (Bug#22504)

    See also Bug#43746.

  • An attempt by a user who did not have the SUPER privilege to kill a system thread could cause a server crash. (Bug#43748)

  • On Windows, incorrectly specified link dependencies in CMakeLists.txt resulted in link errors for mysql_embedded, mysqltest_embedded, and mysql_client_test_embedded. (Bug#43715)

  • mysql crashed if a request for the current database name returned an empty result, such as after the client has executed a preceding SET sql_select_limit=0 statement. (Bug#43254)

  • If the value of the version_comment system variable was too long, the mysql client displayed a truncated startup message. (Bug#43153)

  • Queries of the following form returned an empty result:

    SELECT ... WHERE ... (col=col AND col=col) OR ... (false expression)
    

    (Bug#42957)

  • The strings/CHARSET_INFO.txt file was not included in source distributions. (Bug#42937)

  • A dangling pointer in mysys/my_error.c could lead to client crashes. (Bug#42675)

  • Passing an unknown time zone specification to CONVERT_TZ() resulted in a memory leak. (Bug#42502)

  • The MySQL Instance Configuration Wizard would fail to start correctly on Windows Vista. (Bug#42386)

  • With more than two arguments, LEAST(), GREATEST(), and CASE could unnecessarily return Illegal mix of collations errors. (Bug#41627)

  • The mysql client could misinterpret its input if a line was longer than an internal buffer. (Bug#41486)

  • In the help command output displayed by mysql, the description for the \c (clear) command was misleading. (Bug#41268)

  • The load_defaults(), my_search_option_files() and my_print_default_files() functions in the C client library were subject to a race condition in multi-threaded operation. (Bug#40552)

  • If --basedir was specified, mysqld_safe did not use it when attempting to locate my_print_defaults. (Bug#39326)

  • When running the MySQL Instance Configuration Wizard in command-line only mode, the service name would be ignored (effectively creating all instances with the default MySQL service name), irrespective of the name specified on the command line. However, the wizard would attempt to start the service with the specified name, and would fail. (Bug#38379)

  • When MySQL was configured with the --with-max-indexes=128 option, mysqld crashed. (Bug#36751)

  • Setting the join_buffer_size variable to its minimum value produced spurious warnings. (Bug#36446)

  • The use of NAME_CONST() can result in a problem for CREATE TABLE ... SELECT statements when the source column expressions refer to local variables. Converting these references to NAME_CONST() expressions can result in column names that are different on the master and slave servers, or names that are too long to be legal column identifiers. A workaround is to supply aliases for columns that refer to local variables.

    Now a warning is issued in such cases that indicate possible problems. (Bug#35383)

  • An attempt to check or repair an ARCHIVE table that had been subjected to a server crash returned a 144 internal error. The data appeared to be irrecoverable. (Bug#32880)

  • The Time column for SHOW PROCESSLIST output and the value of the TIME column of the INFORMATION_SCHEMA.PROCESSLIST table now can have negative values. Previously, the column was unsigned and negative values were displayed incorrectly as large positive values. Negative values can occur if a thread alters the time into the future with SET TIMESTAMP = value or the thread is executing on a slave and processing events from a master that has its clock set ahead of the slave. (Bug#22047)

  • Restoring a mysqldump dump file containing FEDERATED tables failed because the file contained the data for the table. Now only the table definition is dumped (because the data is located elsewhere). (Bug#21360)

C.1.16. Changes in MySQL 5.1.33 (13 March 2009)

RPM Notes:

  • Support Ending for AIX 5.2: Per the http://www.mysql.com/about/legal/lifecycle/ regarding ending support for OS versions that have reached vendor end of life, we plan to discontinue building or supporting MySQL binaries for AIX 5.2 as of April 30, 2009. The next release of MySQL 5.1 (5.1.34) will be the last MySQL 5.1 release with support for AIX 5.2. For more information, see the March 24, 2009 note at MySQL Product Support EOL Announcements.

Functionality added or changed:

  • Performance: The query cache now checks whether a SELECT statement begins with SQL_NO_CACHE to determine whether it can skip checking for the query result in the query cache. This is not supported when SQL_NO_CACHE occurs within a comment. (Bug#37416)

  • mysql-test-run.pl now supports an --experimental=file_name option. It enables you to specify a file that contains a list of test cases that should be displayed with the [ exp-fail ] code rather than [ fail ] if they fail. (Bug#42888)

  • The MD5 algorithm now uses the Xfree implementation. (Bug#42434)

Bugs fixed:

  • Partitioning: A duplicate key error raised when inserting into a partitioned table using a different error code from that returned by such an error raised when inserting into a table that was not partitioned. (Bug#38719)

    See also Bug#28842.

  • Partitioning: Several error messages relating to partitioned tables were incorrect or missing. (Bug#36001)

  • Replication: When binlog_format was set to STATEMENT, a statement unsafe for statement-based logging caused an error or warning to be issued even if sql_log_bin was set to 0. (Bug#41980)

  • Replication: When using MIXED replication format and temporary tables were created in statement-based mode, but a later operation in the same session caused a switch to row-based mode, the temporary tables were not dropped on the slave at the end of the session. (Bug#40013)

    See also Bug#43046.

    This regression was introduced by Bug#20499.

  • Replication: When using the MIXED replication format, UPDATE and DELETE statements that searched for rows where part of the key had nullable BIT columns failed. This occurred because operations that inserted the data were replicated as statements, but UPDATE and DELETE statements affecting the same data were replicated using row-based format.

    This issue did not occur when using statement-based replication (only) or row-based replication (only). (Bug#39753)

    See also Bug#39648.

  • Replication: The server SQL mode in effect when a stored procedure was created was not retained in the binary log. This could cause a CREATE PROCEDURE statement that succeeded on the master to fail on the slave.

    This issue was first noticed when a stored procedure was created when ANSI_QUOTES was in effect on the master, but could possibly cause failed CREATE PROCEDURE statements and other problems on the slave when using other server SQL modes as well. (Bug#39526)

  • Replication: If --secure-file-priv was set on the slave, it was unable to execute LOAD DATA INFILE statements sent from the master when using mixed-format or statement-based replication.

    As a result of this fix, this security restriction is now ignored on the slave in such cases; instead the slave checks whether the files were created and should be read by the slave in its --slave-load-tmpdir. (Bug#38174)

  • Replication: Server IDs greater than 2147483647 (232 – 1) were represented by negative numbers in the binary log. (Bug#37313)

  • Replication: When its disk becomes full, a replication slave may wait while writing the binary log, relay log or MyISAM tables, continuing after space has been made available. The error message provided in such cases was not clear about the frequency with which checking for free space is done (once every 60 seconds), and how long the server waits after space has been freed before continuing (also 60 seconds); this caused users to think that the server had hung.

    These issues have been addressed by making the error message clearer, and dividing it into two separate messages:

    1. The error message Disk is full writing 'filename' (Errcode: error_code). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) is printed only once.

    2. The warning Retry in 60 secs, Message reprinted in 600 secs is printed once every for every 10 times that the check for free space is made; that is, the check is performed once each 60 seconds, but the reminder that space needs to be freed is printed only once every 10 minutes (600 seconds).

    (Bug#22082)

  • Replication: The statements DROP PROCEDURE IF EXISTS and DROP FUNCTION IF EXISTS were not written to the binary log if the procedure or function to be dropped did not exist. (Bug#13684)

    See also Bug#25705.

  • The IBM DB2i storage engine has been added to this release for the IBM i Series platform. For more information, see Section 13.7, “The IBMDB2I Storage Engine”. (Bug#44217)

  • On 64-bit debug builds, code in safemalloc resulted in errors due to use of a 32-bit value for 64-bit allocations. (Bug#43885)

  • make distcheck failed to properly handle subdirectories of storage/ndb. (Bug#43614)

  • Use of USE INDEX hints could cause EXPLAIN EXTENDED to crash. (Bug#43354)

  • For InnoDB tables, overflow in an AUTO_INCREMENT column could cause a server crash. (Bug#43203)

  • On 32-bit Windows, mysqld could not use large buffers due to a 2GB user mode address limit. (Bug#43082)

  • stderr should be unbuffered, but when the server redirected stderr to a file, it became buffered. (Bug#42790)

  • The DATA_TYPE column of the INFORMATION_SCHEMA.COLUMNS table displayed the UNSIGNED attribute for floating-point data types. (The column should contain only the data type name.) (Bug#42758)

  • For InnoDB tables, spurious duplicate-key errors could occur when inserting into an AUTO_INCREMENT column. (Bug#42714)

  • mysqldump included views that were excluded with the --ignore-table option. (Bug#42635)

  • An earlier bug fix resulted in the problem that the InnoDB plugin could not be used with a server that was compiled with the built-in InnoDB. To handle this two changes were made:

    • The server now supports an --ignore-builtin-innodb option that causes the server to behave as if the built-in InnoDB is not present. This option causes other InnoDB options not to be recognized.

    • For the INSTALL PLUGIN statement, the server reads option (my.cnf) files just as during server startup. This enables the plugin to pick up any relevant options from those files. Consequently, a plugin no longer is started with each option set to its default value.

      Because of this change, it is possible to add plugin options to an option file even before loading a plugin (if the loose prefix is used). It is also possible to uninstall a plugin, edit my.cnf, and install the plugin again. Restarting the plugin this way enables it to the new option values without a server restart.

    Note

    InnoDB Plugin versions 1.0.4 and higher will take advantage of this bug fix. Although the InnoDB Plugin is source code compatible with multiple MySQL releases, a given binary InnoDB Plugin can be used only with a specific MySQL release. When InnoDB Plugin 1.0.4 is released, it is expected to be compiled for MySQL 5.1.34. For 5.1.33, you can use InnoDB Plugin 1.0.3, but you must build from source.

    (Bug#42610)

    This regression was introduced by Bug#29263.

  • With the ONLY_FULL_GROUP_BY SQL mode enabled, some legal queries failed. (Bug#42567)

  • Tables could enter open table cache for a thread without being properly cleaned up, leading to a server crash. (Bug#42419)

  • For InnoDB tables, inserting into floating-point AUTO_INCREMENT columns failed. (Bug#42400)

  • The InnoDB btr_search_drop_page_hash_when_freed() function had a race condition. (Bug#42279)

  • For InnoDB tables, there was a race condition for ALTER TABLE, OPTIMIZE TABLE, CREATE INDEX, and DROP INDEX operations when periodically checking whether table copying can be committed. (Bug#42152)

  • Parsing of the optional microsecond component of DATETIME values did not fail gracefully when that component width was larger than the allowed six places. (Bug#42146)

  • In InnoDB recovery after a server crash, table lookup could fail and corrupt the data dictionary cache. (Bug#42075)

  • mysqldumpslow parsed the --debug and --verbose options incorrectly. (Bug#42027)

  • Queries that used the loose index scan access method could return no rows. (Bug#41610)

  • In InnoDB recovery after a server crash, rollback of a transaction that updated a column from NULL to NULL could cause another crash. (Bug#41571)

  • The error message for a too-long column comment was Unknown error rather than a more appropriate message. (Bug#41465)

  • Use of SELECT * allowed users with rights to only some columns of a view to access all columns. (Bug#41354)

  • If the tables underlying a MERGE table had a primary key but the MERGE table itself did not, inserting a duplicate row into the MERGE table caused a server crash. (Bug#41305)

  • The server did not robustly handle problems hang if a table opened with HANDLER needed to be re-opened because it had been altered to use a different storage engine that does not support HANDLER. The server also failed to set an error if the re-open attempt failed. These problems could cause the server to crash or hang. (Bug#41110, Bug#41112)

  • SELECT statements executed concurrently with INSERT statements for a MyISAM table could cause incorrect results to be returned from the query cache. (Bug#41098)

  • For prepared statements, multibyte character sets were not taking into account when calculating max_length for string values and mysql_stmt_fetch() could return truncated strings. (Bug#41078)

  • Deprecation warnings that referred to MySQL 5.2 were changed to refer to MySQL 6.0. (Bug#41077)

  • For user-defined variables in a query result, incorrect length values were returned in the result metadata. (Bug#41030)

  • On Windows, starting the server with an invalid value for innodb_flush_method caused a crash. (Bug#40757)

  • MySQL 5.1 crashed with index merge algorithm and merge tables.

    A query in the MyISAM merge table caused a crash if the index merge algorithm was being used. (Bug#40675)

  • With strict SQL mode enabled, setting a system variable to an out-of-bounds value caused an assertion failure. (Bug#40657)

  • Table temporary scans were slower than necessary due to use of mmap rather than caching, even with the myisam_use_mmap system variable disabled. (Bug#40634)

  • For a view that references a table in another database, mysqldump wrote the view name qualified with the current database name. This makes it impossible to reload the dump file into a different database. (Bug#40345)

  • On platforms where long and pointer variables have different sizes, MyISAM could copy key statistics incorrectly, resulting in a server crash or incorrect cardinality values. (Bug#40321)

  • DELETE tried to acquire write (not read) locks for tables accessed within a subquery of the WHERE clause. (Bug#39843)

  • perror did not produce correct output for error codes 153 to 163. (Bug#39370)

  • Several functions in libmysqld called exit() when an error occurred rather than returning an error to the caller. (Bug#39289)

  • The innodb_log_arch_dir system variable is no longer available but was present in some of the sample option files included with MySQL distributions (such as my-huge.cnf). The line was present as a comment but uncommenting it would cause server startup failure so the line has been removed. (Bug#38249)

  • Setting a savepoint with the same name as an existing savepoint incorrectly deleted any other savepoints that had been set in the meantime. For example, setting savepoints named a, b, c, b resulted in savepoints a, b, rather than the correct savepoints a, c, b. (Bug#38187)

  • --help output for myisamchk did not list the --HELP option. (Bug#38103)

  • Comparisons between row constructors, such as (a, b) = (c, d) resulted in unnecessary Illegal mix of collations errors for string columns. (Bug#37601)

  • If a user created a view that referenced tables for which the user had disjoint privileges, an assertion failure occurred. (Bug#37191)

  • An argument to the MATCH() function that was an alias for an expression other than a column name caused a server crash. (Bug#36737)

  • The event, general_log, and slow_log tables in the mysql database store server_id values, but did not use an UNSIGNED column and thus were not able to store the full range of ID values. (Bug#36540)

  • On Windows, the _PC macro in my_global.h was causing problems for modern compilers. It has been removed because it is no longer used. (Bug#34309)

  • For DROP FUNCTION with names that were qualified with a database name, the database name was handled in case-sensitive fashion even with lower_case_table_names set to 1. (Bug#33813)

  • mysqldump --compatible=mysql40 emitted statements referring to the character_set_client system variable, which is unknown before MySQL 4.1. Now the statements are enclosed in version-specific comments. (Bug#33550)

  • Detection by configure of several functions such as setsockopt(), bind(), sched_yield(), and gtty() could fail. (Bug#31506)

  • Use of MBR spatial functions such as MBRTouches() with columns of InnoDB tables caused a server crash rather than an error. (Bug#31435)

  • The mysql client mishandled input parsing if a delimiter command was not first on the line. (Bug#31060)

  • SHOW PRIVILEGES listed the CREATE ROUTINE privilege as having a context of Functions,Procedures, but it is a database-level privilege. (Bug#30305)

  • mysqld --help did not work as root. (Bug#30261)

  • CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE erroneously reported a table to be corrupt if the table did not exist or the statement was terminated with KILL. (Bug#29458)

  • SHOW TABLE STATUS could fail to produce output for tables with non-ASCII characters in their name. (Bug#25830)

  • Allocation of stack space for error messages could be too small on HP-UX, leading to stack overflow crashes. (Bug#21476)

  • Floating-point numbers could be handled with different numbers of digits depending on whether the text or prepared-statement protocol was used. (Bug#21205)

  • Incorrect length metadata could be returned for LONG TEXT columns when a multibyte server character set was used. (Bug#19829)

  • ROUND() sometimes returned different results on different platforms. (Bug#15936)

C.1.17. Changes in MySQL 5.1.32 (14 February 2009)

Functionality added or changed:

  • The libedit library was upgraded to version 2.11. (Bug#42433)

Bugs fixed:

  • Security Fix: Using an XPath expression employing a scalar expression as a FilterExpr with ExtractValue() or UpdateXML() caused the server to crash. Such expressions now cause an error instead. (Bug#42495)

  • Incompatible Change: The fix for Bug#33699 introduced a change to the UPDATE statement such that assigning NULL to a NOT NULL column caused an error even when strict SQL mode was not enabled. The original behavior before was that such assignments caused an error only in strict SQL mode, and otherwise set the column to the implicit default value for the column data type and generated a warning. (For information about implicit default values, see Section 10.1.4, “Data Type Default Values”.)

    The change caused compatibility problems for applications that relied on the original behavior. It also caused replication problems between servers that had the original behavior and those that did not, for applications that assigned NULL to NOT NULL columns in UPDATE statements without strict SQL mode enabled. This change has been reverted so that UPDATE again had the original behavior. Problems can still occur if you replicate between servers that have the modified UPDATE behavior and those that do not. (Bug#39265)

  • Important Change: When using the MySQL Instance Configuration Wizard with a configuration where you already have an existing installation with a custom datadir, the wizard could reset the data to the default data directory. When performing an upgrade installation in this situation, you must re-specify your custom settings, including the datadir, to ensure that your configuration file is not reset to the default values. (Bug#37534)

  • Important Change: Uninstalling MySQL using the MySQL installer on Windows would delete the my.ini file. The file is no longer deleted. In addition, when a new installation is conducted, any existing cofiguration file will be renamed to myDATETIME.ini.bak during configuration. (Bug#36493)

  • Important Change: When installing MySQL on Windows, it was possible to install multiple editions (Complete, and Essential, for example) of the same version of MySQL, leading to two separate entries in the installed packages which were impossible to isolate. This could lead to problems with installation and uninstallation. The MySQL installer on Windows no longers allow multiple installations of the same version of MySQL on a single machine. (Bug#4217)

  • Replication: START SLAVE UNTIL did not work correctly with --replicate-same-server-id enabled; when started with this option, the slave did not perform events recorded in the relay log and that originated from a different master.

    Log rotation events are automatically generated and written when rotating the binary log or relay log. Such events for relay logs are usually ignored by the slave SQL thread because they have the same server ID as that of the slave. However, when --replicate-same-server-id was enabled, the rotation event for the relay log was treated as if it originated on the master, because the log's name and position were incorrectly updated. This caused the MASTER_POS_WAIT() function always to return NULL and thus to fail. (Bug#38734, Bug#38934)

  • Replication: TRUNCATE TABLE statements failed to replicate when statement-based binary logging mode was not available. The issue was observed when using InnoDB with the transaction isolation level set to READ UNCOMMITTED (thus forcing InnoDB not to allow statement-based logging). However, the same behavior could be reproduced using any transactional storage engine supporting only row-based logging, regardless of the isolation level. This was due to two separate problems:

    1. An error was printed by InnoDB for TRUNCATE TABLE when using statement-based logging mode where the transaction isolation level was set to READ COMMITTED or READ UNCOMMITTED, because InnoDB permits statement-based replication for DML statements. However, TRUNCATE TABLE is not transactional; since it is the equivalent of DROP TABLE followed by CREATE TABLE, it is actually DDL, and should therefore be allowed to be replicated as a statement.

    2. TRUNCATE TABLE was not logged in mixed mode because of the error just described; however, this error was not reported to the client.

    As a result of this fix, TRUNCATE TABLE is now treated as DDL for purposes of binary logging and replication; that is, it is always logged as a statement and so no longer causes an error when replicated using a transactional storage engine such as InnoDB. (Bug#36763)

    See also Bug#42643.

  • Replication: mysqlbinlog replay of CREATE TEMPORARY TABLE ... LIKE statements and of TRUNCATE TABLE statements used on temporary tables failed with Error 1146 (Table ... doesn't exist). (Bug#35583)

  • Replication: In statement mode, mysqlbinlog failed to issue a SET @@autommit statement when the autocommit mode was changed. (Bug#34541)

  • Replication: LOAD DATA INFILE statements did not replicate correctly from a master running MySQL 4.1 to a slave running MySQL 5.1 or later. (Bug#31240)

  • The use by libedit of the __weak_reference() macro caused compilation failure on FreeBSD. (Bug#42817)

  • A '%' character in SQL statements could cause the server to crash. (Bug#42634)

  • An optimization introduced for Bug#37553 required an explicit cast to be added for some uses of TIMEDIFF() because automatic casting could produce incorrect results. (It was necessary to use TIME(TIMEDIFF(...)).) (Bug#42525)

  • On the IBM i5 platform, the MySQL configuration process caused the system version of pthread_setschedprio() to be used. This function returns SIGILL on i5 because it is not supported, causing the server to crash. Now the my_pthread_setprio() function in the mysys library is used instead. (Bug#42524)

  • The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)

  • User variables within triggers could cause a crash if the mysql_change_user() C API function was invoked. (Bug#42188)

  • Dependent subqueries such as the following caused a memory leak proportional to the number of outer rows:

    SELECT COUNT(*) FROM t1, t2 WHERE t2.b
      IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a);
    

    (Bug#42037)

  • Some queries using NAME_CONST(.. COLLATE ...) led to a server crash due to a failed type cast. (Bug#42014)

  • On Mac OS X, some of the universal client libraries were not actually universal and were missing code for one or more architectures. (Bug#41940)

  • String reallocation could cause memory overruns. (Bug#41868)

  • mysql_install_db did not pass some relevant options to mysqld. (Bug#41828)

  • Setting innodb_locks_unsafe_for_binlog should be equivalent to setting the transaction isolation level to READ COMMITTED. However, if both of those things were done, nonmatching semi-consistently read rows were not unlocked when they should have been. (Bug#41671)

  • REPAIR TABLE crashed for compressed MyISAM tables. (Bug#41574)

  • For a TIMESTAMP NOT NULL DEFAULT ... column, storing NULL as the return value from some functions caused a “cannot be NULL” error. NULL returns now correctly cause the column default value to be stored. (Bug#41370)

  • The server cannot execute INSERT DELAYED statements when statement-based binary logging is enabled, but the error message displayed only the table name, not the entire statement. (Bug#41121)

  • FULLTEXT indexes did not work for Unicode columns that used a custom UCA collation. (Bug#41084)

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

  • Changing innodb_thread_concurrency at runtime could cause errors. (Bug#40760)

  • SELECT statements could be blocked by INSERT DELAYED statements that were waiting for a lock, even with low_priority_updates enabled. (Bug#40536)

  • For InnoDB tables that used ROW_FORMAT=REDUNDANT, storage size of NULL columns could be determined incorrectly. (Bug#40369)

  • The query cache stored only partial query results if a statement failed while the results were being sent to the client. This could cause other clients to hang when trying to read the cached result. Now if a statement fails, the result is not cached. (Bug#40264)

  • When a MEMORY table became full, the error generated was returned to the client but was not written to the error log. (Bug#39886)

  • With row-based binary logging, replication of InnoDB tables containing NULL-valued BIT columns could fail. (Bug#39648)

  • The expression ROW(...) IN (SELECT ... FROM DUAL) always returned TRUE. (Bug#39069)

  • The greedy optimizer could cause a server crash due to improper handling of nested outer joins. (Bug#38795)

  • Use of COUNT(DISTINCT) prevented NULL testing in the HAVING clause. (Bug#38637)

  • The innodb_stats_on_metadata system variable was not displayed by SHOW VARIABLES and was not settable at runtime. (Bug#38189)

  • Enabling the sync_frm system variable had no effect on the handling of .frm files for views. (Bug#38145)

  • The embedded server truncated some error messages. (Bug#37995)

  • For comparison of NULL to a subquery result inside IS NULL, the comparison could evaluate to NULL rather than to TRUE or FALSE. This occurred for expressions such as:

    SELECT ... WHERE NULL IN (SELECT ...) IS NULL
    

    (Bug#37822)

  • Setting myisam_repair_threads greater than 1 caused a server crash for table repair or alteration operations for MyISAM tables with multiple FULLTEXT indexes. (Bug#37756)

  • When using the MySQL MSI Installer on Windows and selecting Back after a choosing Repair, you would be returned to the Fresh Install section of the installer. You are now correctly returned to the Install, Repair, Modify screen. (Bug#37294)

  • The mysql client sometimes improperly interpreted string escape sequences in nonstring contexts. (Bug#36391)

  • The query cache stored packets containing the server status of the time when the cached statement was run. This might lead to an incorrect transaction status on the client side if a statement was cached during a transaction and later served outside a transaction context (or vice versa). (Bug#36326)

  • If the system time was adjusted backward during query execution, the apparent execution time could be negative. But in some cases these queries would be written to the slow query log, with the negative execution time written as a large unsigned number. Now statements with apparent negative execution time are not written to the slow query log. (Bug#35396)

  • libmysqld was not built with all character sets. (Bug#32831)

  • For mysqld_multi, using the --mysqld=mysqld_safe option caused the --defaults-file and --defaults-extra-file options to behave the same way. (Bug#32136)

  • Attempts to open a valid MERGE table sometimes resulted in a ER_WRONG_MRG_TABLE error. This happened after failure to open an invalid MERGE table had also generated an ER_WRONG_MRG_TABLE error. (Bug#32047)

  • For Solaris package installation using pkgadd, the postinstall script failed, causing the system tables in the mysql database not to be created. (Bug#31164)

  • If the default database was dropped, the value of character_set_database was not reset to character_set_server as it should have been. (Bug#27208)

C.1.18. Release Notes for MySQL Enterprise 5.1.31sp1 [QSP] (19 March 2009)

This is a Service Pack release of the MySQL Enterprise Server 5.1.

This section documents all changes and bugfixes that have been applied since the last MySQL Enterprise Server release (5.1.31).

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/advisors.html.

Functionality added or changed:

  • The libedit library was upgraded to version 2.11. (Bug#42433)

Bugs fixed:

  • Security Fix: Using an XPath expression employing a scalar expression as a FilterExpr with ExtractValue() or UpdateXML() caused the server to crash. Such expressions now cause an error instead. (Bug#42495)

  • On the IBM i5 platform, the MySQL configuration process caused the system version of pthread_setschedprio() to be used. This function returns SIGILL on i5 because it is not supported, causing the server to crash. Now the my_pthread_setprio() function in the mysys library is used instead. (Bug#42524)

  • The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)

  • User variables within triggers could cause a crash if the mysql_change_user() C API function was invoked. (Bug#42188)

  • Some queries using NAME_CONST(.. COLLATE ...) led to a server crash due to a failed type cast. (Bug#42014)

C.1.19. Changes in MySQL 5.1.31 (19 January 2009)

Functionality added or changed:

  • MySQL-shared-compat-advanced-gpl-5.1.31-0.*.rpm and MySQL-shared-compat-advanced-5.1.31-0.*.rpm packages are now available. These client library compatibility packages are like the MySQL-shared-compat package, but are for the “MySQL Enterprise Server –dash; Advanced Edition” products. Install these packages rather than the normal MySQL-shared-compat package if you want to included shared client libraries for older MySQL versions. (Bug#41838)

  • A new status variable, Queries, indicates the number of statements executed by the server. This includes statements executed within stored programs, unlike the Questions variable which includes only statements sent to the server by clients. (Bug#41131)

  • Performance of SELECT * retrievals from INFORMATION_SCHEMA.COLUMNS was improved slightly. (Bug#38918)

  • Previously, index hints did not work for FULLTEXT searches. Now they work as follows:

    For natural language mode searches, index hints are silently ignored. For example, IGNORE INDEX(i) is ignored with no warning and the index is still used.

    For boolean mode searches, index hints with FOR ORDER BY or FOR GROUP BY are silently ignored. Index hints with FOR JOIN or no FOR modifier are honored. In contrast to how hints apply for non-FULLTEXT searches, the hint is used for all phases of query execution (finding rows and retrieval, grouping, and ordering). This is true even if the hint is given for a non-FULLTEXT index. (Bug#38842)

Bugs fixed:

  • Performance: For an InnoDB table, DROP TABLE or ALTER TABLE ... DISCARD TABLESPACE could take a long time or cause a server crash. (Bug#39939)

  • Important Change: Replication: If a trigger was defined on an InnoDB table and this trigger updated a nontransactional table, changes performed on the InnoDB table were replicated and were visible on the slave before they were committed on the master, and were not rolled back on the slave after a successful rollback of those changes on the master.

    As a result of the fix for this issue, the semantics of mixing nontransactional and transactional tables in a transaction in the first statement of a transaction have changed. Previously, if the first statement in a transaction contained nontransactional changes, the statement was written directly to the binary log. Now, any statement appearing after a BEGIN (or immediately following a COMMIT if autocommit = 0) is always considered part of the transaction and cached. This means that nontransactional changes do not propagate to the slave until the transaction is committed and thus written to the binary log.

    See Section 16.3.1.28, “Replication and Transactions”, for more information about this change in behavior. (Bug#40116)

  • Important Change: The MSI installer packages for Windows are now digitally signed with a certificate, allowing installation on Windows where only certified packages are allowed by group policy or configuration.

    As part of this change, and to comply with the certified installer requirements, the Setup.exe versions of the MySQL installer have been discontinued. You must have Windows Installer support in your Windows installation to use the MSI install package. This is a standard component on Windows XP SP2 and higher. For earlier versions, you can download the Microsoft Installer support from Microsoft.com. (Bug#36409)

  • Partitioning: Replication: Changing the transaction isolation level while replicating partitioned InnoDB tables could cause statement-based logging to fail. (Bug#39084)

  • Partitioning: A comparison with an invalid DATE value in a query against a partitioned table could lead to a crash of the MySQL server.

    Note

    Invalid DATE and DATETIME values referenced in the WHERE clause of a query on a partitioned table are treated as NULL. See Section 18.4, “Partition Pruning”, for more information.

    (Bug#40972)

  • Partitioning: A query on a user-partitioned table caused MySQL to crash, where the query had the following characteristics:

    • The query's WHERE clause referenced an indexed column that was also in the partitioning key.

    • The query's WHERE clause included a value found in the partition.

    • The query's WHERE clause used the < or <> operators to compare with the indexed column's value with a constant.

    • The query used an ORDER BY clause, and the same indexed column was used in the ORDER BY clause.

    • The ORDER BY clause used an explcit or implicit ASC sort priority.

    Two examples of such a query are given here, where a represents an indexed column used in the table's partitioning key:

    1. SELECT * FROM table WHERE a < constant ORDER BY a;
      

    2. SELECT * FROM table WHERE a <> constant ORDER BY a;
      

    This bug was introduced in MySQL 5.1.29. (Bug#40954)

    This regression was introduced by Bug#30573, Bug#33257, Bug#33555.

  • Partitioning: With READ COMMITTED transaction isolation level, InnoDB uses a semi-consistent read that releases nonmatching rows after MySQL has evaluated the WHERE clause. However, this was not happening if the table used partitions. (Bug#40595)

  • Partitioning: A query that timed out when run against a partitioned table failed silently, without providing any warnings or errors, rather than returning Lock wait timeout exceeded. (Bug#40515)

  • Partitioning: ALTER TABLE ... REORGANIZE PARTITION could crash the server when the number of partitions was not changed. (Bug#40389)

    See also Bug#41945.

  • Partitioning: For a partitioned table having an AUTO_INCREMENT column: If the first statement following a start of the server or a FLUSH TABLES statement was an UPDATE statement, the AUTO_INCREMENT column was not incremented correctly. (Bug#40176)

  • Partitioning: The server attempted to execute the statements ALTER TABLE ... ANALYZE PARTITION, ALTER TABLE ... CHECK PARTITION, ALTER TABLE ... OPTIMIZE PARTITION, and ALTER TABLE ... REORGANIZE PARTITION on tables that were not partitioned. (Bug#39434)

    See also Bug#20129.

  • Partitioning: The value of the CREATE_COLUMNS column in INFORMATION_SCHEMA.TABLES was not partitioned for partitioned tables. (Bug#38909)

  • Partitioning: When executing an ORDER BY query on a partitioned InnoDB table using an index that was not in the partition expression, the results were sorted on a per-partition basis rather than for the table as a whole. (Bug#37721)

  • Partitioning: Dropping or creating an index on a partitioned table managed by the InnoDB Plugin locked the table. (Bug#37453)

  • Partitioning: Partitioned table checking sometimes returned a warning with an error code of 0, making proper response to errors impossible. The fix also renders the error message subject to translation in non-English deployments. (Bug#36768)

  • Partitioning: SHOW TABLE STATUS could show a nonzero value for the Mean record length of a partitioned InnoDB table, even if the table contained no rows. (Bug#36312)

  • Partitioning: When SHOW CREATE TABLE was used on a partitioned table, all of the table's PARTITION and SUBPARTITION clauses were output on a single line, making it difficult to read or parse. (Bug#14326)

  • Replication: Per-table AUTO_INCREMENT option values were not replicated correctly for InnoDB tables. (Bug#41986)

  • Replication: Some log_event types did not skip the post-header when reading. (Bug#41961)

  • Replication: Attempting to read a binary log containing an Incident_log_event having an invalid incident number could cause the debug server to crash. (Bug#40482)

  • Replication: When using row-based replication, an update of a primary key that was rolled back on the master due to a duplicate key error was not rolled back on the slave. (Bug#40221)

  • Replication: When rotating relay log files, the slave deletes relay log files and then edits the relay log index file. Formerly, if the slave shut down unexpectedly between these two events, the relay log index file could then reference relay logs that no longer existed. Depending on the circumstances, this could when restarting the slave cause either a race condition or the failure of replication. (Bug#38826, Bug#39325)

  • Replication: With row-based replication, UPDATE and DELETE statements using LIMIT and a table's primary key could produce different results on the master and slave. (Bug#38230)

  • resolve_stack_dump was unable to resolve the stack trace format produced by mysqld in MySQL 5.1 and up (see Section 22.5.1.5, “Using a Stack Trace”). (Bug#41612)

  • In example option files provided in MySQL distributions, the thread_stack value was increased from 64K to 128K. (Bug#41577)

  • The optimizer could ignore an error and rollback request during a filesort, causing an assertion failure. (Bug#41543)

  • DATE_FORMAT() could cause a server crash for year-zero dates. (Bug#41470)

  • SET PASSWORD caused a server crash if the account name was given as CURRENT_USER(). (Bug#41456)

  • When a repair operation was carried out on a CSV table, the debug server crashed. (Bug#41441)

  • When substituting system constant functions with a constant result, the server was not expecting NULL function return values and could crash. (Bug#41437)

  • Queries such as SELECT ... CASE AVG(...) WHEN ... that used aggregate functions in a CASE expression crashed the server. (Bug#41363)

  • INSERT INTO .. SELECT ... FROM and CREATE TABLE ... SELECT ... FROM a TEMPORARY table could inadvertently change the locking type of the temporary table from a write lock to a read lock, causing statement failure. (Bug#41348)

  • The INFORMATION_SCHEMA.SCHEMA_PRIVILEGES table was limited to 7680 rows. (Bug#41079)

  • In debug builds, obsolete debug code could be used to crash the server. (Bug#41041)

  • Some queries that used a “range checked for each record” scan could return incorrect results. (Bug#40974)

    See also Bug#44810.

  • Certain SELECT queries could fail with a Duplicate entry error. (Bug#40953)

  • For debug servers, OPTIMIZE TABLE on a compressed table caused a server crash. (Bug#40949)

  • Accessing user variables within triggers could cause a server crash. (Bug#40770)

  • IF(..., CAST(longtext_val AS UNSIGNED), signed_val) as an argument to an aggregate function could cause an assertion failure. (Bug#40761)

  • For single-table UPDATE statements, an assertion failure resulted from a runtime error in a stored function (such as a recursive function call or an attempt to update the same table as in the UPDATE statement). (Bug#40745)

  • TRUNCATE TABLE for an InnoDB table did not flush cached queries for the table. (Bug#40386)

  • Prepared statements allowed invalid dates to be inserted when the ALLOW_INVALID_DATES SQL mode was not enabled. (Bug#40365)

  • mc.exe is no longer needed to compile MySQL on Windows. This makes it possible to build MySQL from source using Visual Studio Express 2008. (Bug#40280)

  • The ':' character was incorrectly disallowed in table names. (Bug#40104)

  • Support for the revision field in .frm files has been removed. This addresses the downgrading problem introduced by the fix for Bug#17823. (Bug#40021)

  • Retrieval speed from the following INFORMATION_SCHEMA tables was improved by shortening the VARIABLE_VALUE column to 1024 characters: GLOBAL_VARIABLES, SESSION_VARIABLES, GLOBAL_STATUS, and SESSION_STATUS.

    As a result of this change, any variable value longer than 1024 characters will be truncated with a warning. This affects only the init_connect system variable. (Bug#39955)

  • If the operating system is configured to return leap seconds from OS time calls or if the MySQL server uses a time zone definition that has leap seconds, functions such as NOW() could return a value having a time part that ends with :59:60 or :59:61. If such values are inserted into a table, they would be dumped as is by mysqldump but considered invalid when reloaded, leading to backup/restore problems.

    Now leap second values are returned with a time part that ends with :59:59. This means that a function such as NOW() can return the same value for two or three consecutive seconds during the leap second. It remains true that literal temporal values having a time part that ends with :59:60 or :59:61 are considered invalid.

    For additional details about leap-second handling, see Section 9.7.2, “Time Zone Leap Second Support”. (Bug#39920)

  • The server could crash during a sort-order optimization of a dependent subquery. (Bug#39844)

  • For a server started with the --temp-pool option on Windows, temporary file creation could fail. This option now is ignored except on Linux systems, which was its original intended scope. (Bug#39750)

  • ALTER TABLE on a table with FULLTEXT index that used a pluggable FULLTEXT parser could cause debug servers to crash. (Bug#39746)

  • With the ONLY_FULL_GROUP_BY SQL mode enabled, the check for nonaggregated columns in queries with aggregate functions, but without a GROUP BY clause was treating all the parts of the query as if they were in the select list. This is fixed by ignoring the nonaggregated columns in the WHERE clause. (Bug#39656)

  • The server crashed if an integer field in a CSV file did not have delimiting quotes. (Bug#39616)

  • Creating a table with a comment of 62 characters or longer caused a server crash. (Bug#39591)

  • The do_abi_check program run during the build process depends on mysql_version.h but that file was not created first, resulting in build failure. (Bug#39571)

  • CHECK TABLE failed for MyISAM INFORMATION_SCHEMA tables. (Bug#39541)

  • On 64-bit Windows systems, the server accepted key_buffer_size values larger than 4GB, but allocated less. (For example, specifying a value of 5GB resulted in 1GB being allocated.) (Bug#39494)

  • InnoDB could hang trying to open an adaptive hash index. (Bug#39483)

  • Following ALTER TABLE ... DISCARD TABLESPACE for an InnoDB table, an attempt to determine the free space for the table before the ALTER TABLE operation had completely finished could cause a server crash. (Bug#39438)

  • Use of the PACK_KEYS or MAX_ROWS table option in ALTER TABLE should have triggered table reconstruction but did not. (Bug#39372)

  • The server returned a column type of VARBINARY rather than DATE as the result from the COALESCE(), IFNULL(), IF(), GREATEST(), or LEAST() functions or CASE expression if the result was obtained using filesort in an anonymous temporary table during the query execution. (Bug#39283)

  • A server built using yaSSL for SSL support would crash if configured to use an RSA key and a client sent a cipher list containing a non-RSA key as acceptable. (Bug#39178)

  • When built with Valgrind, the server failed to access tables created with the DATA DIRECTORY or INDEX DIRECTORY table option. (Bug#39102)

  • With binary logging enabled CREATE VIEW was subject to possible buffer overwrite and a server crash. (Bug#39040)

  • The fast mutex implementation was subject to excessive lock contention. (Bug#38941)

  • Use of InnoDB monitoring (SHOW ENGINE INNODB STATUS or one of the InnoDB Monitor tables) could cause a server crash due to invalid access to a shared variable in a concurrent environment. (Bug#38883)

  • InnoDB could fail to generate AUTO_INCREMENT values after an UPDATE statement for the table. (Bug#38839)

  • If delayed insert failed to upgrade the lock, it did not free the temporary memory storage used to keep newly constructed BLOB values in memory, resulting in a memory leak. (Bug#38693)

  • On Windows, a five-second delay occurred at shutdown of applications that used the embedded server. (Bug#38522)

  • On Solaris, a scheduling policy applied to the main server process could be unintentionally overwritten in client-servicing threads. (Bug#38477)

  • Building MySQL on FreeBSD would result in a failure during the gen_lex_hash phase of the build. (Bug#38364)

  • On Windows, the embedded server would crash in mysql_library_init() if the language file was missing. (Bug#38293)

  • A mix of TRUNCATE TABLE with LOCK TABLES and UNLOCK TABLES for an InnoDB could cause a server crash. (Bug#38231)

  • The ExtractValue() function did not work correctly with XML documents containing a DOCTYPE declaration. (Bug#38227)

  • Queries with a HAVING clause could return a spurious row. (Bug#38072)

  • The Event Scheduler no longer logs “started in thread” or “executed” successfully messages to the error log. (Bug#38066)

  • Use of spatial data types in prepared statements could cause memory leaks or server crashes. (Bug#37956, Bug#37671)

  • An error in a debugging check caused crashes in debug servers. (Bug#37936)

  • A SELECT with a NULL NOT IN condition containing a complex subquery from the same table as in the outer select caused an assertion failure. (Bug#37894)

  • The presence of a /* ... */ comment preceding a query could cause InnoDB to use unnecessary gap locks. (Bug#37885)

  • Use of an uninitialized constant in EXPLAIN evaluation caused an assertion failure. (Bug#37870)

  • When using ALTER TABLE on an InnoDB table, the AUTO_INCREMENT value could be changed to an incorrect value. (Bug#37788)

  • Primary keys were treated as part of a covering index even if only a prefix of a key column was used. (Bug#37742)

  • Renaming an ARCHIVE table to the same name with different lettercase and then selecting from it could cause a server crash. (Bug#37719)

  • The MONTHNAME() and DAYNAME() functions returned a binary string, so that using LOWER() or UPPER() had no effect. Now MONTHNAME() and DAYNAME() return a value in character_set_connection character set. (Bug#37575)

  • TIMEDIFF() was erroneously treated as always returning a positive result. Also, CAST() of TIME values to DECIMAL dropped the sign of negative values. (Bug#37553)

    See also Bug#42525.

  • SHOW PROCESSLIST displayed “copy to tmp table” when no such copy was occurring. (Bug#37550)

  • mysqlcheck used SHOW FULL TABLES to get the list of tables in a database. For some problems, such as an empty .frm file for a table, this would fail and mysqlcheck then would neglect to check other tables in the database. (Bug#37527)

  • Updating a view with a subquery in the CHECK option could cause an assertion failure. (Bug#37460)

  • Statements that displayed the value of system variables (for example, SHOW VARIABLES) expect variable values to be encoded in character_set_system. However, variables set from the command line such as basedir or datadir were encoded using character_set_filesystem and not converted correctly. (Bug#37339)

  • CREATE INDEX could crash with InnoDB plugin 1.0.1. (Bug#37284)

  • Certain boolean-mode FULLTEXT searches that used the truncation operator did not return matching records and calculated relevance incorrectly. (Bug#37245)

  • On a 32-bit server built without big tables support, the offset argument in a LIMIT clause might be truncated due to a 64-bit to 32-bit cast. (Bug#37075)

  • For an InnoDB table with a FOREIGN KEY constraint, TRUNCATE TABLE may be performed using row by row deletion. If an error occurred during this deletion, the table would be only partially emptied. Now if an error occurs, the truncation operation is rolled back and the table is left unchanged. (Bug#37016)

  • The code for the ut_usectime() function in InnoDB did not handle errors from the gettimeofday() system call. Now it retries gettimeofday() several times and updates the value of the Innodb_row_lock_time_max status variable only if ut_usectime() was successful. (Bug#36819)

  • Use of CONVERT() with GROUP BY to convert numeric values to CHAR could return truncated results. (Bug#36772)

  • The mysql client, when built with Visual Studio 2005, did not display Japanese characters. (Bug#36279)

  • CREATE INDEX for InnoDB tables could under very rare circumstances cause the server to crash.. (Bug#36169)

  • A read past the end of the string could occur while parsing the value of the --innodb-data-file-path option. (Bug#36149)

  • Setting the slave_compressed_protocol system variable to DEFAULT failed in the embedded server. (Bug#35999)

  • For upgrades to MySQL 5.1 or higher, mysql_upgrade did not re-encode database or table names that contained nonalphanumeric characters. (They would still appear after the upgrade with the #mysql50# prefix described in Section 8.2.3, “Mapping of Identifiers to File Names”.) To correct this problem, it was necessary to run mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names manually. mysql_upgrade now runs that command automatically after performing the initial upgrade. (Bug#35934)

  • SHOW CREATE TABLE did not display a printable value for the default value of BIT columns. (Bug#35796)

  • The columns that store character set and collation names in several INFORMATION_SCHEMA tables were lengthened because they were not long enough to store some possible values: SCHEMATA, TABLES, COLUMNS, CHARACTER_SETS, COLLATIONS, and COLLATION_CHARACTER_SET_APPLICABILITY. (Bug#35789)

  • The max_length metadata value was calculated incorrectly for the FORMAT() function, which could cause incorrect result set metadata to be sent to clients. (Bug#35558)

  • InnoDB was not updating the Handler_delete or Handler_update status variables. (Bug#35537)

  • InnoDB could fail to generate AUTO_INCREMENT values if rows previously had been inserted containing literal values for the AUTO_INCREMENT column. (Bug#35498, Bug#36411, Bug#39830)

  • The CREATE_OPTIONS column for INFORMATION_SCHEMA.TABLES did not display the KEY_BLOCK_SIZE option. (Bug#35275)

  • Selecting from an INFORMATION_SCHEMA table into an incorrectly defined MERGE table caused an assertion failure. (Bug#35068)

  • perror on Windows did not know about Win32 system error codes. (Bug#34825)

  • EXPLAIN EXTENDED evaluation of aggregate functions that required a temporary table caused a server crash. (Bug#34773)

  • SHOW GLOBAL STATUS shows values that aggregate the session status values for all threads. This did not work correctly for the embedded server. (Bug#34517)

  • mysqldumpslow did not aggregate times. (Bug#34129)

  • mysql_config did not output -ldl (or equivalent) when needed for --libmysqld-libs, so its output could be insufficient to build applications that use the embedded server. (Bug#34025)

  • The mysql client incorrectly parsed statements containing the word “delimiter” in mid-statement.

    This fix is different from the one applied for this bug in MySQL 5.1.26. (Bug#33812)

    See also Bug#38158.

  • For a stored procedure containing a SELECT * ... RIGHT JOIN query, execution failed for the second call. (Bug#33811)

  • Previously, use of index hints with views (which do not have indexes) produced the error ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX and VIEW. Now this produces ERROR 1176 (HY000): Key '...' doesn't exist in table '...', the same error as for base tables without an appropriate index. (Bug#33461)

  • Three conditions were discovered that could cause an upgrade from MySQL 5.0 to 5.1 to fail: 1) Triggers associated with a table that had a #mysql50# prefix in the name could cause assertion failure. 2) ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME failed for databases that had a #mysql50# prefix if there were triggers in the database. 3) mysqlcheck --fix-table-name didn't use UTF8 as the default character set, resulting in parsing errors for tables with nonlatin symbols in their names and trigger definitions. (Bug#33094, Bug#41385)

  • Execution of a prepared statement that referred to a system variable caused a server crash. (Bug#32124)

  • Some division operations produced a result with incorrect precision. (Bug#31616)

  • Queries executed using join buffering of BIT columns could produce incorrect results. (Bug#31399)

  • ALTER TABLE CONVERT TO CHARACTER SET did not convert TINYTEXT or MEDIUMTEXT columns to a longer text type if necessary when converting the column to a different character set. (Bug#31291)

  • Server variables could not be set to their current values on Linux platforms. (Bug#31177)

    See also Bug#6958.

  • For installation on Solaris using pkgadd packages, the mysql_install_db script was generated in the scripts directory, but the temporary files used during the process were left there and not deleted. (Bug#31052)

  • Static storage engines and plugins that were disabled and dynamic plugins that were installed but disabled were not listed in the INFORMATION_SCHEMA appropriate PLUGINS or ENGINES table. (Bug#29263)

  • Some SHOW statements and retrievals from the INFORMATION_SCHEMA TRIGGERS and EVENTS tables used a temporary table and incremented the Created_tmp_disk_tables status variable, due to the way that TEXT columns are handled. The TRIGGERS.SQL_MODE, TRIGGERS.DEFINER, and EVENTS.SQL_MODE columns now are VARCHAR to avoid this problem. (Bug#29153)

  • For several read only system variables that were viewable with SHOW VARIABLES, attempting to view them with SELECT @@var_name or set their values with SET resulted in an unknown system variable error. Now they can be viewed with SELECT @@var_name and attempting to set their values results in a message indicating that they are read only. (Bug#28234)

  • On Windows, Visual Studio does not take into account some x86 hardware limitations, which led to incorrect results converting large DOUBLE values to unsigned BIGINT values. (Bug#27483)

  • SSL support was not included in some “generic” RPM packages. (Bug#26760)

  • The Questions status variable is intended as a count of statements sent by clients to the server, but was also counting statements executed within stored routines. (Bug#24289)

  • Setting the session value of the max_allowed_packet or net_buffer_length system variable was allowed but had no effect. The session value of these variables is now read only. (Bug#22891)

    See also Bug#32223.

  • A race condition between the mysqld.exe server and the Windows service manager could lead to inability to stop the server from the service manager. (Bug#20430)

  • On Windows, moving an InnoDB .ibd file and then symlinking to it in the database directory using a .sym file caused a server crash. (Bug#11894)

C.1.20. Changes in MySQL 5.1.30 (14 November 2008 General Availability)

Bugs fixed:

  • Partitioning: A SELECT using a range WHERE condition with an ORDER BY on a partitioned table caused a server crash. (Bug#40494)

  • Replication: Row-based replication failed with nonpartitioned MyISAM tables having no indexes. (Bug#40004)

  • With statement-based binary logging format and a transaction isolation level of READ COMMITTED or stricter, InnoDB printed an error because statement-based logging might lead to inconsistency between master and slave databases. However, this error was printed even when binary logging was not enabled (in which case, no such inconsistency can occur). (Bug#40360)

  • The CHECK TABLE ... FOR UPGRADE statement did not check for incompatible collation changes made in MySQL 5.1.24 (Bug#27877). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Section 2.4.3, “Checking Whether Tables or Indexes Must Be Rebuilt”.

    Prior to this fix, a binary upgrade (performed without dumping tables with mysqldump before the upgrade and reloading the dump file after the upgrade) would corrupt tables that have indexes that use the utf8_general_ci or ucs2_general_ci collation for columns that contain '?' LATIN SMALL LETTER SHARP S (German). After the fix, CHECK TABLE ... FOR UPGRADE properly detects the problem and warns about tables that need repair.

    However, the fix is not backward compatible and can result in a downgrading problem under these circumstances:

    1. Perform a binary upgrade to a version of MySQL that includes the fix.

    2. Run CHECK TABLE ... FOR UPGRADE (or mysqlcheck or mysql_upgrade) to upgrade tables.

    3. Perform a binary downgrade to a version of MySQL that does not include the fix.

    The solution is to dump tables with mysqldump before the downgrade and reload the dump file after the downgrade. Alternatively, drop and recreate affected indexes. (Bug#40053)

  • Some recent releases for Solaris 10 were built on Solaris 10 U5, which included a new version of libnsl.so that does not work on U4 or earlier. To correct this, Solaris 10 builds now are created on machines that do not have that upgraded libnsl.so, so that they will work on Solaris 10 installations both with and without the upgraded libnsl.so. (Bug#39074)

  • With binary logging enabled, CREATE TABLE ... SELECT and INSERT INTO ... SELECT failed if the source table was a log table. (Bug#34306)

  • XA transaction rollbacks could result in corrupted transaction states and a server crash. (Bug#28323)

  • ALTER TABLE for an ENUM column could change column values. (Bug#23113)

C.1.21. Changes in MySQL 5.1.29 (11 October 2008)

Functionality added or changed:

  • Important Change: The --skip-thread-priority option is now deprecated such that the server won't change the thread priorities by default. Giving threads different priorities might yield marginal improvements in some platforms (where it actually works), but it might instead cause significant degradation depending on the thread count and number of processors. Meddling with the thread priorities is a not a safe bet as it is very dependent on the behavior of the CPU scheduler and system where MySQL is being run. (Bug#35164, Bug#37536)

  • Important Change: The --log option now is deprecated and will be removed (along with the log system variable) in the future. Instead, use the --general_log option to enable the general query log and the --general_log_file=file_name option to set the general query log file name. The values of these options are available in the general_log and general_log_file system variables, which can be changed at runtime.

    Similar changes were made for the --log-slow-queries option and log_slow_queries system variable. You should use the --slow_query_log and --slow_query_log_file=file_name options instead (and the slow_query_log and slow_query_log_file system variables).

  • The BUILD/compile-solaris-* scripts now compile MySQL with the mtmalloc library rather than malloc. (Bug#38727)

Bugs fixed:

  • Incompatible Change: Replication: The default binary logging mode has been changed from MIXED to STATEMENT for compatibility with MySQL 5.0. (Bug#39812)

  • Incompatible Change: CHECK TABLE ... FOR UPGRADE did not check for incompatible collation changes made in MySQL 5.1.21 (Bug#29499) and 5.1.23 (Bug#27562, Bug#29461). This also affects mysqlcheck and mysql_upgrade, which cause that statement to be executed. See Section 2.4.3, “Checking Whether Tables or Indexes Must Be Rebuilt”. (Bug#39585)

    See also Bug#40984.

  • Incompatible Change: In connection with view creation, the server created arc directories inside database directories and maintained useless copies of .frm files there. Creation and renaming procedures of those copies as well as creation of arc directories has been discontinued.

    This change does cause a problem when downgrading to older server versions which manifests itself under these circumstances:

    1. Create a view v_orig in MySQL 5.1.29 or higher.

    2. Rename the view to v_new and then back to v_orig.

    3. Downgrade to an older 5.1.x server and run mysql_upgrade.

    4. Try to rename v_orig to v_new again. This operation fails.

    As a workaround to avoid this problem, use either of these approaches:

    • Dump your data using mysqldump before downgrading and reload the dump file after downgrading.

    • Instead of renaming a view after the downgrade, drop it and recreate it.

    The downgrade problem introduced by the fix for this bug has been addressed as Bug#40021. (Bug#17823)

  • Important Change: Replication: The SUPER privilege is now required to change the session value of binlog_format as well as its global value. For more information about binlog_format, see Section 16.1.2, “Replication Formats”. (Bug#39106)

  • Partitioning: Replication: Replication to partitioned MyISAM tables could be slow with row-based binary logging. (Bug#35843)

  • Partitioning: If an error occurred when evaluating a column of a partitioned table for the partitioning function, the row could be inserted anyway. (Bug#38083)

  • Partitioning: Using INSERT ... SELECT to insert records into a partitioned MyISAM table could fail if some partitions were empty and others are not. (Bug#38005)

  • Partitioning: Ordered range scans on partitioned tables were not always handled correctly. In some cases this caused some rows to be returned twice. The same issue also caused GROUP BY query results to be aggregated incorrectly. (Bug#30573, Bug#33257, Bug#33555)

  • Replication: Server code used in binary logging could in some cases be invoked even though binary logging was not actually enabled, leading to asserts and other server errors. (Bug#38798)

  • Replication: Replication of BLACKHOLE tables did not work with row-based binary logging. (Bug#38360)

  • Replication: In some cases, a replication master sent a special event to a reconnecting slave to keep the slave's temporary tables, but they still had references to the “old” slave SQL thread and used them to access that thread's data. (Bug#38269)

  • Replication: Replication filtering rules were inappropiately applied when executing BINLOG pseudo-queries. One way in which this problem showed itself was that, when replaying a binary log with mysqlbinlog, RBR events were sometimes not executed if the --replicate-do-db option was specified. Now replication rules are applied only to those events executed by the slave SQL thread. (Bug#36099)

  • Replication: For a CREATE TABLE ... SELECT statement that creates a table in a database other than the current one, the table could be created in the wrong database on replication slaves if row-based binary logging is used. (Bug#34707)

  • Replication: A statement did not always commit or roll back correctly when the server was shut down; the error could be triggered by having a failing UPDATE or INSERT statement on a transactional table, causing an implicit rollback. (Bug#32709)

    See also Bug#38262.

  • The Sun Studio compiler failed to build debug versions of the server due to use of features specific to gcc. (Bug#39451)

  • For a TIMESTAMP column in an InnoDB table, testing the column with multiple conditions in the WHERE clause caused a server crash. (Bug#39353)

  • References to local variables in stored procedures are replaced with NAME_CONST(name, value) when written to the binary log. However, an “illegal mix of collation” error might occur when executing the log contents if the value's collation differed from that of the variable. Now information about the variable collation is written as well. (Bug#39182)

  • Queries of the form SELECT ... REGEXP BINARY NULL could lead to a hung or crashed server. (Bug#39021)

  • Statements of the form INSERT ... SELECT .. ON DUPLICATE KEY UPDATE col_name = DEFAULT could result in a server crash. (Bug#39002)

  • Column names constructed due to wild-card expansion done inside a stored procedure could point to freed memory if the expansion was performed after the first call to the stored procedure. (Bug#38823)

  • Repeated CREATE TABLE ... SELECT statements, where the created table contained an AUTO_INCREMENT column, could lead to an assertion failure. (Bug#38821)

  • For deadlock between two transactions that required a timeout to resolve, all server tables became inaccessible for the duration of the deadlock. (Bug#38804)

  • When inserting a string into a duplicate-key error message, the server could improperly interpret the string, resulting in a crash. (Bug#38701)

  • A race condition between threads sometimes caused unallocated memory to be addressed. (Bug#38692)

  • A server crash resulted from concurrent execution of a multiple-table UPDATE that used a NATURAL or USING join together with FLUSH TABLES WITH READ LOCK or ALTER TABLE for the table being updated. (Bug#38691)

  • On ActiveState Perl, mysql-test-run.pl --start-and-exit started but did not exit. (Bug#38629)

  • An uninitialized variable in the query profiling code was corrected (detected by Valgrind). (Bug#38560)

  • A server crash resulted from execution of an UPDATE that used a derived table together with FLUSH TABLES. (Bug#38499)

  • Stored procedures involving substrings could crash the server on certain platforms due to invalid memory reads. (Bug#38469)

  • The handlerton-to-plugin mapping implementation did not free handler plugin references when the plugin was uninstalled, resulting in a server crash after several install/uninstall cycles. Also, on Mac OS X, the server crashed when trying to access an EXAMPLE table after the EXAMPLE plugin was installed. (Bug#37958)

  • The server crashed if an argument to a stored procedure was a subquery that returned more than one row. (Bug#37949)

  • When analyzing the possible index use cases, the server was incorrectly reusing an internal structure, leading to a server crash. (Bug#37943)

  • Access checks were skipped for SHOW PROCEDURE STATUS and SHOW FUNCTION STATUS, which could lead to a server crash or insufficient access checks in subsequent statements. (Bug#37908)

  • The <=> operator could return incorrect results when comparing NULL to DATE, TIME, or DATETIME values. (Bug#37526)

  • The combination of a subquery with a GROUP BY, an aggregate function calculated outside the subquery, and a GROUP BY on the outer SELECT could cause the server to crash. (Bug#37348)

  • The NO_BACKSLASH_ESCAPES SQL mode was ignored for LOAD DATA INFILE and SELECT INTO ... OUTFILE. The setting is taken into account now. (Bug#37114)

  • In some cases, references to views were confused with references to anonymous tables and privilege checking was not performed. (Bug#36086)

  • For crash reports on Windows, symbol names in stack traces were not correctly resolved. (Bug#35987)

  • ALTER EVENT changed the PRESERVE attribute of an event even when PRESERVE was not specified in the statement. (Bug#35981)

  • Host name values in SQL statements were not being checked for '@', which is illegal according to RFC952. (Bug#35924)

  • mysql_install_db failed on machines that had the host name set to localhost. (Bug#35754)

  • Dynamic plugins failed to load on i5/OS. (Bug#35743)

  • With the PAD_CHAR_TO_FULL_LENGTH SQL mode enabled, a ucs2 CHAR column returned additional garbage after trailing space characters. (Bug#35720)

  • A trigger for an InnoDB table activating multiple times could lead to AUTO_INCREMENT gaps. (Bug#31612)

  • mysqldump could fail to dump views containing a large number of columns. (Bug#31434)

  • The server could improperly type user-defined variables used in the select list of a query. (Bug#26020)

  • For access to the INFORMATION_SCHEMA.VIEWS table, the server did not check the SHOW VIEW and SELECT privileges, leading to inconsistency between output from that table and the SHOW CREATE VIEW statement. (Bug#22763)

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

C.1.22. Changes in MySQL 5.1.28 (28 August 2008)

Functionality added or changed:

Bugs fixed:

  • Performance: Incompatible Change: Some performance problems of SHOW ENGINE INNODB STATUS were reduced by removing used cells and Total number of lock structs in row lock hash table from the output. Now these values are present only if the UNIV_DEBUG symbol is defined at MySQL build time. (Bug#36941, Bug#36942)

  • Performance: Over-aggressive lock acquisition by InnoDB when calculating free space for tablespaces could result in performance degradation when multiple threads were executing statements on multi-core machines. (Bug#38185)

  • Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.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.

    Note

    Additional fixes were made in MySQL 5.1.41.

    (Bug#32167, CVE-2008-2079)

    See also Bug#39277.

  • Security Enhancement: The server consumed excess memory while parsing statements with hundreds or thousands of nested boolean conditions (such as OR (OR ... (OR ... ))). This could lead to a server crash or incorrect statement execution, or cause other client statements to fail due to lack of memory. The latter result constitutes a denial of service. (Bug#38296)

  • Incompatible Change: There were some problems using DllMain() hook functions on Windows that automatically do global and per-thread initialization for libmysqld.dll:

    • Per-thread initialization: MySQL internally counts the number of active threads, which causes a delay in my_end() if not all threads have exited. But there are threads that can be started either by Windows internally (often in TCP/IP scenarios) or by users. Those threads do not necessarily use libmysql.dll functionality but still contribute to the open-thread count. (One symptom is a five-second delay in times for PHP scripts to finish.)

    • Process-initialization: my_init() calls WSAStartup that itself loads DLLs and can lead to a deadlock in the Windows loader.

    To correct these problems, DLL initialization code now is not invoked from libmysql.dll by default. To obtain the previous behavior (DLL initialization code will be called), set the LIBMYSQL_DLLINIT environment variable to any value. This variable exists only to prevent breakage of existing Windows-only applications that do not call mysql_thread_init() and work okay today. Use of LIBMYSQL_DLLINIT is discouraged and is removed in MySQL 6.0. (Bug#37226, Bug#33031)

  • Incompatible Change: SHOW STATUS took a lot of CPU time for calculating the value of the Innodb_buffer_pool_pages_latched status variable. Now this variable is calculated and included in the output of SHOW STATUS only if the UNIV_DEBUG symbol is defined at MySQL build time. (Bug#36600)

  • Incompatible Change: An additional correction to the original MySQL 5.1.23 fix was made to normalize directory names before adding them to the list of directories. This prevents /etc/ and /etc from being considered different, for example. (Bug#20748)

    See also Bug#38180.

  • Partitioning: When a partitioned table had a TIMESTAMP column defined with CURRENT_TIMESTAMP as the default but with no ON UPDATE clause, the column's value was incorrectly set to CURRENT_TIMESTAMP when updating across partitions. (Bug#38272)

  • Partitioning: myisamchk failed with an assertion error when analyzing a partitioned MyISAM table. (Bug#37537)

  • Partitioning: A LIST partitioned MyISAM table returned erroneous results when an index was present on a column in the WHERE clause and NOT IN was used on that column.

    Searches using the index were also much slower then if the index were not present. (Bug#35931)

  • Partitioning: SELECT COUNT(*) was not correct for some partitioned tables using a storage engine that did not support HA_STATS_RECORDS_IS_EXACT. Tables using the ARCHIVE storage engine were known to be affected.

    This was because ha_partition::records() was not implemented, and so the default handler::records() was used in its place. However, this is not correct behavior if the storage engine does not support HA_STATS_RECORDS_IS_EXACT.

    The solution was to implement ha_partition::records() as a wrapper around the underlying partition records.

    As a result of this fix, the rows column in the output of EXPLAIN PARTITIONS now includes the total number of records in the partitioned table. (Bug#35745)

  • Partitioning: MyISAM recovery enabled with the --myisam-recover option did not work for partitioned MyISAM tables. (Bug#35161)

  • Partitioning: When one user was in the midst of a transaction on a partitioned table, a second user performing an ALTER TABLE on this table caused the server to hang. (Bug#34604)

  • Partitioning: Attempting to execute an INSERT DELAYED statement on a partitioned table produced the error Table storage engine for 'table' doesn't have this option, which did not reflect the source of the error accurately. The error message returned in such cases has been changed to DELAYED option not supported for table 'table'. (Bug#31210)

  • Replication: Some kinds of internal errors, such as Out of memory errors, could cause the server to crash when replicating statements with user variables.

    certain internal errors. (Bug#37150)

  • Replication: Row-based replication did not correctly copy TIMESTAMP values from a big-endian storage engine to a little-endian storage engine. (Bug#37076)

  • Replication: INSTALL PLUGIN and UNINSTALL PLUGIN caused row-based replication to fail.

    Note

    These statements are not replicated; however, when using row-based logging, the changes they introduce in the mysql system tables are written to the binary log.

    (Bug#35807)

  • Server-side cursors were not initialized properly, which could cause a server crash. (Bug#38486)

  • A server crash or Valgrind warnings could result when a stored procedure selected from a view that referenced a function. (Bug#38291)

  • A failure to clean up binary log events was corrected (detected by Valgrind). (Bug#38290)

  • Incorrect handling of aggregate functions when loose index scan was used caused a server crash. (Bug#38195)

  • Queries containing a subquery with DISTINCT and ORDER BY could cause a server crash. (Bug#38191)

  • The fix for Bug#20748 caused a problem such that on Unix, MySQL programs looked for options in ~/my.cnf rather than the standard location of ~/.my.cnf. (Bug#38180)

  • If the table definition cache contained tables with many BLOB columns, much memory could be allocated to caching BLOB values. Now a size limit on the cached BLOB values is enforced. (Bug#38002)

  • For InnoDB tables, ORDER BY ... DESC sometimes returned results in ascending order. (Bug#37830)

  • If a table has a BIT NOT NULL column c1 with a length shorter than 8 bits and some additional NOT NULL columns c2, ..., and a SELECT query has a WHERE clause of the form (c1 = constant) AND c2 ..., the query could return an unexpected result set. (Bug#37799)

  • The server returned unexpected results if a right side of the NOT IN clause consisted of the NULL value and some constants of the same type. For example, this query might return 3, 4, 5, and so forth if a table contained those values:

    SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2);
    

    (Bug#37761)

  • Setting the session value of the innodb_table_locks system variable caused a server crash. (Bug#37669)

  • Nesting of IF() inside of SUM() could cause an extreme server slowdown. (Bug#37662)

  • Killing a query that used an EXISTS subquery as the argument to SUM() or AVG() caused a server crash. (Bug#37627)

  • When using indexed ORDER BY sorting, incorrect query results could be produced if the optimizer switched from a covering index to a noncovering index. (Bug#37548)

  • After TRUNCATE TABLE for an InnoDB table, inserting explicit values into an AUTO_INCREMENT column could fail to increment the counter and result in a duplicate-key error for subsequent insertion of NULL. (Bug#37531)

  • Within stored programs or prepared statements, REGEXP could return incorrect results due to improper initialization. (Bug#37337)

  • For a MyISAM table with CHECKSUM = 1 and ROW_FORMAT = DYNAMIC table options, a data consistency check (maximum record length) could fail and cause the table to be marked as corrupted. (Bug#37310)

  • The max_length result set metadata value was calculated incorrectly under some circumstances. (Bug#37301)

  • If the length of a field was 3, internal InnoDB to integer type conversion didn't work on big-endian machines in the row_search_autoinc_column() function. (Bug#36793)

  • A query which had an ORDER BY DESC clause that is satisfied with a reverse range scan could cause a server crash for some specific CPU/compiler combinations. (Bug#36639)

  • The CSV storage engine returned success even when it failed to open a table's data file. (Bug#36638)

  • SELECT DISTINCT from a simple view on an InnoDB table, where all selected columns belong to the same unique index key, returned incorrect results. (Bug#36632)

  • Dumping information about locks in use by sending a SIGHUP signal to the server or by invoking the mysqladmin debug command could lead to a server crash in debug builds or to undefined behavior in production builds. (Bug#36579)

  • If initialization of an INFORMATION_SCHEMA plugin failed, INSTALL PLUGIN freed some internal plugin data twice. (Bug#36399)

  • For InnoDB tables, the DATA_FREE column of the INFORMATION_SCHEMA.TABLES displayed free space in kilobytes rather than bytes. Now it displays bytes. (Bug#36278)

  • When the fractional part in a multiplication of DECIMAL values overflowed, the server truncated the first operand rather than the longest. Now the server truncates so as to produce more precise multiplications. (Bug#36270)

  • The mysql client failed to recognize comment lines consisting of -- followed by a newline. (Bug#36244)

  • The server could crash with an assertion failure (or cause the client to get a “Packets out of order” error) when the expected query result was that it should terminate with a “Subquery returns more than 1 row” error. (Bug#36135)

  • The UUID() function returned UUIDs with the wrong time; this was because the offset for the time part in UUIDs was miscalculated. (Bug#35848)

  • The configure script did not allow utf8_hungarian_ci to be specified as the default collation. (Bug#35808)

  • On 64-bit systems, assigning values of 2 63 – 1 or larger to key_buffer_size caused memory overruns. (Bug#35616)

  • For InnoDB tables, REPLACE statements used “traditional” style locking, regardless of the setting of innodb_autoinc_lock_mode. Now REPLACE works the same way as “simple inserts” instead of using the old locking algorithm. (REPLACE statements are treated in the same way as INSERT statements.) (Bug#35602)

  • Freeing of an internal parser stack during parsing of complex stored programs caused a server crash. (Bug#35577, Bug#37269, Bug#37228)

  • mysqlbinlog left temporary files on the disk after shutdown, leading to the pollution of the temporary directory, which eventually caused mysqlbinlog to fail. This caused problems in testing and other situations where mysqlbinlog might be invoked many times in a relatively short period of time. (Bug#35543)

  • Index scans performed with the sort_union() access method returned wrong results, caused memory to be leaked, and caused temporary files to be deleted when the limit set by sort_buffer_size was reached. (Bug#35477, Bug#35478)

  • Table checksum calculation could cause a server crash for FEDERATED tables with BLOB columns containing NULL values. (Bug#34779)

  • A significant slowdown occurred when many SELECT statements that return many rows from InnoDB tables were running concurrently. (Bug#34409)

  • mysql_install_db failed if the server was running with an SQL mode of TRADITIONAL. This program now resets the SQL mode internally to avoid this problem. (Bug#34159)

  • Changes to build files were made to enable the MySQL distribution to compile on Microsoft Visual C++ Express 2008. (Bug#33907)

  • Fast ALTER TABLE operations were not fast for columns that used multibyte character sets. (Bug#33873)

  • The internal functions my_getsystime(), my_micro_time(), and my_micro_time_and_time() did not work correctly on Windows. One symptom was that uniqueness of UUID() values could be compromised. (Bug#33748)

  • Cached queries that used 256 or more tables were not properly cached, so that later query invalidation due to a TRUNCATE TABLE for one of the tables caused the server to hang. (Bug#33362)

  • mysql_upgrade attempted to use the /proc file system even on systems that do not have it. (Bug#31605)

  • mysql_install_db failed if the default storage engine was NDB. Now it explicitly uses MyISAM as the storage engine when running mysqld --bootstrap. (Bug#31315)

  • Several MySQL programs could fail if the HOME environment variable had an empty value. (Bug#30394)

  • On NetWare, mysql_install_db could appear to execute normally even if it failed to create the initial databases. (Bug#30129)

  • The Serbian translation for the ER_INCORRECT_GLOBAL_LOCAL_VAR error was corrected. (Bug#29738)

  • TRUNCATE TABLE for InnoDB tables returned a count showing too many rows affected. Now the statement returns 0 for InnoDB tables. (Bug#29507)

  • The BUILD/check-cpu build script failed if gcc had a different name (such as gcc.real on Debian). (Bug#27526)

  • In some cases, the parser interpreted the ; character as the end of input and misinterpreted stored program definitions. (Bug#26030)

  • The FLUSH PRIVILEGES statement did not produce an error when it failed. (Bug#21226)

  • After executing a prepared statement that accesses a stored function, the next execution would fail to find the function if the stored function cache was flushed in the meantime. (Bug#12093, Bug#21294)

C.1.23. Changes in MySQL 5.1.27 (Not released)

Functionality added or changed:

  • mysqltest now installs signal handlers and generates a stack trace if it crashes. (Bug#37003)

  • mysql-test-run.pl now supports --client-bindir and --client-libdir options for specifying the directory where client binaries and libraries are located. (Bug#34995)

Bugs fixed:

  • Partitioning: Incompatible Change: On Mac OS X with lower_case_table_names = 2, the server could not read partitioned tables whose names contained uppercase letters.

    Partitioned tables using mixed case names should be renamed or dropped before upgrading to this version of the server on Mac OS X. (Bug#37402)

  • Important Change: Partitioning: The statements ANALYZE TABLE, CHECK TABLE, OPTIMIZE TABLE, and REPAIR TABLE are now supported for partitioned tables.

    Also as a result of this fix, the following statements which were disabled in MySQL 5.1.24 have been re-enabled:

    • ALTER TABLE ... ANALYZE PARTITION

    • ALTER TABLE ... CHECK PARTITION

    • ALTER TABLE ... OPTIMIZE PARTITION

    • ALTER TABLE ... REPAIR PARTITION

    (Bug#20129)

    See also Bug#39434.

  • Replication: Issuing a DROP DATABASE while any temporary tables were open caused the server to switch to statement-based mode. (Bug#38773)

  • Replication: The --replicate-*-table options were not evaluated correctly when replicating multi-table updates.

    As a result of this fix, replication of multi-table updates no longer fails when an update references a missing table but does not update any of its columns. (Bug#37051)

  • The fix for Bug#33812 had the side effect of causing the mysql client not to be able to read some dump files produced with mysqldump. To address this, that fix was reverted. (Bug#38158)

C.1.24. Changes in MySQL 5.1.26 (30 June 2008)

Functionality added or changed:

  • Important Change: Incompatible Change: The FEDERATED storage engine is now disabled by default in binary distributions. The engine is still available and can be enabled by starting the server with the --federated option. (Bug#37069)

  • mysqltest was changed to be more robust in the case of a race condition that can occur for rapid disconnect/connect sequences with the server. The account used by mysqltest could reach its allowed simultaneous-sessions user limit if the connect attempt occurred before the server had fully processed the preceding disconnect. mysqltest now checks specificaly for a user-limits error when it connects; if that error occurs, it delays briefly before retrying. (Bug#23921)

Bugs fixed:

  • Replication: Row-based replication broke for utf8 CHAR columns longer than 85 characters. (Bug#37426)

  • Replication: Performing an insert on a table having an AUTO_INCREMENT column and an INSERT trigger that was being replicated from a master running MySQL 5.0 or any version of MySQL 5.1 up to and including MySQL 5.1.11 to a slave running MySQL 5.1.12 or later caused the replication slave to crash. (Bug#36443)

    See also Bug#33029.

  • Some binary distributions had a duplicate “-64bit” suffix in the file name. (Bug#37623)

  • NOT IN subqueries that selected MIN() or MAX() values but produced an empty result could cause a server crash. (Bug#37004)

  • ha_innodb.so was incorrectly installed in the lib/mysql directory rather than in lib/mysql/plugin. (Bug#36434)

  • An empty bit-string literal (b'') caused a server crash. Now the value is parsed as an empty bit value (which is treated as an empty string in string context or 0 in numeric context). (Bug#35658)

  • The code for detecting a byte order mark (BOM) caused mysql to crash for empty input. (Bug#35480)

  • The mysql client incorrectly parsed statements containing the word “delimiter” in mid-statement.

    The fix for this bug had the side effect of causing the problem reported in Bug#38158, so it was reverted in MySQL 5.1.27. (Bug#33812)

C.1.25. Changes in MySQL 5.1.25 (28 May 2008)

Functionality added or changed:

  • Incompatible Change: A change has been made to the way that the server handles prepared statements. This affects prepared statements processed at the SQL level (using the PREPARE statement) and those processed using the binary client-server protocol (using the mysql_stmt_prepare() C API function).

    Previously, changes to metadata of tables or views referred to in a prepared statement could cause a server crash when the statement was next executed, or perhaps an error at execute time with a crash occurring later. For example, this could happen after dropping a table and recreating it with a different definition.

    Now metadata changes to tables or views referred to by prepared statements are detected and cause automatic repreparation of the statement when it is next executed. Metadata changes occur for DDL statements such as those that create, drop, alter, rename, or truncate tables, or that analyze, optimize, or repair tables. Repreparation also occurs after referenced tables or views are flushed from the table definition cache, either implicitly to make room for new entries in the cache, or explicitly due to FLUSH TABLES.

    Repreparation is automatic, but to the extent that it occurs, performance of prepared statements is diminished.

    Table content changes (for example, with INSERT or UPDATE) do not cause repreparation, nor do SELECT statements.

    An incompatibility with previous versions of MySQL is that a prepared statement may now return a different set of columns or different column types from one execution to the next. For example, if the prepared statement is SELECT * FROM t1, altering t1 to contain a different number of columns causes the next execution to return a number of columns different from the previous execution.

    Older versions of the client library cannot handle this change in behavior. For applications that use prepared statements with the new server, an upgrade to the new client library is strongly recommended.

    Along with this change to statement repreparation, the default value of the table_definition_cache system variable has been increased from 128 to 256. The purpose of this increase is to lessen the chance that prepared statements will need repreparation due to referred-to tables/views having been flushed from the cache to make room for new entries.

    A status variable, Com_stmt_reprepare, has been introduced to track the number of repreparations. (Bug#27420, Bug#27430, Bug#27690)

  • Important Change: Some changes were made to CHECK TABLE ... FOR UPGRADE and REPAIR TABLE with respect to detection and handling of tables with incompatible .frm files (files created with a different version of the MySQL server). These changes also affect mysqlcheck because that program uses CHECK TABLE and REPAIR TABLE, and thus also mysql_upgrade because that program invokes mysqlcheck.

    • If your table was created by a different version of the MySQL server than the one you are currently running, CHECK TABLE ... FOR UPGRADE indicates that the table has an .frm file with an incompatible version. In this case, the result set returned by CHECK TABLE contains a line with a Msg_type value of error and a Msg_text value of Table upgrade required. Please do "REPAIR TABLE `tbl_name`" to fix it!

    • REPAIR TABLE without USE_FRM upgrades the .frm file to the current version.

    • If you use REPAIR TABLE ...USE_FRM and your table was created by a different version of the MySQL server than the one you are currently running, REPAIR TABLE will not attempt to repair the table. In this case, the result set returned by REPAIR TABLE contains a line with a Msg_type value of error and a Msg_text value of Failed repairing incompatible .FRM file.

      Previously, use of REPAIR TABLE ...USE_FRM with a table created by a different version of the MySQL server risked the loss of all rows in the table.

    (Bug#36055)

  • mysql_upgrade now has a --tmpdir option to enable the location of temporary files to be specified. (Bug#36469)

  • mysqldump now adds the LOCAL qualifier to the FLUSH TABLES statement that is sent to the server when the --master-data option is enabled. This prevents the FLUSH TABLES statement from replicating to slaves, which is disadvantageous because it would cause slaves to block while the statement executes. (Bug#35157)

    See also Bug#38303.

Bugs fixed:

  • Important Change: The server no longer issues warnings for truncation of excess spaces for values inserted into CHAR columns. This reverts a change in the previous release that caused warnings to be issued. (Bug#30059)

  • Replication: CREATE PROCEDURE and CREATE FUNCTION statements containing extended comments were not written to the binary log correctly, causing parse errors on the slave. (Bug#36570)

    See also Bug#32575.

  • Replication: When flushing tables, there was a slight chance that the flush occurred between the processing of one table map event and the next. Since the tables were opened one by one, subsequent locking of tables would cause the slave to crash. This problem was observed when replicating NDBCLUSTER or InnoDB tables, when executing multi-table updates, and when a trigger or a stored routine performed an (additional) insert on a table so that two tables were effectively being inserted into in the same statement. (Bug#36197)

  • Replication: CREATE VIEW statements containing extended comments were not written to the binary log correctly, causing parse errors on the slave. Now, all comments are stripped from such statements before being written to the binary log. (Bug#32575)

    See also Bug#36570.

  • On Windows 64-bit systems, temporary variables of long types were used to store ulong values, causing key cache initialization to receive distorted parameters. The effect was that setting key_buffer_size to values of 2GB or more caused memory exhaustion to due allocation of too much memory. (Bug#36705)

  • Multiple-table UPDATE statements that used a temporary table could fail to update all qualifying rows or fail with a spurious duplicate-key error. (Bug#36676)

  • A REGEXP match could return incorrect rows when the previous row matched the expression and used CONCAT() with an empty string. (Bug#36488)

  • mysqltest ignored the value of --tmpdir in one place. (Bug#36465)

  • When updating an existing instance (for example, from MySQL 5.0 to 5.1, or 5.1 to 6.0), the Instance Configuration Wizard unnecessarily prompted for a root password when there was an existing root password. (Bug#36305)

  • Conversion of a FLOAT ZEROFILL value to string could cause a server crash if the value was NULL. (Bug#36139)

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

  • mysqltest was performing escape processing for the --replace_result command, which it should not have been. (Bug#36041)

  • An error in calculation of the precision of zero-length items (such as NULL) caused a server crash for queries that employed temporary tables. (Bug#36023)

  • For EXPLAIN EXTENDED, execution of an uncorrelated IN subquery caused a crash if the subquery required a temporary table for its execution. (Bug#36011)

  • The MERGE storage engine did a table scan for SELECT COUNT(*) statements when it could calculate the number of records from the underlying tables. (Bug#36006)

  • The server crashed inside NOT IN subqueries with an impossible WHERE or HAVING clause, such as NOT IN (SELECT ... FROM t1, t2, ... WHERE 0). (Bug#36005)

  • The Event Scheduler was not designed to work under the embedded server. It is now disabled for the embedded server, and the event_scheduler system variable is not displayed. (Bug#35997)

  • Grouping or ordering of long values in unindexed BLOB or TEXT columns with the gbk or big5 character set crashed the server. (Bug#35993)

  • SET GLOBAL debug='' resulted in a Valgrind warning in DbugParse(), which was reading beyond the end of the control string. (Bug#35986)

  • The “prefer full scan on clustered primary key over full scan of any secondary key” optimizer rule introduced by Bug#26447 caused a performance regression for some queries, so it has been disabled. (Bug#35850)

  • The server ignored any covering index used for ref access of a table in a query with ORDER BY if this index was incompatible with the ORDER BY list and there was another covering index compatible with this list. As a result, suboptimal execution plans were chosen for some queries that used an ORDER BY clause. (Bug#35844)

  • mysql_upgrade did not properly update the mysql.event table. (Bug#35824)

  • An incorrect error and message was produced for attempts to create a MyISAM table with an index (.MYI) file name that was already in use by some other MyISAM table that was open at the same time. For example, this might happen if you use the same value of the INDEX DIRECTORY table option for tables belonging to different databases. (Bug#35733)

  • Enabling the read_only system variable while autocommit mode was enabled caused SELECT statements for transactional storage engines to fail. (Bug#35732)

  • The combination of GROUP_CONCAT(), DISTINCT, and LEFT JOIN could crash the server when the right table is empty. (Bug#35298)

  • Some binaries produced stack corruption messages due to being built with versions of bison older than 2.1. Builds are now created using bison 2.3. (Bug#34926)

  • The log_output system variable could be set to an illegal value. (Bug#34820)

  • On Windows 64-bit builds, an apparent compiler bug caused memory overruns for code in innobase/mem/*. Removed optimizations so as not to trigger this problem. (Bug#34297)

  • Several additional configuration scripts in the BUILD directory now are included in source distributions. These may be useful for users who wish to build MySQL from source. (See Section 2.3.3, “Installing from the Development Source Tree”, for information about what they do.) (Bug#34291)

  • Executing a FLUSH PRIVILEGES statement after creating a temporary table in the mysql database with the same name as one of the MySQL system tables caused the server to crash.

    Note

    While it is possible to shadow a system table in this way, the temporary table exists only for the current user and connection, and does not effect any user privileges.

    (Bug#33275)

  • UNION constructs cannot contain SELECT ... INTO except in the final SELECT. However, if a UNION was used in a subquery and an INTO clause appeared in the top-level query, the parser interpreted it as having appeared in the UNION and raised an error. (Bug#32858)

  • Assignment of relative path names to general_log_file or slow_query_log_file did not always work. (Bug#32748)

  • The mysql.servers table was not created during installation on Windows. (Bug#28680, Bug#32797)

  • The jp test suite was not working. (Bug#28563)

  • The internal init_time() library function was renamed to my_init_time() to avoid conflicts with external libraries. (Bug#26294)

  • The parser used signed rather than unsigned values in some cases that caused legal lengths in column declarations to be rejected. (Bug#15776)

C.1.26. Changes in MySQL 5.1.24 (08 April 2008)

Functionality added or changed:

  • Important Change: MySQL Cluster: Packaging: Beginning with this release, standard MySQL 5.1 binaries are no longer built with support for the NDBCLUSTER storage engine, and the NDBCLUSTER code included in 5.1 mainline sources is no longer guaranteed to be maintained or supported. Those using MySQL Cluster in MySQL 5.1.23 and earlier MySQL 5.1 mainline releases should upgrade to MySQL Cluster NDB 6.2.15 or a later MySQL Cluster NDB 6.2 or 6.3 release. (Bug#36193)

  • Important Change: The FEDERATED storage engine is not included in binary distributions of MySQL 5.1.24. (It will be included again in 5.1.25.)

  • Replication: Introduced the slave_exec_mode system variable to control whether idempotent or strict mode is used for replication conflict resolution. Idempotent mode suppresses duplicate-key, no-key-found, and some other errors, and is needed for circular replication, multi-master replication, and some other complex replication setups when using MySQL Cluster, where idempotent mode is the default. However, strict mode is the default for storage engines other than NDB. (Bug#31609)

  • Replication: When running the server with --binlog-format=MIXED or --binlog-format=STATEMENT, a query that referred to a system variable used the slave's value when replayed on the slave. This meant that, if the value of a system variable was inserted into a table, the slave differed from the master. Now, statements that refer to a system variable are marked as “unsafe”, which means that:

    (Bug#31168)

    See also Bug#34732.

  • The PROCESS privilege now is required to start or stop the InnoDB monitor tables (see Section 13.6.13.2, “SHOW ENGINE INNODB STATUS and the InnoDB Monitors”). Previously, no privilege was required. (Bug#34053)

  • For binary .tar.gz packages, mysqld and other binaries now are compiled with debugging symbols included to enable easier use with a debugger. If you do not need debugging symbols and are short on disk space, you can use strip to remove the symbols from the binaries. (Bug#33252)

  • Formerly, when the MySQL server crashed, the generated stack dump was numeric and required external tools to properly resolve the names of functions. This is not very helpful to users having a limited knowledge of debugging techniques. In addition, the generated stack trace contained only the names of functions and was formatted differently for each platform due to different stack layouts.

    Now it is possible to take advantage of newer versions of the GNU C Library provide a set of functions to obtain and manipulate stack traces from within the program. On systems that use the ELF binary format, the stack trace contains important information such as the shared object where the call was generated, an offset into the function, and the actual return address. Having the function name also makes possible the name demangling of C++ functions.

    The library generates meaningful stack traces on the following platforms: i386, x86_64, PowerPC, IA64, Alpha, and S390. On other platforms, a numeric stack trace is still produced, and the use of the resolve_stack_dump utility is still required. (Bug#31891)

  • mysqltest now has mkdir and rmdir commands for creating and removing directories. (Bug#31004)

  • The server uses less memory when loading privileges containing table grants. (Patch provided by Google.) (Bug#25175)

  • Added the Uptime_since_flush_status status variable, which indicates the number of seconds since the most recent FLUSH STATUS statement. (Community contribution by Jeremy Cole) (Bug#24822)

  • SHOW OPEN TABLES now supports FROM and LIKE clauses. (Bug#12183)

  • The new read-only global system variables report_host, report_password, report_port, and report_user system variables provide runtime access to the values of the corresponding --report-host, --report-password, --report-port, and --report-user options.

  • Formerly it was possible to specify an innodb_flush_method value of fdatasync to obtain the default flush behavior of using fdatasync() for flushing. This is no longer possible because it can be confusing that a value of fdatasync causes use of fsync() rather than fdatasync().

  • The use of InnoDB hash indexes now can be controlled by setting the new innodb_adaptive_hash_index system variable at server startup. By default, this variable is enabled. See Section 13.6.10.4, “Adaptive Hash Indexes”.

Bugs fixed:

  • Performance: InnoDB adaptive hash latches could be held too long during filesort operations, resulting in a server crash. Now the hash latch is released when a query on InnoDB tables performs a filesort. This eliminates the crash and may provide significant performance improvements on systems on which many queries using filesorts with temporary tables are being performed. (Bug#32149)

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

  • Important Change: Security Fix: 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 is now disallowed. This is now also true of these options when used with partitioned tables and individual partitions of such tables.

    Note

    Additional fixes were made in MySQL 5.1.28, 5.1.41.

    (Bug#32167, CVE-2008-2079)

    See also Bug#39277.

  • Security Fix: A client that connects to a malicious server could be tricked by the server into sending files from the client host to the server. This occurs because the libmysqlclient client library would respond to a FETCH LOCAL FILE request from the server even if the request is sent for statements from the client other than LOAD DATA LOCAL INFILE. The client library has been modified to respond to a FETCH LOCAL FILE request from the server only if is sent in response to a LOAD DATA LOCAL INFILE statement from the client.

    The client library now also checks whether CLIENT_LOCAL_FILE is set and refuses to send a local file if not.

    Note

    Binary distributions ship with the local-infile capability enabled. Applications that do not use this functionality should disable it to be safe.

    (Bug#29605)

  • Important Change: Security Enhancement: On Windows Vista and Windows Server 2008, a user without administrative privileges does not have write permissions to the Program Files directory where MySQL and the associated data files are normally installed. Using data files located in the standard Program Files installation directory could therefore cause MySQL to fail, or lead to potential security issues in an installed instance.

    To address the problem, on Windows XP, Windows Vista and Windows Server 2008, the datafiles and data file configuration are now set to the Microsoft recommended AppData folder. The AppData folder is typically located within the user's home directory.

    Important

    When upgrading an existing 5.1.23 or 6.0.4 installation of MySQL you must take a backup of your data and configuration file (my.ini before installing the new version. To migrate your data, either extract the data and re-import (using mysqldump, then upgrade and re-import using mysql), or back up your data, upgrade to the new version, and copy your existing data files from your old datadir directory to the new directory located within AppData.

    Failure to back up your data and follow these procedures may lead to data loss.

    (Bug#34593)

  • Incompatible Change: In MySQL 5.1.23, the last_errno and last_error members of the NET structure in mysql_com.h were renamed to client_last_errno and client_last_error. This was found to cause problems for connectors that use the internal NET structure for error handling. The change has been reverted. (Bug#34655)

    See also Bug#12713.

  • Incompatible Change: It was possible to use FRAC_SECOND as a synonym for MICROSECOND with DATE_ADD(), DATE_SUB(), and INTERVAL; now, using FRAC_SECOND with anything other than TIMESTAMPADD() or TIMESTAMPDIFF() produces a syntax error.

    It is now possible (and preferable) to use MICROSECOND with TIMESTAMPADD() and TIMESTAMPDIFF(), and FRAC_SECOND is now deprecated. (Bug#33834)

  • Incompatible Change: The UPDATE statement allowed NULL to be assigned to NOT NULL columns (the implicit default value for the column data type was assigned). This was changed so that on error occurs.

    This change was reverted, because the original report was determined not to be a bug: Assigning NULL to a NOT NULL column in an UPDATE statement should produce an error only in strict SQL mode and set the column to the implicit default with a warning otherwise, which was the original behavior. See Section 10.1.4, “Data Type Default Values”, and Bug#39265. (Bug#33699)

  • Incompatible Change: For packages that are built within their own prefix (for example, /usr/local/mysql) the plugin directory will be lib/plugin. For packages that are built to be installed into a system-wide prefix (such as RPM packages with a prefix of /usr), the plugin directory will be lib/mysql/plugin to ensure a clean /usr/lib hierarchy. In both cases, the $pkglibdir configuration setting is used at build time to set the plugin directory.

    The current plugin directory location is available as the value of the plugin_dir system variable as before, but the mysql_config script now has a --plugindir option that can be used externally to the server by third-party plugin writers to obtain the default plugin directory path name and configure their installation directory appropriately. (Bug#31736)

  • Incompatible Change: The utf8_general_ci and ucs2_general_ci collations did not sort the letter "U+00DF SHARP S" equal to 's'.

    As a result of this bug fix, indexes must be rebuilt for columns that use the utf8_general_ci or ucs2_general_ci collation for columns that contain SHARP S. See Section 2.4.3, “Checking Whether Tables or Indexes Must Be Rebuilt”. (Bug#27877)

    See also Bug#37046.

  • Important Change: Partitioning: The following statements did not function correctly with corrupted or crashed tables and have been disabled:

    • ALTER TABLE ... ANALYZE PARTITION

    • ALTER TABLE ... CHECK PARTITION

    • ALTER TABLE ... OPTIMIZE PARTITION

    • ALTER TABLE ... REPAIR PARTITION

    ALTER TABLE ... REBUILD PARTITION is unaffected by this change and continues to be available. This statement and ALTER TABLE ... REORGANIZE PARTITION may be used to analyze and optimize partitioned tables, since these operations cause the partition files to be rebuilt. (Bug#20129)

    See also Bug#39434.

  • Important Change: Replication: When the master crashed during an update on a transactional table while in autocommit mode, the slave failed. This fix causes every transaction (including autocommit transactions) to be recorded in the binlog as starting with a BEGIN and ending with a COMMIT or ROLLBACK. (Bug#26395)

  • Important Change: InnoDB free space information is now shown in the Data_free column of SHOW TABLE STATUS and in the DATA_FREE column of the INFORMATION_SCHEMA.TABLES table. (Bug#32440)

    See also Bug#11379.

  • Important Change: The server handled truncation of values having excess trailing spaces into CHAR, VARCHAR, and TEXT columns in different ways. This behavior has now been made consistent for columns of all three of these types, and now follows the existing behavior of VARCHAR columns in this regard; that is, a Note is always issued whenever such truncation occurs.

    This change does not affect columns of these three types when using a binary encoding; BLOB columns are also unaffected by the change, since they always use a binary encoding. (Bug#30059)

  • Important Change: An AFTER UPDATE trigger was not invoked when the UPDATE did not make any changes to the table for which the trigger was defined. Now AFTER UPDATE triggers behave the same in this regard as do BEFORE UPDATE triggers, which are invoked whether the UPDATE makes any changes in the table or not. (Bug#23771)

  • Replication: Important Note: Network timeouts between the master and the slave could result in corruption of the relay log. This fix rectifies a long-standing replication issue when using unreliable networks, including replication over wide area networks such as the Internet. If you experience reliability issues and see many You have an error in your SQL syntax errors on replication slaves, we strongly recommend that you upgrade to a MySQL version which includes this fix. (Bug#26489)

  • Partitioning: In some cases, matching rows from a partitioned MyISAM using a BIT column as the primary key were not found by queries. (Bug#34358)

  • Partitioning: Enabling innodb_file_per_table produced problems with partitioning and tablespace operations on partitioned InnoDB tables, in some cases leading to corrupt partitions or causing the server to crash. (Bug#33429)

  • Partitioning: A table defined using PARTITION BY KEY and having a BIT column referenced in the partitioning key did not behave correctly; some rows could be inserted into the wrong partition, causing wrong results to be returned from queries. (Bug#33379)

  • Partitioning: For InnoDB tables, there was a race condition involving the data dictionary and repartitioning. (Bug#33349)

  • Partitioning: When ALTER TABLE DROP PARTITION was executed on a table on which there was a trigger, the statement failed with an error. This occurred even if the trigger did not reference any tables. (Bug#32943)

  • Partitioning: Currently, all partitions of a partitioned table must use the same storage engine. One may optinally specify the storage engine on a per-partition basis; however, where this is the done, the storage engine must be the same as used by the table as a whole. ALTER TABLE did not enforce these rules correctly, the result being that incaccurate error messages were shown when trying to use the statement to change the storage engine used by an individual partition or partitions. (Bug#31931)

  • Partitioning: Using the DATA DIRECTORY and INDEX DIRECTORY options for partitions with CREATE TABLE or ALTER TABLE statements appeared to work on Windows, although they are not supported by MySQL on Windows systems, and subsequent attempts to use the tables referenced caused errors. Now these options are disabled on Windows, and attempting to use them generates a warning. (Bug#30459)

  • Replication: The failure of a CREATE TABLE ... ENGINE=InnoDB ... SELECT statement caused the slave to lose data. (Bug#35762)

  • Replication: When using row-based replication, a slave could crash at startup because it received a row-based replication event that InnoDB could not handle due to an incorrect test of the query string provided by MySQL, which was NULL for row-based replication events. (Bug#35226)

  • Replication: insert_id was not written to the binary log for inserts into BLACKHOLE tables. (Bug#35178)

  • Replication: When using statement-based replication and a DELETE, UPDATE, or INSERT ... SELECT statement using a LIMIT clause is encountered, a warning that the statement is not safe to replicate in statement mode is now issued; when using MIXED mode, the statement is now replicated using the row-based format. (Bug#34768)

  • Replication: mysqlbinlog did not output the values of auto_increment_increment and auto_increment_offset when both were equal to their default values (for both of these variables, the default is 1). This meant that a binary log recorded by a client using the defaults for both variables and then replayed on another client using its own values for either or both of these variables produced erroneous results. (Bug#34732)

    See also Bug#31168.

  • Replication: When the Windows version of mysqlbinlog read 4.1 binlogs containing LOAD DATA INFILE statements, it output backslashes as path separators, causing problems for client programs expecting forward slashes. In such cases, it now converts \\ to / in directory paths. (Bug#34355)

  • Replication: SHOW SLAVE STATUS failed when slave I/O was about to terminate. (Bug#34305)

  • Replication: The character sets and collations used for constant identifiers in stored procedures were not replicated correctly. (Bug#34289)

  • Replication: mysqlbinlog from a 5.1 or later MySQL distribution could not read binary logs generated by a 4.1 server when the logs contained LOAD DATA INFILE statements. (Bug#34141)

    This regression was introduced by Bug#32407.

  • Replication: A CREATE USER, DROP USER, or RENAME USER statement that fails on the master, or that is a duplicate of any of these statements, is no longer written to the binlog; previously, either of these occurrences could cause the slave to fail. (Bug#33862)

    See also Bug#29749.

  • Replication: SHOW BINLOG EVENTS could fail when the binlog contained one or more events whose size was close to the value of max_allowed_packet. (Bug#33413)

  • Replication: An extraneous ROLLBACK statement was written to the binary log by a connection that did not use any transactional tables. (Bug#33329)

  • Replication: mysqlbinlog failed to release all of its memory after terminating abnormally. (Bug#33247)

  • Replication: When a stored routine or trigger, running on a master that used MySQL 5.0 or MySQL 5.1.11 or earlier, performed an insert on an AUTO_INCREMENT column, the insert_id value was not replicated correctly to a slave running MySQL 5.1.12 or later (including any MySQL 6.0 release). (Bug#33029)

    See also Bug#19630.

  • Replication: The error message generated due to lack of a default value for an extra column was not sufficiently informative. (Bug#32971)

  • Replication: When a user variable was used inside an INSERT statement, the corresponding binlog event was not written to the binlog correctly. (Bug#32580)

  • Replication: When using row-based replication, deletes from a table with a foreign key constraint failed on the slave. (Bug#32468)

  • Replication: The --base64-output option for mysqlbinlog was not honored for all types of events. This interfered in some cases with performing point-in-time recovery. (Bug#32407)

    See also Bug#46640, Bug#34777.

  • Replication: SQL statements containing comments using -- syntax were not replayable by mysqlbinlog, even though such statements replicated correctly. (Bug#32205)

  • Replication: When using row-based replication from a master running MySQL 5.1.21 or earlier to a slave running 5.1.22 or later, updates of integer columns failed on the slave with Error in Unknown event: row application failed. (Bug#31583)

    This regression was introduced by Bug#21842.

  • Replication: Replicating write, update, or delete events from a master running MySQL 5.1.15 or earlier to a slave running 5.1.16 or later caused the slave to crash. (Bug#31581)

  • Replication: When using row-based replication, the slave stopped when attempting to delete nonexistent rows from a slave table without a primary key. In addition, no error was reported when this occurred. (Bug#31552)

  • Replication: Errors due to server ID conflicts were reported only in the slave's error log; now these errors are also shown in the Server_IO_State column in the output of SHOW SLAVE STATUS. (Bug#31316)

  • Replication: STOP SLAVE did not stop connection attempts properly. If the I/O slave thread was attempting to connect, STOP SLAVE waited for the attempt to finish, sometimes for a long period of time, rather than stopping the slave immediately. (Bug#31024)

    See also Bug#30932.

  • Replication: Issuing a DROP VIEW statement caused replication to fail if the view did not actually exist. (Bug#30998)

  • Replication: Replication of LOAD DATA INFILE could fail when read_buffer_size was larger than max_allowed_packet. (Bug#30435)

  • Replication: Replication crashed with the NDB storage engine when mysqld was started with --character-set-server=ucs2. (Bug#29562)

  • Replication: When using row-based logging, non-transactional updates were not written atomically to the binary log. If a non-transactional update was made concurrently with some other update, this could cause incorrect binary logging, and consequently the slave could diverge from the master. Now, non-transactional updates are always written atomically to the binary log. (Bug#29020)

  • Replication: Setting server_id did not update its value for the current session. (Bug#28908)

  • Replication: Some older servers wrote events to the binary log using different numbering from what is currently used, even though the file format number in the file is the same. Slaves running MySQL 5.1.18 and later could not read these binary logs properly. Binary logs from these older versions now are recognized and event numbers are mapped to the current numbering so that they can be interpreted properly. (Bug#27779, Bug#32434)

    This regression was introduced by Bug#22583.

  • Replication: MASTER_POS_WAIT() did not return NULL when the server was not a slave. (Bug#26622)

  • Replication: The nonspecific error message Wrong parameters to function register_slave resulted when START SLAVE failed to register on the master due to excess length of any the slave server options --report-host, --report-user, or --report-password. An error message specific to each of these options is now returned in such cases. The new error messages are:

    • Failed to register slave: too long 'report-host'

    • Failed to register slave: too long 'report-user'

    • Failed to register slave; too long 'report-password'

    (Bug#22989)

    See also Bug#19328.

  • Replication: PURGE BINARY LOGS TO and PURGE BINARY LOGS BEFORE did not handle missing binary log files correctly or in the same way. Now for both of these statements, if any files listed in the .index file are missing from the file system, the statement fails with an error. (Bug#18199, Bug#18453)

  • Replication: START SLAVE UNTIL MASTER_LOG_POS=position issued on a slave that was using --log-slave-updates and that was involved in circular replication would cause the slave to run and stop one event later than that specified by the value of position. (Bug#13861)

  • Manually replacing a binary log file with a directory having the same name caused an error that was not handled correctly. (Bug#35675)

  • Using LOAD DATA INFILE with a view could crash the server. (Bug#35469)

  • Selecting from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS could cause a server crash. (Bug#35406)

    See also Bug#35108.

  • For a TEMPORARY table, DELETE with no WHERE clause could fail when preceded by DELETE statements with a WHERE clause. (Bug#35392)

  • If the server crashed with an InnoDB error due to unavailability of undo slots, errors could persist during rollback when the server was restarted: There are two UNDO slot caches (for INSERT and UPDATE). If all slots end up in one of the slot caches, a request for a slot from the other slot cache would fail. This can happen if the request is for an UPDATE slot and all slots are in the INSERT slot cache, or vice versa. (Bug#35352)

  • In some cases, when too many clients tried to connect to the server, the proper SQLSTATE code was not returned. (Bug#35289)

  • Memory-allocation failures for attempts to set key_buffer_size to large values could result in a server crash. (Bug#35272)

  • For InnoDB tables, ALTER TABLE DROP failed if the name of the column to be dropped began with “foreign”. (Bug#35220)

  • Queries could return different results depending on whether ORDER BY columns were indexed. (Bug#35206)

  • When a view containing a reference to DUAL was created, the reference was removed when the definition was stored, causing some queries against the view to fail with invalid SQL syntax errors. (Bug#35193)

  • SELECT ... FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS caused the server to crash if the table referenced by a foreign key had been dropped. This issue was observed on Windows platforms only. (Bug#35108)

    See also Bug#35406.

  • Debugging symbols were missing for some executables in Windows binary distributions. (Bug#35104)

  • Nonconnection threads were being counted in the value of the Max_used_connections status variable. (Bug#35074)

  • A query that performed a ref_or_null join where the second table used a key having one or columns that could be NULL and had a column value that was NULL caused the server to crash. (Bug#34945)

    This regression was introduced by Bug#12144.

  • For some queries, the optimizer used an ordered index scan for GROUP BY or DISTINCT when it was supposed to use a loose index scan, leading to incorrect results. (Bug#34928)

  • Creating a foreign key on an InnoDB table that was created with an explicit AUTO_INCREMENT value caused that value to be reset to 1. (Bug#34920)

  • mysqldump failed to return an error code when using the --master-data option without binary logging being enabled on the server. (Bug#34909)

  • Under some circumstances, the value of mysql_insert_id() following a SELECT ... INSERT statement could return an incorrect value. This could happen when the last SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the value of mysql_insert_id() was changed by some previous statements. (Bug#34889)

  • Table and database names were mixed up in some places of the subquery transformation procedure. This could affect debugging trace output and further extensions of that procedure. (Bug#34830)

  • If fsync() returned ENOLCK, InnoDB could treat this as fatal and cause abnormal server termination. InnoDB now retries the operation. (Bug#34823)

  • CREATE SERVER and ALTER SERVER could crash the server if out-of-memory conditions occurred. (Bug#34790)

  • DROP SERVER does not release memory cached for server structures created by CREATE SERVER, so repeated iterations of these statements resulted in a memory leak. FLUSH PRIVILEGES now releases the memory allocated for CREATE SERVER. (Bug#34789)

  • A malformed URL used for a FEDERATED table's CONNECTION option value in a CREATE TABLE statement was not handled correctly and could crash the server. (Bug#34788)

  • Queries such as SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a (combining row constructors and subqueries in the FROM clause) could lead to assertion failure or unexpected error messages. (Bug#34763)

  • Using NAME_CONST() with a negative number and an aggregate function caused MySQL to crash. This could also have a negative impact on replication. (Bug#34749)

  • A memory-handling error associated with use of GROUP_CONCAT() in subqueries could result in a server crash. (Bug#34747)

  • For an indexed integer column col_name and a value N that is one greater than the maximum value allowed for the data type of col_name, conditions of the form WHERE col_name < N failed to return rows where the value of col_name is N - 1. (Bug#34731)

  • A server running with the --debug option could attempt to dereference a null pointer when opening tables, resulting in a crash. (Bug#34726)

  • Assigning an “incremental” value to the debug system variable did not add the new value to the current value. For example, if the current debug value was 'T', the statement SET debug = '+P' resulted in a value of 'P' rather than the correct value of 'P:T'. (Bug#34678)

  • For debug builds, reading from INFORMATION_SCHEMA.TABLES or INFORMATION_SCHEMA.COLUMNS could cause assertion failures. This could happen under rare circumstances when INFORMATION_SCHEMA fails to get information about a table (for example, when a connection is killed). (Bug#34656)

  • Executing a TRUNCATE TABLE statement on a table having both a foreign key reference and a DELETE trigger crashed the server. (Bug#34643)

  • Some subqueries using an expression that included an aggregate function could fail or in some cases lead to a crash of the server. (Bug#34620)

  • Dangerous pointer arithmetic crashed the server on some systems. (Bug#34598)

  • Creating a view inside a stored procedure could lead to a crash of the MySQL Server. (Bug#34587)

  • A server crash could occur if INFORMATION_SCHEMA tables built in memory were swapped out to disk during query execution. (Bug#34529)

  • CAST(AVG(arg) AS DECIMAL) produced incorrect results for non-DECIMAL arguments. (Bug#34512)

  • The per-thread debugging settings stack was not being deallocated before thread termination, resulting in a stack memory leak. (Bug#34424)

  • Executing an ALTER VIEW statement on a table crashed the server. (Bug#34337)

  • InnoDB could crash if overflow occurred for an AUTO_INCREMENT column. (Bug#34335)

  • For InnoDB, exporting and importing a table could corrupt TINYBLOB columns, and a subsequent ALTER TABLE could corrupt TINYTEXT columns as well. (Bug#34300)

  • DEFAULT 0 was not allowed for the YEAR data type. (Bug#34274)

  • Under some conditions, a SET GLOBAL innodb_commit_concurrency or SET GLOBAL innodb_autoextend_increment statement could fail. (Bug#34223)

  • mysqldump attempts to set the character_set_results system variable after connecting to the server. This failed for pre-4.1 servers that have no such variable, but mysqldump did not account for this and 1) failed to dump database contents; 2) failed to produce any error message alerting the user to the problem. (Bug#34192)

  • Use of stored functions in the WHERE clause for SHOW OPEN TABLES caused a server crash. (Bug#34166)

  • For a FEDERATED table with an index on a nullable column, accessing the table could crash a server, return an incorrect result set, or return ERROR 1030 (HY000): Got error 1430 from storage engine. (Bug#33946)

  • Passing anything other than an integer argument to a LIMIT clause in a prepared statement would fail. (This limitation was introduced to avoid replication problems; for example, replicating the statement with a string argument would cause a parse failure in the slave). Now, arguments to the LIMIT clause are converted to integer values, and these converted values are used when logging the statement. (Bug#33851)

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

  • A query using WHERE (column1='string1' AND column2=constant1) OR (column1='string2' AND column2=constant2), where col1 used a binary collation and string1 matched string2 except for case, failed to match any records even when matches were found by a query using the equivalent clause WHERE column2=constant1 OR column2=constant2. (Bug#33833)

  • Large unsigned integers were improperly handled for prepared statements, resulting in truncation or conversion to negative numbers. (Bug#33798)

  • Reuse of prepared statements could cause a memory leak in the embedded server. (Bug#33796)

  • The server crashed when executing a query that had a subquery containing an equality X=Y where Y referred to a named select list expression from the parent select. The server crashed when trying to use the X=Y equality for ref-based access. (Bug#33794)

  • Some queries using a combination of IN, CONCAT(), and an implicit type conversion could return an incorrect result. (Bug#33764)

  • In some cases a query that produced a result set when using ORDER BY ASC did not return any results when this was changed to ORDER BY DESC. (Bug#33758)

  • Disabling concurrent inserts caused some cacheable queries not to be saved in the query cache. (Bug#33756)

  • ORDER BY ... DESC sorts could produce misordered results. (Bug#33697)

  • The server could crash when REPEAT or another control instruction was used in conjunction with labels and a LEAVE instruction. (Bug#33618)

  • The parser allowed control structures in compound statements to have mismatched beginning and ending labels. (Bug#33618)

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

  • Threads created by the event scheduler were incorrectly counted against the max_connections thread limit, which could lead to client lockout. (Bug#33507)

  • Dropping a function after dropping the function's creator could cause the server to crash. (Bug#33464)

  • Certain combinations of views, subselects with outer references and stored routines or triggers could cause the server to crash. (Bug#33389)

  • SET GLOBAL myisam_max_sort_file_size=DEFAULT set myisam_max_sort_file_size to an incorrect value. (Bug#33382)

    See also Bug#31177.

  • ENUM- or SET-valued plugin variables could not be set from the command line. (Bug#33358)

  • Loading plugins via command-line options to mysqld could cause an assertion failure. (Bug#33345)

  • SLEEP(0) failed to return on 64-bit Mac OS X due to a bug in pthread_cond_timedwait(). (Bug#33304)

  • Using Control-R in the mysql client caused it to crash. (Bug#33288)

  • For MyISAM tables, CHECK TABLE (non-QUICK) and any form of REPAIR TABLE incorrected treated rows as corrupted under the combination of the following conditions:

    • The table had dynamic row format

    • The table had a CHAR (not VARCHAR) column longer than 127 bytes (for multi-byte character sets this could be less than 127 characters)

    • The table had rows with a signifcant length of more than 127 bytes significant length in that CHAR column (that is, a byte beyond byte position 127 must be a nonspace character)

    This problem affected CHECK TABLE, REPAIR TABLE, OPTIMIZE TABLE, ALTER TABLE. CHECK TABLE reported and marked the table as crashed if any row was present that fulfilled the third condition. The other statements deleted these rows. (Bug#33222)

  • Granting the UPDATE privilege on one column of a view caused the server to crash. (Bug#33201)

  • For DECIMAL columns used with the ROUND(X,D) or TRUNCATE(X,D) function with a nonconstant value of D, adding an ORDER BY for the function result produced misordered output. (Bug#33143)

    See also Bug#33402, Bug#30617.

  • The CSV engine did not honor update requests for BLOB columns when the new column value had the same length as the value to be updated. (Bug#33067)

  • After receiving a SIGHUP signal, the server could crash, and user-specified log options were ignored when reopening the logs. (Bug#33065)

  • When MySQL was built with OpenSSL, the SSL library was not properly initialized with information of which endpoint it was (server or client), causing connection failures. (Bug#33050)

  • Under some circumstances a combination of aggregate functions and GROUP BY in a SELECT query over a view could lead to incorrect calculation of the result type of the aggregate function. This in turn could lead to incorrect results, or to crashes on debug builds of the server. (Bug#33049)

  • For DISTINCT queries, MySQL 4.0 and 4.1 stopped reading joined tables as soon as the first matching row was found. However, this optimization was lost in MySQL 5.0, which instead read all matching rows. This fix for this regression may result in a major improvement in performance for DISTINCT queries in cases where many rows match. (Bug#32942)

  • Repeated creation and deletion of views within prepared statements could eventually crash the server. (Bug#32890)

    See also Bug#34587.

  • Incorrect assertions could cause a server crash for DELETE triggers for transactional tables. (Bug#32790)

  • In some cases where setting a system variable failed, no error was sent to the client, causing the client to hang. (Bug#32757)

  • Enabling the PAD_CHAR_TO_FULL_LENGTH SQL mode caused privilege-loading operations (such as FLUSH PRIVILEGES) to include trailing spaces from grant table values stored in CHAR columns. Authentication for incoming connections failed as a result. Now privilege loading does not include trailing spaces, regardless of SQL mode. (Bug#32753)

  • The SHOW ENGINE INNODB STATUS and SHOW ENGINE INNODB MUTEX statements incorrectly required the SUPER privilege rather than the PROCESS privilege. (Bug#32710)

  • Inserting strings with a common prefix into a table that used the ucs2 character set corrupted the table. (Bug#32705)

  • Tables in the mysql database that stored the current sql_mode value as part of stored program definitions were not updated with newer mode values (NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH). This causes various problems defining stored programs if those modes were included in the current sql_mode value. (Bug#32633)

  • A view created with a string literal for one of the columns picked up the connection character set, but not the collation. Comparison to that field therefore used the default collation for that character set, causing an error if the connection collation was not compatible with the default collation. The problem was caused by text literals in a view being dumped with a character set introducer even when this was not necessary, sometimes leading to a loss of collation information. Now the character set introducer is dumped only if it was included in the original query. (Bug#32538)

    See also Bug#21505.

  • Queries using LIKE on tables having indexed CHAR columns using either of the eucjpms or ujis character sets did not return correct results. (Bug#32510)

  • Executing a prepared statement associated with a materialized cursor sent to the client a metadata packet with incorrect table and database names. The problem occurred because the server sent the name of the temporary table used by the cursor instead of the table name of the original table.

    The same problem occured when selecting from a view, in which case the name of the table name was sent, rather than the name of the view. (Bug#32265)

  • On Windows, mysqltest_embedded.exe did not properly execute the send command. (Bug#32044)

  • A variable named read_only could be declared even though that is a reserved word. (Bug#31947)

  • On Windows, the build process failed with four parallel build threads. (Bug#31929)

  • Queries testing numeric constants containing leading zeroes against ZEROFILL columns were not evaluated correctly. (Bug#31887)

  • If an error occurred during file creation, the server sometimes did not remove the file, resulting in an unused file in the file system. (Bug#31781)

  • The mysqld crash handler failed on Windows. (Bug#31745)

  • When upgrading from MySQL 5.1.19 to any version between MySQL 5.1.20 to MySQL 5.1.23, the MySQL Instance Configuration Wizard would fail to account for the change in name for the mysqld-nt.exe to mysqld.exe, causing MySQL to fail to start properly after the upgrade. (Bug#31674)

  • The server returned the error message Out of memory; restart server and try again when the actual problem was that the sort buffer was too small. Now an appropriate error message is returned in such cases. (Bug#31590)

  • A table having an index that included a BLOB or TEXT column, and that was originally created with a MySQL server using version 4.1 or earlier, could not be opened by a 5.1 or later server. (Bug#31331)

  • The -, *, and / operators and the functions POW() and EXP() could misbehave when used with floating-point numbers. Previously they might return +INF, -INF, or NaN in cases of numeric overflow (including that caused by division by zero) or when invalid arguments were used. Now NULL is returned in all such cases. (Bug#31236)

  • The mysql_change_user() C API function caused global Com_xxx status variable values to be incorrect. (Bug#31222)

  • When sorting privilege table rows, the server treated escaped wildcard characters (\% and \_) the same as unescaped wildcard characters (% and _), resulting in incorrect row ordering. (Bug#31194)

  • On Windows, SHOW PROCESSLIST could display process entries with a State value of *** DEAD ***. (Bug#30960)

  • ROUND(X,D) or TRUNCATE(X,D) for nonconstant values of D could crash the server if these functions were used in an ORDER BY that was resolved using filesort. (Bug#30889)

  • Resetting the query cache by issuing a SET GLOBAL query_cache_size=0 statement caused the server to crash if it concurrently was saving a new result set to the query cache. (Bug#30887)

  • Manifest problems prevented MySQLInstanceConfig.exe from running on Windows Vista. (Bug#30823)

  • If an alias was used to refer to the value returned by a stored function within a subselect, the outer select recognized the alias but failed to retrieve the value assigned to it in the subselect. (Bug#30787)

  • Binary logging for a stored procedure differed depending on whether or not execution occurred in a prepared statement. (Bug#30604)

  • An orphaned PID file from a no-longer-running process could cause mysql.server to wait for that process to exit even though it does not exist. (Bug#30378)

  • The Table_locks_waited waited variable was not incremented in the cases that a lock had to be waited for but the waiting thread was killed or the request was aborted. (Bug#30331)

  • The Com_create_function status variable was not incremented properly. (Bug#30252)

  • View metadata returned from INFORMATION_SCHEMA.VIEWS was changed by the fix for Bug#11986, causing the information returned in MySQL 5.1 to differ from that returned in 5.0. (Bug#30217)

  • mysqld displayed the --enable-pstack option in its help message even if MySQL was configured without --with-pstack. (Bug#29836)

  • The mysql_config command would output CFLAGS values that were incompatible with C++ for the HP-UX platform. (Bug#29645)

  • Views were treated as insertable even if some base table columns with no default value were omitted from the view definition. (This is contrary to the condition for insertability that a view must contain all columns in the base table that do not have a default value.) (Bug#29477)

  • myisamchk always reported the character set for a table as latin1_swedish_ci (8) regardless of the table' actual character set. (Bug#29182)

  • InnoDB could return an incorrect rows-updated value for UPDATE statements. (Bug#29157)

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

  • For upgrading to a new major version using RPM packages (such as 4.1 to 5.0), if the installation procedure found an existing MySQL server running, it could fail to shut down the old server, but also erroneously removed the server's socket file. Now the procedure checks for an existing server package from a different vendor or major MySQL version. In such case, it refuses to install the server and recommends how to safely remove the old packages before installing the new ones. (Bug#28555)

  • mysqlhotcopy silently skipped databases with names consisting of two alphanumeric characters. (Bug#28460)

  • No information was written to the general query log for the COM_STMT_CLOSE, COM_STMT_RESET, and COM_STMT_SEND_LONG_DATA commands. (These occur when a client invokes the mysql_stmt_close(), mysql_stmt_reset() and mysql_stmt_send_long_data() C API functions.) (Bug#28386)

  • Previously, the parser accepted the ODBC { OJ ... LEFT OUTER JOIN ...} syntax for writing left outer joins. The parser now allows { OJ ... } to be used to write other types of joins, such as INNER JOIN or RIGHT OUTER JOIN. This helps with compatibility with some third-party applications, but is not official ODBC syntax. (Bug#28317)

  • The FEDERATED storage engine did not perform identifier quoting for column names that are reserved words when sending statements to the remote server. (Bug#28269)

  • The SQL parser did not accept an empty UNION=() clause. This meant that, when there were no underlying tables specified for a MERGE table, SHOW CREATE TABLE and mysqldump both output statements that could not be executed.

    Now it is possible to execute a CREATE TABLE or ALTER TABLE statement with an empty UNION=() clause. However, SHOW CREATE TABLE and mysqldump do not output the UNION=() clause if there are no underlying tables specified for a MERGE table. This also means it is now possible to remove the underlying tables for a MERGE table using ALTER TABLE ... UNION=(). (Bug#28248)

  • It was possible to exhaust memory by repeatedly running index_merge queries and never performing any FLUSH TABLES statements. (Bug#27732)

  • When utf8 was set as the connection character set, using SPACE() with a non-Unicode column produced an error. (Bug#27580)

    See also Bug#23637.

  • The parser rules for the SHOW PROFILE statement were revised to work with older versions of bison. (Bug#27433)

  • resolveip failed to produce correct results for host names that begin with a digit. (Bug#27427)

  • In ORDER BY clauses, mixing aggregate functions and nongrouping columns is not allowed if the ONLY_FULL_GROUP_BY SQL mode is enabled. However, in some cases, no error was thrown because of insufficient checking. (Bug#27219)

  • For the --record_log_pos option, mysqlhotcopy now determines the slave status information from the result of SHOW SLAVE STATUS by using the Relay_Master_Log_File and Exec_Master_Log_Pos values rather than the Master_Log_File and Read_Master_Log_Pos values. This provides a more accurate indication of slave execution relative to the master. (Bug#27101)

  • The MySQL Instance Configuration Wizard would not allow 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)

  • Memory corruption, a crash of the MySQL server, or both, could take place if a low-level I/O error occurred while an ARCHIVE table was being opened. (Bug#26978)

  • DROP DATABASE failed for attempts to drop databases with names that contained the legacy #mysql50# name prefix. (Bug#26703)

  • config-win.h unconditionally defined bool as BOOL, causing problems on systems where bool is 1 byte and BOOL is 4 bytes. (Bug#26461)

  • On Windows, for distributions built with debugging support, mysql could crash if the user typed Control-C. (Bug#26243)

  • The XPath boolean() function did not cast string and nodeset values correctly in some cases. It now returns TRUE for any nonempty string or nodeset and 0 for a NULL string, as specified in the XPath standard.. (Bug#26051)

  • When symbolic links were disabled, either with a server startup option or by enabling the NO_DIR_IN_CREATE SQL mode, CREATE TABLE silently ignored the DATA DIRECTORY and INDEX DIRECTORY table options. Now the server issues a warning if symbolic links are disabled when these table options are used. (Bug#25677)

  • Attempting to create an index with a prefix on a DECIMAL column appeared to succeed with an inaccurate warning message. Now, this action fails with the error Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys. (Bug#25426)

  • mysqlcheck -A -r did not correctly identify all tables that needed repairing. (Bug#25347)

  • On Windows, an error in configure.js caused installation of source distributions to fail. (Bug#25340)

  • The Qcache_free_blocks status variable did not display a value of 0 if the query cache was disabled. (Bug#25132)

  • The client library had no way to return an error if no connection had been established. This caused problems such as mysql_library_init() failing silently if no errmsg.sys file was available. (Bug#25097)

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

  • For Windows 64-bit builds, enabling shared-memory support caused client connections to fail. (Bug#24992)

  • mysql did not use its completion table. Also, the table contained few entries. (Bug#24624)

  • If a user installed MySQL Server and set a password for the root user, and then uninstalled and reinstalled MySQL Server to the same location, the user could not use the MySQL Instance Config wizard to configure the server because the uninstall operation left the previous data directory intact. The config wizard assumed that any new install (not an upgrade) would have the default data directory where the root user has no password. The installer now writes a registry key named FoundExistingDataDir. If the installer finds an existing data directory, the key will have a value of 1, otherwise it will have a value of 0. When MySQLInstanceConfig.exe is run, it will attempt to read the key. If it can read the key, and the value is 1 and there is no existing instance of the server (indicating a new installation), the Config Wizard will allow the user to input the old password so the server can be configured. (Bug#24215)

  • Logging of statements to log tables was incorrect for statements that contained utf8-incompatible binary strings. Incompatible sequences are hex-encoded now. (Bug#23924)

  • The MySQL header files contained some duplicate macro definitions that could cause compilation problems. (Bug#23839)

  • SHOW COLUMNS on a TEMPOARY table caused locking issues. (Bug#23588)

  • For distributions compiled with the bundled libedit library, there were difficulties using the mysql client to enter input for non-ASCII or multi-byte characters. (Bug#23097)

  • perror reported incomplete or inaccurate information. (Bug#23028, Bug#25177)

  • After stopping and starting the event scheduler, disabled events could remain in the execution queue. (Bug#22738)

  • The server produced a confusing error message when attempting to open a table that required a storage engine that was not loaded. (Bug#22708)

  • For views or stored programs created with an invalid DEFINER value, the error message was confusing (did not tie the problem to the DEFINER clause) and has been improved. (Bug#21854)

  • Warnings for deprecated syntax constructs used in stored routines make sense to report only when the routine is being created, but they were also being reported when the routine was parsed for loading into the execution cache. Now they are reported only at routine creation time. (Bug#21801)

  • On Mac OS X, mysqld did not react to Ctrl-C when run under gdb, even when run with the --gdb option. (Bug#21567)

  • CREATE ... SELECT did not always set DEFAULT column values in the new table. (Bug#21380)

  • mysql_config output did not include -lmygcc on some platforms when it was needed. (Bug#21158)

  • mysql-stress-test.pl and mysqld_multi.server.sh were missing from some binary distributions. (Bug#21023, Bug#25486)

  • The BENCHMARK() function, invoked with more than 2147483648 iterations (the size of a signed 32-bit integer), terminated prematurely. (Bug#20752)

  • mysqldumpslow returned a confusing error message when no configuration file was found. (Bug#20455)

  • MySQLInstanceConfig.exe could lose the innodb_data_home_dir setting when reconfiguring an instance. (Bug#19797)

  • DROP DATABASE did not drop orphaned FOREIGN KEY constraints. (Bug#18942)

  • CREATE TABLE allowed 0 as the default value for a TIMESTAMP column when the server was running in NO_ZERO_DATE mode. (Bug#18834)

  • A SET column whose definition specified 64 elements could not be updated using integer values. (Bug#15409)

  • If a SELECT calls a stored function in a transaction, and a statement within the function fails, that statement should roll back. Furthermore, if ROLLBACK is executed after that, the entire transaction should be rolled back. Before this fix, the failed statement did not roll back when it failed (even though it might ultimately get rolled back by a ROLLBACK later that rolls back the entire transaction). (Bug#12713)

    See also Bug#34655.

  • The parser incorrectly allowed SQLSTATE '00000' to be specified for a condition handler. (This is incorrect because the condition must be a failure condition and '00000' indicates success.) (Bug#8759)

  • MySQLInstanceConfig.exe did not save the innodb_data_home_dir value to the my.ini file under certain circumstances. (Bug#6627)

C.1.27. Changes in MySQL 5.1.23 (29 January 2008)

Functionality added or changed:

  • Important Change: Partitioning: Security Fix: It was possible, by creating a partitioned table using the DATA DIRECTORY and INDEX DIRECTORY options to gain privileges on other tables having the same name as the partitioned table. As a result of this fix, any table-level DATA DIRECTORY or INDEX DIRECTORY options are now ignored for partitioned tables. (Bug#32091, CVE-2007-5970)

    See also Bug#29325, Bug#32111.

  • Incompatible Change: In MySQL 5.1.6, when log tables were implemented, the default log destination for the general query and slow query log was TABLE. This default has been changed to FILE, which is compatible with MySQL 5.0, but incompatible with earlier releases of MySQL 5.1 from 5.1.6 to 5.1.20. If you are upgrading from MySQL 5.0 to 5.1.21 or higher, no logging option changes should be necessary. However, if you are upgrading from 5.1.6 through 5.1.20 to 5.1.21 or higher and were using TABLE logging, use the --log-output=TABLE option explicitly to preserve your server's table-logging behavior.

    The MySQL 5.1.23 fix is in addition to a fix in 5.1.21 because it turned out that the default was set in two places, only one of which was fixed the first time. (Bug#29993)

  • Incompatible Change

    The parser accepted statements that contained /* ... */ that were not properly closed with */, such as SELECT 1 /* + 2. Statements that contain unclosed /*-comments now are rejected with a syntax error.

    This fix has the potential to cause incompatibilities. Because of Bug#26302, which caused the trailing */ to be truncated from comments in views, stored routines, triggers, and events, it is possible that objects of those types may have been stored with definitions that now will be rejected as syntactically invalid. Such objects should be dropped and re-created so that their definitions do not contain truncated comments. (Bug#28779)

  • MySQL Cluster: The following improvements have been made in the ndb_size.pl utility:

    • The script can now be used with multiple databases; lists of databases and tables can also be excluded from analysis.

    • Schema name information has been added to index table calculations.

    • The database name is now an optional parameter, the exclusion of which causes all databases to be examined.

    • If selecting from INFORMATION_SCHEMA fails, the script now attempts to fall back to SHOW TABLES.

    • A --real_table_name option has been added; this designates a table to handle unique index size calculations.

    • The report title has been amended to cover cases where more than one database is being analyzed.

    Support for a --socket option was also added.

    For more information, see Section 17.4.21, “ndb_size.pl — NDBCLUSTER Size Requirement Estimator”. (Bug#28683, Bug#28253)

  • MySQL Cluster: Mapping of NDB error codes to MySQL storage engine error codes has been improved. (Bug#28423)

  • MySQL Cluster: The output from the cluster management client showing the progress of data node starts has been improved. (Bug#23354)

  • Partitioning: Error messages for partitioning syntax errors have been made more descriptive. (Bug#29368)

  • Replication: Replication of the following SQL functions now switches to row-based logging in MIXED mode, and generates a warning in STATEMENT mode:

    See Section 5.2.4.3, “Mixed Binary Logging Format”, for more information. (Bug#12092, Bug#28086, Bug#30244)

  • mysqldump information at the top of the output now shows the same information as mysqldump invoked with the -V option, namely the mysqldump version number, the MySQL server version, and the distribution. (Bug#32350)

  • mysqltest now has a change_user command to change the user for the current connection. (It invokes the mysql_change_user() C API function.) (Bug#31608)

  • mysql-test-run.pl now allows a suite name prefix to be specified in command-line arguments that name test cases. The test name syntax now is [suite_name.]test_name[.suffix]. For example, mysql-test-run.pl binlog.mytest runs the mytest.test test in the binlog test suite. (Bug#31400)

  • The --event-scheduler option without a value disabled the event scheduler. Now it enables the event scheduler. (Bug#31332)

  • mysqldump produces a -- Dump completed on DATE comment at the end of the dump if --comments is given. The date causes dump files for identical data take at different times to appear to be different. The new options --dump-date and --skip-dump-date control whether the date is added to the comment. --skip-dump-date suppresses date printing. The default is --dump-date (include the date in the comment). (Bug#31077)

  • Server parser performance was improved for expression parsing by lowering the number of state transitions and reductions needed. (Bug#30625)

  • Server parser performance was improved for identifier lists, expression lists, and UDF expression lists. (Bug#30333)

  • Server parser performance was improved for boolean expressions. (Bug#30237)

  • The LAST_EXECUTED column of the INFORMATION_SCHEMA.EVENTS table now indicates when the event started executing rather than when it finished executing. As a result, the ENDS column is never less than LAST_EXECUTED. (Bug#29830)

  • The mysql_odbc_escape_string() C API function has been removed. It has multi-byte character escaping issues, doesn't honor the NO_BACKSLASH_ESCAPES SQL mode and is not needed anymore by Connector/ODBC as of 3.51.17. (Bug#29592)

    See also Bug#41728.

  • If a MyISAM table is created with no DATA DIRECTORY option, the .MYD file is created in the database directory. By default, if MyISAM finds an existing .MYD file in this case, it overwrites it. The same applies to .MYI files for tables created with no INDEX DIRECTORY option. To suppress this behavior, start the server with the new --keep_files_on_create option, in which case MyISAM will not overwrite existing files and returns an error instead. (Bug#29325)

  • The default value of the connect_timeout system variable was increased from 5 to 10 seconds. This might help in cases where clients frequently encounter errors of the form Lost connection to MySQL server at 'XXX', system error: errno. (Bug#28359)

  • MySQL now can be compiled with gcc 4.2.x. There was a problem involving a conflict with the min() and max() macros in my_global.h. (Bug#28184)

  • mysql-test-run.pl now supports a --combination option for specifying options to the mysqld server. This option is similar to --mysqld but should be given two or more times. mysql-test-run.pl executes multiple test runs, using the options for each instance of --combination in successive runs.

    For test runs specific to a given test suite, an alternative to the use of --combination is to create a combinations file in the suite directory. The file should contain a section of options for each test run.

  • The argument for the mysql-test-run.pl --do-test and --skip-test options is now interpreted as a Perl regular expression if there is a pattern metacharacter in the argument value. This allows more flexible specification of which tests to perform or skip.

Bugs fixed:

  • Performance: If a LIMIT clause was present, the server could fail to consider indexes that could be used for ORDER BY or GROUP BY. (Bug#28404)

  • Security Fix: Replication: It was possible for any connected user to issue a BINLOG statement, which could be used to escalate privileges.

    Use of the BINLOG statement now requires the SUPER privilege. (Bug#31611, CVE-2007-6313)

  • Security Fix: Three vulnerabilities in yaSSL versions 1.7.5 and earlier were discovered that could lead to a server crash or execution of unauthorized code. The exploit requires a server with yaSSL enabled and TCP/IP connections enabled, but does not require valid MySQL account credentials. The exploit does not apply to OpenSSL.

    Warning

    The proof-of-concept exploit is freely available on the Internet. Everyone with a vulnerable MySQL configuration is advised to upgrade immediately.

    (Bug#33814, CVE-2008-0226, CVE-2008-0227)

  • 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: ALTER VIEW retained the original DEFINER value, even when altered by another user, which could allow that user to gain the access rights of the view. Now ALTER VIEW is allowed only to the original definer or users with the SUPER privilege. (Bug#29908)

  • Security Fix: When using a FEDERATED table, the local server could be forced to crash if the remote server returned a result with fewer columns than expected. (Bug#29801)

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

  • Incompatible Change: It is no longer possible to create CSV tables with NULL columns. However, for backwards compatibility, you can continue to use such tables that were created in previous MySQL releases. (Bug#32050)

  • Incompatible Change: With ONLY_FULL_GROUP_BY SQL mode enabled, queries such as SELECT a FROM t1 HAVING COUNT(*)>2 were not being rejected as they should have been.

    This fix results in the following behavior:

    • There is a check against mixing group and nongroup columns only when ONLY_FULL_GROUP_BY is enabled.

    • This check is done both for the select list and for the HAVING clause if there is one.

    This behavior differs from previous versions as follows:

    (Bug#31794)

  • Incompatible Change: Inserting a row with a NULL value for a DATETIME column results in a CSV file that the storage engine cannot read.

    All CSV tables now need to be defined with each column marked as NOT NULL. An error is raised if you try to create a CSV table with columns that are not defined with NOT NULL. (Bug#31473, Bug#32817)

  • Incompatible Change: SET PASSWORD statements now cause an implicit commit, and thus are prohibited within stored functions and triggers. (Bug#30904)

  • Incompatible Change: The mysql_install_db script could fail to locate some components (including resolveip) during execution if the --basedir option was specified on the command-line or within the my.cnf file. This was due to a conflict when comparing the compiled-in values and the supplied values.

    The --source-install command-line option to the script has been removed and replaced with the --srcdir option. mysql_install_db now locates components either using the compiled-in options, the --basedir option or --srcdir option. (Bug#30759)

  • Incompatible Change: Multiple-table DELETE statements containing ambiguous aliases could have unintended side effects such as deleting rows from the wrong table. Example:

    DELETE FROM t1 AS a2 USING t1 AS a1 INNER JOIN t2 AS a2;
    

    Now alias declarations can be declared only in the table_references part. Elsewhere in the statement, alias references are allowed but not alias declarations. Statements containing aliases that are no longer allowed must be rewritten. (Bug#30234)

    See also Bug#27525.

  • Incompatible Change: Within a stored routine, it is no longer allowable to declare a cursor for a SHOW or DESCRIBE statement. This happened to work in some instances, but is no longer supported. In many cases, a workaround for this change is to use the cursor with a SELECT query to read from an INFORMATION_SCHEMA table that produces the same information as the SHOW statement. (Bug#29223)

  • Incompatible Change: It was possible to create a view having a column whose name consisted of an empty string or space characters only.

    One result of this bug fix is that aliases for columns in the view SELECT statement are checked to ensure that they are legal column names. In particular, the length must be within the maximum column length of 64 characters, not the maximum alias length of 256 characters. This can cause problems for replication or loading dump files. For additional information and workarounds, see Section D.4, “Restrictions on Views”. (Bug#27695)

    See also Bug#31202.

  • Incompatible Change: Several type-preserving functions and operators returned an incorrect result type that does not match their argument types: COALESCE(), IF(), IFNULL(), LEAST(), GREATEST(), CASE. These now aggregate using the precise SQL types of their arguments rather than the internal type. In addition, the result type of the STR_TO_DATE() function is now DATETIME by default. (Bug#27216)

  • Incompatible Change: GRANT and REVOKE statements now cause an implicit commit, and thus are prohibited within stored functions and triggers. (Bug#21975, Bug#21422, Bug#17244)

  • Incompatible Change: It was possible for option files to be read twice at program startup, if some of the standard option file locations turned out to be the same directory. Now duplicates are removed from the list of files to be read.

    Also, users could not override system-wide settings using ~/.my.cnf because SYSCONFDIR/my.cnf was read last. The latter file now is read earlier so that ~/.my.cnf can override system-wide settings.

    The fix for this problem had a side effect such that on Unix, MySQL programs looked for options in ~/my.cnf rather than the standard location of ~/.my.cnf. That problem was addressed as Bug#38180. (Bug#20748)

  • Incompatible Change: A number of problems existed in the implementation of MERGE tables that could cause problems. The problems are summarized below:

    • Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table. This was caused in a number of situations:

      1. A thread trying to lock a MERGE table performs busy waiting while REPAIR TABLE or a similar table administration task is ongoing on one or more of its MyISAM tables.

      2. A thread trying to lock a MERGE table performs busy waiting until all threads that did REPAIR TABLE or similar table administration tasks on one or more of its MyISAM tables in LOCK TABLES segments do UNLOCK TABLES. The difference against problem #1 is that the busy waiting takes place after the administration task. It is terminated by UNLOCK TABLES only.

      3. Two FLUSH TABLES within a LOCK TABLES segment can invalidate the lock. This does not require a MERGE table. The first FLUSH TABLES can be replaced by any statement that requires other threads to reopen the table. In 5.0 and 5.1 a single FLUSH TABLES can provoke the problem.

    • Bug#26867 - Simultaneously executing LOCK TABLES and REPAIR TABLE on a MERGE table would result in memory/cpu hogging.

      Trying DML on a MERGE table, which has a child locked and repaired by another thread, made an infinite loop in the server.

    • Bug#26377 - Deadlock with MERGE and FLUSH TABLE

      Locking a MERGE table and its children in parent-child order and flushing the child deadlocked the server.

    • Bug#25038 - Waiting TRUNCATE TABLE

      Truncating a MERGE child, while the MERGE table was in use, let the truncate fail instead of waiting for the table to become free.

    • Bug#25700 - MERGE base tables get corrupted by OPTIMIZE TABLE, ANALYZE TABLE, or REPAIR TABLE.

      Repairing a child of an open MERGE table corrupted the child. It was necessary to FLUSH the child first.

    • Bug#30275 - MERGE tables: FLUSH TABLES or UNLOCK TABLES causes server to crash.

      Flushing and optimizing locked MERGE children crashed the server.

    • Bug#19627 - temporary merge table locking

      Use of a temporary MERGE table with nontemporary children could corrupt the children.

      Temporary tables are never locked. Creation of tables with nontemporary children of a temporary MERGE table is now prohibited.

    • Bug#27660 - Falcon: MERGE table possible

      It was possible to create a MERGE table with non-MyISAM children.

    • Bug#30273 - MERGE tables: Can't lock file (errno: 155)

      This was a Windows-only bug. Table administration statements sometimes failed with "Can't lock file (errno: 155)".

    The fix introduces the following changes in behavior:

    • This patch changes the behavior of temporary MERGE tables. Temporary MERGE must have temporary children. The old behavior was wrong. A temporary table is not locked. Hence even nontemporary children were not locked. See Bug#19627.

    • You cannot change the union list of a nontemporary MERGE table when LOCK TABLES is in effect. The following does not work:

      CREATE TABLE m1 ... ENGINE=MRG_MYISAM ...;
      LOCK TABLES t1 WRITE, t2 WRITE, m1 WRITE;
      ALTER TABLE m1 ... UNION=(t1,t2) ...;
      

      However, you can do this with a temporary MERGE table.

    • You cannot create a MERGE table with CREATE ... SELECT, neither as a temporary MERGE table, nor as a nontemporary MERGE table. For example, CREATE TABLE m1 ... ENGINE=MRG_MYISAM ... SELECT ...; causes the error message: table is not BASE TABLE.

    (Bug#19627, Bug#25038, Bug#25700, Bug#26377, Bug#26379, Bug#26867, Bug#27660, Bug#30275, Bug#30491)

  • Important Change: MySQL Cluster: AUTO_INCREMENT columns had the following problems when used in NDB tables:

    • The AUTO_INCREMENT counter was not updated correctly when such a column was updated.

    • AUTO_INCREMENT values were not prefetched beyond statement boundaries.

    • AUTO_INCREMENT values were not handled correctly with INSERT IGNORE statements.

    • After being set, ndb_autoincrement_prefetch_sz showed a value of 1, regardless of the value it had actually been set to.

    As part of this fix, the behavior of ndb_autoincrement_prefetch_sz has changed. Setting this to less than 32 no longer has any effect on prefetching within statements (where IDs are now always obtained in batches of 32 or more), but only between statements. The default value for this variable has also changed, and is now 1. (Bug#25176, Bug#31956, Bug#32055)

  • Partitioning: Important Note: An apostrophe or single quote character (') used in the DATA DIRECTORY, INDEX DIRECTORY, or COMMENT for a PARTITION clause caused the server to crash. When used as part of a CREATE TABLE statement, the crash was immediate. When used in an ALTER TABLE statement, the crash did not occur until trying to perform a SELECT or DML statement on the table. In either case, the server could not be completely restarted until the .frm file corresponding to the newly created or altered table was deleted.

    Note

    Upgrading to the current (or later) release solves this problem only for tables that are newly created or altered. Tables created or altered in previous versions of the server to include ' characters in PARTITION options must still be removed by deleting the corresponding .frm files and re-creating them afterwards.

    (Bug#30695)

  • Important Note: The RENAME DATABASE statement was removed and replaced with ALTER DATABASE db_name UPGRADE DATA DIRECTORY NAME. The RENAME DATABASE statement was intended for upgrading database directory names to the encoding format used in 5.1 for representing identifiers in the file system (see Section 8.2.3, “Mapping of Identifiers to File Names”). However, the statement was found to be dangerous because it could result in loss of database contents. See Section 12.1.32, “RENAME DATABASE Syntax”, and Section 12.1.1, “ALTER DATABASE Syntax”. (Bug#17565, Bug#21741, Bug#28360)

  • Replication: MySQL Cluster: Row-based replication from or to a big-endian machine where the table used the NDB storage engine failed, if the same table on the other machine was either non-NDB or the other machine was little-endian. (Bug#29549, Bug#30790)

    See also Bug#24231, Bug#30024, Bug#30133, Bug#30134.

  • MySQL Cluster: An improperly reset internal signal was observed as a hang when using events in the NDB API but could result in various errors. (Bug#33206)

  • MySQL Cluster: Incorrectly handled parameters could lead to a crash in the Transaction Coordinator during a node failure, causing other data nodes to fail. (Bug#33168)

  • MySQL Cluster: A memory leak occurred if a subscription start request was received by the subscription manager before the node making the request was fully connected to the cluster. (Bug#32652)

  • MySQL Cluster: A local checkpoint could sometimes be started before the previous LCP was restorable from a global checkpoint. (Bug#32519)

  • MySQL Cluster: High numbers of API nodes on a slow or congested network could cause connection negotiation to time out prematurely, leading to the following issues:

    • Excessive retries

    • Excessive CPU usage

    • Partially connected API nodes

    (Bug#32359)

  • MySQL Cluster: When a mysqld acting as a cluster SQL node starts the NDBCLUSTER storage engine, there is a delay during which some necessary data structures cannot be initialized until after it has connected to the cluster, and all MySQL Cluster tables should be opened as read-only. This worked correctly when the NDB binlog thread was running, but when it was not running, Cluster tables were not opened as read-only even when the data structures had not yet been set up. (Bug#32275, Bug#33763)

  • MySQL Cluster: The failure of a master node could lead to subsequent failures in local checkpointing. (Bug#32160)

  • MySQL Cluster: The management server was slow to respond when no data nodes were connected to the cluster. This was most noticeable when running SHOW in the management client. (Bug#32023)

  • MySQL Cluster: An error with an if statement in sql/ha_ndbcluster.cc could potentially lead to an infinite loop in case of failure when working with AUTO_INCREMENT columns in NDB tables. (Bug#31810)

  • MySQL Cluster: The NDB storage engine code was not safe for strict-alias optimization in gcc 4.2.1. (Bug#31761)

  • MySQL Cluster: It was possible in some cases for a node group to be “lost” due to missed local checkpoints following a system restart. (Bug#31525)

  • MySQL Cluster: A query against a table with TEXT or BLOB columns that would return more than a certain amount of data failed with Got error 4350 'Transaction already aborted' from NDBCLUSTER. (Bug#31482)

    This regression was introduced by Bug#29102.

  • MySQL Cluster: NDB tables having names containing nonalphanumeric characters (such as “$”) were not discovered correctly. (Bug#31470)

  • MySQL Cluster: A node failure during a local checkpoint could lead to a subsequent failure of the cluster during a system restart. (Bug#31257)

  • MySQL Cluster: A cluster restart could sometimes fail due to an issue with table IDs. (Bug#30975)

  • MySQL Cluster: When handling BLOB columns, the addition of read locks to the lock queue was not handled correctly. (Bug#30764)

  • MySQL Cluster: Discovery of NDB tables did not work correctly with INFORMATION_SCHEMA. (Bug#30667)

  • MySQL Cluster: A file system close operation could fail during a node or system restart. (Bug#30646)

  • MySQL Cluster: Transaction timeouts were not handled well in some circumstances, leading to excessive number of transactions being aborted unnecessarily. (Bug#30379)

  • MySQL Cluster: The cluster management client could not connect, and would hang instead. This issue affected Mac OS X 64-bit only. (Bug#30366)

  • MySQL Cluster: Attempting to restore a backup made on a cluster host using one endian to a machine using the other endian could cause the cluster to fail. (Bug#29674)

  • MySQL Cluster: Log event requests to ndb_mgmd could time out, causing it to fail. (Bug#29621)

  • MySQL Cluster: In some cases, the cluster managment server logged entries multiple times following a restart of mgmd. (Bug#29565)

  • MySQL Cluster: ndb_mgm --help did not display any information about the -a option. (Bug#29509)

  • MySQL Cluster: An interpreted program of sufficient size and complexity could cause all cluster data nodes to shut down due to buffer overruns. (Bug#29390)

  • MySQL Cluster: ndb_size.pl failed on tables with FLOAT columns whose definitions included commas (for example, FLOAT(6,2)). (Bug#29228)

  • MySQL Cluster: The error message for NDB error code 275 (Out of transaction records for complete phase) was missing. (Bug#29139)

  • MySQL Cluster: Reads on BLOB columns were not locked when they needed to be to guarantee consistency. (Bug#29102)

    See also Bug#31482.

  • MySQL Cluster: A query using joins between several large tables and requiring unique index lookups failed to complete, eventually returning Uknown Error after a very long period of time. This occurred due to inadequate handling of instances where the Transaction Coordinator ran out of TransactionBufferMemory, when the cluster should have returned NDB error code 4012 (Request ndbd time-out). (Bug#28804)

  • MySQL Cluster: There was a short interval during the startup process prior to the beginning of heartbeat detection such that, were an API or management node to reboot or a network failure to occur, data nodes could not detect this, with the result that there could be a lingering connection. (Bug#28445)

  • MySQL Cluster: The description of the --print option provided in the output from ndb_restore --help was incorrect. (Bug#27683)

  • MySQL Cluster: Restoring a backup made on a cluster host using one endian to a machine using the other endian failed for BLOB and DATETIME columns. (Bug#27543, Bug#30024)

  • MySQL Cluster: An invalid subselect on an NDB table could cause mysqld to crash. (Bug#27494)

  • MySQL Cluster: An attempt to perform a SELECT ... FROM INFORMATION_SCHEMA.TABLES whose result included information about NDB tables for which the user had no privileges crashed the MySQL Server on which the query was performed. (Bug#26793)

  • MySQL Cluster: Performing DELETE operations after a data node had been shut down could lead to inconsistent data following a restart of the node. (Bug#26450)

  • MySQL Cluster: UPDATE IGNORE could sometimes fail on NDB tables due to the use of unitialized data when checking for duplicate keys to be ignored. (Bug#25817)

  • MySQL Cluster: The cluster log was formatted inconsistently and contained extraneous newline characters. (Bug#25064)

  • MySQL Cluster: A restart of the cluster failed when more than 1 REDO phase was in use. (Bug#22696)

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

    This improves on an initial fix for this issue made in MySQL 5.1.13. (Bug#21072)

  • MySQL Cluster: An insufficiently descriptive and potentially misleading Error 4006 (Connect failure - out of connection objects...) was produced when either of the following two conditions occurred:

    1. There were no more transaction records in the transaction coordinator

    2. An NDB object in the NDB API was initialized with insufficient parallelism

    Separate error messages are now generated for each of these two cases. (Bug#11313)

  • Partitioning: Replication: Replication of partitioned tables using the InnoDB storage engine failed with binlog-format=ROW or binlog-format=MIXED. (Bug#28430)

  • Partitioning: It was possible to partition a table to which a foreign key referred. (Bug#32948)

  • Partitioning: A query of the form SELECT col1 FROM table GROUP BY (SELECT col2 FROM table LIMIT 1); against a partitioned table having a SET column crashed the server. (Bug#32772)

  • Partitioning: SHOW CREATE TABLE misreported the value of AUTO_INCREMENT for partitioned tables using either of the InnoDB or ARCHIVE storage engines. (Bug#32247)

  • Partitioning: Selecting from INFORMATION_SCHEMA.PARTITIONS while partition management statements (for example, ALTER TABLE ... ADD PARTITION) were executing caused the server to crash. (Bug#32178)

  • Partitioning: An error in the internal function mysql_unpack_partition() led to a fatal error in subsequent calls to open_table_from_share(). (Bug#32158)

  • Partitioning: Repeated updates of a table that was partitioned by KEY on a TIMESTAMP column eventually crashed the server. (Bug#32067)

  • Partitioning: Changing the storage engine used by a table having subpartitions led to a server crash. (Bug#31893)

  • Partitioning: ORDER BY ... DESC did not always work correctly when selecting from partitioned tables. (Bug#31890)

    See also Bug#31001.

  • Partitioning: Selecting from a table partitioned by KEY on a VARCHAR column whose size was greater than 65530 caused the server to crash. (Bug#31705)

  • Partitioning: INSERT DELAYED on a partitioned table crashed the server. The server now rejects the statement with an error. (Bug#31210)

  • Partitioning: Using ALTER TABLE to partition an existing table having an AUTO_INCREMENT column could crash the server. (Bug#30878)

    This regression was introduced by Bug#27405.

  • Partitioning: ALTER TABLE ... COALESCE PARTITION on a table partitioned by [LINEAR] HASH or [LINEAR] KEY caused the server to crash. (Bug#30822)

  • Partitioning: LIKE queries on tables partitioned by KEY and using third-party storage engines could return incomplete results. (Bug#30480)

    See also Bug#29320, Bug#29493, Bug#30563.

  • Partitioning: It was not possible to insert the greatest possible value for a given data type into a partitioned table. For example, consider a table defined as shown here:

    CREATE TABLE t (c BIGINT UNSIGNED)
        PARTITION BY RANGE(c) (
          PARTITION p0 VALUES LESS THAN MAXVALUE
        );
    

    The largest possible value for a BIGINT UNSIGNED column is 18446744073709551615, but the statement INSERT INTO t VALUES (18446744073709551615); would fail, even though the same statement succeeded were t not a partitioned table.

    In other words, MAXVALUE was treated as being equal to the greatest possible value, rather than as a least upper bound. (Bug#29258)

  • Cluster Replication: Replication: A node failure during replication could lead to buckets out of order; now active subscribers are checked for, rather than empty buckets. (Bug#31701)

  • Cluster Replication: Replication: Incorrect handling of INSERT plus DELETE operations with regard to local checkpoints caused data node failures in multi-master replication setups. (Bug#30914)

  • Replication: When dropping a database containing a stored procedure while using row-cased replication, the delete of the stored procedure from the mysql.proc table was recorded in the binary log following the DROP DATABASE statement. To correct this issue, DROP DATABASE now uses statement-based replication. (Bug#32435)

  • Replication: It was possible for the name of the relay log file to exceed the amount of memory reserved for it, possibly leading to a crash of the server. (Bug#31836)

    See also Bug#28597.

  • Replication: Corruption of log events caused the server to crash on 64-bit Linux systems having 4 GB or more of memory. (Bug#31793)

  • Replication: Trying to replicate an update of a row that was missing on the slave led to a failure on the slave. (Bug#31702)

  • Replication: Use of the @@hostname system variable in inserts in mysql_system_tables_data.sql did not replicate. The workaround is to select its value into a user variable (which does replicate) and insert that. (Bug#31167)

  • Replication: Table names were displayed as binary “garbage” characters in slave error messages. The issue was observed on 64-bit Windows but may have effected other platforms. (Bug#30854)

  • Replication: One thread could read uninitialized memory from the stack of another thread. This issue was only known to occur in a mysqld process acting as both a master and a slave. (Bug#30752)

  • Replication: It was possible to set SQL_SLAVE_SKIP_COUNTER such that the slave would jump into the middle of a transaction. This fix improves on one made for this bug in MySQL 5.1.20; the previous fix insured that the slave could not be made to jump into the middle of an event group, but the slave failed to recognize that BEGIN, COMMIT, and ROLLBACK statements could begin or end an event group. (Bug#28618)

    See also Bug#12691.

  • Replication: Due a previous change in how the default name and location of the binary log file were determined, replication failed following some upgrades. (Bug#28597, Bug#28603)

    See also Bug#31836.

    This regression was introduced by Bug#20166.

  • Replication: Stored procedures having BIT parameters were not replicated correctly. (Bug#26199)

  • Replication: Issuing SHOW SLAVE STATUS as mysqld was shutting down could cause a crash. (Bug#26000)

  • Replication: If a temporary error occured inside an event group on an event that was not the first event of the group, the slave could get caught in an endless loop because the retry counter was reset whenever an event was executed successfully. (Bug#24860)

    See also Bug#12691, Bug#23171.

  • Replication: An UPDATE statement using a stored function that modified a nontransactional table was not logged if it failed. This caused the copy of the nontransactional table on the master have a row that the copy on the slave did not.

    In addition, when an INSERT ... ON DUPLICATE KEY UPDATE statement encountered a duplicate key constraint, but the UPDATE did not actually change any data, the statement was not logged. As a result of this fix, such statements are now treated the same for logging purposes as other UPDATE statements, and so are written to the binary log. (Bug#23333)

    See also Bug#12713.

  • Replication: A replication slave sometimes failed to reconnect because it was unable to run SHOW SLAVE HOSTS. It was not necessary to run this statement on slaves (since the master should track connection IDs), and the execution of this statement by slaves was removed. (Bug#21132)

    See also Bug#13963, Bug#21869.

  • Replication: A replication slave sometimes stopped for changes that were idempotent (that is, such changes should have been considered “safe”), even though it should have simply noted that the change was already done, and continued operation. (Bug#19958)

  • Replication: Replicating from a master table to a slave table where the size of a CHAR or VARCHAR column was a different size would cause mysqld to crash. For more information on replicating with different column definitions, see Section 16.3.1.5, “Replication with Differing Table Definitions on Master and Slave”.

  • Cluster Replication: A replication slave could return “garbage” data that was not in recognizable row format due to a problem with the internal all_set() method. (Bug#33375)

  • Cluster Replication: Memory was mistakenly freed for NdbBlob objects when adding an index while replicating the cluster, which could cause mysqld to crash. (Bug#33142)

    See also Bug#18106.

  • Cluster Replication: Under certain conditions, the slave stopped processing relay logs. This resulted in the logs never being cleared and the slave eventually running out of disk space. (Bug#31958)

  • Cluster Replication: Replicating NDB tables with extra VARCHAR columns on the master caused the slave to fail. (Bug#31646)

    See also Bug#29549.

  • Cluster Replication: When the master mysqld crashed or was restarted, no LOST_EVENTS entry was made in the binlog. (Bug#31484)

    See also Bug#21494.

  • Cluster Replication: An issue with the mysql.ndb_apply_status table could cause NDB schema autodiscovery to fail in certain rare circumstances. (Bug#20872)

  • Cluster API: A call to CHECK_TIMEDOUT_RET() in mgmapi.cpp should have been a call to DBUG_CHECK_TIMEDOUT_RET(). (Bug#30681)

  • API: When the language option was not set correctly, API programs calling mysql_server_init() crashed. This issue was observed only on Windows platforms. (Bug#31868)

  • Corrected a typecast involving bool on Mac OS X 10.5 (Leopard), which evaluated differently from earlier Mac OS X versions. (Bug#38217)

  • Use of uninitialized memory for filesort in a subquery caused a server crash. (Bug#33675)

  • CREATE TABLE ... SELECT created tables that for date columns used the obsolete Field_date type instead of Field_newdate. (Bug#33256)

  • Some valid SELECT statements could not be used as views due to incorrect column reference resolution. (Bug#33133)

  • The fix for Bug#11230 and Bug#26215 introduced a significant input-parsing slowdown for the mysql client. This has been corrected. (Bug#33057)

  • The correct data type for a NULL column resulting from a UNION could be determined incorrectly in some cases: 1) Not correctly inferred as NULL depending on the number of selects; 2) Not inferred correctly as NULL if one select used a subquery. (Bug#32848)

  • For queries containing GROUP_CONCAT(DISTINCT col_list ORDER BY col_list), there was a limitation that the DISTINCT columns had to be the same as ORDER BY columns. Incorrect results could be returned if this was not true. (Bug#32798)

  • SHOW EVENTS and selecting from the INFORMATION_SCHEMA.EVENTS table failed if the current database was INFORMATION_SCHEMA. (Bug#32775)

  • Use of the cp932 character set with CAST() in an ORDER BY clause could cause a server crash. (Bug#32726)

  • A subquery using an IS NULL check of a column defined as NOT NULL in a table used in the FROM clause of the outer query produced an invalid result. (Bug#32694)

  • mysqld_safe looked for error messages in the wrong location. (Bug#32679)

  • Specifying a nonexistent column for an INSERT DELAYED statement caused a server crash rather than producing an error. (Bug#32676)

  • An issue with the NO_ENGINE_SUBSTITUTION sql_mode database can cause the creation of stored routines to fail. If you are having problems with creating stored routines while using this sql_mode value, remove this value from your sql_mode setting. (Bug#32633)

  • Use of CLIENT_MULTI_QUERIES caused libmysqld to crash. (Bug#32624)

  • The INTERVAL() function incorrectly handled NULL values in the value list. (Bug#32560)

  • Use of a NULL-returning GROUP BY expression in conjunction with WITH ROLLUP could cause a server crash. (Bug#32558)

    See also Bug#31095.

  • ORDER BY UpdateXML(...) caused the server to crash in queries where UpdateXML() returned NULL. (Bug#32557)

  • A SELECT ... GROUP BY bit_column query failed with an assertion if the length of the BIT column used for the GROUP BY was not an integer multiple of 8. (Bug#32556)

  • Using SELECT INTO OUTFILE with 8-bit ENCLOSED BY characters led to corrupted data when the data was reloaded using LOAD DATA INFILE. This was because SELECT INTO OUTFILE failed to escape the 8-bit characters. (Bug#32533)

  • For FLUSH TABLES WITH READ LOCK, the server failed to properly detect write-locked tables when running with low-priority updates, resulting in a crash or deadlock. (Bug#32528)

  • The rules for valid column names were being applied differently for base tables and views. (Bug#32496)

  • A query of the form SELECT @user_variable := constant AS alias FROM table GROUP BY alias WITH ROLLUP crashed the server. (Bug#32482)

  • Sending several KILL QUERY statements to target a connection running SELECT SLEEP() could freeze the server. (Bug#32436)

  • ssl-cipher values in option files were not being read by libmysqlclient. (Bug#32429)

  • Repeated execution of a query containing a CASE expression and numerous AND and OR relations could crash the server. The root cause of the issue was determined to be that the internal SEL_ARG structure was not properly initialized when created. (Bug#32403)

  • Referencing within a subquery an alias used in the SELECT list of the outer query was incorrectly permitted. (Bug#32400)

  • If a global read lock acquired with FLUSH TABLES WITH READ LOCK was in effect, executing ALTER TABLE could cause a server crash. (Bug#32395)

  • An ORDER BY query on a view created using a FEDERATED table as a base table caused the server to crash. (Bug#32374)

  • Comparison of a BIGINT NOT NULL column with a constant arithmetic expression that evaluated to NULL mistakenly caused the error Column '...' cannot be null (error 1048). (Bug#32335)

  • Assigning a 65,536-byte string to a TEXT column (which can hold a maximum of 65,535 bytes) resulted in truncation without a warning. Now a truncation warning is generated. (Bug#32282)

  • The LAST_DAY() function returns a DATE value, but internally the value did not have the time fields zeroed and calculations involving the value could return incorrect results. (Bug#32270)

  • MIN() and MAX() could return incorrect results when an index was present if a loose index scan was used. (Bug#32268)

  • Some uses of user variables in a query could result in a server crash. (Bug#32260)

  • Memory corruption could occur due to large index map in Range checked for each record status reported by EXPLAIN SELECT. The problem was based in an incorrectly calculated length of the buffer used to store a hexadecimal representation of an index map, which could result in buffer overrun and stack corruption under some circumstances. (Bug#32241)

  • Various test program cleanups were made: 1) mytest and libmysqltest were removed. 2) bug25714 displays an error message when invoked with incorrect arguments or the --help option. 3) mysql_client_test exits cleanly with a proper error status. (Bug#32221)

  • The default grant tables on Windows contained information for host production.mysql.com, which should not be there. (Bug#32219)

  • Under certain conditions, the presence of a GROUP BY clause could cause an ORDER BY clause to be ignored. (Bug#32202)

  • For comparisons of the form date_col OP datetime_const (where OP is =, <, >, <=, or >=), the comparison is done using DATETIME values, per the fix for Bug#27590. However that fix caused any index on date_col not to be used and compromised performance. Now the index is used again. (Bug#32198)

  • DATETIME arguments specified in numeric form were treated by DATE_ADD() as DATE values. (Bug#32180)

  • Killing a statement could lead to a race condition in the server. (Bug#32148)

  • InnoDB does not support SPATIAL indexes, but could crash when asked to handle one. Now an error is returned. (Bug#32125)

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

  • mysql-test-run.pl used the --user option when starting mysqld, which produces warnings if the current user is not root. Now --user is added only for root. (Bug#32078)

  • mysqlslap was missing from the MySQL 5.1.22 Linux RPM packages. (Bug#32077)

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

  • Within a subquery, UNION was handled differently than at the top level, which could result in incorrect results or a server crash. (Bug#32036, Bug#32051)

  • On 64-bit platforms, assignments of values to enumeration-valued storage engine-specific system variables were not validated and could result in unexpected values. (Bug#32034)

  • A DELETE statement with a subquery in the WHERE clause would sometimes ignore an error during subquery evaluation and proceed with the delete operation. (Bug#32030)

  • Using dates in the range '0000-00-01' to '0000-00-99' range in the WHERE clause could result in an incorrect result set. (These dates are not in the supported range for DATE, but different results for a given query could occur depending on position of records containing the dates within a table.) (Bug#32021)

  • User-defined functions are not loaded if the server is started with the --skip-grant-tables option, but the server did not properly handle this case and issued an Out of memory error message instead. (Bug#32020)

  • If a user-defined function was used in a SELECT statement, and an error occurred during UDF initialization, the error did not terminate execution of the SELECT, but rather was converted to a warning. (Bug#32007)

  • HOUR(), MINUTE(), and SECOND() could return nonzero values for DATE arguments. (Bug#31990)

  • Changing the SQL mode to cause dates with “zero” parts to be considered invalid (such as '1000-00-00') could result in indexed and nonindexed searches returning different results for a column that contained such dates. (Bug#31928)

  • The server used unnecessarily large amounts of memory when user variables were used as an argument to CONCAT() or CONCAT_WS(). (Bug#31898)

  • In debug builds, testing the result of an IN subquery against NULL caused an assertion failure. (Bug#31884)

  • mysql-test-run.pl sometimes set up test scenarios in which the same port number was passed to multiple servers, causing one of them to be unable to start. (Bug#31880)

  • SHOW CREATE TRIGGER caused a server crash. (Bug#31866)

  • The server crashed after insertion of a negative value into an AUTO_INCREMENT column of an InnoDB table. (Bug#31860)

  • For libmysqld applications, handling of mysql_change_user() calls left some pointers improperly updated, leading to server crashes. (Bug#31850)

  • Using ORDER BY led to the wrong result when using the ARCHIVE on a table with a BLOB when the table cache was full. The table could also be reported as crashed after the query had completed, even though the table data was intact. (Bug#31833)

  • Comparison results for BETWEEN were different from those for operators like < and > for DATETIME-like values with trailing extra characters such as '2007-10-01 00:00:00 GMT-6'. BETWEEN treated the values as DATETIME, whereas the other operators performed a binary-string comparison. Now they all uniformly use a DATETIME comparison, but generate warnings for values with trailing garbage. (Bug#31800)

  • Name resolution for correlated subqueries and HAVING clauses failed to distinguish which of two was being performed when there was a reference to an outer aliased field. This could result in error messages about a HAVING clause for queries that had no such clause. (Bug#31797)

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

  • For tables with certain definitions, UPDATE statements could fail to find the correct record to update and report an error when the record did in fact exist. (Bug#31747)

  • For a fatal error during a filesort in find_all_keys(), the error was returned without the necessary handler uninitialization, causing an assertion failure. (Bug#31742)

  • mysqlslap failed to commit after the final record load. (Bug#31704)

  • The examined-rows count was not incremented for const queries. (Bug#31700)

  • The server crashed if a thread was killed while locking the general_log table at the beginning of statement processing. (Bug#31692)

  • The mysql_change_user() C API function was subject to buffer overflow. (Bug#31669)

  • For SELECT ... INTO OUTFILE, if the ENCLOSED BY string is empty and the FIELDS TERMINATED BY string started with a special character (one of n, t, r, b, 0, Z, or N), every occurrence of the character within field values would be duplicated. (Bug#31663)

  • SHOW COLUMNS and DESCRIBE displayed null as the column type for a view with no valid definer. This caused mysqldump to produce a nonreloadable dump file for the view. (Bug#31662)

  • The mysqlbug script did not include the correct values of CFLAGS and CXXFLAGS that were used to configure the distribution. (Bug#31644)

  • Queries that include a comparison of an INFORMATION_SCHEMA table column to NULL caused a server crash. (Bug#31633)

  • EXPLAIN EXTENDED for SELECT from INFORMATION_SCHEMA tables caused an assertion failure. (Bug#31630)

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

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

  • HAVING could treat lettercase of table aliases incorrectly if lower_case_table_names was enabled. (Bug#31562)

  • Spurious duplicate-key errors could occur for multiple-row inserts into an InnoDB table that activate a trigger. (Bug#31540)

  • Using ALTER EVENT to rename a disabled event caused it to become enabled. (Bug#31539)

  • The fix for Bug#24989 introduced a problem such that a NULL thread handler could be used during a rollback operation. This problem is unlikely to be seen in practice. (Bug#31517)

  • The length of the result from IFNULL() could be calculated incorrectly because the sign of the result was not taken into account. (Bug#31471)

  • Queries that used the ref access method or index-based subquery execution over indexes that have DECIMAL columns could fail with an error Column col_name cannot be null. (Bug#31450)

  • InnoDB now tracks locking and use of tables by MySQL only after a table has been successfully locked on behalf of a transaction. Previously, the locked flag was set and the table in-use counter was updated before checking whether the lock on the table succeeded. A subsequent failure in obtaining a lock on the table led to an inconsistent state as the table was neither locked nor in use. (Bug#31444)

  • SELECT 1 REGEX NULL caused an assertion failure for debug servers. (Bug#31440)

  • The UpdateXML() function did not check for the validity of all its arguments; in some cases, this could lead to a crash of the server. (Bug#31438)

  • The mysql_change_user() C API function caused advisory locks (obtained with GET_LOCK()) to malfunction. (Bug#31418)

  • NDB libraries and include files were missing from some binary tar file distributions. (Bug#31414)

  • Executing RENAME while tables were open for use with HANDLER statements could cause a server crash. (Bug#31409)

  • mysql-test-run.pl tried to create files in a directory where it could not be expected to have write permission. mysqltest created .reject files in a directory other than the one where test results go. (Bug#31398)

  • For a table that had been opened with HANDLER and marked for reopening after being closed with FLUSH TABLES, DROP TABLE did not properly discard the handler. (Bug#31397)

  • Automatically allocated memory for string options associated with a plugin was not freed if the plugin did not get installed. (Bug#31382)

  • INFORMATION_SCHEMA.TABLES was returning incorrect information. (Bug#31381)

  • DROP USER caused an increase in memory usage. (Bug#31347)

  • For InnoDB tables with READ COMMITTED isolation level, semi-consistent reads used for UPDATE statements skipped rows locked by another transaction, rather than waiting for the locks to be released. Consequently, rows that possibly should have been updated were never examined. (Bug#31310)

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

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

  • CONVERT(val, DATETIME) would fail on invalid input, but processing was not aborted for the WHERE clause, leading to a server crash. (Bug#31253)

  • Allocation of an insufficiently large group-by buffer following creation of a temporary table could lead to a server crash. (Bug#31249)

  • Use of DECIMAL(n, n) ZEROFILL in GROUP_CONCAT() could cause a server crash. (Bug#31227)

  • When a TIMESTAMP with a nonzero time part was converted to a DATE value, no warning was generated. This caused index lookups to assume that this is a valid conversion and was returning rows that match a comparison between a TIMESTAMP value and a DATE keypart. Now a warning is generated so that TIMESTAMP with a nonzero time part will not match DATE values. (Bug#31221)

  • Server variables could not be set to their current values on Linux platforms. (Bug#31177)

    See also Bug#6958.

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

  • If MAKETIME() returned NULL when used in an ORDER BY that was evaluated using filesort, a server crash could result. (Bug#31160)

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

  • LAST_INSERT_ID() execution could be handled improperly in subqueries. (Bug#31157)

  • An assertion designed to detect a bug in the ROLLUP implementation would incorrectly be triggered when used in a subquery context with noncacheable statements. (Bug#31156)

  • Selecting spatial types in a UNION could cause a server crash. (Bug#31155)

  • Use of GROUP_CONCAT(DISTINCT bit_column) caused an assertion failure. (Bug#31154)

  • The server crashed in the parser when running out of memory. Memory handling in the parser has been improved to gracefully return an error when out-of-memory conditions occur in the parser. (Bug#31153)

  • MySQL declares a UNIQUE key as a PRIMARY key if it doesn't have NULL columns and is not a partial key, and the PRIMARY key must alway be the first key. However, in some cases, a nonfirst key could be reported as PRIMARY, leading to an assert failure by InnoDB. This is fixed by correcting the key sort order. (Bug#31137)

  • mysqldump failed to handle databases containing a ‘-’ character in the name. (Bug#31113)

  • Starting the server using --read-only and with the Event Scheduler enabled caused it to crash.

    Note

    This issue occurred only when the server had been built with certain nonstandard combinations of configure options.

    (Bug#31111)

  • GROUP BY NULL WITH ROLLUP could cause a server crash. (Bug#31095)

    See also Bug#32558.

  • A rule to prefer filesort over an indexed ORDER BY when accessing all rows of a table was being used even if a LIMIT clause was present. (Bug#31094)

  • REGEXP operations could cause a server crash for character sets such as ucs2. Now the arguments are converted to utf8 if possible, to allow correct results to be produced if the resulting strings contain only 8-bit characters. (Bug#31081)

  • Expressions of the form WHERE col NOT IN (col, ...), where the same column was named both times, could cause a server crash in the optimizer. (Bug#31075)

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

  • Many nested subqueries in a single query could led to excessive memory consumption and possibly a crash of the server. (Bug#31048)

  • Using ORDER BY with ARCHIVE tables caused a server crash. (Bug#31036)

  • A server crash could occur when a non-DETERMINISTIC stored function was used in a GROUP BY clause. (Bug#31035)

  • The MOD() function and the % operator crashed the server for a divisor less than 1 with a very long fractional part. (Bug#31019)

  • Transactions were committed prematurely when LOCK TABLE and SET autocommit = 0 were used together. (Bug#30996)

  • On Windows, the pthread_mutex_trylock() implementation was incorrect. (Bug#30992)

  • A character set introducer followed by a hexadecimal or bit-value literal did not check its argument and could return an ill-formed result for invalid input. (Bug#30986)

  • CHAR(str USING charset) did not check its argument and could return an ill-formed result for invalid input. (Bug#30982)

  • The result from CHAR(str USING ucs2) did not add a leading 0x00 byte for input strings with an odd number of bytes. (Bug#30981)

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

  • MAKEDATE() incorrectly moved year values in the 100–200 range into the 1970–2069 range. (This is legitimate for 00–99, but three-digit years should be used unchanged.) (Bug#30951)

  • When invoked with constant arguments, STR_TO_DATE() could use a cached value for the format string and return incorrect results. (Bug#30942)

  • GROUP_CONCAT() returned ',' rather than an empty string when the argument column contained only empty strings. (Bug#30897)

  • For MEMORY tables, lookups for NULL values in BTREE indexes could return incorrect results. (Bug#30885)

  • A server crash could occur if a stored function that contained a DROP TEMPORARY TABLE statement was invoked by a CREATE TEMPORARY TABLE statement that created a table of the same name. (Bug#30882)

  • Calling NAME_CONST() with nonconstant arguments triggered an assertion failure. Nonconstant arguments are now disallowed. (Bug#30832)

  • For a spatial column with a regular (non-SPATIAL) index, queries failed if the optimizer tried to use the index. (Bug#30825)

  • Values for the --tc-heuristic-recover option incorrectly were treated as values for the --myisam-stats-method option. (Bug#30821)

  • INFORMATION_SCHEMA.SCHEMATA was returning incorrect information. (Bug#30795)

  • The optimizer incorrectly optimized conditions out of the WHERE clause in some queries involving subqueries and indexed columns. (Bug#30788)

  • Improper calculation of CASE expression results could lead to value truncation. (Bug#30782)

  • On Windows, the pthread_mutex_trylock() implementation was incorrect. One symptom was that invalidating the query cache could cause a server crash. (Bug#30768)

  • A multiple-table UPDATE involving transactional and nontransactional tables caused an assertion failure. (Bug#30763)

  • User-supplied names foreign key names might not be set to the right key, leading to foreign keys with no name. (Bug#30747)

  • Under some circumstances, CREATE TABLE ... SELECT could crash the server or incorrectly report that the table row size was too large. (Bug#30736)

  • Using the MIN() or MAX() function to select one part of a multi-part key could cause a crash when the function result was NULL. (Bug#30715)

  • The embedded server did not properly check column-level privileges. (Bug#30710)

  • INFORMATION_SCHEMA.VIEWS.VIEW_DEFINITION was incorrect for views that were defined to select from other INFORMATION_SCHEMA tables. (Bug#30689)

  • Issuing an ALTER SERVER statement to update the settings for a FEDERATED server would cause the mysqld to crash. (Bug#30671)

  • The optimizer could ignore ORDER BY in cases when the result set is ordered by filesort, resulting in rows being returned in incorrect order. (Bug#30666)

  • A different execution plan was displayed for EXPLAIN than would actually have been used for the SELECT because the test of sort keys for ORDER BY did not consider keys mentioned in IGNORE KEYS FOR ORDER BY. (Bug#30665)

  • The thread_handling system variable was treated as having a SESSION value and as being settable at runtime. Now it has only a GLOBAL read-only value. (Bug#30651)

  • On Windows, LIMIT arguments greater than 232 did not work correctly. (Bug#30639)

  • MyISAM tables could not exceed 4294967295 (232 – 1) rows on Windows. (Bug#30638)

  • A failed HANDLER ... READ operation could leave the table in a locked state. (Bug#30632)

  • mysql-test-run.pl could not run mysqld with root privileges. (Bug#30630)

  • The mysqld_safe script contained a syntax error. (Bug#30624)

  • The optimization that uses a unique index to remove GROUP BY did not ensure that the index was actually used, thus violating the ORDER BY that is implied by GROUP BY. (Bug#30596)

  • SHOW STATUS LIKE 'Ssl_cipher_list' from a MySQL client connected via SSL returned an empty string rather than a list of available ciphers. (Bug#30593)

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

  • Using GROUP BY on an expression of the form timestamp_col DIV number caused a server crash due to incorrect calculation of number of decimals. (Bug#30587)

  • Executing a SELECT COUNT(*) query on an InnoDB table partitioned by KEY that used a DOUBLE column as the partitioning key caused the server to crash. (Bug#30583)

  • The options available to the CHECK TABLE statement were also allowed in OPTIMIZE TABLE and ANALYZE TABLE statements, but caused corruption during their execution. These options were never supported for these statements, and an error is now raised if you try to apply these options to these statements. (Bug#30495)

  • A self-referencing trigger on a partitioned table caused the server to crash instead of failing with an error. (Bug#30484)

  • The mysql_change_user() C API function did not correctly reset the character set variables to the values they had just after initially connecting. (Bug#30472)

  • When expanding a * in a USING or NATURAL join, the check for table access for both tables in the join was done using only the grant information of the first table. (Bug#30468)

  • When casting a string value to an integer, cases where the input string contained a decimal point and was long enough to overrun the unsigned long long type were not handled correctly. The position of the decimal point was not taken into account which resulted in miscalculated numbers and incorrect truncation to appropriate SQL data type limits. (Bug#30453)

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

  • With libmysqld, use of prepared statements and the query cache at the same time caused problems. (Bug#30430)

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

  • For CREATE ... SELECT ... FROM, where the resulting table contained indexes, adding SQL_BUFFER_RESULT to the SELECT part caused index corruption in the table. (Bug#30384)

  • The Last_query_cost status variable value can be computed accurately only for simple “flat” queries, not complex queries such as those with subqueries or UNION. However, the value was not consistently being set to 0 for complex queries. (Bug#30377)

  • The optimizer made incorrect assumptions about the value of the is_member value for user-defined functions, sometimes resulting in incorrect ordering of UDF results. (Bug#30355)

  • Queries that had a GROUP BY clause and selected COUNT(DISTINCT bit_column) returned incorrect results. (Bug#30324)

  • Some valid euc-kr characters having the second byte in the ranges [0x41..0x5A] and [0x61..0x7A] were rejected. (Bug#30315)

  • When loading a dynamic plugin on FreeBSD, the plugin would fail to load. This was due to a build error where the required symbols would be not exported correctly. (Bug#30296)

  • Simultaneous ALTER TABLE statements for BLACKHOLE tables caused 100% CPU use due to locking problems. (Bug#30294)

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

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

  • Flushing a merge table between the time it was opened and its child table were actually attached caused the server to crash. (Bug#30273)

    This regression was introduced by Bug#26379.

  • The query cache does not support retrieval of statements for which column level access control applies, but the server was still caching such statements, thus wasting memory. (Bug#30269)

  • Using DISTINCT or GROUP BY on a BIT column in a SELECT statement caused the column to be cast internally as an integer, with incorrect results being returned from the query. (Bug#30245)

  • GROUP BY on BIT columns produced incorrect results. (Bug#30219)

  • Short-format mysql commands embedded within /*! ... */ comments were parsed incorrectly by mysql, which discarded the rest of the comment including the terminating */ characters. The result was a malformed (unclosed) comment. Now mysql does not discard the */ characters. (Bug#30164)

  • If the server crashed during an ALTER TABLE statement, leaving a temporary file in the database directory, a subsequent DROP DATABASE statement failed due to the presence of the temporary file. (Bug#30152)

  • When mysqldump wrote DROP DATABASE statements within version-specific comments, it included the terminating semicolon in the wrong place, causing following statements to fail when the dump file was reloaded. (Bug#30126)

  • It was not possible for client applications to distinguish between auto-set and auto-updated TIMESTAMP column values.

    To rectify this problem, a new ON_UPDATE_NOW_FLAG flag is set by Field_timestamp constructors whenever a column should be set to NOW on UPDATE, and the get_schema_column_record() function now reports whether a timestamp column is set to NOW on UPDATE. In addition, such columns now display on update CURRENT_TIMESTAMP in the Extra column in the output from SHOW COLUMNS. (Bug#30081)

  • Some INFORMATION_SCHEMA tables are intended for internal use, but could be accessed by using SHOW statements. (Bug#30079)

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

  • mysqlslap did not properly handle multiple result sets from stored procedures. (Bug#29985)

  • Specifying the --without-geometry option for configure caused server compilation to fail. (Bug#29972)

  • Statements within stored procedures ignored the value of the low_priority_updates system variable. (Bug#29963)

    See also Bug#26162.

  • With auto-reconnect enabled, row fetching for a prepared statement could crash after reconnect occurred because loss of the statement handler was not accounted for. (Bug#29948)

  • mysqldump --skip-events --all-databases dumped data from the mysqld.event table, and when restoring from this dump, events were created in spite of the --skip-events option. (Bug#29938)

  • When mysqlslap was given a query to execute from a file via a --query=file_name option, it executed the query one too many times. (Bug#29803)

  • configure did not find nss on some Linux platforms. (Bug#29658)

  • It was possible when creating a partitioned table using CREATE TABLE ... SELECT to refer in the PARTITION BY clause to columns in the table being selected from, which could cause the server to crash. An example of such a statement is:

    CREATE TABLE t1 (b INT)
    PARTITION BY RANGE(t2.b) (
        PARTITION p1 VALUES LESS THAN (10),
        PARTITION p2 VALUES LESS THAN (20)
    )   SELECT * FROM t2;
    

    The fix is to disallow references in PARTITION BY clauses to columns not in the table being created. (Bug#29444)

  • If a view used a function in its SELECT statement, the columns from the view were not inserted into the INFORMATION_SCHEMA.COLUMNS table. (Bug#29408)

  • The mysql client program now ignores Unicode byte order mark (BOM) characters at the beginning of input files. Previously, it read them and sent them to the server, resulting in a syntax error.

    Presence of a BOM does not cause mysql to change its default character set. To do that, invoke mysql with an option such as --default-character-set=utf8. (Bug#29323)

  • For transactional tables, an error during a multiple-table DELETE statement did not roll back the statement. (Bug#29136)

  • The log and log_slow_queries system variables were displayed by SHOW VARIABLES but could not be accessed in expressions as @@log and @@log_slow_queries. Also, attempting to set them with SET produced an incorrect Unknown system variable message. Now these variables are treated as synonyms for general_log and slow_query_log, which means that they can be accessed in expressions and their values can be changed with SET. (Bug#29131)

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

  • SHOW VARIABLES did not display the relay_log, relay_log_index, or relay_log_info_file system variables. (Bug#28893)

  • When doing a DELETE on a table that involved a JOIN with MyISAM or MERGE tables and the JOIN referred to the same table, the operation could fail reporting ERROR 1030 (HY000): Got error 134 from storage engine. This was because scans on the table contents would change because of rows that had already been deleted. (Bug#28837)

  • Killing an SSL connection on platforms where MySQL is compiled with -DSIGNAL_WITH_VIO_CLOSE (Windows, Mac OS X, and some others) could crash the server. (Bug#28812)

  • SHOW VARIABLES did not correctly display the value of the thread_handling system variable. (Bug#28785)

  • On Windows, mysql_upgrade created temporary files in C:\ and did not clean them up. (Bug#28774)

  • Index hints specified in view definitions were ignored when using the view to select from the base table. (Bug#28702)

  • Views do not have indexes, so index hints do not apply. Use of index hints when selecting from a view is now disallowed. (Bug#28701)

  • After changing the SQL mode to a restrictive value that would make already-inserted dates in a column be considered invalid, searches returned different results depending on whether the column was indexed. (Bug#28687)

  • When running the MySQL Instance Configuration Wizard, a race condition could exist that would fail to connect to a newly configured instance. This was because mysqld had not completed the startup process before the next stage of the installation process. (Bug#28628)

  • A SELECT in one connection could be blocked by INSERT ... ON DUPLICATE KEY UPDATE in another connection even when low_priority_updates is set. (Bug#28587)

  • mysql_upgrade could run binaries dynamically linked against incorrect versions of shared libraries. (Bug#28560)

  • The result from CHAR() was incorrectly assumed in some contexts to return a single-byte result. (Bug#28550)

  • mysqldump reversed the event name and program name in one of its error messages. (Bug#28535)

  • The parser confused user-defined function (UDF) and stored function creation for CREATE FUNCTION and required that there be a default database when creating UDFs, although there is no such requirement. (Bug#28318, Bug#29816)

  • Fast-mutex locking was not thread-safe and optimization-safe on some platforms, which could cause program failures such as out-of-memory errors. (Bug#28284)

  • The result of a comparison between VARBINARY and BINARY columns differed depending on whether the VARBINARY column was indexed. (Bug#28076)

  • The metadata in some MYSQL_FIELD members could be incorrect when a temporary table was used to evaluate a query. (Bug#27990)

  • Partition pruning was not used for queries having <= or >= conditions in the WHERE clause on a table using TO_DAYS() in the partitioning expression. (Bug#27927)

  • mysqlbinlog produced incorrectly formatted DATETIME and TIMESTAMP values. (Bug#27894)

  • Failure to log to the general_log or slow_log log tables were not logged to the error log at all or were logged incorrectly. (Bug#27858)

  • An ORDER BY at the end of a UNION affected individual SELECT statements rather than the overall query result. (Bug#27848)

  • comp_err created files with permissions such that they might be inaccessible during make install operations. (Bug#27789)

  • SHOW COLUMNS returned NULL instead of the empty string for the Default value of columns that had no default specified. (Bug#27747)

  • With recent versions of DBD::mysql, mysqlhotcopy generated table names that were doubly qualified with the database name. (Bug#27694)

  • The anonymous accounts were not being created during MySQL installation. (Bug#27692)

  • Some SHOW statements and INFORMATION_SCHEMA queries could expose information not allowed by the user's access privileges. (Bug#27629)

  • ALTER TABLE tbl_name ROW_FORMAT=format_type did not cause the table to be rebuilt. (Bug#27610)

  • A race condition between killing a statement and the thread executing the statement could lead to a situation such that the binary log contained an event indicating that the statement was killed, whereas the statement actually executed to completion. (Bug#27571)

  • Some character mappings in the ascii.xml file were incorrect.

    As a result of this bug fix, indexes must be rebuilt for columns that use the ascii_general_ci collation for columns that contain any of these characters: '`', '[', '\', ']', '~'. See Section 2.4.3, “Checking Whether Tables or Indexes Must Be Rebuilt”. (Bug#27562)

  • Some queries using the NAME_CONST() function failed to return either a result or an error to the client, causing it to hang. This was due to the fact that there was no check to insure that both arguments to this function were constant expressions. (Bug#27545, Bug#32559)

  • With the read_only system variable enabled, CREATE DATABASE and DROP DATABASE were allowed to users who did not have the SUPER privilege. (Bug#27440)

  • For an event with an ON COMPLETION value of PRESERVE, an ALTER EVENT statement that specified no ON COMPLETION option caused the value to become NOT PRESERVE. (Bug#27407)

  • MySQL failed to generate or retrieve an AUTO_INCREMENT primary key for InnoDB tables with user-defined partitioning. (Bug#27405)

  • Changes to the sql_mode system variable were not tracked by INSERT DELAYED. (Bug#27358)

  • A SELECT with more than 31 nested dependent subqueries returned an incorrect result. (Bug#27352)

  • The ExtractValue() and UpdateXML() functions performed extremely slowly for large amounts of XML data (greater than 64 KB). These functions now execute approximately 2000 times faster than previously. (Bug#27287)

  • On Windows, writes to the debug log were using freopen() instead of fflush(), resulting in slower performance. (Bug#27099)

  • For a table that used different full-text parsers for different FULLTEXT indexes, SHOW CREATE TABLE displayed the first parser name for all of them. (Bug#27040)

  • STR_TO_DATE() displayed an error message that referred to STR_TO_TIME(). (Bug#27014)

  • The mysql_insert_id() C API function sometimes returned different results for libmysqld and libmysqlclient. (Bug#26921)

  • Symbolic links on Windows could fail to work. (Bug#26811)

  • mysqld sometimes miscalculated the number of digits required when storing a floating-point number in a CHAR column. This caused the value to be truncated, or (when using a debug build) caused the server to crash. (Bug#26788)

    See also Bug#12860.

  • LOAD DATA INFILE ran very slowly when reading large files into partitioned tables. (Bug#26527)

  • It makes no sense to attempt to use ALTER TABLE ... ORDER BY to order an InnoDB table if there is a user-defined clustered index, because rows are always ordered by the clustered index. Such attempts now are ignored and produce a warning.

    Also, in some cases, InnoDB incorrectly used a secondary index when the clustered index would produce a faster scan. EXPLAIN output now indicates use of the clustered index (for tables that have one) as lines with a type value of index, a key value of PRIMARY, and without Using index in the Extra value. (Bug#26447)

    See also Bug#35850.

  • Using HANDLER to open a table having a storage engine not supported by HANDLER properly returned an error, but also improperly prevented the table from being dropped by other connections. (Bug#25856)

  • For a prepared statement stmt, changing the default database following PREPARE stmt but before EXECUTE stmt caused stmt to be recorded incorrectly in the binary log. (Bug#25843)

  • CREATE TABLE LIKE did not work when the source table was an INFORMATION_SCHEMA table. (Bug#25629)

  • Threads that were calculating the estimated number of records for a range scan did not respond to the KILL statement. That is, if a range join type is possible (even if not selected by the optimizer as a join type of choice and thus not shown by EXPLAIN), the query in the statistics state (shown by the SHOW PROCESSLIST) did not respond to the KILL statement. (Bug#25421)

  • For InnoDB tables, CREATE TABLE a AS SELECT * FROM A would fail. (Bug#25164)

  • For mysql --show-warnings, warnings were in some cases not displayed. (Bug#25146)

  • The returns column of the mysql.proc table was CHAR(64), which is not long enough to store long data types such as ENUM types. The column has been changed to LONGBLOB and a warning is generated if truncation occurs when storing a row into the proc table. (Bug#24923)

  • If the expected precision of an arithmetic expression exceeded the maximum precision supported by MySQL, the precision of the result was reduced by an unpredictable or arbitrary amount, rather than to the maximum precision. In some cases, exceeding the maximum supported precision could also lead to a crash of the server. (Bug#24907)

  • For Vista installs, MySQLInstanceConfig.exe did not add the default MySQL port to the firewall exceptions. It now provides a checkbox that enables the user a choice of whether to do this. (Bug#24853)

  • A CREATE TRIGGER statement could cause a deadlock or server crash if it referred to a table for which a table lock had been acquired with LOCK TABLES. (Bug#23713)

  • For storage engines that do not redefine handler::index_next_same() and are capable of indexes, statements that include a WHERE clause might select incorrect data. (Bug#22351)

  • The parser treated the INTERVAL() function incorrectly, leading to situations where syntax errors could result depending on which side of an arithmetic operator the function appeared. (Bug#22312)

  • Entries in the general query log were truncated at 1000 characters. (Bug#21557)

  • A memory leak occurred when CREATE TEMPORARY TABLE .. SELECT was invoked from a stored function that in turn was called from CREATE TABLE ... SELECT. (Bug#21136)

  • It was possible to execute CREATE TABLE t1 ... SELECT ... FROM t2 with the CREATE privilege for t1 and SELECT privilege for t2, even in the absence of the INSERT privilege for t1. (Bug#20901)

  • Worked around an icc problem with an incorrect machine instruction being generated in the context of software pre-fetching after a subroutine got in-lined. (Upgrading to icc 10.0.026 makes the workaround unnecessary.) (Bug#20803)

  • If a column selected by a view referred to a stored function, the data type reported for the column in INFORMATION_SCHEMA.COLUMNS could be incorrect. (Bug#20550)

  • The mysql_change_user() C API function changed the value of the sql_big_selects session variable. (Bug#20023)

    See also Bug#40363.

  • Host names sometimes were treated as case sensitive in account-management statements (CREATE USER, GRANT, REVOKE, and so forth). (Bug#19828)

  • Issuing an SQL KILL of the active connection caused an error on Mac OS X. (Bug#19723)

  • The readline library has been updated to version 5.2. This addresses issues in the mysql client where history and editing within the client would fail to work as expected. (Bug#18431)

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

  • MySQLInstanceConfig.exe failed to grant certain privileges to the 'root'@'%' account. (Bug#17303)

  • The Aborted_clients status variable was incremented twice if a client exited without calling mysql_close(). (Bug#16918)

  • Use of GRANT statements with grant tables from an old version of MySQL could cause a server crash. (Bug#16470)

  • Clients were ignoring the TCP/IP port number specified as the default port via the --with-tcp-port configuration option. (Bug#15327)

  • Parameters of type DATETIME or DATE in stored procedures were silently converted to VARBINARY. (Bug#13675)

  • Zero-padding of exponent values was not the same across platforms. (Bug#12860)

  • Values of types REAL ZEROFILL, DOUBLE ZEROFILL, FLOAT ZEROFILL, were not zero-filled when converted to a character representation in the C prepared statement API. (Bug#11589)

  • mysql stripped comments from statements sent to the server. Now the --comments or --skip-comments option can be used to control whether to retain or strip comments. The default is --skip-comments. (Bug#11230, Bug#26215)

  • Several buffer-size system variables were either being handled incorrectly for large values (for settings larger than 4GB, they were truncated to values less than 4GB without a warning), or were limited unnecessarily to 4GB even on 64-bit systems. The following changes were made:

    In addition, settings for read_buffer_size and read_rnd_buffer_size are limited to 2GB on all platforms. Larger values are truncated to 2GB with a warning. (Bug#5731, Bug#29419, Bug#29446)

  • Executing DISABLE KEYS and ENABLE KEYS on a nonempty table would cause the size of the index file for the table to grow considerable. This was because the DISABLE KEYS operation would only mark the existing index, without deleting the index blocks. The ENABLE KEYS operation would re-create the index, adding new blocks, while the previous index blocks would remain. Existing indexes are now dropped and recreated when the ENABLE KEYS statement is executed. (Bug#4692)

  • Grant table checks failed in libmysqld.

C.1.28. Changes in MySQL 5.1.22 (24 September 2007 Release Candidate)

Functionality added or changed:

  • There is a new innodb_autoinc_lock_mode system variable to configure the locking behavior that InnoDB uses for generating auto-increment values. The default behavior now is slightly different from before, which involves a minor incompatibility for multiple-row inserts that specify an explicit value for the auto-increment column in some but not all rows. See Section 13.6.4.3, “AUTO_INCREMENT Handling in InnoDB.

Bugs fixed:

  • MySQL Cluster: Replication: (Replication): Multi-master replication setups did not handle --log-slave-updates correctly. (Bug#30017)

  • MySQL Cluster: Backups of TIMESTAMP columns made with ndb_restore on a MySQL Cluster using data nodes hosts of one endian could not be used to restore the cluster's data to data node hosts of the other endian. (Bug#30134)

  • Replication: Row-based replication from a pre-5.1.22 MySQL Server to a MySQL 5.1.22 was unstable due to an uninitialized variable. (Bug#31076)

  • Replication: Operations that used the time zone replicated the time zone only for successful operations, but did not replicate the time zone for errors that need to know it. (Bug#29536)

  • For an InnoDB table if a SELECT was ordered by the primary key and also had a WHERE field = value clause on a different field that was indexed, a DESC order instruction would be ignored. (Bug#31001)

  • mysql_install_db could fail to find its message file. (Bug#30678)

  • Memory corruption occurred for some queries with a top-level OR operation in the WHERE condition if they contained equality predicates and other sargable predicates in disjunctive parts of the condition. (Bug#30396)

  • CONNECTION_ID() always returned 0 for the embedded server (libmysqld). (Bug#30389)

  • The server created temporary tables for filesort operations in the working directory, not in the directory specified by the tmpdir system variable. (Bug#30287)

  • Using KILL QUERY or KILL CONNECTION to kill a SELECT statement caused a server crash if the query cache was enabled. (Bug#30201)

  • mysqldump from the MySQL 5.1.21 distribution could not be used to create a dump from a MySQL 5.1.20 or older server. (Bug#30123)

  • Under some circumstances, a UDF initialization function could be passed incorrect argument lengths. (Bug#29804)

  • When using a combination of HANDLER... READ and DELETE on a table, MySQL continued to open new copies of the table every time, leading to an exhaustion of file descriptors. (Bug#29474)

    This regression was introduced by Bug#21587.

  • The mysql_list_fields() C API function incorrectly set MYSQL_FIELD::decimals for some view columns. (Bug#29306)

  • Tables using the InnoDB storage engine incremented AUTO_INCREMENT values incorrectly with ON DUPLICATE KEY UPDATE. (Bug#28781)

  • Nonrange queries of the form SELECT ... FROM ... WHERE keypart1=constant, ..., keypartN=constant ORDER BY ... FOR UPDATE sometimes were unnecessarily blocked waiting for a lock if another transaction was using SELECT ... FOR UPDATE on the same table. (Bug#28570)

  • On Windows, symbols for yaSSL and taocrypt were missing from mysqlclient.lib, resulting in unresolved symbol errors for clients linked against that library. (Bug#27861)

  • Read lock requests that were blocked by a pending write lock request were not allowed to proceed if the statement requesting the write lock was killed. (Bug#21281)

C.1.29. Changes in MySQL 5.1.21 (16 August 2007)

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

Note

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

Note

Subsequent to release, it was discovered that on some platforms, mysql_install_db could fail to find its message file, resulting in error messages of the following form:

shell> mysql_install_db
Installing MySQL system tables...
070830  9:33:24 [ERROR] Can't find messagefile 'path/share/english/errmsg.sys'
070830  9:33:24 [ERROR] Aborting

To deal with this problem, specify a --language option to specify the proper path name to the language file directory. For example:

shell> mysql_install_db --language=/path/to/share/english/

This problem is corrected in MySQL 5.1.22.

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:

  • Incompatible Change: In MySQL 5.1.6, when log tables were implemented, the default log destination for the general query and slow query log was TABLE. This default has been changed to FILE, which is compatible with MySQL 5.0, but incompatible with earlier releases of MySQL 5.1 from 5.1.6 to 5.1.20. If you are upgrading from MySQL 5.0 to 5.1.21 or higher, no logging option changes should be necessary. However, if you are upgrading from 5.1.6 through 5.1.20 to 5.1.21 or higher and were using TABLE logging, use the --log-output=TABLE option explicitly to preserve your server's table-logging behavior.

    A further fix for this issue was made in MySQL 5.1.23. (Bug#29993)

  • Incompatible Change: The innodb_log_arch_dir system variable (which has been deprecated since MySQL 5.0.24) has been removed and should no longer be used.

  • Incompatible Change: On Windows only, the mysqld-nt has been removed from this release and all future releases. The mysqld server now includes named-pipe support as standard, and you do not have to use the mysqld-nt version to enable named-pipe support.

  • Important Change: The default mysqld_safe logging behavior now is --skip-syslog rather than --syslog, which is compatible with the default behavior of writing an error log file for releases prior to 5.1.20.

  • Replication: The SQL thread on a slave now is always allowed to enter InnoDB even if this would exceed the limit imposed by the innodb_thread_concurrency system variable. In cases of high load on the slave server (when innodb_thread_concurrency is reached), this change helps the slave stay more up to date with the master; in the previous behavior, the SQL thread was competing for resources with all client threads active on the slave server. (Bug#25078)

  • Replication: Replication between master and slaves now supports different column numbers within a table on both master and slave. The rules for replication where the table definitions are different has also changed. This supercedes the functionality for replication from the master table to a slave table with more columns that was added in MySQL 5.1.12. For more information, see Section 16.3.1.5, “Replication with Differing Table Definitions on Master and Slave”.

  • Several programs now accept --debug-check and --debug-info options: mysql, mysqladmin, mysqlbinlog, mysqlcheck, mysqldump, mysqlimport, mysqlshow, mysqlslap, mysqltest, mysql_upgrade. (Note: mysql, mysqladmin, mysqlcheck, mysqldump, mysqlimport, mysqlshow, and mysqltest already accepted --debug-info.) --debug-check prints debugging information at program exit. --debug-info is similar but also prints memory and CPU usage statistics. This patch also corrects a problem for mysql that --debug-info did not display statistics at exit time. (Bug#30127)

  • The --syslog option that was introduced in 5.1.20 for mysqld_safe (to send error output to syslog) did not work correctly: Error output was buffered and not logged immediately. This has been corrected. In addition, some feature changes were made:

    • Important

      The default mysqld_safe logging behavior now is --skip-syslog rather than --syslog, which is compatible with the default behavior of writing an error log file for releases prior to 5.1.20.

    • A new option, --syslog-tag=tag , modifies the default tags written by mysqld_safe and mysqld to syslog to be mysqld_safe-tag and mysqld-tag rather than the default tags of mysqld_safe and mysqld.

    (Bug#29992)

  • Transaction support in the FEDERATED storage engine has been disabled due to issues with multiple active transactions and sessions on the same FEDERATED table. (Bug#29875)

  • Previously, prepared statements processed using PREPARE and EXECUTE were not subject to caching in the query cache if they contained any ? parameter markers. This limitation has been lifted. (Bug#29318)

  • It is now possible to set long_query_time in microseconds or to 0. Setting this value to 0 causes all queries to be recorded in the slow query log.

    Currently, fractional values can be used only when logging to files. We plan to provide this functionality for logging to tables when time-related data types are enhanced to support microsecond resolution. (Bug#25412)

  • INFORMATION_SCHEMA implementation changes were made that optimize certain types of queries for INFORMATION_SCHEMA tables so that they execute more quickly. Section 7.2.20, “INFORMATION_SCHEMA Optimization”, provides guidelines on how to take advantage of these optimizations by writing queries that minimize the need for the server to access the file system to obtain the information contained in INFORMATION_SCHEMA tables. By writing queries that enable the server to avoid directory scans or opening table files, you will obtain better performance. (Bug#19588)

  • Log table locking was redesigned, eliminating several lock-related problems:

    • Truncating mysql.slow_log in a stored procedure after use of a cursor caused the thread to lock.

    • Flushing a log table resulted in unnecessary warnings.

    • The server would hang when performing concurrent ALTER TABLE or TRUNCATE TABLE statements against the log tables.

    • Changing the value of the general_log system variable while a global read lock was in place resulted in deadlock.

    The changes provide better-defined interface characteristics. See Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”. (Bug#17876, Bug#23044, Bug#25422, Bug#29129)

  • Added the --commit, --detach, --post-system, and --pre-system options for mysqlslap.

  • A new option, --syslog-tag=tag , modifies the default tags written by mysqld_safe and mysqld to syslog to be mysqld_safe-tag and mysqld-tag rather than the default tags of mysqld_safe and mysqld.

  • Two options relating to slow query logging have been added for mysqld. --log-slow-slave-statements causes slow statements executed by a replication slave to be written to the slow query log; min_examined_row_limit can be used to cause queries which examine fewer than the stated number of rows not to be logged.

Bugs fixed:

  • Incompatible Change: Failure to consider collation when comparing space characters could result in incorrect index entry order, leading to incorrect comparisons, inability to find some index values, misordered index entries, misordered ORDER BY results, or tables that CHECK TABLE reports as having corrupt indexes.

    As a result of this bug fix, indexes must be rebuilt for columns that use any of these character sets: eucjpms, euc_kr, gb2312, latin7, macce, ujis. See Section 2.4.3, “Checking Whether Tables or Indexes Must Be Rebuilt”. (Bug#29461)

  • Incompatible Change: Several issues were identified for stored programs (stored procedures and functions, triggers, and events) and views containing non-ASCII symbols. These issues involved conversion errors due to incomplete character set information when translating these objects to and from stored format, such as:

    • Parsing the original object definition so that it can be stored.

    • Compiling the stored definition into executable form when the object is invoked.

    • Retrieval of object definitions from INFORMATION_SCHEMA tables.

    • Displaying the object definition in SHOW statements. This issue also affected mysqldump, which uses SHOW.

    The fix for the problems is to store character set information from the object creation context so that this information is available when the object needs to be used later. The context includes the client character set, the connection character set and collation, and the collation of the database with which the object is associated.

    As a result of the patch, several tables have new columns:

    • In the mysql database, the proc and event tables now have these columns: character_set_client, collation_connection, db_collation, body_utf8.

    • In INFORMATION_SCHEMA, the VIEWS table now has these columns: CHARACTER_SET_CLIENT, COLLATION_CONNECTION. The ROUTINES, TRIGGERS, and EVENTS tables now have these columns: CHARACTER_SET_CLIENT, COLLATION_CONNECTION, DATABASE_COLLATION.

    These columns store the session values of the character_set_client and collation_connection system variables, and the collation of the database with which the object is associated. The values are those in effect at object creation time. (The saved database collation is not the value of the collation_database system variable, which applies to the default database; the database that contains the object is not necessarily the default database.)

    Several SHOW statements now display additional columns corresponding to the new table columns. These statements are: SHOW CREATE EVENT, SHOW CREATE FUNCTION, SHOW CREATE PROCEDURE, SHOW CREATE VIEW, SHOW EVENTS, SHOW FUNCTION STATUS, SHOW PROCEDURE STATUS, SHOW TRIGGERS.

    A new statement, SHOW CREATE TRIGGER is introduced and is used by mysqldump for producing CREATE TRIGGER statements.

    Subsequent to the patch just described, it was discovered that the patch broke mysql_upgrade; this has been corrected.

    Important

    The fixes for the problems just describe affect all existing stored programs and views. (For example, you will see warnings about “no creation context.”) To avoid warnings from the server about the use of old definitions from any release prior to 5.1.21, you should dump stored programs and views with mysqldump after upgrading to 5.1.21, and then reload them to recreate them with new definitions. Invoke mysqldump with a --default-character-set option that names the non-ASCII character set that was used for the definitions when the objects were originally defined.

    (Bug#25221, Bug#21249, Bug#30027, Bug#16291, Bug#11986, Bug#25212, Bug#19443, Bug#30029)

  • MySQL Cluster: Replication: (Replication): Inconsistencies could occur between the master and the slave when replicating Disk Data tables. (Bug#19259, Bug#19227)

  • MySQL Cluster: DELETE FROM table WHERE primary_key IN (value_list), where the value_list contained more than one value, called from an AFTER DELETE trigger on an NDB table, caused mysqld to crash. (Bug#30337)

  • MySQL Cluster: When restarting a data node, queries could hang during that node's start phase 5, and continue only after the node had entered phase 6. (Bug#29364)

  • MySQL Cluster: Replica redo logs were inconsistently handled during a system restart. (Bug#29354)

  • MySQL Cluster: When a node failed to respond to a COPY_GCI signal as part of a global checkpoint, the master node was killed instead of the node that actually failed. (Bug#29331)

  • MySQL Cluster: An invalid comparison made during REDO validation that could lead to an Error while reading REDO log condition. (Bug#29118)

  • MySQL Cluster: The wrong data pages were sometimes invalidated following a global checkpoint. (Bug#29067)

  • MySQL Cluster: If at least 2 files were involved in REDO invalidation, then file 0 of page 0 was not updated and so pointed to an invalid part of the redo log. (Bug#29057)

  • MySQL Cluster: If a storage engine has its own logging capability, then any statement using both this engine and some other engine not having its own logging could not be correctly logged, due to the fact that entries from one engine could be logged before entries from the other engine were. This did not generate any error messages when it occurred.

    Now, if multiple storage engines are used in a statement and at least one of them has its own logging capability, then an error message is generated and the statement is not executed.

    Note

    Currently, the only storage engine to have its own logging capability is NDBCLUSTER.

    (Bug#28722)

  • MySQL Cluster: Warnings and errors generated by ndb_config --config-file=file were sent to stdout, rather than to stderr. (Bug#25941)

  • MySQL Cluster: When a cluster backup was terminated using the ABORT BACKUP command in the management client, a misleading error message Backup aborted by application: Permanent error: Internal error was returned. The error message returned in such cases now reads Backup aborted by user request. (Bug#21052)

  • MySQL Cluster: Large file support did not work in AIX server binaries. (Bug#10776)

  • Replication: The thread ID was not reset properly after execution of mysql_change_user(), which could cause replication failure when replicating temporary tables. (Bug#29734)

  • Replication: Storage engine error conditions in row-based replication were not correctly reported to the user. (Bug#29570)

  • Replication: INSERT DELAYED statements on a master server are replicated as non-DELAYED inserts on slaves (which is normal, to preserve serialization), but the inserts on the slave did not use concurrent inserts. Now INSERT DELAYED on a slave is converted to a concurrent insert when possible, and to a normal insert otherwise. (Bug#29152)

  • Replication: An error that happened inside INSERT, UPDATE, or DELETE statements performed from within a stored function or trigger could cause inconsistency between master and slave servers. (Bug#27417)

  • Replication: Slave servers could incorrectly interpret an out-of-memory error from the master and reconnect using the wrong binary log position. (Bug#24192)

  • Replication: Using the READ COMMITTED transaction isolation level caused mixed and statement-based replication to fail. (Bug#23051)

  • Disk Data: Performing Disk Data schema operations during a node restart could cause forced shutdowns of other data nodes. (Bug#29501)

  • Disk Data: When dropping a page, the stack's bottom entry could sometime be left “cold” rather than “hot”, violating the rules for stack pruning. (Bug#29176)

  • Disk Data: Disk data meta-information that existed in ndbd might not be visible to mysqld. (Bug#28720)

  • Disk Data: The number of free extents was incorrectly reported for some tablespaces. (Bug#28642)

  • Cluster Replication: When executing a statement where binlog_format = statement, the result of the statement was logged both as a statement and as rows. (Bug#29222)

  • Cluster Replication: mysqld would segfault on startup when the NDB storage engine was enabled and the default character set was a strictly multi-byte character set such as UCS2.

    This issue does not apply to character sets that can contain single-byte characters in addition to multi-byte characters such as UTF-8.

    Additional issues remain with regard to the use of multi-byte character sets in MySQL Cluster Replication; see Section 17.6.3, “Known Issues in MySQL Cluster Replication”, for more information. (Bug#27404)

  • Prepared statements containing CONNECTION_ID() could be written improperly to the binary log. (Bug#30200)

  • Use of local variables with non-ASCII names in stored procedures crashed the server. (Bug#30120)

  • On Windows, client libraries lacked symbols required for linking. (Bug#30118)

  • --myisam-recover='' (empty option value) did not disable MyISAM recovery. (Bug#30088)

  • For the SHOW TABLE TYPES statement, the server sent incorrect output to clients, possibly causing them to crash. (Bug#30036)

  • The IS_UPDATABLE column in the INFORMATION_SCHEMA.VIEWS table was not always set correctly. (Bug#30020)

  • SHOW statements were being written to the slow query log that should not have been. (Bug#30000)

  • REPAIR TABLE ... USE_FRM could corrupt tables. (Bug#29980)

  • For MyISAM tables on Windows, INSERT, DELETE, or UPDATE followed by ALTER TABLE within LOCK TABLES could cause table corruption. (Bug#29957)

  • LOCK TABLES did not pre-lock tables used in triggers of the locked tables. Unexpected locking behavior and statement failures similar to failed: 1100: Table 'xx' was not locked with LOCK TABLES could result. (Bug#29929)

  • INSERT ... VALUES(CONNECTION_ID(), ...) statements were written to the binary log in such a way that they could not be properly restored. (Bug#29928)

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

  • On Windows, the CMake build process did not produce the embedded server library or related binaries. (Bug#29903)

  • Using the DATE() function in a WHERE clause did not return any records after encountering NULL. However, using TRIM() or CAST() produced the correct results. (Bug#29898)

  • SESSION_USER() returned garbage data (rather than the correct value of the empty string) when executed by a slave SQL thread. (Bug#29878)

  • Very long prepared statements in stored procedures could cause a server crash. (Bug#29856)

  • If query execution involved a temporary table, GROUP_CONCAT() could return a result with an incorrect character set. (Bug#29850)

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

  • Repeatedly accessing a view in a stored procedure (for example, in a loop) caused a small amount of memory to be allocated per access. Although this memory is deallocated on disconnect, it could be a problem for a long running stored procedures that make repeated access of views. (Bug#29834)

  • mysqldump produced output that incorrectly discarded the NO_AUTO_VALUE_ON_ZERO value of the sql_mode variable after dumping triggers. (Bug#29788)

  • An assertion failure occurred within yaSSL for very long keys. (Bug#29784)

  • For MEMORY tables, the index_merge union access method could return incorrect results. (Bug#29740)

  • Comparison of TIME values using the BETWEEN operator led to string comparison, producing incorrect results in some cases. Now the values are compared as integers. (Bug#29739)

  • For a table with a DATE column date_col such that selecting rows with WHERE date_col = 'date_val 00:00:00' yielded a nonempty result, adding GROUP BY date_col caused the result to be empty. (Bug#29729)

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

  • Single-row inserts could report a row count greater than one. (Bug#29692)

  • For the embedded server, the mysql_stmt_store_result() C API function caused a memory leak for empty result sets. (Bug#29687)

  • EXPLAIN produced Impossible where for statements of the form SELECT ... FROM t WHERE c=0, where c was an ENUM column defined as a primary key. (Bug#29661)

  • On Windows, ALTER TABLE hung if records were locked in share mode by a long-running transaction. (Bug#29644)

  • mysqld_safe produced error messages and did not create the error log file under some circumstances. (Bug#29634)

  • On 64-bit platforms, the filesort code (for queries with GROUP BY or ORDER BY) could crash due to an incorrect pointer size. (Bug#29610)

  • A left join between two views could produce incorrect results. (Bug#29604)

  • Certain statements with unions, subqueries, and joins could result in huge memory consumption. (Bug#29582)

  • Clients using SSL could hang the server. (Bug#29579)

  • A slave running with --log-slave-updates would fail to write INSERT DELAY IGNORE statements to its binary log, resulting in different binary log contents on the master and slave. (Bug#29571)

  • An incorrect result was returned when comparing string values that were converted to TIME values with CAST(). (Bug#29555)

  • gcov coverage-testing information was not written if the server crashed. (Bug#29543)

  • In the ascii character set, conversion of DEL (0x7F) to Unicode incorrectly resulted in QUESTION MARK (0x3F) rather than DEL. (Bug#29499)

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

  • On Windows, the mysql client died if the user entered a statement and Return after entering Control-C. (Bug#29469)

  • The full-text parser could enter an infinite loop if it encountered an illegal multi-byte sequence or a sequence that has no mapping to Unicode. (Bug#29464)

  • Searching a FULLTEXT index for a word with the boolean mode truncation operator could cause an infinite loop. (Bug#29445)

  • Corrupt data resulted from use of SELECT ... INTO OUTFILE 'file_name' FIELDS ENCLOSED BY 'c', where c is a digit or minus sign, followed by LOAD DATA INFILE 'file_name' FIELDS ENCLOSED BY 'c'. (Bug#29442)

  • Killing an INSERT DELAYED thread caused a server crash. (Bug#29431)

  • Use of SHOW BINLOG EVENTS for a nonexistent log file followed by PURGE BINARY LOGS caused a server crash. (Bug#29420)

  • Assertion failure could occur for grouping queries that employed DECIMAL user variables with assignments to them. (Bug#29417)

  • For CAST(expr AS DECIMAL(M,D)), the limits of 65 and 30 on the precision (M) and scale (D) were not enforced. (Bug#29415)

  • Deleting from a CSV table could corrupt it. (Bug#29411)

  • Results for a select query that aliases the column names against a view could duplicate one column while omitting another. This bug could occur for a query over a multiple-table view that includes an ORDER BY clause in its definition. (Bug#29392)

  • mysqldump created a stray file when a given a too-long file name argument. (Bug#29361)

  • The special “zeroENUM value was coerced to the normal empty string ENUM value during a column-to-column copy. This affected CREATE ... SELECT statements and SELECT statements with aggregate functions on ENUM columns in the GROUP BY clause. (Bug#29360)

  • Inserting a negative number into a CSV table could corrupt it. (Bug#29353)

  • Optimization of queries with DETERMINISTIC stored functions in the WHERE clause was ineffective: A sequential scan was always used. (Bug#29338)

  • MyISAM corruption could occur with the cp932_japanese_ci collation for the cp932 character set due to incorrect comparison for trailing space. (Bug#29333)

  • For updates to InnoDB tables, a TIMESTAMP column with the ON UPDATE CURRENT_TIMESTAMP attribute could be updated even when no values actually changed. (Bug#29310)

  • FULLTEXT indexes could be corrupted by certain gbk characters. (Bug#29299)

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

  • Sort order of the collation wasn't used when comparing trailing spaces. This could lead to incorrect comparison results, incorrectly created indexes, or incorrect result set order for queries that include an ORDER BY clause. (Bug#29261)

  • CHECK TABLE could erroneously report table corruption for a CSV table if multiple threads were modifying the table at the same time. (Bug#29253)

  • Many threads accessing a CSV table simultaneously could cause an assertion failure. (Bug#29252)

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

  • Calling mysql_options() after mysql_real_connect() could cause clients to crash. (Bug#29247)

  • CHECK TABLE for ARCHIVE tables could falsely report table corruption or cause a server crash. (Bug#29207)

  • Mixing binary and utf8 columns in a union caused field lengths to be calculated incorrectly, resulting in truncation. (Bug#29205)

  • AsText() could fail with a buffer overrun. (Bug#29166)

  • Under some circumstances, a SELECT ... FROM mysql.event could cause the server to crash. (Bug#29156)

  • InnoDB refused to start on some versions of FreeBSD with LinuxThreads. This is fixed by enabling file locking on FreeBSD. (Bug#29155)

  • LOCK TABLES was not atomic when more than one InnoDB tables were locked. (Bug#29154)

  • mysqld failed to exit during shutdown. (Bug#29133)

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

  • An assertion failure occurred if a query contained a conjunctive predicate of the form view_column = constant in the WHERE clause and the GROUP BY clause contained a reference to a different view column. The fix also enables application of an optimization that was being skipped if a query contained a conjunctive predicate of the form view_column = constant in the WHERE clause and the GROUP BY clause contained a reference to the same view column. (Bug#29104)

  • A maximum of 4TB InnoDB free space was reported by SHOW TABLE STATUS, which is incorrect on systems with more than 4TB space. (Bug#29097)

  • If an INSERT INTO ... SELECT statement inserted into the same table that the SELECT retrieved from, and the SELECT included ORDER BY and LIMIT clauses, different data was inserted than the data produced by the SELECT executed by itself. (Bug#29095)

  • Queries that performed a lookup into a BINARY index containing key values ending with spaces caused an assertion failure for debug builds and incorrect results for nondebug builds. (Bug#29087)

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

  • A byte-order issue in writing a spatial index to disk caused bad index files on some systems. (Bug#29070)

  • Creation of a legal stored procedure could fail if no default database had been selected. (Bug#29050)

  • REPLACE, INSERT IGNORE, and UPDATE IGNORE did not work for FEDERATED tables. (Bug#29019)

  • Inserting into InnoDB tables and executing RESET MASTER in multiple threads cause assertion failure in debug server binaries. (Bug#28983)

  • Updates to a CSV table could cause a server crash or update the table with incorrect values. (Bug#28971)

  • For a ucs2 column, GROUP_CONCAT() did not convert separators to the result character set before inserting them, producing a result containing a mixture of two different character sets. (Bug#28925)

  • Dropping the definer of an active event caused the server to crash. (Bug#28924)

  • For a join with GROUP BY and/or ORDER BY and a view reference in the FROM list, the query metadata erroneously showed empty table aliases and database names for the view columns. (Bug#28898)

  • Creating an event using ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL ... could in some cases cause mysqld to crash. (Bug#28881)

  • Coercion of ASCII values to character sets that are a superset of ASCII sometimes was not done, resulting in illegal mix of collations errors. These cases now are resolved using repertoire, a new string expression attribute (see Section 9.1.8, “String Repertoire”). (Bug#28875)

  • Executing ALTER EVENT on an event whose definer's event creation privileges had been revoked cause the server to crash. (Bug#28873)

  • ALTER VIEW is not supported as a prepared statement but was not being rejected. ALTER VIEW is now prohibited as a prepared statement or when called within stored routines. (Bug#28846)

  • In strict SQL mode, errors silently stopped the SQL thread even for errors named using the --slave-skip-errors option. (Bug#28839)

  • Fast ALTER TABLE (that works without rebuilding the table) acquired duplicate locks in the storage engine. In MyISAM, if ALTER TABLE was issued under LOCK TABLE, it caused all data inserted after LOCK TABLE to disappear. (Bug#28838)

  • Runtime changes to the log_queries_not_using_indexes system variable were ignored. (Bug#28808)

  • Selecting a column not present in the selected-from table caused an extra error to be produced by SHOW ERRORS. (Bug#28677)

  • Creating an event to be executed at a time close to the end of the allowed range (2038-01-19 03:14:07 UTC) would cause the server to crash. (Bug#28641)

  • For a statement of the form CREATE t1 SELECT integer_constant, the server created the column using the DECIMAL data type for large negative values that are within the range of BIGINT. (Bug#28625)

  • Starting the server with an innodb_force_recovery value of 4 did not work. (Bug#28604)

  • For InnoDB tables, MySQL unnecessarily sorted records in certain cases when the records were retrieved by InnoDB in the proper order already. (Bug#28591)

  • mysql_install_db could fail to find script files that it needs. (Bug#28585)

  • If a stored procedure was created and invoked prior to selecting a default database with USE, a No database selected error occurred. (Bug#28551)

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

  • Using the --skip-add-drop-table option with mysqldump generated incorrect SQL if the database included any views. The recreation of views requires the creation and removal of temporary tables. This option suppressed the removal of those temporary tables. The same applied to --compact since this option also invokes --skip-add-drop-table. (Bug#28524)

  • mysqlbinlog --hexdump generated incorrect output due to omission of the “#” comment character for some comment lines. (Bug#28293)

  • InnoDB could crash if the server was shut down while innodb_table_monitor was running. (Bug#28254)

  • A race condition in the interaction between MyISAM and the query cache code caused the query cache not to invalidate itself for concurrently inserted data. (Bug#28249)

  • A duplicate-key error message could display an incorrect key value when not all columns of the key were used to select rows for update. (Bug#28158)

  • Indexing column prefixes in InnoDB tables could cause table corruption. (Bug#28138)

  • Index creation could fail due to truncation of key values to the maximum key length rather than to a mulitiple of the maximum character length. (Bug#28125)

  • Instance Manager had a race condition when it received a shutdown request while a guarded mysqld instance was starting such that it could fail to stop the mysqld instance. (Bug#28030)

  • SELECT ... FOR UPDATE with partitioned tables could cause a server crash. (Bug#28026)

  • On Windows, Instance Manager would crash if an instance object failed to initialize during startup. This could happen if an incorrect mysqld path was supplied in the configuration file. (Bug#28012)

  • The LOCATE() function returned NULL if any of its arguments evaluated to NULL. Likewise, the predicate, LOCATE(str,NULL) IS NULL, erroneously evaluated to FALSE. (Bug#27932)

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

  • For some event-creation problems, the server displayed messages that implied the problems were errors when they were only warnings. (Bug#27406)

  • Unsafe aliasing in the source caused a client library crash when compiled with gcc 4 at high optimization levels. (Bug#27383)

  • Index-based range reads could fail for comparisons that involved contraction characters (such as ch in Czech or ll in Spanish). (Bug#27345)

  • Aggregations in subqueries that refer to outer query columns were not always correctly referenced to the proper outer query. (Bug#27333)

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

  • Phantom reads could occur under InnoDB SERIALIZABLE isolation level. (Bug#27197)

  • The SUBSTRING() function returned the entire string instead of an empty string when it was called from a stored procedure and when the length parameter was specified by a variable with the value “0”. (Bug#27130)

  • Some functions when used in partitioning expressions could cause mysqld to crash. (Bug#27084)

  • The server acquired a global mutex for temporary tables, although such tables are thread-specific. This affected performance by blocking other threads. (Bug#27062)

  • FEDERATED tables had an artificially low maximum of key length. (Bug#26909)

  • Updates to rows in a partitioned table could update the wrong column. (Bug#26827)

  • Index creation could corrupt the table definition in the .frm file: 1) A table with the maximum number of key segments and maximum length key name would have a corrupted .frm file, due to incorrect calculation of the total key length. 2) MyISAM would reject a table with the maximum number of keys and the maximum number of key segments in all keys. (It would allow one less than this total maximum.) Now MyISAM accepts a table defined with the maximum. (Bug#26642)

  • The Windows implementation of pthread_join() was incorrect and could cause crashes. (Bug#26564)

  • After the first read of a TEMPORARY table, CHECK TABLE could report the table as being corrupt. (Bug#26325)

  • If an operation had an InnoDB table, and two triggers, AFTER UPDATE and AFTER INSERT, competing for different resources (such as two distinct MyISAM tables), the triggers were unable to execute concurrently. In addition, INSERT and UPDATE statements for the InnoDB table were unable to run concurrently. (Bug#26141)

  • A number of unsupported constructs — including prohibited constructs, the UCASE() function, and nested function calls — were permitted in partitioning expressions. (Bug#26082, Bug#18198, Bug#29308)

  • ALTER DATABASE did not require at least one option. (Bug#25859)

  • The index merge union access algorithm could produce incorrect results with InnoDB tables. The problem could also occur for queries that used DISTINCT. (Bug#25798)

  • When using a FEDERATED table, the value of LAST_INSERT_ID() would not correctly update the C API interface, which would affect the autogenerated ID returned both through the C API and the MySQL protocol, affecting Connectors that used the protocol and/or C API. (Bug#25714)

  • The server was blocked from opening other tables while the FEDERATED engine was attempting to open a remote table. Now the server does not check the correctness of a FEDERATED table at CREATE TABLE time, but waits until the table actually is accessed. (Bug#25679)

  • Under ActiveState Perl, mysql-test-run.pl could kill itself when attempting to kill other processes. (Bug#25657)

  • Several InnoDB assertion failures were corrected. (Bug#25645)

  • A query with DISTINCT in the select list to which the loose-scan optimization for grouping queries was applied returned an incorrect result set when the query was used with the SQL_BIG_RESULT option. (Bug#25602)

  • For a multiple-row insert into a FEDERATED table that refers to a remote transactional table, if the insert failed for a row due to constraint failure, the remote table would contain a partial commit (the rows preceding the failed one) instead of rolling back the statement completely. This occurred because the rows were treated as individual inserts.

    Now FEDERATED performs bulk-insert handling such that multiple rows are sent to the remote table in a batch. This provides a performance improvement and enables the remote table to perform statement rollback properly should an error occur. This capability has the following limitations:

    • The size of the insert cannot exceed the maximum packet size between servers. If the insert exceeds this size, it is broken into multiple packets and the rollback problem can occur.

    • Bulk-insert handling does not occur for INSERT ... ON DUPLICATE KEY UPDATE.

    (Bug#25513)

  • The FEDERATED storage engine failed silently for INSERT ... ON DUPLICATE KEY UPDATE if a duplicate key violation occurred. FEDERATED does not support ON DUPLICATE KEY UPDATE, so now it correctly returns an ER_DUP_KEY error if a duplicate key violation occurs. (Bug#25511)

  • In a stored function or trigger, when InnoDB detected deadlock, it attempted rollback and displayed an incorrect error message (Explicit or implicit commit is not allowed in stored function or trigger). Now InnoDB returns an error under these conditions and does not attempt rollback. Rollback is handled outside of InnoDB above the function/trigger level. (Bug#24989)

  • Dropping a temporary InnoDB table that had been locked with LOCK TABLES caused a server crash. (Bug#24918)

  • On Windows, executables did not include Vista manifests. (Bug#24732)

    See also Bug#22563.

  • If MySQL/InnoDB crashed very quickly after starting up, it would not force a checkpoint. In this case, InnoDB would skip crash recovery at next startup, and the database would become corrupt. Now, if the redo log scan at InnoDB startup goes past the last checkpoint, crash recovery is forced. (Bug#23710)

  • SHOW INNODB STATUS caused an assertion failure under high load. (Bug#22819)

  • SHOW BINLOG EVENTS displayed incorrect values of End_log_pos for events associated with transactional storage engines. (Bug#22540)

  • When determining which transaction to kill after deadlock has been detected, InnoDB now adds the number of locks to a transaction's weight, and avoids killing transactions that mave modified nontransactional tables. This should reduce the likelihood of killing long-running transactions containing SELECT ... FOR UPDATE or INSERT/REPLACE INTO ... SELECT statements, and of causing partial updates if the target is a MyISAM table. (Bug#21293)

  • InnoDB displayed an incorrect error message when a CREATE TABLE statement exceeded the InnoDB maximum allowable row size. (Bug#21101)

  • Under heavy load with a large query cache, invalidating part of the cache could cause the server to freeze (that is, to be unable to service other operations until the invalidation was complete). (Bug#21074)

    See also Bug#39253.

  • On Windows, the server used 10MB of memory for each connection thread, resulting in memory exhaustion. Now each thread uses 1MB. (Bug#20815)

  • InnoDB produced an unnecessary (and harmless) warning: InnoDB: Error: trying to declare trx to enter InnoDB, but InnoDB: it already is declared. (Bug#20090)

  • If a slave timed out while registering with the master to which it was connecting, auto-reconnect failed thereafter. (Bug#19328)

  • If InnoDB reached its limit on the number of concurrent transactions (1023), it wrote a descriptive message to the error log but returned a misleading error message to the client, or an assertion failure occurred. (Bug#18828)

    See also Bug#46672.

  • Under ActiveState Perl, mysql-test-run.pl would not run. (Bug#18415)

  • The server crashed when the size of an ARCHIVE table grew larger than 2GB. (Bug#15787)

  • SQL_BIG_RESULT had no effect for CREATE TABLE ... SELECT SQL_BIG_RESULT ... statements. (Bug#15130)

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

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

  • For the general query log, logging of prepared statements executed via the C API differed from logging of prepared statements performed with PREPARE and EXECUTE. Logging for the latter was missing the Prepare and Execute lines. (Bug#13326)

  • The TABLE_COMMENT column of INFORMATION_SCHEMA.TABLES and the Comment column in the output of SHOW TABLE STATUS displayed extraneous information for InnoDB and NDBCLUSTER tables. (Bug#11379)

    See also Bug#32440.

  • The server returned data from SHOW CREATE TABLE statement or a SELECT statement on an INFORMATION_SCHEMA table using the binary character set. (Bug#10491)

  • Backup software can cause ERROR_SHARING_VIOLATION or ERROR_LOCK_VIOLATION conditions during file operations. InnoDB now retries forever until the condition goes away. (Bug#9709)

C.1.30. Changes in MySQL 5.1.20 (25 June 2007)

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

Note

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

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

Functionality added or changed:

  • Incompatible Change: It is no longer possible to partition the log tables. (Bug#27816)

  • Incompatible Change: mysqld_safe now supports error logging to syslog on systems that support the logger command. The new --syslog and --skip-syslog options can be used instead of the --log-error option to control logging behavior, as described in Section 4.3.2, “mysqld_safe — MySQL Server Startup Script”. The default is to use syslog, which differs from the previous default behavior of writing an error log file.

    Currently, logging to syslog may fail to operate correctly in some cases; if so, use --skip-syslog or --log-error. To maintain the older behavior if you were using no error-logging option, use --skip-syslog. If you were using --log-error, continue to use it.

    Note: In 5.1.21, the default is changed to --skip-syslog, which is compatible with releases prior to 5.1.20. (Bug#4858)

  • Important Change: MySQL Cluster: The TimeBetweenWatchdogCheckInitial configuration parameter was added to allow setting of a separate watchdog timeout for memory allocation during startup of the data nodes. See Section 17.3.2.6, “Defining MySQL Cluster Data Nodes”, for more information. (Bug#28899)

  • MySQL Cluster: The cluster management client now stores command history between sessions. (Bug#29073)

  • MySQL Cluster: auto_increment_increment and auto_increment_offset are now supported for NDB tables. (Bug#26342)

  • MySQL Cluster: The server source tree now includes scripts to simplify building MySQL with SCI support. For more information about SCI interconnects and these build scripts, see Section 17.3.5.1, “Configuring MySQL Cluster to use SCI Sockets”. (Bug#25470)

  • MySQL Cluster: A new configuration parameter ODirect causes NDB to attempt using O_DIRECT writes for LCP, backups, and redo logs, often lowering CPU usage.

  • Replication: The sql_mode, foreign_key_checks, unique_checks, character set/collations, and sql_auto_is_null session variables are written to the binary log and honored during replication. See Section 5.2.4, “The Binary Log”.

  • If a MERGE table cannot be opened or used because of a problem with an underlying table, CHECK TABLE now displays information about which table caused the problem. (Bug#26976)

  • User variables and stored procedure variables are now supported for use in XPath expressions employed as arguments to the ExtractValue() and UpdateXML() functions.

    This means that:

    • XPath can now be used to load data from XML files using virtually any format, and so able to import data from most third party software which either has XML export functionality, or uses XML natively as a storage format.

    • Various complex conditions can be put on rows and columns, so one can filter for desired rows (or skip unwanted rows) when loading XML.

    • Various types of preprocessing using SQL functions are now possible when loading XML. For example, you can concatenate two XML tag or attribute values into a single column value using CONCAT(), or remove some parts of the data using REPLACE().

    See Section 11.10, “XML Functions”, for more information. (Bug#26518)

  • Binary distributions for some platforms did not include shared libraries; now shared libraries are shipped for all platforms except AIX 5.2 64-bit. Exception: The library for the libmysqld embedded server is not shared except on Windows. (Bug#16520, Bug#26767, Bug#13450)

  • Added a new PAD_CHAR_TO_FULL_LENGTH SQL mode. By default, trailing spaces are trimmed from CHAR column values on retrieval. If PAD_CHAR_TO_FULL_LENGTH is enabled, trimming does not occur and retrieved CHAR values are padded to their full length. This mode does not apply to VARCHAR columns, for which trailing spaces are retained on retrieval.

  • XPath can now be used to load data from XML files using virtually any format, and so able to import data from most third party software which either has XML export functionality, or uses XML natively as a storage format.

  • Various complex conditions can be put on rows and columns, so one can filter for desired rows (or skip unwanted rows) when loading XML.

  • Various types of preprocessing using SQL functions are now possible when loading XML. For example, you can concatenate two XML tag or attribute values into a single column value using CONCAT(), or remove some parts of the data using REPLACE().

Bugs fixed:

  • 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 Fix: CREATE TABLE LIKE did not require any privileges on the source table. Now it requires the SELECT privilege.

    In addition, CREATE TABLE LIKE was not isolated from alteration by other connections, which resulted in various errors and incorrect binary log order when trying to execute concurrently a CREATE TABLE LIKE statement and either DDL statements on the source table or DML or DDL statements on the target table. (Bug#23667, Bug#25578, CVE-2007-3781)

  • Incompatible Change: Some error codes had error numbers in MySQL 5.1 different from the numbers in MySQL 5.0. In MySQL 5.1, error numbers have been changed to match the MySQL 5.0 values: Error codes with value of 1458 or higher have changed in MySQL 5.1 now. Client applications designed to work with MySQL 5.1 with hard-coded error code values (for example, in statements such as if (mysql_errno(mysql) == 1463) { ... }) need to be updated in the source code. All clients designed to work with MySQL 5.1 that test error codes (for example, in statements such as if (mysql_errno(mysql) == ER_VIEW_RECURSIVE) { ... }) should be recompiled. Existing 5.0 clients should now work, without changes or recompilation, against servers for MySQL 5.1.20 or higher. (Bug#29245)

  • Incompatible Change: The names of stored functions referenced by views were not properly displayed by SHOW CREATE VIEW.

    The fix corrects a problem introduced by Bug#23491. There is an incompatibility when upgrading from versions affected by that bug fix (MySQL 5.0.40 through 5.0.43, MySQL 5.1.18 through 5.1.19): If you use mysqldump before upgrading from an affected version and reload the data after upgrading to a higher version, you must drop and recreate your views. (Bug#28605)

  • Incompatible Change: When mysqldump was run with the --delete-master-logs option, binary log files were deleted before it was known that the dump had succeeded, not after. (The method for removing log files used RESET MASTER prior to the dump. This also reset the binary log sequence numbering to .000001.) Now mysqldump flushes the logs (which creates a new binary log number with the next sequence number), performs the dump, and then uses PURGE BINARY LOGS to remove the log files older than the new one. This also preserves log numbering because the new log with the next number is generated and only the preceding logs are removed. However, this may affect applications if they rely on the log numbering sequence being reset. (Bug#24733)

  • Incompatible Change: The use of an ORDER BY or DISTINCT clause with a query containing a call to the GROUP_CONCAT() function caused results from previous queries to be redisplayed in the current result. The fix for this includes replacing a BLOB value used internally for sorting with a VARCHAR. This means that for long results (more than 65,535 bytes), it is possible for truncation to occur; if so, an appropriate warning is issued. (Bug#23856, Bug#28273)

  • MySQL Cluster: Replication: (Replication): A replicated unique key allowed duplicate key inserts on the slave. (Bug#27044)

  • MySQL Cluster: Memory corruption could occur due to a problem in the DBTUP kernel block. (Bug#29229)

  • MySQL Cluster: A query having a large IN(...) or NOT IN(...) list in the WHERE condition on an NDB table could cause mysqld to crash. (Bug#29185)

  • MySQL Cluster: In the event that two data nodes in the same node group and participating in a GCP crashed before they had written their respective P0.sysfile files, QMGR could refuse to start, issuing an invalid Insufficient nodes for restart error instead. (Bug#29167)

  • MySQL Cluster: Attempting to restore a NULL row to a VARBINARY column caused ndb_restore to fail. (Bug#29103)

  • MySQL Cluster: ndb_error_reporter now preserves timestamps on files. (Bug#29074)

  • MySQL Cluster: It is now possible to set the maximum size of the allocation unit for table memory using the MaxAllocate configuration parameter. (Bug#29044)

  • MySQL Cluster: When shutting down mysqld, the NDB binlog process was not shut down before log cleanup began. (Bug#28949)

  • MySQL Cluster: ndb_mgm could hang when connecting to a nonexistent host. (Bug#28847)

  • MySQL Cluster: A regression in the heartbeat monitoring code could lead to node failure under high load. This issue affected MySQL 5.1.19 and MySQL Cluster NDB 6.1.10 only. (Bug#28783)

  • MySQL Cluster: A corrupt schema file could cause a File already open error. (Bug#28770)

  • MySQL Cluster: Having large amounts of memory locked caused swapping to disk. (Bug#28751)

  • MySQL Cluster: Setting InitialNoOpenFiles equal to MaxNoOfOpenFiles caused an error. This was due to the fact that the actual value of MaxNoOfOpenFiles as used by the cluster was offset by 1 from the value set in config.ini. (Bug#28749)

  • MySQL Cluster: LCP files were not removed following an initial system restart. (Bug#28726)

  • MySQL Cluster: UPDATE IGNORE statements involving the primary keys of multiple tables could result in data corruption. (Bug#28719)

  • MySQL Cluster: A race condition could result when nonmaster nodes (in addition to the master node) tried to update active status due to a local checkpoint (that is, between NODE_FAILREP and COPY_GCIREQ events). Now only the master updates the active status. (Bug#28717)

  • MySQL Cluster: A fast global checkpoint under high load with high usage of the redo buffer caused data nodes to fail. (Bug#28653)

  • MySQL Cluster: The management client's response to START BACKUP WAIT COMPLETED did not include the backup ID. (Bug#27640)

  • Cluster Replication: Replication: When replicating MyISAM or InnoDB tables to a MySQL Cluster, it was not possible to determine exactly what had been applied following a shutdown of the slave cluster or mysqld process. (Bug#26783)

  • Replication: DROP USER statements that named multiple users, only some of which could be dropped, were replicated incorrectly. (Bug#29030)

  • Replication: Using events in replication could cause the slave to crash. (Bug#28953)

  • Replication: It was possible to set SQL_SLAVE_SKIP_COUNTER such that the slave would jump into the middle of an event group. (Bug#28618)

    See also Bug#12691.

  • Replication: The result of executing of a prepared statement created with PREPARE s FROM "SELECT 1 LIMIT ?" was not replicated correctly. (Bug#28464)

  • Replication: Recreating a view that already exists on the master would cause a replicating slave to terminate replication with a 'different error message on slave and master' error. (Bug#28244)

  • Replication: Binary logging of prepared statements could produce syntactically incorrect queries in the binary log, replacing some parameters with variable names rather than variable values. This could lead to incorrect results on replication slaves. (Bug#26842, Bug#12826)

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

    See also Bug#29083.

  • Replication: When using transactions and replication, shutting down the master in the middle of a transaction would cause all slaves to stop replicating. (Bug#22725)

  • Replication: Using CREATE TABLE LIKE ... would raise an assertion when replicated to a slave. (Bug#18950)

  • Disk Data: When loading data into a cluster following a version upgrade, the data nodes could forcibly shut down due to page and buffer management failures (that is, ndbrequire failures in PGMAN). (Bug#28525)

  • Disk Data: Repeated INSERT and DELETE operations on a Disk Data table having one or more large VARCHAR columns could cause data nodes to fail. (Bug#20612)

  • Cluster API: The timeout set using the MGM API ndb_mgm_set_timeout() function was incorrectly interpreted as seconds rather than as milliseconds. (Bug#29063)

  • Cluster API: An invalid error code could be set on transaction objects by BLOB handling code. (Bug#28724)

  • The TRUNCATE TABLE statement was handled differently by the server when row-based logging was in effect, even though the binlogging format in effect does not effect the fact that TRUNCATE TABLE is always logged as a statement. (Bug#29130)

  • If one of the queries in a UNION used the SQL_CACHE option and another query in the UNION contained a nondeterministic function, the result was still cached. For example, this query was incorrectly cached:

    SELECT NOW() FROM t1 UNION SELECT SQL_CACHE 1 FROM t1;
    

    (Bug#29053)

  • Long path names for internal temporary tables could cause stack overflows. (