May 9th, 2012· The MySQL-shared-compat RPM package enables users of Red Hat-privided mysql-*-5.1 RPM packages to migrate to Oracle-provided MySQL-*-5.5 packages. MySQL-shared-compat now replaces the Red Hat mysql-libs package by replacing libmysqlclient.so files of the latter package, thus satisfying dependencies of other packages on mysql-libs. This change affects only users of Red Hat (or Red Hat-compatible) RPM packages. Nothing is different for users of Oracle RPM packages. (Bug #13867506)
Bugs Fixed:
· Security Fix: Bug #59533 was fixed.
· Performance: Partitioning: InnoDB: The statistics used by the optimizer for queries against partitioned InnoDB tables were based only on the first partition of each such table, leading to use of the wrong execution plan. (Bug #13694811)
· References: This bug was introduced by Bug #11756867.
· Performance: InnoDB: Improved the performance of the DROP TABLE statement for InnoDB tables, especially on systems with a large buffer pool. The fix speeds up the processing for freeing entries in the adaptive hash index. (Bug #13704145, Bug #64284)
· InnoDB: Deleting a huge amount of data from InnoDB tables within a short time could cause the purge operation that flushes data from the buffer pool to stall. If this issue occurs, restart the server to work around it. This issue is only likely to occur on 32-bit platforms. (Bug #13847885)
InnoDB: If the server crashed during a TRUNCATE TABLE or CREATE INDEX statement for an InnoDB table, or a DROP DATABASE statement for a database containing InnoDB tables, an index could be corrupted, causing an error message when accessing the table after restart:
· InnoDB: Error: trying to load index index_name for table table_name
· InnoDB: but the index tree has been freed!
· In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #12861864, Bug #11766019)
· InnoDB: When data was removed from an InnoDB table, newly inserted data might not reuse the freed disk blocks, leading to an unexpected size increase for the system tablespace or .ibd file (depending on the setting of innodb_file_per_table. The OPTIMIZE TABLE could compact a .ibd file in some cases but not others. The freed disk blocks would eventually be reused as additional data was inserted. (Bug #11766634, Bug #59783)
· InnoDB: When shutting down the MySQL server, the cleanup operations of the InnoDB shutdown could take a long time with no output, making the server appear to be hung.
· Note] mysqld: Normal shutdown
· InnoDB: Starting shutdown...
· InnoDB: Shutdown completed; log sequence number ...
Now additional progress messages are displayed between the “starting” and “completed” messages:
· InnoDB: Waiting for srv_monitor_thread (srv_lock_timeout_thread/ srv_error_monitor_thread) to exit
· InnoDB: Waiting for %lu active transactions to exit
· InnoDB: Waiting for master thread (worker threads) to be suspended
· InnoDB: Pending checkpoint_writes: %lu
· InnoDB: Pending log flush writes: %lu
· InnoDB: Waiting for %lu buffer page I/Os to complete
· InnoDB: Waiting for dirty buffer pages to be flushed
For both fast shutdown and slow shutdown, a progress messages is printed every 60 seconds:
· InnoDB: Waiting for %lu tables to be dropped
During a slow shutdown, two additional messages are printed if certain phases take longer than normal:
· InnoDB: Waiting for %lu undo logs to be purged
· InnoDB: number of pages just purged: %lu
· InnoDB: Waiting for change buffer merge to complete\n
· InnoDB: number of bytes of change buffer just merged: %lu
· Bug #11755873, Bug #47707)
· Partitioning: After updating a row of a partitioned table and selecting that row within the same transaction with the query cache enabled, then performing a ROLLBACK, the same result was returned by an identical SELECT issued in a new transaction. (Bug #11761296, Bug #53775)
· Replication: Formerly, the default value shown for the Port column in the output of SHOW SLAVE HOSTS was 3306 whether the port had been set incorrectly or not set at all. Now, when the slave port is not set, 0 is used as the default. This change also affects the default used for the --report-port server option. (Bug #13333431)
· Replication: The --relay-log-space-limit option was sometimes ignored.
· More specifically, when the SQL thread went to sleep, it allowed the I/O thread to queue additional events in such a way that the relay log space limit was bypassed, and the number of events in the queue could grow well past the point where the relay logs needed to be rotated. Now in such cases, the SQL thread checks to see whether the I/O thread should rotate and provide the SQL thread a chance to purge the logs (thus freeing space).
· Note that, when the SQL thread is in the middle of a transaction, it cannot purge the logs; it can only ask for more events until the transaction is complete. Once the transaction is finished, the SQL thread can immediately instruct the I/O thread to rotate. (Bug #12400313, Bug #64503)
· References: See also Bug #13806492.
· An infinite thread loop could develop within Performance Schema, causing the server to become unresponsive. (Bug #13898343)
· Incorrect stored program caching could cause statements within a stored program that included a GROUP BY clause to return different results across multiple program invocations. (Bug #13805127)
· Mishandling of NO_BACKSLASH_ESCAPES SQL mode within stored procedures on slave servers could cause replication failures. (Bug #12601974)
· SAVEPOINT statements were incorrectly disallowed within XA transactions. (Bug #64374, Bug #13737343)
· References: See also Bug #11766752.
· The Performance Schema incorrectly displayed some backslashes in Windows file names (by doubling them). (Bug #63339, Bug #13417446)
· SHOW statements treated stored procedure, stored function, and event names as case sensitive. (Bug #56224, Bug #11763507)
April 9th, 2012Functionality Added or Changed:
· New utf8_general_mysql500_ci and ucs2_general_mysql500_ci collations have been added that preserve the behavior of utf8_general_ci and ucs2_general_ci from versions of MySQL previous to 5.1.24.
· Bug #27877 corrected an error in the original collations but introduced an incompatibility for columns that contain German 'ß' LATIN SMALL LETTER SHARP S. (As a result of the fix, that character compares equal to characters with which it previously compared different.)
· yaSSL was upgraded from version 1.7.2 to 2.2.0.
Bugs Fixed:
· Security Fix: Bug #13510739 and Bug #63775 were fixed.
· Incompatible Change: An earlier change (in MySQL 5.1.59 and 5.5.16) was found to modify date-handling behavior in General Availability-status series (MySQL 5.1 and 5.5). This change has been reverted.
· Important Change: InnoDB Storage Engine: When a row grew in size due to an UPDATE operation, other (non-updated) columns could be moved to off-page storage so that information about the row still fit within the constraints of the InnoDB page size. The pointer to the new allocated off-page data was not set up until the pages were allocated and written, potentially leading to lost data if the system crashed while the column was being moved out of the page. The fix corrects the order of operations for moving the column data off the original page and replacing it with a pointer. Now if a crash occurs at the precise moment when the column data is being transferred, the transfer will not be re-run during crash recovery. In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13721257, Bug #12612184, Bug #12704861)
· InnoDB Storage Engine: An erroneous assertion could occur, in debug builds only, when creating an index on a column containing zero-length values (that is, ''). (Bug #13654923)
· InnoDB Storage Engine: A DDL operation such as ALTER TABLE ... ADD COLUMN could stall, eventually timing out with an Error 1005: Can't create table message referring to fil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)
· InnoDB Storage Engine: References to C preprocessor symbols and macros HAVE_purify, UNIV_INIT_MEM_TO_ZERO, and UNIV_SET_MEM_TO_ZERO were removed from the InnoDB source code. They were only used in debug builds instrumented for Valgrind. They are replaced by calls to the UNIV_MEM_INVALID() macro. (Bug #13418934)
· InnoDB Storage Engine: A DDL operation for an InnoDB table could cause a busy MySQL server to halt with an assertion error: InnoDB: Failing assertion: trx->error_state == DB_SUCCESS (Bug #12739098, Bug #62401)
· InnoDB Storage Engine: With 1024 concurrent InnoDB transactions running concurrently and the innodb_file_per_table setting enabled, a CREATE TABLE operation for an InnoDB table could fail. The .ibd file from the failed CREATE TABLE was left behind, preventing the table from being created later, after the load had dropped. The fix adds error handling to delete the erroneous .ibd file. This error was less likely to occur in MySQL 5.5 and 5.6, because raising the number of InnoDB undo slots increased the number of simultaneous transactions needed to trigger the bug, from 1K to 128K. (Bug #12400341)
InnoDB Storage Engine: When copying a partitioned InnoDB table from a Linux system to a Windows system, you could encounter this error:
· 101115 14:19:53 [ERROR] Table .\test\d has no primary key in InnoDB data
· dictionary, but has one in MySQL! Normally, the solution to copy InnoDB tables from Linux to Windows is to create the tables on Linux with the lower_case_table_names option enabled. Partitioned tables, with #P# appended to the filename, were not covered by that solution. (Bug #11765438, Bug #58406)
· InnoDB Storage Engine: Server startup could produce an error for temporary tables using the InnoDB storage engine, if the path in the $TMPDIR variable ended with a / character. The workaround for the problem was to create a similar temporary table again, copy its .frm file to tmpdir under the name mentioned in the error message (for example, #sql123.frm) and restart mysqld with tmpdir set to its normal value without a trailing slash, for example /var/tmp. On startup, MySQL would see the .frm file and issue DROP TABLE for the orphaned temporary table. (Bug #11754376, Bug #45976)
· A query that used an index on a CHAR column referenced in a BETWEEN clause could return invalid results. (Bug #13463488, Bug #63437)
· When the optimizer performed conversion of DECIMAL values while evaluating range conditions, it could produce incorrect results. (Bug #13453382)
· When used with the --xml option, mysqldump --routines failed to dump any stored routines, triggers, or events. (Bug #11760384, Bug #52792)
· It was possible on replication slaves where FEDERATED tables were in use to get timeouts on long-running operations, such as Error 1160 Got an error writing communication packets. The FEDERATED tables did not need to be replicated for the issue to occur. (Bug #11758931, Bug #51196)
· If an attempt to initiate a statement failed, the issue could not be reported to the client because it was not prepared to receive any error messages prior to the execution of any statement. Since the user could not execute any queries, they were simply disconnected without providing a clear error. After the fix for this issue, the client is prepared for an error as soon as it attempts to initiate a statement, so that the error can be reported prior to disconnecting the user. (Bug #11755281, Bug #47032)
· Using myisamchk with the sort recover method to repair a table having fixed-width row format could cause the row pointer size to be reduced, effectively resulting in a smaller maximum data file size. (Bug #48848, Bug #11756869)
· Due to improper locking, concurrent inserts into an ARCHIVE table at the same time as repair and check operations on the table resulted in table corruption. (Bug #37280, Bug #11748748)
· Under some circumstances, the result of SUBSTRING_INDEX() incorrectly depended on the contents of the previous row. (Bug #42404, Bug #11751514)
April 6th, 2012Bugs Fixed:
· Security Fix: Bug #13510739 and Bug #63775 were fixed.
· Important Change: InnoDB Storage Engine: When a row grew in size due to an UPDATE operation, other (non-updated) columns could be moved to off-page storage so that information about the row still fit within the constraints of the InnoDB page size. The pointer to the new allocated off-page data was not set up until the pages were allocated and written, potentially leading to lost data if the system crashed while the column was being moved out of the page. The problem was more common with tables using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED along with the Barracuda file format, particularly with the innodb_file_per_table setting enabled, because page allocation operations are more common as the .ibd tablespace files are extended. Still, the problem could occur with any combination of InnoDB version, file format, and row format.
· A related issue was that during such an UPDATE operation, or an INSERT operation that reused a delete-marked record, other transactions could see invalid data for the affected column, regardless of isolation level.
· The fix corrects the order of operations for moving the column data off the original page and replacing it with a pointer. Now if a crash occurs at the precise moment when the column data is being transferred, the transfer will not be re-run during crash recovery.
· In MySQL 5.1, this fix applies to the InnoDB Plugin, but not the built-in InnoDB storage engine. (Bug #13721257, Bug #12612184, Bug #12704861)
· InnoDB Storage Engine: An erroneous assertion could occur, in debug builds only, when creating an index on a column containing zero-length values (that is, ''). (Bug #13654923)
· InnoDB Storage Engine: A DDL operation such as ALTER TABLE ... ADD COLUMN could stall, eventually timing out with an Error 1005: Can't create table message referring to fil_rename_tablespace. (Bug #13636122, Bug #62100, Bug #63553)
InnoDB Storage Engine: A DDL operation for an InnoDB table could cause a busy MySQL server to halt with an assertion error:
· InnoDB Storage Engine: Server startup could produce an error for temporary tables using the InnoDB storage engine, if the path in the $TMPDIR variable ended with a / character.
· Replication: Statements that wrote to tables with AUTO_INCREMENT columns based on an unordered SELECT from another table could lead to the master and the slave going out of sync, as the order in which the rows are retrieved from the table may differ between them. Such statements include any INSERT ... SELECT, REPLACE ... SELECT, or CREATE TABLE ... SELECT statement. Such statements are now marked as unsafe for statement-based replication, which causes the execution of one to throw a warning, and forces the statement to be logged using the row-based format if the logging format is MIXED. (Bug #11758263, Bug #50440)
After using an ALTER TABLE statement to change the KEY_BLOCK_SIZE property for an InnoDB table, for example when switching from an uncompressed to a compressed table, subsequent server restarts could fail with a message like:
· InnoDB: Error: data file path/ibdata2 uses page size 1024,
· InnoDB: but the only supported page size in this release is=16384
· This issue is a regression introduced in MySQL 5.5.20. (Bug #13698765, Bug #64160)
· The contents of the shared and shared-compat RPM packages had been changed in versions 5.5.6 and 5.6.1 to avoid the overlap which they traditionally had (and still have in MySQL 5.0 and 5.1). However, the RPM meta information had not been changed in accordance, and so RPM still assumed a conflict between shared and shared-compat RPM packages. This has been fixed. (Bug #60855, Bug #12368215)
· References: See also Bug #56150.
· myisam_sort_buffer_size could not be set larger than 4GB on 64-bit systems. (Bug #45702, Bug #11754145)
· Due to improper locking, concurrent inserts into an ARCHIVE table at the same time as repair and check operations on the table resulted in table corruption. (Bug #37280, Bug #11748748)
January 13th, 2012Functionality Added or Changed:
· A new server option, --slow-start-timeout, controls the Windows service control manager's service start timeout. The value is the maximum number of milliseconds that the service control manager waits before trying to kill the MySQL service during startup. The default value is 15000 (15 seconds). If the MySQL service takes too long to start, you may need to increase this value. A value of 0 means there is no timeout.
Bugs Fixed:
· Important Change: Replication: Setting an empty user in a CHANGE MASTER TO statement caused an invalid internal result and is no longer permitted. Trying to use MASTER_USER='' or setting MASTER_PASSWORD while leaving MASTER_USER unset causes the statement to fail with an error.
· Important Change: Replication: Moving the binary log file, relay log file, or both files to a new location, then restarting the server with a new value for --log-bin, --relay-log, or both, caused the server to abort on start. This was because the entries in the index file overrode the new location. In addition, paths were calculated relative to datadir (rather than to the --log-bin or --relay-log values).
· The fix for this problem means that, when the server reads an entry from the index file, it now checks whether the entry contains a relative path. If it does, the relative part of the path is replaced with the absolute path set using the --log-bin or --relay-log option. An absolute path remains unchanged; in such a case, the index must be edited manually to enable the new path or paths to be used.
· InnoDB Storage Engine: When doing a live downgrade from MySQL 5.6.4 or later, with innodb_page_size set to a value other than 16384, now the earlier MySQL version reports that the page size is incompatible with the older version, rather than crashing or displaying a “corruption” error.
· InnoDB Storage Engine: Issuing INSERT...ON DUPLICATE KEY statements for InnoDB tables from concurrent threads could cause a deadlock, particularly with the INSERT...ON DUPLICATE KEY UPDATE form. The fix avoids deadlocks caused by the same row being accessed by more than one transaction. Deadlocks could still occur when multiple rows are inserted and updated simultaneously by different transactions in inconsistent order; those types of deadlocks require the standard error handling on the application side, of re-trying the transaction.
· An incorrect InnoDB assertion could cause the server to halt. This issue only affected debug builds. The assertion referenced the source file btr0pcur.ic and the variable cursor->pos_state.
· Locale information for FORMAT() function instances was lost in view definitions.
· The handle_segfault() signal-handler code in mysqld could itself crash due to calling unsafe functions.
· Enabling myisam_use_mmap could cause the server to crash.
· Concurrent access to ARCHIVE tables could cause corruption.
December 8th, 2011Functionality Added or Changed:
· Performance of metadata locking operations on Windows XP systems was improved by instituting a cache for metadata lock objects. This permits the server to avoid expensive operations for creation and destruction of synchronization objects on XP. A new system variable, metadata_locks_cache_size, permits control over the size of the cache. The default size is 1024.
· Replication: Previously, replication slaves could connect to the master server through master accounts that use nonnative authentication, except Windows native authentication. This is now also true for Windows native authentication.
Bugs Fixed:
· InnoDB Storage Engine: An incorrect deadlock could occur on a server doing a substantial amount of change buffering for DML operations, particularly DELETE statements.
· Rounding DBL_MAX returned DBL_MAX, not 'inf'.
· mysql_upgrade did not upgrade the system tables or create the mysql_upgrade_info file when run with the --write-binlog or --skip-write-binlog option.
· If a plugin was uninstalled, thread local variables for plugin variables of string type with wth PLUGIN_VAR_MEMALLOC flag were not freed.
· Deadlock could occur when these four things happened at the same time: 1) An old dump thread was waiting for the binary log to grow. 2) The slave server that replicates from the old dump thread tried to reconnect. During reconnection, the new dump thread tried to kill the old dump thread. 3) A KILL statement tried to kill the old dump thread. 4) An INSERT statement caused a binary log rotation.
December 8th, 2011Functionality Added or Changed:
· Upgrading from an Advanced GPL RPM package to an Advanced RPM package did not work. Now on Linux it is possible to use rpm -U to replace any installed MySQL product by any other of the same release family. It is not necessary to remove the old produce with rpm -e first.
Bugs Fixed:
· Incompatible Change: Replication: The statements in the following list are now marked as unsafe for statement-based replication. This is due to the fact that each of these statements depends on the results of a SELECT statement whose order cannot always be determined. When using STATEMENT logging mode, a warning is issued in the binary log for any of these statements; when using MIXED logging mode, the statement is logged using the row-based format.
· I/O thread. In addition, the error text that the master sends to the slave when an incomplete event is found now states that the incomplete event may have been caused by running out of disk space on the master, and provides coordinates of the first and the last event bytes read.
· During the table-opening process, memory was allocated and later freed that was needed view loading, even for statements that did not use views. These unnecessary allocation and free operations are no longer done.
· mysql_plugin mishandled the --plugin-ini, --mysqld, and --my-print-defaults options under some circumstances.
· mysql_plugin returned the wrong error code from failed server bootstrap execution.
·
Several improvements were made to the libedit library bundled with MySQL distributions, and that is available for all platforms that MySQL supports except Windows.
· Navigation keys did not work for UTF-8 input.
· Word navigation and delete operations did not work for UTF-8 input with Cyrillic characters.
· Nonlatin characters were corrupted in overwrite mode for UTF-8 input.
· Long queries caused the statement history file to become corrupted.
· The Alt key caused history operations to fail.
· ARCHIVE tables with NULL columns could cause server crashes or become corrupt under concurrent load.
· OPTIMIZE TABLE could corrupt MyISAM tables if myisam_use_mmap was enabled.
· A query that selected a GROUP_CONCAT() function result could return different values depending on whether an ORDER BY of the function result was present.
· For FEDERATED tables, loss of connection to the remote table during some insert operations could cause a server crash.
November 18th, 2011· Upgrading from an Advanced GPL RPM package to an Advanced RPM package did not work. Now on Linux it is possible to use rpm -U to replace any installed MySQL product by any other of the same release family. It is not necessary to remove the old produce with rpm -e first. (Bug #11886309)
· MEMORY table creation time is now available in the CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table and the Create_time column of SHOW TABLE STATUS output. (Bug #51655, Bug #11759349)
Bugs Fixed:
· InnoDB Storage Engine: This fix improves the performance of instrumentation code for InnoDB buffer pool operations. (Bug #12950803, Bug #62294)
· InnoDB Storage Engine: Data from BLOB columns could be lost if the server crashed at a precise moment when other columns were being updated in an InnoDB table. (Bug #12704861)
· InnoDB Storage Engine: Lookups using secondary indexes could give incorrect matches under a specific set of conditions. The conditions involve an index defined on a column prefix, for a BLOB or other long column stored outside the index page, with a table using the Barracuda file format. (Bug #12601439)
· InnoDB Storage Engine: This fix corrects cases where the MySQL server could hang or abort with a long semaphore wait message. (This is a different issue than when these symptoms occurred during a CHECK TABLE statement.) (Bug #11766591, Bug #59733)
Replication: Issuing the following statements, in the order shown, could cause a deadlock between the user thread and I/O thread:
· START SLAVE;
· STOP SLAVE SQL_THREAD;
· START SLAVE;
· Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)
· Valgrind warnings generated by filesort operations were fixed. (Bug #12856915)
· Several improvements were made to the libedit library bundled with MySQL distributions, and that is available for all platforms that MySQL supports except Windows.
· Navigation keys did not work for UTF-8 input.
· Word navigation and delete operations did not work for UTF-8 input with Cyrillic characters.
· Nonlatin characters were corrupted in overwrite mode for UTF-8 input.
· Long queries caused the statement history file to become corrupted.
· The Alt key caused history operations to fail.
· The help message for mysql_install_db did not indicate that it supports the --defaults-file, --defaults-extra-file and --no-defaults options. (Bug #58898, Bug #11765888)
· An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)
· myisampack could create corrupt FULLTEXT indexes when compressing tables. (Bug #53646, Bug #11761180)
· OPTIMIZE TABLE could corrupt MyISAM tables if myisam_use_mmap was enabled. (Bug #49030, Bug #11757032)
· If MySQL was configured with --without-plugin-innobase and --with-plugin-innodb_plugin, to suppress building the built-in InnoDB storage engine and build the InnoDB Plugin instead, the innochecksum utility was not built. (Bug #47337, Bug #11755544)
· A linking problem prevented the FEDERATED storage engine plugin from loading. (Bug #40942, Bug #11750417)
· For FEDERATED tables, loss of connection to the remote table during some insert operations could cause a server crash. (Bug #34660, Bug #11747970)
October 22nd, 2011Functionality Added or Changed:
· Replication: Previously, replication slaves could connect to the master server only through master accounts that use native authentication. Now replication slaves can also connect through master accounts that use nonnative authentication (except Windows native authentication) if the required client-side plugin is installed on the slave side in the directory named by the slave plugin_dir system variable. (Bug #12897501)
· MEMORY table creation time is now available in the CREATE_TIME column of the INFORMATION_SCHEMA.TABLES table and the Create_time column of SHOW TABLE STATUS output. (Bug #51655, Bug #11759349)
Bugs Fixed:
· InnoDB Storage Engine: This fix improves the performance of instrumentation code for InnoDB buffer pool operations. (Bug #12950803, Bug #62294)
· InnoDB Storage Engine: Data from BLOB columns could be lost if the server crashed at a precise moment when other columns were being updated in an InnoDB table. (Bug #12704861)
· InnoDB Storage Engine: Lookups using secondary indexes could give incorrect matches under a specific set of conditions. The conditions involve an index defined on a column prefix, for a BLOB or other long column stored outside the index page, with a table using the Barracuda file format. (Bug #12601439)
· InnoDB Storage Engine: This fix corrects cases where the MySQL server could hang or abort with a long semaphore wait message. (This is a different issue than when these symptoms occurred during a CHECK TABLE statement.) (Bug #11766591, Bug #59733)
· Internal conversion of zero to binary and back could yield a result with incorrect precision. (Bug #12911710)
· Valgrind warnings generated by filesort operations were fixed. (Bug #12856915)
· mysqld_safe did not properly check for an already running instance of mysqld. (Bug #11878394)
· The help message for mysql_install_db did not indicate that it supports the --defaults-file, --defaults-extra-file and --no-defaults options. (Bug #58898, Bug #11765888)
· An assertion designed to detect zero-length sort keys also was raised when the entire key set fit in memory. (Bug #58200, Bug #11765254)
· myisampack could create corrupt FULLTEXT indexes when compressing tables. (Bug #53646, Bug #11761180)
· A linking problem prevented the FEDERATED storage engine plugin from loading. (Bug #40942, Bug #11750417)
September 17th, 2011Functionality Added or Changed:
· If the --with-ndbcluster option is given to the configure script, it now produces a warning that the version of MySQL Cluster included in 5.1 is no longer maintained. (The separate MySQL Cluster distribution should be used instead.) (Bug #49093, Bug #11757091)
Bugs Fixed:
· InnoDB Storage Engine: The “random read-ahead” feature that was removed from the InnoDB Plugin is now available again. Because it is only helpful for certain workloads, it is turned off by default. To turn it on, enable the innodb_random_read_ahead configuration option. Because this feature can improve performance in some cases and reduce performance in others, before relying on this setting, benchmark both with and without the setting enabled. (Bug #12356373)
· Partitioning: Auto-increment columns of partitioned tables were checked even when they were not being written to. In debug builds, this could lead to a server crash. (Bug #11765667, Bug #58655)
· The option-parsing code for empty strings leaked memory. (Bug #12589928)
· Replication: Processing of corrupted table map events could cause the server to crash. This was especially likely if the events mapped different tables to the same identifier, such as could happen due to Bug#56226.
· Now, before applying a table map event, the server checks whether the table has already been mapped with different settings, and if so, an error is raised and the slave SQL thread stops. If it has been mapped with the same settings, or if the table is set to be ignored by filtering rules, there is no change in behavior: the event is skipped and IDs are not checked. (Bug #44360, Bug #11753004)
· ALTER TABLE {MODIFY|CHANGE} ... FIRST did nothing except rename columns if the old and new versions of the table had exactly the same structure with respect to column data types. As a result, the mapping of column name to column data was incorrect. The same thing happened for ALTER TABLE DROP COLUMN ... ADD COLUMN statements intended to produce a new version of the table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)
· For a lower_case_table_names value of 1 or 2 and a database having a mixed-case name, calling a stored function using a fully qualified name including the database name failed. (Bug #60347, Bug #11840395)
· Previously, Performance Schema table columns that held byte counts were BIGINT UNSIGNED. These were changed to BIGINT (signed). This makes it easier to perform calculations that compute differences between columns. (Bug #59631, Bug #11766504)
· For MyISAM tables, attempts to insert incorrect data into an indexed GEOMETRY column could result in table corruption. (Bug #57323, Bug #11764487)
· A race condition between loading a stored routine using the name qualified by the database name and dropping that database resulted in a spurious error message: The table mysql.proc is missing, corrupt, or contains bad data (Bug #47870, Bug #11756013)
· Upgrades using an RPM package recreated the test database, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)
September 17th, 2011· The default thread-handling model in MySQL Server executes statements using one thread per client connection. As more clients connect to the server and execute statements, overall performance degrades. Commercial distributions of MySQL now include a thread pool plugin that provides an alternative thread-handling model designed to reduce overhead and improve performance. The plugin implements a thread pool that increases server performance by efficiently managing statement execution threads for large numbers of client connections.
The thread pool addresses several problems of the one thread per connection model:
· Too many thread stacks make CPU caches almost useless in highly parallel execution workloads. The thread pool promotes thread stack reuse to minimize the CPU cache footprint.
· With too many threads executing in parallel, context switching overhead is high. This also presents a challenging task to the operating system scheduler. The thread pool controls the number of active threads to keep the parallelism within the MySQL server at a level that it can handle and that is appropriate for the server host on which MySQL is executing.
· Too many transactions executing in parallel increases resource contention. In InnoDB, this increases the time spent holding central mutexes. The thread pool controls when transactions start to ensure that not too many execute in parallel.
· On Windows, the thread pool plugin requires Windows Vista or newer.
Pluggable Authentication Notes:
Commercial distributions of MySQL now include two plugins that enable MySQL Server to use external authentication methods to authenticate MySQL users:
· PAM (Pluggable Authentication Modules) enables a system to access various kinds of authentication methods through a standard interface. A PAM authentication plugin enables MySQL Server to use PAM to authenticate MySQL users.
· The PAM plugin uses the information passed to it by the MySQL server (such as user name, host name, password, and authentication string), plus whatever is available for PAM lookup (such as Unix passwords or an LDAP directory). The plugin checks the user credentials against PAM and returns success or failure.
· Distributions of MySQL for Windows include an authentication plugin that enables MySQL Server to use native Windows services to authenticate client connections. Users who have logged in to Windows can connect from MySQL client programs to the server based on the information in their environment without specifying an additional password.
· The client and server exchange data packets in the authentication handshake. As a result of this exchange, the server creates a security context object that represents the identity of the client in the Windows OS. This identity includes the name of the client account. The Windows authentication plugin uses the identity of the client to check whether it is a given account or a member of a group. By default, negotiation uses Kerberos to authenticate, then NTLM if Kerberos is unavailable.
· The Windows authentication plugin should work on Windows 2000 Professional
· These authentication plugins enable MySQL Server to accept connections from users defined outside the MySQL grant tables. They also support the MySQL proxy-user capability. Each plugin can return to MySQL a user name different from the login user, which means that the plugin can return the MySQL user that defines the privileges the externally authenticated user should have. For example, an external user named joe can connect and have the privileges of the MySQL user named developer.
· The server-side PAM and Windows authentication plugins are included only in commercial distributions. They are not included in MySQL community distributions. The client-side plugins with which they communicate are included in all distributions, including community distributions. This permits clients from any release to connect to a server that has the server-side plugin loaded.
Functionality Added or Changed:
· Important Change: Replication: The RESET SLAVE statement has been extended with an ALL keyword. In addition to deleting the master.info, relay-log.info, and all relay log files, RESET SLAVE ALL also clears all connection information otherwise held in memory following execution of RESET SLAVE. (Bug #11809016)
· A new utility, mysql_plugin, enables MySQL administrators to manage which plugins a MySQL server loads. It provides an alternative to manually specifying the --plugin-load option at server startup or using the INSTALL PLUGIN and UNINSTALL PLUGIN statements at runtime. See Section 4.4.5, “mysql_plugin — Configure MySQL Server Plugins”.
Bugs Fixed:
· InnoDB Storage Engine: The “random read-ahead” feature that was removed from the InnoDB Plugin is now available again. Because it is only helpful for certain workloads, it is turned off by default. To turn it on, enable the innodb_random_read_ahead configuration option. Because this feature can improve performance in some cases and reduce performance in others, before relying on this setting, benchmark both with and without the setting enabled. (Bug #12356373)
· The metadata locking subsystem added too much overhead for INFORMATION_SCHEMA queries that were processed by opening only .frm or .TRG files and had to scan many tables. For example, SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS was affected. (Bug #12828477)
· With profiling disabled or not compiled in, set_thd_proc_info() unnecessarily checked file name lengths. (Bug #12756017)
· A DBUG_ASSERT added by Bug #11792200 was overly aggressive in raising assertions. (Bug #12537160)
· CHECK TABLE and REPAIR TABLE failed to find problems with MERGE tables that had underlying tables missing or with the wrong storage engine. Issues were reported only for the first underlying table. (Bug #11754210)
· Replication: Processing of corrupted table map events could cause the server to crash. This was especially likely if the events mapped different tables to the same identifier, such as could happen due to Bug#56226.
· Now, before applying a table map event, the server checks whether the table has already been mapped with different settings, and if so, an error is raised and the slave SQL thread stops. If it has been mapped with the same settings, or if the table is set to be ignored by filtering rules, there is no change in behavior: the event is skipped and IDs are not checked. (Bug #44360, Bug #11753004)
· For a lower_case_table_names value of 1 or 2 and a database having a mixed-case name, calling a stored function using a fully qualified name including the database name failed. (Bug #60347, Bug #11840395)
· Previously, Performance Schema table columns that held byte counts were BIGINT UNSIGNED. These were changed to BIGINT (signed). This makes it easier to perform calculations that compute differences between columns. (Bug #59631, Bug #11766504)
· The embedded server crashed when argc = 0. (Bug #57931, Bug #12561297)
· The mysql_affected_rows() C API function returned 3 (instead of 2) for INSERT ... ON DUPLICATE KEY UPDATE statements where there was a duplicated key value. (Bug #46675, Bug #11754979)
· Upgrades using an RPM package recreated the test database, which is undesirable when the DBA had removed it. (Bug #45415, Bug #11753896)
July 28th, 2011Functionality Added or Changed:
· The undocumented --all option for perror is deprecated and will be removed in MySQL 5.6.
Bugs Fixed:
· InnoDB Storage Engine: A failed CREATE INDEX operation for an InnoDB table could result in some memory being allocated and not freed. This memory leak could affect tables created with the ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED settings. (Bug #12699505)
· Partitioning: Auto-increment columns of partitioned tables were checked even when they were not being written to. In debug builds, this could lead to a crash of the server. (Bug #11765667, Bug #58655)
· Partitioning: The UNIX_TIMESTAMP() function was not treated as a monotonic function for purposes of partition pruning. (Bug #11746819, Bug #28928)
· Replication: If a LOAD DATA INFILE statement—replicated using statement-based replication—featured a SET clause, the name-value pairs were regenerated using a method (Item::print()) intended primarily for generating output for statements such as EXPLAIN EXTENDED, and which cannot be relied on to return valid SQL. This could in certain cases lead to a crash on the slave.
· To fix this problem, we now name each value in its original, user-supplied form, and use that to create LOAD DATA INFILE statements for statement-based replication. (Bug #11902767, Bug #60580)
· Previously, an inappropriate error message was produced if a multiple-table update for an InnoDB table with a clustered primary key would update a table through multiple aliases, and perform an update that may physically move the row in at least one of these aliases. Now the error message is: Primary key/partition key update is not allowed since the table is updated both as 'tbl_name1' and 'tbl_name2' (Bug #11882110)
· ALTER TABLE {MODIFY|CHANGE} ... FIRST did nothing except rename columns if the old and new versions of the table had exactly the same structure with respect to column data types. As a result, the mapping of column name to column data was incorrect. The same thing happened for ALTER TABLE DROP COLUMN, ADD COLUMN statements intended to produce a new version of table with exactly the same structure as the old version. (Bug #61493, Bug #12652385)
Incorrect handling of metadata locking for FLUSH TABLES WITH READ LOCK for statements requiring prelocking caused two problems:
· Execution of any data-changing statement that required prelocking (that is, involved a stored function or trigger) as part of transaction slowed down somewhat all subsequent statements in the transaction. Performance in a transaction that periodically involved such statements gradually degraded over time.
· Execution of any data-changing statement that required prelocking as part of transaction prevented a concurrent FLUSH TABLES WITH READ LOCK from proceeding until the end of transaction rather than at the end of the particular statement.
· The fractional part of the “Queries per second” value in MySQL status output could be displayed incorrectly. (Bug #61205, Bug #12565712)
· LOAD DATA INFILE incorrectly parsed relative data file path names that ascended more than three levels in the file system and as a consequence was unable to find the file. (Bug #60987, Bug #12403662)
· For MyISAM tables, attempts to insert incorrect data into an indexed GEOMETRY column could result in table corruption. (Bug #57323, Bug #11764487)
· In debug builds, Field_new_decimal::store_value() was subject to buffer overflows. (Bug #55436, Bug #11762799)
· A race condition between loading a stored routine using the name qualified by the database name and dropping that database resulted in a spurious error message: The table mysql.proc is missing, corrupt, or contains bad data (Bug #47870, Bug #11756013)
July 6th, 2011Functionality added or changed:
· CMake configuration support on Linux now provides a boolean ENABLE_GCOV option to control whether to include support for gcov. (Bug #12549572)
· InnoDB now permits concurrent reads while creating a secondary index. (Bug #11853126)
· Client programs now display more information for SSL errors to aid in diagnosis and debugging of connection problems. (Bug #21287, Bug #11745920)
· In the audit plugin interface, the event_class member was removed from the mysql_event_general structure and the calling sequence for the notification function changed. Originally, the second argument was a pointer to the event structure. The function now receives this information as two arguments: an event class number and a pointer to the event. Corresponding to these changes, MYSQL_AUDIT_INTERFACE_VERSION was increased to 0x0300.
· The plugin_audit.h header file, and the NULL_AUDIT example plugin in the plugin/audit_null directory have been modified per these changes. See Section 21.2.4.7, “Writing Audit Plugins”.
Bugs fixed:
· Replication: A mistake in thread cleanup could cause a replication master to crash. (Bug #12578441)
· Replication: When using row-based replication and attribute promotion or demotion (see Section 15.4.1.6.2, “Replication of Columns Having Different Data Types”), memory allocated internally for conversion of BLOB columns was not freed afterwards. (Bug #12558519)
· Adding support for Windows authentication to libmysql introduced a link dependency on the system Secur32 library. The Microsoft Visual C++ link information was modified to pull in this library automatically. (Bug #12612143)
· In some cases, memory allocated for Query_tables_list::sroutines() was not freed properly. (Bug #12429877)
· After the fix for Bug#11889186, MAKEDATE() arguments with a year part greater than 9999 raised an assertion. (Bug #12403504)
· An assertion could be raised due to a missing NULL value check in Item_func_round::fix_length_and_dec(). (Bug #12392636)
· An assertion could be raised during two-phase commits if the binary log was used as the transaction coordinator log. (Bug #12346411)
· A problem introduced in 5.5.11 caused very old (MySQL 4.0) clients to be unable to connect to the server. (Bug #61222, Bug #12563279)
· Using CREATE EVENT IF NOT EXISTS for an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)
· An embedded client would abort rather than issue an error message if it issued a TEE command (\T file_name) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)
· On some platforms, the Incorrect value: xxx for column yyy at row zzz error produced by LOAD DATA INFILE could have an incorrect value of zzz. (Bug #46895, Bug #11755168)
· An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)
· On FreeBSD 64-built builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)
July 6th, 2011Bugs fixed:
· InnoDB Storage Engine: If the server crashed while an XA transaction was prepared but not yet committed, the transaction could remain in the system after restart, and cause a subsequent shutdown to hang. (Bug #11766513, Bug #59641)
· Partitioning: When executing a row-ordered retrieval index merge, the partitioning handler used memory from that allocated for the table, rather than that allocated to the query, causing table object memory not to be freed until the table was closed. (Bug #11766249, Bug #59316)
Replication: When mysqlbinlog was invoked using --base64-output=decode-row and --start-position=pos, (where pos is a point in the binary log past the format description log event), a spurious error of the type shown here was generated:
· malformed binlog: it does not contain any Format_description_log_event...
· However, since there is nothing unsafe about not printing the format description log event, the error has been removed for this case. (Bug #12354268)
· Replication: Typographical errors appeared in the text of several replication error messages. (The word “position” was misspelled as “postion”.) (Bug #11762616, Bug #55229)
· After the fix for Bug#11889186, MAKEDATE() arguments with a year part greater than 9999 raised an assertion. (Bug #12403504)
· An assertion could be raised due to a missing NULL value check in Item_func_round::fix_length_and_dec(). (Bug #12392636)
· In debug builds on Solaris, an assertion was raised if a reverse IP lookup with gethostbyaddr_r() failed. (Bug #12377872)
· MySQL did not build if configured with both --with-debug and --with-libedit. (Bug #12329909)
· A problem introduced in 5.1.57 caused very old (MySQL 4.0) clients to be unable to connect to the server. (Bug #61222, Bug #12563279)
· Using CREATE EVENT IF NOT EXISTS for an event that already existed and was enabled caused multiple instances of the event to run. (Bug #61005, Bug #12546938)
· The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. (Bug #59343, Bug #11766270)
· In Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)
· In ROUND() calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)
· Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)
· LOAD DATA INFILE errors could leak I/O cache memory. (Bug #58072, Bug #11765141)
· For LOAD DATA INFILE, multibyte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)
· An embedded client would abort rather than issue an error message if it issued a TEE command (\T file_name) and the directory containing the file did not exist. This occurred because the wrong error handler was called. (Bug #57491, Bug #11764633)
· In debug builds, Field_new_decimal::store_value() was subject to buffer overflows. (Bug #55436, Bug #11762799)
· The optimizer sometimes incorrectly processed HAVING clauses for queries that did not also have an ORDER BY clause. (Bug #48916, Bug #11756928)
· PROCEDURE ANALYZE() could leak memory for NULL results, and could return incorrect results if used with a LIMIT clause. (Bug #48137, Bug #11756242)
· On some platforms, the Incorrect value: xxx for column yyy at row zzz error produced by LOAD DATA INFILE could have an incorrect value of zzz. (Bug #46895, Bug #11755168)
· In MySQL 5.1 and up, if a table had triggers that used syntax supported in 5.0 but not 5.1, the table became unavailable. Now the table is marked as having broken triggers. (Bug #45235, Bug #11753738)
· An attempt to install nonexistent files during installation was corrected. (Bug #43247, Bug #11752142)
· On FreeBSD 64-built builds of the embedded server, exceptions were not prevented from propagating into the embedded application. (Bug #38965, Bug #11749418)
June 2nd, 2011Bugs fixed:
· InnoDB Storage Engine: If the server crashed while an XA transaction was prepared but not yet committed, the transaction could remain in the system after restart, and cause a subsequent shutdown to hang. (Bug #11766513, Bug #59641)
· InnoDB Storage Engine: Similar problem to the foreign key error in bug #11831040 / 60196 / 60909, but with a different root cause and occurring on Mac OS X. With the setting lower_case_table_names=2, inserts into InnoDB tables covered by foreign key constraints could fail after a server restart.
· Partitioning: The internal get_partition_set() function did not take into account the possibility that a key specification could be NULL in some cases. (Bug #12380149)
· Partitioning: When executing a row-ordered retrieval index merge, the partitioning handler used memory from from that allocated for the table, rather than that allocated to the query, causing table object memory not to be freed until the table was closed. (Bug #11766249, Bug #59316)
· Replication: A spurious error malformed binlog: it does not contain any Format_description_log_event... was generated when mysqlbinlog was invoked using --base64-output=decode-row and --start-position=pos, where pos is a point in the binary log past the format description log event. However, there is nothing unsafe about not printing the format description log event, so the error has been removed for this case. (Bug #12354268)
· Replication: Typographical errors appeared in the text of several replication error messages. (The word “position” was misspelled as “postion”.) (Bug #11762616, Bug #55229)
· Assignments to NEW.var_name within triggers, where var_name had a BLOB or TEXT type, were not properly handled and produced incorrect results. (Bug #12362125)
· XA COMMIT could fail to clean up the error state if it discovered that the current XA transaction had to be rolled back. Consequently, the next XA transaction could raise an assertion when it checked for proper cleanup of the previous transaction. (Bug #12352846)
· An internal client macro reference was removed from the client_plugin.h header file. This reference made the file unusable. (Bug #60746, Bug #12325444)
· The server consumed memory for repeated invocation of some stored procedures, which was not released until the connection terminated. (Bug #60025, Bug #11848763)
· The server did not check for certain invalid out of order sequences of XA statements, and these sequences raised an assertion. (Bug #59936, Bug #11766752, Bug #12348348)
· With the conversion from GNU autotools to CMake for configuring MySQL, the USE_SYMDIR preprocessor symbol was omitted. This caused failure of symbolic links (described at Section 7.11.3.1, “Using Symbolic Links”). (Bug #59408, Bug #11766320)
· The incorrect max_length value for YEAR values could be used in temporary result tables for UNION, leading to incorrect results. (Bug #59343, Bug #11766270)
· In Item_func_in::fix_length_and_dec(), a Valgrind warning for uninitialized values was corrected. (Bug #59270, Bug #11766212)
· In ROUND() calculations, a Valgrind warning for uninitialized memory was corrected. (Bug #58937, Bug #11765923)
· Valgrind warnings caused by comparing index values to an uninitialized field were corrected. (Bug #58705, Bug #11765713)
· LOAD DATA INFILE errors could leak I/O cache memory. (Bug #58072, Bug #11765141)
· For LOAD DATA INFILE, multibyte character sequences could be pushed onto a stack too small to accommodate them. (Bug #58069, Bug #11765139)
· Internal Performance Schema header files were unnecessarily installed publicly. (Bug #53281)
· On Linux, the mysql client built using the bundled libedit did not read ~/.editrc. (Bug #49967, Bug #11757855)
· The optimizer sometimes incorrectly processed HAVING clauses for queries that did not also have an ORDER BY clause. (Bug #48916, Bug #11756928)
· PROCEDURE ANALYZE() could leak memory for NULL results, and could return incorrect results if used with a LIMIT clause. (Bug #48137, Bug #11756242)
· With DISTINCT CONCAT(col,...) returned incorrect results when the arguments to CONCAT() were columns with an integer data type declared with a display width narrower than the values in the column. (For example, if an INT(1) column contain 1111.) (Bug #4082)
May 7th, 2011Functionality added or changed:
· When invoked with the --auto-generate-sql option, mysqlslap dropped the schema specified with the --create-schema option at the end of the test run, which may have been unexpected by the user. mysqlslap no longer drops the schema, but has a new --create-and-drop-schema schema that both creates and drops a schema. (Bug #58090, Bug #11765157)
Bugs fixed:
· InnoDB Storage Engine: Replication: Trying to update a column, previously set to NULL, of an InnoDB table with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)
· InnoDB Storage Engine: The server could halt if InnoDB interpreted a very heavy I/O load for 15 minutes or more as an indication that the server was hung. This change fixes the logic that measures how long InnoDB threads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)
· InnoDB Storage Engine: With the setting lower_case_table_names=2, inserts into InnoDB tables covered by foreign key constraints could fail after a server restart. (Bug #11831040, Bug #60196, Bug #60909)
· Replication: Using the --server-id option with mysqlbinlog could cause format description log events to be filtered out of the binary log, leaving mysqlbinlog unable to read the remainder of the log. Now such events are always read without regard to the value of this option.
· As part of the the fix for this problem, mysqlbinlog now also reads rotate log events without regard to the value of --server-id. (Bug #11766427, Bug #59530)
· On Windows, the server rejected client connections if no DNS server was available. (Bug #12325375)
· mysql_upgrade did not properly upgrade the authentication_string column of the mysql.user table. (Bug #11936829)
· InnoDB invoked some zlib functions without proper initialization. (Bug #11849231)
· Comparison of a DATETIME stored program variable and NOW() led to an “Illegal mix of collations error” when character_set_connection was set to utf8. (Bug #60625, Bug #11926811)
Selecting from a view for which the definition included a HAVING clause failed with an error:
· 1356: View '...' references invalid table(s) or column(s)
· or function(s) or definer/invoker of view lack rights to use them
· (Bug #60295, Bug #11829681)
· CREATE TABLE syntax permits specification of a STORAGE {DEFAULT|DISK|MEMORY} option. However, this value was not written to the .frm file, so that a subsequent CREATE TABLE ... LIKE for the table did not include that option.
· Also, ALTER TABLE of a table that had a tablespace incorrectly destroyed the tablespace. (Bug #60111, Bug #11766883, Bug #34047, Bug #11747789)
· The server permitted max_allowed_packet to be set lower than net_buffer_length, which does not make sense because max_allowed_packet is the upper limit on net_buffer_length values. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)
· A missing variable initialization for Item_func_set_user_var objects could cause an assertion to be raised. (Bug #59527, Bug #11766424)
· When the server was started with the --skip-innodb option, it initialized the have_innodb system variable to YES rather than DISABLED. (Bug #59393, Bug #11766306)
· In Item_func_month::val_str(), a Valgrind warning for a too-late NULL value check was corrected. (Bug #59166, Bug #11766126)
· In Item::get_date, a Valgrind warning for a missing NULL value check was corrected. (Bug #59164, Bug #11766124)
· In extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)
· In string context, the MIN() and MAX() functions did not take into account the unsignedness of a BIGINT UNSIGNED argument. (Bug #59132, Bug #11766094)
· In Item_func::val_decimal, a Valgrind warning for a missing NULL value check was corrected. (Bug #59125, Bug #11766087)
· In Item_func_str_to_date::val_str, a Valgrind warning for an uninitialized variable was corrected. (Bug #58154, Bug #11765216)
· An assertion could be raised in Item_func_int_val::fix_num_length_and_dec() due to overflow for geometry functions. (Bug #57900, Bug #11764994)
· With prepared statements, the server could attempt to send result set metadata after the table had been closed. (Bug #56115, Bug #11763413)
· With lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)
· SHOW EVENTS did not always show events from the correct database. (Bug #41907, Bug #11751148)
May 7th, 2011Functionality added or changed:
· When invoked with the --auto-generate-sql option, mysqlslap dropped the schema specified with the --create-schema option at the end of the test run, which may have been unexpected by the user. mysqlslap no longer drops the schema, but has a new --create-and-drop schema that both creates and drops a schema. (Bug #58090, Bug #11765157)
· A new system variable, max_long_data_size, now controls the maximum size of parameter values that can be sent with the mysql_stmt_send_long_data() C API function. If not set at server startup, the default is the value of the max_allowed_packet system variable. This variable is deprecated. In MySQL 5.6, it is removed and the maximum parameter size is controlled by max_allowed_packet.
Bugs fixed:
· InnoDB Storage Engine: Replication: Trying to update a column, previously set to NULL, of an InnoDB table with no primary key caused replication to fail with Can't find record in 'table' on the slave. (Bug #11766865, Bug #60091)
· InnoDB Storage Engine: The server could halt if InnoDB interpreted a very heavy I/O load for 15 minutes or more as an indication that the server was hung. This change fixes the logic that measures how long InnoDB threads were waiting, which formerly could produce false positives. (Bug #11877216, Bug #11755413, Bug #47183)
· Replication: Using the --server-id option with mysqlbinlog could cause format description log events to be filtered out of the binary log, leaving mysqlbinlog unable to read the remainder of the log. Now such events are always read without regard to the value of this option.
· As part of the the fix for this problem, mysqlbinlog now also reads rotate log events without regard to the value of --server-id. (Bug #11766427, Bug #59530)
· Partitioning: A problem with a previous fix for poor performance of INSERT ON DUPLICATE KEY UPDATE statements on tables having many partitions caused the handler function for reading a row from a specific index to fail to store the ID of the partition last used. This caused some statements to fail with Can't find record errors. (Bug #59297, Bug #11766232)
· InnoDB invoked some zlib functions without proper initialization. (Bug #11849231)
Selecting from a view for which the definition included a HAVING clause failed with an error:
· 1356: View '...' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
· The server permitted max_allowed_packet to be set lower than net_buffer_length, which does not make sense because max_allowed_packet is the upper limit on net_buffer_length values. Now a warning occurs and the value remains unchanged. (Bug #59959, Bug #11766769)
· The server read one byte too many when trying to process an XML string lacking a closing quote (') or double quote (") character used as an argument for UpdateXML() or ExtractValue(). (Bug #59901, Bug #11766725)
· Attempting to create a spatial index on a CHAR column longer than 31 bytes led to an assertion failure if the server was compiled with safemutex support. (Bug #59888, Bug #11766714)
· Aggregation followed by a subquery could produce an incorrect result.
· An incorrect character set pointer passed to my_strtoll10_mb2() caused an assertion to be raised. (Bug #59648, Bug #11766519)
· A missing variable initialization for Item_func_set_user_var objects could cause an assertion to be raised. (Bug #59527, Bug #11766424)
· mysqldump did not quote database names in ALTER DATABASE statements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)
· In Item_func_month::val_str(), a Valgrind warning for a too-late NULL value check was corrected. (Bug #59166, Bug #11766126)
· In Item::get_date, a Valgrind warning for a missing NULL value check was corrected. (Bug #59164, Bug #11766124)
· In extract_date_time(), a Valgrind warning for a missing end-of-string check was corrected. (Bug #59151, Bug #11766112)
· In string context, the MIN() and MAX() functions did not take into account the unsignedness of a BIGINT UNSIGNED argument. (Bug #59132, Bug #11766094)
· In Item_func::val_decimal, a Valgrind warning for a missing NULL value check was corrected. (Bug #59125, Bug #11766087)
· In Item_func_str_to_date::val_str, a Valgrind warning for an uninitialized variable was corrected. (Bug #58154, Bug #11765216)
· The code for PROCEDURE ANALYSE() had a missing DBUG_RETURN statement, which could cause a server crash in debug builds. (Bug #58140, Bug #11765202)
· An assertion could be raised in Item_func_int_val::fix_num_length_and_dec() due to overflow for geometry functions. (Bug #57900, Bug #11764994)
· An assertion could be raised if a statement that required a name lock on a table (for example, DROP TRIGGER) executed concurrently with an INFORMATION_SCHEMA query that also used the table. (Bug #56541, Bug #11763784)
· For a client connected using SSL, the Ssl_cipher_list status variable was empty and did not show the possible cipher types. (Bug #52596, Bug #11760210)
· With lower_case_table_names=2, resolution of objects qualified by database names could fail. (Bug #50924, Bug #11758687)
· A potential invalid memory access discovered by Valgrind was fixed. (Bug #48053, Bug #11756169)
· Bitmap functions used in one thread could change bitmaps used by other threads, causing an assertion to be raised. (Bug #43152, Bug #11752069)
· SHOW EVENTS did not always show events from the correct database. (Bug #41907, Bug #11751148)
April 5th, 2011Functionality added or changed:
· The undocumented SHOW NEW MASTER statement has been removed.
Bugs fixed:
· Partitioning: A problem with a previous fix for poor performance of INSERT ON DUPLICATE KEY UPDATE statements on tables having many partitions caused the handler function for reading a row from a specific index to fail to store the ID of the partition last used. This caused some statements to fail with Can't find record errors. (Bug #59297, Bug #11766232)
· On some systems, debug builds of comp_err.c could fail due to an uninitialized variable. (Bug #59906, Bug #11766729)
· The server read one byte too many when trying to process an XML string lacking a closing quote (') or double quote (") character used as an argument for UpdateXML() or ExtractValue(). (Bug #59901, Bug #11766725)
· See also Bug #44332.
· Aggregation followed by a subquery could produce an incorrect result. (Bug #59839, Bug #11766675)
· mysqldump did not quote database names in ALTER DATABASE statements in its output, which could cause an error at reload time for database names containing a dash. (Bug #59398, Bug #11766310)
If a multiple-table update updated a row through two aliases and the first update physically moved the row, the second update failed to locate the row. This resulted in different errors depending on storage engine, although these errors did not accurately describe the problem:
· MyISAM: Got error 134 from storage engine
· InnoDB: Can't find record in 'tbl'
· For MyISAM, which is nontransactional, the update executed first was performed but the second was not. In addition, for two equal multiple-table update statements, one could succeed and the other fail depending on whether the record actually moved, which is inconsistent.
· Now such an update returns an error if it will update a table through multiple aliases, and perform an update that may physically more the row in at least one of these aliases. (Bug #57373, Bug #11764529, Bug #55385, Bug #11762751)
· SHOW WARNINGS output following EXPLAIN EXTENDED could include unprintable characters. (Bug #57341, Bug #11764503)
March 16th, 2011Functionality added or changed:
· MySQL distributions now include auth_socket, a server-side authentication plugin that authenticates clients that connect from the local host through the Unix socket file. The plugin uses the SO_PEERCRED socket option to obtain information about the user running the client program (and thus can be built only on systems that support this option. For a connection to succeed, the plugin requires a match between the login name of the connecting client user and the MySQL user name presented by the client program. For more information, see Section 5.5.6.1.4, “The Socket Peer-Credential Authentication Plugin”.
· The mysql_upgrade, mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow, and mysqlslap clients now have --default-auth and --plugin-dir options for specifying which authentication plugin and plugin directory to use.
· Boolean system variables can be enabled at run time by setting them to the value ON or OFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them to ON or TRUE, or disabled by setting them to OFF or FALSE. Any other nonnumeric variable is invalid.
Previously, for queries that were aborted due to sort problem, the server wrote the message Sort aborted to the error log. Now the server writes more information to provide a more specific message, such as:
· [ERROR] mysqld: Sort aborted: Out of memory (Needed 24 bytes)
· [ERROR] mysqld: Out of sort memory,
· consider increasing server sort buffer size
· [ERROR] mysqld: Sort aborted: Out of sort memory,
· consider increasing server sort buffer size
· [ERROR] mysqld: Sort aborted: Incorrect number of arguments for
· FUNCTION test.f1; expected 0, got 1
· In addition, if the server was started with --log-warnings=2, the server write information about the host, user, and query.
· mysqldump --xml now displays comments from column definitions.
· MySQL distributions now include mysql_clear_password, a client-side authentication plugin that sends the password to the server without hashing or encryption. Although this is insecure, and thus apprpropriate precautions should be taken such as using an SSL connection, the plugin is useful in conjunction with server-side plugins that must have access to the original password in clear text. For more information, see Section 5.5.6.1.3, “The Clear Text Client-Side Authentication Plugin”.
Bugs fixed:
· InnoDB Storage Engine: Raised the number of I/O requests that each AIO helper thread could process, from 32 to 256. The new limit applies to Linux and Unix platforms; the limit on Windows remains 32.
· InnoDB Storage Engine: InnoDB returned values for “rows examined” in the query plan that were higher than expected. NULL values were treated in an inconsistent way. The inaccurate statistics could trigger “false positives” in combination with the MAX_JOIN_SIZE setting, because the queries did not really examine as many rows as reported.
· Replication: When using the statement-based logging format, INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE statements affecting transactional tables that did not fail were not written to the binary log if they did not insert any rows. (With statement-based logging, all successful statements should be logged, whether they do or do not cause any rows to be changed.)
· Replication: Formerly, STOP SLAVE stopped the slave I/O thread first and then stopped the slave SQL thread; thus, it was possible for the I/O thread to stop after replicating only part of a transaction which the SQL thread was executing, in which case—if the transaction could not be rolled back safely—the SQL thread could hang.
· Now, STOP SLAVE stops the slave SQL thread first and then stops the I/O thread; this guarantees that the I/O thread can fetch any remaining events in the transaction that the SQL thread is executing, so that the SQL thread can finish the transaction if it cannot be rolled back safely.
· DES_DECRYPT() could crash if the argument was not produced by DES_ENCRYPT().
· The server and client did not always properly negotiate authentication plugin names.
· --autocommit=ON did not work (it set the global autocommit value to 0, not 1).
A query of the following form returned an incorrect result, where the values for col_name in the result set were entirely replaced with NULL values:
· SELECT DISTINCT col_name ... ORDER BY col_name DESC;
· SHOW PRIVILEGES did not display a row for the PROXY privilege.
· SHOW PROFILE could truncate source file names or fail to show function names.
· DELETE or UPDATE statements could fail if they used DATE or DATETIME values with a year, month, or day part of zero.
· The ESCAPE clause for the LIKE operator allows only expressions that evaluate to a constant at execution time, but aggregate functions were not being rejected.
· Memory leaks detected, some of which could cause incorrect query results, were corrected.
· The DEFAULT_CHARSET and DEFAULT_COLLATION CMake options did not work.
· An OUTER JOIN query using WHERE column IS NULL could return an incorrect result.
· Starting the server with the --defaults-file=file_name option, where the file name had no extension, caused a server crash.
· Outer joins with an empty table could produce incorrect results.
· In debug builds, SUBSTRING_INDEX(FORMAT(...), FORMAT(...)) could cause a server crash.
· When mysqladmin was run with the --sleep and --count options, it went into an infinite loop executing the specified command.
· Some string manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function SUBSTRING_INDEX() to return an empty string when one argument was of the wrong datatype. If the string object was then modified by the SQL function INSERT(), undefined behavior ensued.
· Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash.
· The fix for Bug#25192 caused load_defaults() to add an argument separator to distinguish options loaded from configure files from those provided on the command line, whether or not the application needed it.
· The mysql client went into an infinite loop if the standard input was a directory.
· Outer joins on a unique key could return incorrect results.
· The expression const1 BETWEEN const2 AND field was optimized incorrectly and produced incorrect results.
· Some RPM installation scripts used a hardcoded value for the data directory, which could result in a failed installation for users who have a nonstandard data directory location. The same was true for other configuration values such as the PID file name
· On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected.
· Sorting using ORDER BY AVG(DISTINCT decimal_col) caused a server crash or incorrect results.
· When using ExtractValue() or UpdateXML(), if the XML to be read contained an incomplete XML comment, MySQL read beyond the end of the XML string when processing, leading to a crash of the server.
· DATE_ADD() and DATE_SUB() return a string if the first argument is a string, but incorrectly returned a binary string. Now they return a character string with a collation of connection_collation.
March 8th, 2011Functionality added or changed:
· mysqldump --xml now displays comments from column definitions.
Bugs fixed:
· InnoDB Storage Engine: InnoDB returned values for “rows examined” in the query plan that were higher than expected. NULL values were treated in an inconsistent way. The inaccurate statistics could trigger “false positives” in combination with the MAX_JOIN_SIZE setting, because the queries did not really examine as many rows as reported. (Bug #30423)
· Partitioning: Trying to use the same column more than once in the partitioning key when partitioning a table by KEY caused mysqld to crash. Such duplication of key columns is now expressly disallowed, and fails with an appropriate error. (Bug #53354, Bug #57924)
· Replication: When using the statement-based logging format, INSERT ON DUPLICATE KEY UPDATE and INSERT IGNORE statements affecting transactional tables that did not fail were not written to the binary log if they did not insert any rows. (With statement-based logging, all successful statements should be logged, whether they do or do not cause any rows to be changed.) (Bug #59338)
· Replication: Formerly, STOP SLAVE stopped the slave I/O thread first and then stopped the slave SQL thread; thus, it was possible for the I/O thread to stop after replicating only part of a transaction which the SQL thread was executing, in wich case—if the transaction could not be rolled back safely—the SQL thread could hang.
· Now, STOP SLAVE stops the slave SQL thread first and then stops the I/O thread; this guarantees that the I/O thread can fetch any remaining events in the transaction that the SQL thread is executing, so that the SQL thread can finish the transaction if it cannot be rolled back safely. (Bug #58546)
A query of the following form returned an incorrect result, where the values for col_name in the result set were entirely replaced with NULL values:
· SELECT DISTINCT col_name ... ORDER BY col_name DESC;
· DELETE or UPDATE statements could fail if they used DATE or DATETIME values with a year, month, or day part of zero. (Bug #59173)
· The ESCAPE clause for the LIKE operator allows only expressions that evaluate to a constant at execution time, but aggregrate functions were not being rejected. (Bug #59149)
· Memory leaks detected by Valgrind, some of which could cause incorrect query results, were corrected. (Bug #59110, Bug #11766075)
· mysqlslap failed to check for a NULL return from mysql_store_result() and crashed trying to process the result set. (Bug #59109)
· In debug builds, SUBSTRING_INDEX(FORMAT(...), FORMAT(...)) could cause a server crash. (Bug #58371)
· When mysqldadmin was run with the --sleep and --count options, it went into an infinite loop executing the specified command. (Bug #58221)
· Some string manipulating SQL functions use a shared string object intended to contain an immutable empty string. This object was used by the SQL function SUBSTRING_INDEX() to return an empty string when one argument was of the wrong datatype. If the string object was then modified by the SQL function INSERT(), undefined behavior ensued. (Bug #58165, Bug #11765225)
· Parsing nested regular expressions could lead to recursion resulting in a stack overflow crash. (Bug #58026, Bug #11765099)
· The mysql client went into an infinite loop if the standard input was a directory. (Bug #57450)
· The expression const1 BETWEEN const2 AND field was optimized incorrectly and produced incorrect results. (Bug #57030, Bug #11764215)
· Some RPM installation scripts used a hardcoded value for the data directory, which could result in a failed installation for users who have a nonstandard data directory location. The same was true for other configuration values such as the PID file name. (Bug #56581, Bug #11763817)
· On FreeBSD and OpenBSD, the server incorrectly checked the range of the system date, causing legal values to be rejected. (Bug #55755, Bug #11763089)
· When using ExtractValue() or UpdateXML(), if the XML to be read contained an incomplete XML comment, MySQL read beyond the end of the XML string when processing, leading to a crash of the server. (Bug #44332)
February 8th, 2011Functionality added or changed:
· The mysqladmin and mysqldump clients now have --default-auth and --plugin-dir options for specifying which authentication plugin and plugin directory to use.
· sql_priv.h now includes an OPTION_ALLOW_BATCH flag for the transaction_allow_batching feature of MySQL Cluster.
· Boolean system variables can be enabled at run time by setting them to the value ON or OFF, but previously this did not work at server startup. Now at startup such variables can be enabled by setting them to ON or TRUE. Any other nonnumeric variable is interpreted as OFF. (Bug#46393 improves on this such that ON, TRUE, OFF, and FALSE are recognized, and other values are invalid.)
Bugs fixed:
· Incompatible Change: When auto_increment_increment is greater than one, values generated by a bulk insert that reaches the maximum column value could wrap around rather producing an overflow error.
· As a consequence of the fix, it is no longer possible for an auto-generated value to be equal to the maximum BIGINT UNSIGNED value. It is still possible to store that value manually, if the column can accept it.
· Important Change: Partitioning: Date and time functions used as partitioning functions now have the types of their operands checked; use of a value of the wrong type is now disallowed in such cases. In addition, EXTRACT(WEEK FROM col), where col is a DATE or DATETIME column, is now disallowed altogether because its return value depends on the value of the default_week_format system variable.
· Partitioning: InnoDB Storage Engine: The partitioning handler did not pass locking information to a table's storage engine handler. This caused high contention and thus slower performance when working with partitioned InnoDB tables.
· InnoDB Storage Engine: When multiple InnoDB buffer pools were enabled, SHOW ENGINE INNODB commands displayed information about each one, but not summary information combining statistics for the entire buffer pool subsystem. Now, the aggregated information is displayed in the BUFFER POOL AND MEMORY section, and information about individual buffer pool instances is displayed in a new INDIVIDUAL BUFFER POOL INFO section.
· InnoDB Storage Engine: The command to create a debug build (cmake -DWITH_DEBUG ...) now automatically sets the InnoDB debugging flag UNIV_DEBUG on all platforms. Formerly, the UNIV_DEBUG flag might not be set for Windows platforms with Visual Studio and not on OS X with Xcode.
· InnoDB Storage Engine: In InnoDB status output, the value for I/O sum[] could be incorrect, displayed as a very large number.
· InnoDB Storage Engine: It was not possible to query the information_schema.innodb_trx table while other connections were running queries involving BLOB types.
· InnoDB Storage Engine: When the lowercase_system_names variable was set to 2, InnoDB could fail to restore a mysqldump dump of a table with foreign key constraints involving case-sensitive names.
· InnoDB Storage Engine: The OPTIMIZE TABLE statement would reset the auto-increment counter for an InnoDB table. Now the auto-increment value is preserved across this operation.
· Partitioning: A failed ALTER TABLE ... TRUNCATE PARTITION statement was still written to the binary log.
· Partitioning: Failed ALTER TABLE ... PARTITION statements could cause memory leaks.
· Replication: While an INSERT DELAYED statement with a single inserted value does not return any visible warnings, such a warning could be still written into the error log.
· Replication: When closing a session that used temporary tables, binary logging could sometimes fail with a spurious Failed to write the DROP statement for temporary tables to binary log.
· Replication: Due to changes made in MySQL 5.5.3, settings made in the binlog_cache_size and max_binlog_cache_size server system variables affected both the binary log statement cache (also introduced in that version) and the binary log transactional cache (formerly known simply as the binary log cache). This meant that the resources used as a result of setting either or both of these variables were double the amount expected. To rectify this problem, these variables now affect only the transactional cache. The fix for this issue also introduces two new system variables binlog_stmt_cache_size and max_binlog_stmt_cache_size, which affect only the binary log statement cache.
· In addition, the Binlog_cache_use status variable was incremented whenever either cache was used, and Binlog_cache_disk_use was incremented whenever the disk space from either cache was used, which caused problems with performance tuning of the statement and transactional caches, because it was not possible to determine which of these was being exceeded when attempting to troubleshoot excessive disk seeks and related problems. This issue is solved by changing the behavior of these two status variables such that they are incremented only in response to usage of the binary log transactional cache, as well as by introducing two new status variables Binlog_stmt_cache_use and Binlog_stmt_cache_disk_use, which are incremented only by usage of the binary log statement cache.
· For more information, see System variables used with the binary log, and Section 5.1.6, “Server Status Variables”.
· Replication: By default, a value is generated for an AUTO_INCREMENT column by inserting either NULL or 0 into the column. Setting the NO_AUTO_VALUE_ON_ZERO server SQL mode suppresses this behavior for 0, so that it occurs only when NULL is inserted into the column.
· This behavior is also followed on a replication slave (by the slave SQL thread) when applying events that have been logged on the master using the statement-based format. However, when applying events that had been logged using the row-based format, NO_AUTO_VALUE_ON_ZERO was ignored, which could lead to an assertion.
· To fix this issue, the value of an AUTO_INCREMENT column is no longer generated when applying an event that was logged using the row-based row format, as this value is already contained in the changes applied on the slave.
· Replication: The Binlog_cache_use and Binlog_cache_disk_use status variables were incremented twice by a change to a table using a transactional storage engine.
· Replication: The BINLOG statement modified the values of session variables, which could lead to problems with operations such a point-in-time recovery. One such case occurred when replaying a row-based binary log which relied on setting foreign_key_checks = OFF on the session level in order to create and populate a set of InnoDB tables having foreign key constraints.
Replication: mysqlbinlog printed USE statements to its output only when the default database changed between events. To illustrate how this could cause problems, suppose that a user issued the following sequence of statements:
· CREATE DATABASE mydb;
· USE mydb;
· CREATE TABLE mytable (column_definitions);
· DROP DATABASE mydb;
· CREATE DATABASE mydb;
· USE mydb;
· CREATE TABLE mytable (column_definitions);
· When played back using mysqlbinlog, the second CREATE TABLE statement failed with Error: No Database Selected because the second USE statement was not played back, due to the fact that a database other than mydb was never selected.
· This fix insures that mysqlbinlog outputs a USE statement whenever it reads one from the binary log.
Replication: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing:
· The error message for the master error code
· The master error code
· The error message for the slaves error code
· The slave error code
However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this:
· Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Now the slave displays this:
· Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
· Replication: When an error occurred in the generation of the name for a new binary log file, the error was logged but not shown to the user.
· Comparisons of aggregate values with TIMESTAMP values were incorrect.
· For DIV expressions, assignment of the result to multiple variables could cause a server crash.
· MIN(year_col) could return an incorrect result in some cases.
· mysqlslap failed to check for a NULL return from mysql_store_result() and crashed trying to process the result set.
· In a subquery, a UNION with no referenced tables (or only a reference to the virtual table dual) did not allow an ORDER BY clause.
· Configuring MySQL with -DWITHOUT_PERFSCHEMA_STORAGE_ENGINE=1 caused build failures.
· Several Valgrind warnings were fixed.
· OPTIMIZE TABLE for an InnoDB table could raise an assertion if the operation failed because it had been killed.
· If max_allowed_packet was set larger than 16MB, the server failed to reject too-large packets with “Packet too large” errors.
· A NOT IN predicate with a subquery containing a HAVING clause could retrieve too many rows, when the subquery itself returned NULL.
· EXPLAIN could crash for queries that accessed two derived tables.
· On Solaris, the MySQL build failed if it was configured with debugging enabled.
· Issuing EXPLAIN EXTENDED for a query that would use condition pushdown could cause mysqld to crash.
· An assertion could be raised for queries for which the optimizer could choose between Index Merge range access or const ref access methods.
· If MySQL was built with Visual Studio Express, the project wixca was not built.
· EXPLAIN could crash for queries that used GROUP_CONCAT().
· CMake polluted the source tree by writing installation-related temporary files there.
· Security context references in sp_head.cc were rewritten for improved DTrace compatibility.
· The ucs2 character set does not support characters outside the Basic Multilingual Plane (BMP), but converting a string containing such characters did not produce a conversion-failure warning.
· A Valgrind failure occurred in fn_format when called from archive_discover.
· CMake did not add LINK_LIBRARIES for MYSQL_ADD_PLUGIN for libmysqld.
· An assertion could be raised if the server was closing a session at the same time the session was being killed by another thread.
· Condition pushdown optimization could push down conditions with incorrect column references.
· Configuration with maintainer mode enabled resulted in errors when compiling with icc.
· An ORDER BY clause was bound to the incorrect substatement when used in UNION context.
· The BIT_AND() function could return incorrect results when a join returned no matching rows.
· If the set of values aggregated with AVG(DISTINCT) contained a NULL value, the function result could be incorrect.
· In rare cases, LIKE expressions failed for an indexed column that used a collation containing contractions.
· Unnecessary subquery evaluation in contexts such as statement preparation or view creation could cause a server crash.
· View creation could produce Valgrind warnings.
· NULL geometry values could cause a crash in Item_func_spatial_collection::fix_length_and_dec.
· It was possible to compile mysqld with Performance Schema support but with a dummy atomic-operations implementation, which caused a server crash. This problem does not affect binary distributions. It is helpful as a safety measure for users who build MySQL from source.
· The cp1251 character set did not properly support the Euro sign (0x88). For example, converting a string containing this character to utf8 resulted in '?' rather than the utf8 Euro sign.
· Some unsigned system variables could be displayed with negative values.
· CREATE DATABASE and DROP DATABASE caused mysql --one-database to lose track of the statement-filtering context.
· An assertion could be raised during concurrent execution of DROP DATABASE and REPAIR TABLE if the drop deleted a table's .TMD file at the same time the repair tried to read details from the old file that was just removed.
· A problem could also occur when DROP TABLE tried to remove all files belonging to a table at the same time REPAIR TABLE had just deleted the table's .TMD file.
· After compilation from source, all header files were installed in the same directory, even those that should be installed into subdirectories of the installation include directory.
· When mysqld printed crash dump information, it incorrectly indicated that some valid pointers were invalid.
· On Mac OS X, a configuration error caused the preference pane to fail.
· On FreeBSD, if mysqld was killed with a SIGHUP signal, it could corrupt InnoDB .ibd files.
· An assertion could be raised if –1 was inserted into an AUTO_INCREMENT column by a statement writing more than one row.
· If a client supplied a user name longer than the maximum 16 characters allowed for names stored in the MySQL grant tables, all characters were being considered significant. Historically, only the first 16 characters were used to check for a match; this behavior was restored.
· The my_seek() and my_tell() functions ignored the MY_WME flag when they returned an error, which could cause client programs to hang.
· During assignment of values to system variables, legality checks on the value range occurred too late, preventing proper error checking.
· On Solaris, time-related functions such as NOW() or SYSDATE() could return a constant value.
· If the remote server for a FEDERATED table could not be accessed, queries for the INFORMATION_SCHEMA.TABLES table failed.
February 8th, 2011Functionality added or changed:
· The time zone tables available at http://dev.mysql.com/downloads/timezones.html have been updated. These tables can be used on systems such as Windows or HP-UX that do not include zoneinfo files.
Bugs fixed:
· Incompatible Change: When auto_increment_increment is greater than one, values generated by a bulk insert that reaches the maximum column value could wrap around rather producing an overflow error.
· As a consequence of the fix, it is no longer possible for an auto-generated value to be equal to the maximum BIGINT UNSIGNED value. It is still possible to store that value manually, if the column can accept it.
· Important Change: Partitioning: Date and time functions used as partitioning functions now have the types of their operands checked; use of a value of the wrong type is now disallowed in such cases. In addition, EXTRACT(WEEK FROM col), where col is a DATE or DATETIME column, is now disallowed altogether because its return value depends on the value of the default_week_format system variable.
· InnoDB Storage Engine: A compilation problem affected the InnoDB source code on NetBSD/sparc64.
· InnoDB Storage Engine: In InnoDB status output, the value for I/O sum[] could be incorrect, displayed as a very large number.
· InnoDB Storage Engine: It was not possible to query the information_schema.innodb_trx table while other connections were running queries involving BLOB types.
· InnoDB Storage Engine: The OPTIMIZE TABLE statement would reset the auto-increment counter for an InnoDB table. Now the auto-increment value is preserved across this operation.
· Partitioning: Failed ALTER TABLE ... PARTITION statements could cause memory leaks.
· Replication: When closing a session that used temporary tables, binary logging could sometimes fail with a spurious Failed to write the DROP statement for temporary tables to binary log.
· Replication: By default, a value is generated for an AUTO_INCREMENT column by inserting either NULL or 0 into the column. Setting the NO_AUTO_VALUE_ON_ZERO server SQL mode suppresses this behavior for 0, so that it occurs only when NULL is inserted into the column.
· This behavior is also followed on a replication slave (by the slave SQL thread) when applying events that have been logged on the master using the statement-based format. However, when applying events that had been logged using the row-based format, NO_AUTO_VALUE_ON_ZERO was ignored, which could lead to an assertion.
· To fix this issue, the value of an AUTO_INCREMENT column is no longer generated when applying an event that was logged using the row-based row format, as this value is already contained in the changes applied on the slave.
· Replication: The BINLOG statement modified the values of session variables, which could lead to problems with operations such a point-in-time recovery. One such case occurred when replaying a row-based binary log which relied on setting foreign_key_checks = OFF on the session level in order to create and populate a set of InnoDB tables having foreign key constraints.
Replication: mysqlbinlog printed USE statements to its output only when the default database changed between events. To illustrate how this could cause problems, suppose that a user issued the following sequence of statements:
· CREATE DATABASE mydb;
· USE mydb;
· CREATE TABLE mytable (column_definitions);
· DROP DATABASE mydb;
· CREATE DATABASE mydb;
· USE mydb;
· CREATE TABLE mytable (column_definitions);
· When played back using mysqlbinlog, the second CREATE TABLE statement failed with Error: No Database Selected because the second USE statement was not played back, due to the fact that a database other than mydb was never selected.
· This fix insures that mysqlbinlog outputs a USE statement whenever it reads one from the binary log.
Replication: Previously, when a statement failed with a different error on the slave than on the master, the slave SQL thread displayed a message containing:
· The error message for the master error code
· The master error code
· The error message for the slaves error code
· The slave error code
However, the slave has no information with which to fill in any print format specifiers for the master message, so it actually displayed the message format string. To make it clearer that the slave is not displaying the actual message as it appears on the master, the slave now indicates that the master part of the output is the message format, not the actual message. For example, previously the slave displayed information like this:
· Error: "Query caused different errors on master and slave. Error on master: 'Duplicate entry '%-.192s' for key %d' (1062), Error on slave: 'no error' (0). Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Now the slave displays this:
· Error: "Query caused different errors on master and slave. Error on master: message format='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
· Replication: When an error occurred in the generation of the name for a new binary log file, the error was logged but not shown to the user. (Bug#46166)
· See also Bug#37148, Bug#40611, Bug#43929, Bug#51019.
· MIN(year_col) could return an incorrect result in some cases.
· If max_allowed_packet was set larger than 16MB, the server failed to reject too-large packets with “Packet too large” errors.
· Issuing EXPLAIN EXTENDED for a query that would use condition pushdown could cause mysqld to crash.
· EXPLAIN could crash for queries that used GROUP_CONCAT().
· Configuration with maintainer mode enabled resulted in errors when compiling with icc.
· Unnecessary subquery evaluation in contexts such as statement preparation or view creation could cause a server crash.
· View creation could produce Valgrind warnings.
· NULL geometry values could cause a crash in Item_func_spatial_collection::fix_length_and_dec.
· The cp1251 character set did not properly support the Euro sign (0x88). For example, converting a string containing this character to utf8 resulted in '?' rather than the utf8 Euro sign.
· Some unsigned system variables could be displayed with negative values.
· CREATE DATABASE and DROP DATABASE caused mysql --one-database to lose track of the statement-filtering context.
· An assertion could be raised during concurrent execution of DROP DATABASE and REPAIR TABLE if the drop deleted a table's .TMD file at the same time the repair tried to read details from the old file that was just removed.
· A problem could also occur when DROP TABLE tried to remove all files belonging to a table at the same time REPAIR TABLE had just deleted the table's .TMD file.
· When mysqld printed crash dump information, it incorrectly indicated that some valid pointers were invalid.
· On FreeBSD, if mysqld was killed with a SIGHUP signal, it could corrupt InnoDB .ibd files.
· An assertion could be raised if –1 was inserted into an AUTO_INCREMENT column by a statement writing more than one row.
· If a client supplied a user name longer than the maximum 16 characters allowed for names stored in the MySQL grant tables, all characters were being considered significant. Historically, only the first 16 characters were used to check for a match; this behavior was restored.
· The my_seek() and my_tell() functions ignored the MY_WME flag when they returned an error, which could cause client programs to hang.
· During assignment of values to system variables, legality checks on the value range occurred too late, preventing proper error checking.
· On Solaris, time-related functions such as NOW() or SYSDATE() could return a constant value.
· If the remote server for a FEDERATED table could not be accessed, queries for the INFORMATION_SCHEMA.TABLES table failed.
December 16th, 2010Configuration Notes:
· MySQL releases are now built on all platforms using CMake rather than the GNU autotools, so autotools support has been removed. For instructions on building MySQL with CMake, see Section 2.11, “Installing MySQL from Source”. Third-party tools that need to extract the MySQL version number formerly found in configure.in can use the VERSION file. See Section 2.11.6, “MySQL Configuration and Third-Party Tools”.
Functionality added or changed:
· Support for the IBMDB2I storage engine has been removed. (Bug#58079)
· A --bind-address option has been added to a number of MySQL client programs: mysql, mysqldump, mysqladmin, mysqlbinlog, mysqlcheck, mysqlimport, and mysqlshow. This is for use on a computer having multiple network interfaces, and enables you to choose which interface is used to connect to the MySQL server.
Bugs fixed:
· Performance: InnoDB Storage Engine: Improved concurrency when several ANALYZE TABLE or SHOW TABLE STATUS statements are run simultaneously for InnoDB tables. (Bug#53046)
· Incompatible Change: Previously, tables in the performance_schema database had uppercase names. This was incompatible with the lower_case_table_names system variable, and caused issues when the variable value was changed after installing or upgrading.
· Now performance_schema table names are lowercase, so they appear in uniform lettercase regardless of the lower_case_table_names setting. References to these tables in SQL statements should be given in lowercase. This is an incompatible change, but provides compatible behavior across different values of lower_case_table_names.
· If you upgrade to MySQL 5.5.8 from an earlier version of MySQL 5.5, be sure to run mysql_upgrade (and restart the server) to change the names of existing performance_schema tables from uppercase to lowercase. (Bug#57609)
Incompatible Change: The following changes were made to the performance_schema.threads table for conformance with the implementation in MySQL 5.6:
· ID column: Renamed to PROCESSLIST_ID, removed NOT NULL from definition.
· NAME column: Changed from VARCHAR(64) to VARCHAR(128).
· Incompatible Change: Deadlock occurred when a connection that had some table open through a HANDLER statement tried to update data through a DML statement while another connection tried to execute FLUSH TABLES WITH READ LOCK concurrently. Starvation of FLUSH TABLES WITH READ LOCK statements occurred when there was a constant load of concurrent DML statements in two or more connections.
These problems resulted from the global read lock implementation, which was reimplemented with the following consequences:
· To solve deadlock in event-handling code that was exposed by this patch, the LOCK_event_metadata mutex was replaced with metadata locks on events. As a result, DDL operations on events are now prohibited under LOCK TABLES. This is an incompatible change.
· The global read lock (FLUSH TABLES WITH READ LOCK) no longer blocks DML and DDL on temporary tables. Before this patch, server behavior was not consistent in this respect: In some cases, DML/DDL statements on temporary tables were blocked; in others, they were not. Since the main use cases for FLUSH TABLES WITH READ LOCK are various forms of backups and temporary tables are not preserved during backups, the server now consistently allows DML/DDL on temporary tables under the global read lock.
· Thread state names are now either Waiting for global read lock or Waiting for commit lock, depending on which stage FLUSH TABLES WITH READ LOCK is in.
· (Bug#57006, Bug#54673)
· InnoDB Storage Engine: Values could be truncated in certain INFORMATION_SCHEMA columns, such as REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME and KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME. (Bug#57960)
· InnoDB Storage Engine: For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#57799)
· InnoDB Storage Engine: The server could stop with an assertion error on Windows Vista and Windows 7 systems. (Bug#57720)
· InnoDB Storage Engine: A followup fix to Bug#54678. TRUNCATE TABLE could still cause a crash (assertion error) in the debug version of the server. (Bug#57700)
· InnoDB Storage Engine: The InnoDB system tablespace could grow continually for a server under heavy load. (Bug#57611)
· InnoDB Storage Engine: Heavy concurrent updates of a BLOB column in an InnoDB table could cause a hang. (Bug#57579)
· InnoDB Storage Engine: The innodb_stats_on_metadata option could prevent the ANALYZE TABLE statement from running. (Bug#57252)
· InnoDB Storage Engine: A query for an InnoDB table could return the wrong value if a column value was changed to a different case, and the column had a case-insensitive index. (Bug#56680)
· InnoDB Storage Engine: An existing InnoDB could be switched to ROW_FORMAT=COMPRESSED implicitly by a KEY_BLOCK_SIZE clause in an ALTER TABLE statement. Now, the row format is only switched to compressed if there is an explicit ROW_FORMAT=COMPRESSED clause. on the ALTER TABLE statement.
· Any valid, non-default ROW_FORMAT parameter takes precedence over KEY_BLOCK_SIZE when both are specified. KEY_BLOCK_SIZE only enables ROW_FORMAT=COMPRESSED if ROW_FORMAT is not specified on either the CREATE TABLE or ALTER TABLE statement, or is specified as DEFAULT. In case of a conflict between KEY_BLOCK_SIZE and ROW_FORMAT clauses, the KEY_BLOCK_SIZE is ignored if innodb_strict_mode is off, and the statement causes an error if innodb_strict_mode is on. (Bug#56632)
· InnoDB Storage Engine: The clause KEY_BLOCK_SIZE=0 is now allowed on CREATE TABLE and ALTER TABLE statements for InnoDB tables, regardless of the setting of innodb_strict_mode. The zero value has the effect of resetting the KEY_BLOCK_SIZE table parameter to its default value, depending on the ROW_FORMAT parameter, as if it had not been specified. That default is 8 if ROW_FORMAT=COMPRESSED. Otherwise, KEY_BLOCK_SIZE is not used or stored with the table parameters.
· As a consequence of this fix, ROW_FORMAT=FIXED is not allowed when the innodb_strict_mode is enabled. (Bug#56628)
· InnoDB Storage Engine: A large number of foreign key declarations could cause the output of the SHOW CREATE STATEMENT statement to be truncated. (Bug#56143)
· InnoDB Storage Engine: A compilation problem affected the InnoDB source code on NetBSD/sparc64. (Bug#53916)
· InnoDB Storage Engine: Clarified the message when a CREATE TABLE statement fails because a foreign key constraint does not have the required indexes. (Bug#16290)
· Partitioning: “Fast” ALTER TABLE operations (that do not involve a table copy) on a partitioned table could leave the table in an unusable state. (Bug#57985)
· Partitioning: An INSERT ... ON DUPLICATE KEY UPDATE column = 0 statement on an AUTO_INCREMENT column caused the debug server to crash. (Bug#57890)
· Replication: Concurrent statements using a stored function and a DROP DATABASE statement that caused the same stored function to be dropped could cause statement-based replication to fail. This problem is resolved by making sure that DROP DATABASE takes an exclusive metadata lock on all stored functions and stored procedures that it causes to be dropped. (Bug#57663)
· See also Bug#30977.
· Replication: When STOP SLAVE is issued, the slave SQL thread rolls back the current transaction and stops immediately if the transaction updates only tables which use transactional storage engines are updated. Previously, this occurred even when the transaction contained CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, although these statements cannot be rolled back. Because temporary tables persist for the lifetime of a user session (in the case, the replication user), they remain until the slave is stopped or reset. When the transaction is restarted following a subsequent START SLAVE statement, the SQL thread aborts with an error that a temporary table to be created (or dropped) already exists (or does not exist, in the latter case).
· Following this fix, if an ongoing transaction contains CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug#56118)
· Replication: If there exist both a temporary table and a non-temporary table having the same, updates normally apply only to the temporary table, with the exception of a CREATE TABLE ... SELECT statement that creates a non-temporary table having the same name as an existing temporary table. When such a statement was replicated using the MIXED logging format, and the statement was unsafe for row-based logging, updates were misapplied to the temporary table.
· Updates were also applied wrongly when a temporary table that used a transactional storage engine was dropped inside a transaction, followed by updates within the same transaction to a non-temporary table having the same name. (Bug#55478)
· See also Bug#47899, Bug#55709.
· Replication: When making changes to relay log settings using CHANGE MASTER TO, the I/O cache was not cleared. This could result in replication failure when the slave attempted to read stale data from the cache and then stopped with an assertion. (Bug#55263)
· Replication: Replication of SET and ENUM columns represented using more than 1 byte (that is, SET columns with more than 8 members and ENUM columns with more than 256 constants) between platforms using different endianness failed when using the row-based format. This was because columns of these types are represented internally using integers, but the internal functions used by MySQL to handle them treated them as strings. (Bug#52131)
· See also Bug#53528.
· Replication: Trying to read from a binary log containing a log event of an invalid type caused the slave to crash. (Bug#38718)
· Replication: When replicating the mysql.tables_priv table, the Grantor column was not replicated, and was thus left empty on the slave. (Bug#27606)
· Setting the read_only system variable at server startup did not work. (Bug#58669)
· mysql_upgrade failed after an upgrade from MySQL 5.1. (Bug#58514)
· When configuring the build with -DBUILD_CONFIG=mysql_release and building with Visual Studio Express, the build failed if signtool.exe was not present. (Bug#58313)
· When configuring the build with -DBUILD_CONFIG=mysql_release on Linux, libaio is required, but the error message if it was missing was uninformative. (Bug#58227)
· Use of NAME_CONST() in a HAVING clause caused a server crash. (Bug#58199)
· BETWEEN did not use indexes for DATE or DATETIME columns. (Bug#58190)
· Memory was allocated in fn_expand() for storing path names, but not freed anywhere. (Bug#58173)
· In debug builds, inserting a FLOAT value into a CHAR(0) column could crash the server. (Bug#58137)
· Failure to create a thread to handle a user connection could result in a server crash. (Bug#58080)
· During configuration, ADD_VERSION_INFO in cmake/mysql_version.cmake failed if LINK_FLAGS was modified. (Bug#58074)
· Performance Schema did not account for I/O for the binary log file (no I/O was counted). (Bug#58052)
· Several compilation problems were fixed. (Bug#57992, Bug#57993, Bug#57994, Bug#57995, Bug#57996, Bug#57997, Bug#58057)
· After creating a table with two foreign key constraints, the INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS table displayed only one of them. (Bug#57904)
· Incorrect error handling raised an assertion if character set conversion wrapped an item that failed. (Bug#57882)
· In debug builds, a missing DBUG_RETURN macro in sql/client.c caused mysql to be unable to connect to the server. (Bug#57744)
· Clients using a client library older than MySQL 5.5.7 suffered loss of connection after executing mysql_change_user() while connected to a 5.5.7 server. (Bug#57689)
· The MySQL-shared RPM package failed to provide the lowercase virtual identifier 'mysql-shared' in the RPM 'Provides' tags (usually used for backward compatibility). (Bug#57596)
· For an upgrade to MySQL 5.5.7 from a previous release, the server exited if the mysql.proxies_priv table did not exist, making upgrades inconvenient. Now the server treats a missing proxies_priv table as equivalent to an empty table. However, after starting the server, you should still run mysql_upgrade to create the table. (Bug#57551)
· SHOW PROCESSLIST displayed non-ASCII characters improperly. (Bug#57306)
· Passing a string that was not null-terminated to UpdateXML() or ExtractValue() caused the server to fail with an assertion. (Bug#57279)
· SET GLOBAL debug could cause a crash on Solaris if the server failed to open the trace file. (Bug#57274)
· In debug builds, an assertion could be raised during conversion of strings to floating-point values. (Bug#57203)
· A user with no privileges on a stored routine or the mysql.proc table could discover the routine's existence. (Bug#57061)
· Queries executed using the Index Merge access method and a temporary file could return incorrect results. (Bug#56862)
· The server could crash as a result of accessing freed memory when populating INFORMATION_SCHEMA.VIEWS if a view could not be opened properly. (Bug#56540)
· Valgrind warnings about overlapping memory when double-assigning the same variable were corrected. (Bug#56138)
· If a STOP SLAVE statement was issued while the slave SQL thread was executing a statement that invoked the SLEEP() function, both statements hung. (Bug#56096)
· OPTIMIZE TABLE for InnoDB tables could raise an assertion. (Bug#55930)
· Warnings raised by a trigger were not cleared upon successful completion. Now warnings are cleared if the trigger completes successfully, per the SQL standard. (Bug#55850)
· For CMake builds, some parts of the source were unnecessarily compiled twice if the embedded server was built. (Bug#55647)
· Boolean command options caused an error if given with an option value and the loose- option prefix. (Bug#54569)
· An error in a stored procedure could leave the session in a different default database. (Bug#54375)
· The CMake “wrapper” for configure (configure.pl) did not handle the --with-comment option properly. (Bug#52275)
· Grouping by a TIME_TO_SEC() function result could cause a server crash or incorrect results. Grouping by a function returning a BLOB could cause an unexpected “Duplicate entry” error and incorrect result. (Bug#52160)
· The find_files() function used by SHOW statements performed redundant and unnecessary memory allocation. (Bug#51208)
· The Windows sample option files contained values more appropriate for Linux. (Bug#50021)
· A failed RENAME TABLE operation could prevent a FLUSH TABLES WITH READ LOCK from completing. (Bug#47924)
· Error messages for several delegate-related initialization error conditions that should not occur were changed to help identify the area of failure and to instruct the user to file a bug report if they do occur. A delegate is a set of internal data structures and algorithms. (Bug#47027)
· On file systems with case insensitive file names, and lower_case_table_names=2, the server could crash due to a table definition cache inconsistency. (Bug#46941)
· Handling of host name lettercase in GRANT statements was inconsistent. (Bug#36742)
· SET NAMES utf8 COLLATE utf8_sinhala_ci did not work. (Bug#26474)
· The utf16_bin collation uses code-point order, not byte-by-byte order, as described at Section 9.1.14.1, “Unicode Character Sets”. (The order was byte-by-byte in MySQL 5.5.7.)
December 16th, 2010Functionality added or changed:
· Support for the IBMDB2I storage engine has been removed. (Bug#58079)
· The pstack library was nonfunctional and has been removed, along with the --with-pstack option for configure. The --enable-pstack option for mysqld is deprecated and will be removed in MySQL 5.5. (Bug#57210)
Bugs fixed:
· Performance: InnoDB Storage Engine: Improved concurrency when several ANALYZE TABLE or SHOW TABLE STATUS statements are run simultaneously for InnoDB tables. (Bug#53046)
· InnoDB Storage Engine: For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#57799)
· Partitioning: An INSERT ... ON DUPLICATE KEY UPDATE column = 0 statement on an AUTO_INCREMENT column caused the debug server to crash. (Bug#57890)
· Several compilation problems were fixed. (Bug#57992, Bug#57993, Bug#57994, Bug#57995, Bug#57996, Bug#57997, Bug#58057)
· Passing a string that was not null-terminated to UpdateXML() or ExtractValue() caused the server to fail with an assertion. (Bug#57279)
· Queries executed using the Index Merge access method and a temporary file could return incorrect results. (Bug#56862)
· The find_files() function used by SHOW statements performed redundant and unnecessary memory allocation
November 19th, 2010Bugs fixed:
· Replication: SET PASSWORD caused row-based replication to fail between a MySQL 5.1 master and a MySQL 5.5 slave.
· This fix makes it possible to replicate SET PASSWORD correctly, using row-based replication between a master running MySQL 5.1.53 or a later MySQL 5.1 release to a slave running MySQL 5.5.7 or a later MySQL 5.5 release. (Bug#57098)
· See also Bug#55452, Bug#57357.
· Replication: An ALTER TABLE statement against a MyISAM table that altered a column without setting its size caused the binary log to become corrupted, leading to replication failure. (Bug#56226)
· Replication: When STOP SLAVE is issued, the slave SQL thread rolls back the current transaction and stops immediately if the transaction updates only tables which use transactional storage engines are updated. Previously, this occurred even when the transaction contained CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, although these statements cannot be rolled back. Because temporary tables persist for the lifetime of a user session (in the case, the replication user), they remain until the slave is stopped or reset. When the transaction is restarted following a subsequent START SLAVE statement, the SQL thread aborts with an error that a temporary table to be created (or dropped) already exists (or does not exist, in the latter case).
· Following this fix, if an ongoing transaction contains CREATE TEMPORARY TABLE statements, DROP TEMPORARY TABLE statements, or both, the SQL thread now waits until the transaction ends, then stops. (Bug#56118)
· Replication: If there exist both a temporary table and a non-temporary table having the same, updates normally apply only to the temporary table, with the exception of a CREATE TABLE ... SELECT statement that creates a non-temporary table having the same name as an existing temporary table. When such a statement was replicated using the MIXED logging format, and the statement was unsafe for row-based logging, updates were misapplied to the temporary table. (Bug#55478)
· See also Bug#47899, Bug#55709.
· Replication: When a slave tried to execute a transaction larger than the slave's value for max_binlog_cache_size, it crashed. This was caused by an assertion that the server should roll back only the statement but not the entire transaction when the error ER_TRANS_CACHE_FULL occurred. However, the slave SQL thread always rolled back the entire transaction whenever any error occurred, regardless of the type of error. (Bug#55375)
· Replication: When making changes to relay log settings using CHANGE MASTER TO, the I/O cache was not cleared. This could result in replication failure when the slave attempted to read stale data from the cache and then stopped with an assertion. (Bug#55263)
· Replication: Trying to read from a binary log containing a log event of an invalid type caused the slave to crash. (Bug#38718)
· Replication: When replicating the mysql.tables_priv table, the Grantor column was not replicated, and was thus left empty on the slave. (Bug#27606)
· Handling of host name lettercase in GRANT statements was inconsistent. (Bug#36742)
November 2nd, 2010Bugs fixed:
· InnoDB Storage Engine: InnoDB incorrectly reported an error when a cascading foreign key constraint deleted more than 250 rows. (Bug#57255)
· InnoDB Storage Engine: A SELECT ... FOR UPDATE statement affecting a range of rows in an InnoDB table could cause a crash in the debug version of the server. (Bug#56716)
· InnoDB Storage Engine: Improved the performance of UPDATE operations on InnoDB tables, when only non-indexed columns are changed. (Bug#56340)
· InnoDB Storage Engine: The server could crash on shutdown, if started with --innodb-use-system-malloc=0. (Bug#55627)
· InnoDB Storage Engine: Setting the PACK_KEYS=0 table option for an InnoDB table prevented new indexes from being added to the table. (Bug#54606)
· InnoDB Storage Engine: Changed the locking mechanism for the InnoDB data dictionary during ROLLBACK operations, to improve concurrency for REPLACE statements. (Bug#54538)
· InnoDB Storage Engine: InnoDB transactions could be incorrectly committed during recovery, rather than rolled back, if the server crashed and was restarted after performing ALTER TABLE...ADD PRIMARY KEY on an InnoDB table, or some other operation that involves copying the entire table. (Bug#53756)
· Partitioning: Replication: Attempting to execute LOAD DATA on a partitioned MyISAM table while using statement-based logging mode caused the master to hang or crash. (Bug#51851)
· Partitioning: Multi-table UPDATE statements involving a partitioned MyISAM table could cause this table to become corrupted. Not all tables affected by the UPDATE needed to be partitioned for this issue to be observed. (Bug#55458)
· Partitioning: EXPLAIN PARTITIONS returned bad estimates for range queries on partitioned MyISAM tables. In addition, values in the rows column of EXPLAIN PARTITIONS output did not take partition pruning into account. (Bug#53806, Bug#46754)
· Replication: Backticks used to enclose idenitfiers for savepoints were not preserved in the binary log, which could lead to replication failure when the identifier, stripped of backticks, could be misinterpreted, causing a syntax or other error.
· This could cause problems with MySQL application programs making use of generated savepoint IDs. If, for instance, java.sql.Connection.setSavepoint() is called without any parameters, Connector/J automatically generates a savepoint identifier consisting of a string of hexadecimal digits 0-F encased in backtick (`) characters. If such an ID took the form `NeN` (where N represents a string of the decimal digits 0-9, and e is a literal uppercase or lowercase “E” character). Removing the backticks when writing the identifier into the binary log left behind a substring which the slave MySQL server tried to interpret as a floating point number, rather than as an identifier. The resulting syntax error caused loss of replication. (Bug#55961)
· See also Bug#55962.
· If a query specified a DATE or DATETIME value in a format different from 'YYYY-MM-DD HH:MM:SS', a greater-than-or-equal (>=) condition matched only greater-than values in an indexed TIMESTAMP column. (Bug#55779)
· If there was an active SELECT statement, an error arising during trigger execution could cause a server crash. (Bug#55421)
· With an UPDATE IGNORE statement including a subquery that was evaluated using a temporary table, an error transferring the data from the temporary was ignored, causing an assertion to be raised. (Bug#54543)
· Row subqueries producing no rows were not handled as UNKNOWN values in row comparison expressions. (Bug#54190)
· The max_length metadata value of MEDIUMBLOB types was reported as 1 byte greater than the correct value. (Bug#53296)
· In some cases, when the left part of a NOT IN subquery predicate was a row and contained NULL values, the query result was incorrect. (Bug#51070)
· For some queries, the optimizer produced incorrect results using the Index Merge access method with InnoDB tables. (Bug#50402)
· EXPLAIN produced an incorrect rows value for queries evaluated using an index scan and that included LIMIT, GROUP BY, and ORDER BY on a computed column. (Bug#50394)
· mysql_store_result() and mysql_use_result() are not for use with prepared statements and are not intended to be called following mysql_stmt_execute(), but failed to return an error when invoked that way. (Bug#47485)
· A malformed packet sent by the server when the query cache was in use resulted in lost-connection errors. (Bug#42503)
· CREATE TABLE failed if a column referred to in an index definition and foreign key definition was in different lettercases in the two definitions. (Bug#39932)
September 26th, 2010InnoDB Notes:
· InnoDB Plugin has been upgraded to version 1.0.12. This version is considered of General Availability (GA) quality.
· In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), generic Linux RPM packages, and any builds produced with the icc compiler. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
Bugs fixed:
Incompatible Change: Replication: As of MySQL 5.5.6, handling of CREATE TABLE IF NOT EXISTS ... SELECT statements has been changed for the case that the destination table already exists:
· Previously, for CREATE TABLE IF NOT EXISTS ... SELECT, MySQL produced a warning that the table exists, but inserted the rows and wrote the statement to the binary log anyway. By contrast, CREATE TABLE ... SELECT (without IF NOT EXISTS) failed with an error, but MySQL inserted no rows and did not write the statement to the binary log.
· MySQL now handles both statements the same way when the destination table exists, in that neither statement inserts rows or is written to the binary log. The difference between them is that MySQL produces a warning when IF NOT EXISTS is present and an error when it is not.
· This change in handling of IF NOT EXISTS results in an incompatibility for statement-based replication from a MySQL 5.1 master with the original behavior and a MySQL 5.5 slave with the new behavior. Suppose that CREATE TABLE IF NOT EXISTS ... SELECT is executed on the master and the destination table exists. The result is that rows are inserted on the master but not on the slave. (Row-based replication does not have this problem.)
To address this issue, statement-based binary logging for CREATE TABLE IF NOT EXISTS ... SELECT is changed in MySQL 5.1 as of 5.1.51:
· If the destination table does not exist, there is no change: The statement is logged as is.
· If the destination table does exist, the statement is logged as the equivalent pair of CREATE TABLE IF NOT EXISTS and INSERT ... SELECT statements. (If the SELECT in the original statement is preceded by IGNORE or REPLACE, the INSERT becomes INSERT IGNORE or REPLACE, respectively.)
· This change provides forward compatibility for statement-based replication from MySQL 5.1 to 5.5 because when the destination table exists, the rows will be inserted on both the master and slave. To take advantage of this compatibility measure, the 5.1 server must be at least 5.1.51 and the 5.5 server must be at least 5.5.6.
· To upgrade an existing 5.1-to-5.5 replication scenario, upgrade the master first to 5.1.51 or higher. Note that this differs from the usual replication upgrade advice of upgrading the slave first.
· A workaround for applications that wish to achieve the original effect (rows inserted regardless of whether the destination table exists) is to use CREATE TABLE IF NOT EXISTS and INSERT ... SELECT statements rather than CREATE TABLE IF NOT EXISTS ... SELECT statements.
· Along with the change just described, the following related change was made: Previously, if an existing view was named as the destination table for CREATE TABLE IF NOT EXISTS ... SELECT, rows were inserted into the underlying base table and the statement was written to the binary log. As of MySQL 5.1.51 and 5.5.6, nothing is inserted or logged. (Bug#47442, Bug#47132, Bug#48814, Bug#49494)
Incompatible Change: Previously, if you flushed the logs using FLUSH LOGS or mysqladmin flush-logs and mysqld was writing the error log to a file (for example, if it was started with the --log-error option), it renamed the current log file with the suffix -old, then created a new empty log file. This had the problem that a second log-flushing operation thus caused the original error log file to be lost unless you saved it under a different name. For example, you could use the following commands to save the file:
· shell> mysqladmin flush-logs
· shell> mv host_name.err-old backup-directory
To avoid the preceding file-loss problem, renaming no longer occurs. The server merely closes and reopens the log file. To rename the file, you can do so manually before flushing. Then flushing the logs reopens a new file with the original file name. For example, you can rename the file and create a new one using the following commands:
· shell> mv host_name.err host_name.err-old
· shell> mysqladmin flush-logs
· shell> mv host_name.err-old backup-directory
· (Bug#29751)
· Partitioning: When the storage engine used to create a partitioned table was disabled, attempting to drop the table caused the server to crash. (Bug#46086)
· If a view was named as the destination table for CREATE TABLE ... SELECT, the server produced a warning whether or not IF NOT EXISTS was used. Now it produces a warning only when IF NOT EXISTS is used, and an error otherwise. (Bug#55777)
· The CHECK TABLE command could cause a time-consuming verification of the InnoDB adaptive hash index memory structure. Now this extra checking is only performed in binaries built for debugging. (Bug#55716)
· After the fix for Bug#39653, the shortest available secondary index was used for full table scans. The primary clustered key was used only if no secondary index could be used. However, when the chosen secondary index includes all columns of the table being scanned, it is better to use the primary index because the amount of data to scan is the same but the primary index is clustered. This is now taken into account. (Bug#55656)
· (Bug#55627)
· The server was not checking for errors generated during the execution of Item::val_xxx() methods when copying data to a group, order, or distinct temp table's row. (Bug#55580)
· ORDER BY clauses that included user variable expressions could cause a debug assertion to be raised. (Bug#55565)
· Queries involving predicates of the form const NOT BETWEEN not_indexed_column AND indexed_column could return incorrect data due to incorrect handling by the range optimizer. (Bug#54802)
· MIN() or MAX() with a subquery argument could raise a debug assertion for debug builds or return incorrect data for nondebug builds. (Bug#54465)
· INFORMATION_SCHEMA plugins with no deinit() method resulted in a memory leak. (Bug#54253)
· INSERT IGNORE INTO ... SELECT statements could cause a debug assertion to be raised. (Bug#54106)
· The fix for Bug#30234 caused the server to reject the DELETE tbl_name.* ... Access compatibility syntax for multiple-table DELETE statements. (Bug#53034)
· Enumeration plugin variables were subject to a type casting error, causing inconsistent results between different platforms. (Bug#42144)
· A PKG install on Solaris put some files in incorrect locations. (Bug#31058)
August 19th, 2010· InnoDB Plugin has been upgraded to version 1.0.11. This version is considered of General Availability (GA) quality.
· In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), generic Linux RPM packages, and any builds produced with the icc compiler. It also does not work for FreeBSD 6 and HP-UX or for Linux on generic ia64.
Bugs fixed:
· Important Change: Replication: The LOAD DATA INFILE statement is now considered unsafe for statement-based replication. When using statement-based logging mode, the statement now produces a warning; when using mixed-format logging, the statement is made using the row-based format. (Bug#34283)
· Partitioning: UPDATE and INSERT statements affecting partitioned tables performed poorly when using row-based replication. (Bug#52517)
· Partitioning: INSERT ON DUPLICATE KEY UPDATE statements performed poorly on tables having many partitions. This was because the handler function for reading a row from a specific index was not optimized in the partitioning handler. (Bug#52455)
· The server could crash on shutdown, if started with --innodb-use-system-malloc=0. (Bug#55581)
· GROUP BY operations used max_sort_length inconsistently. (Bug#55188)
· Building MySQL on Solaris 8 x86 failed when using Sun Studio due to gcc inline assembler code. (Bug#55061)
· In debug builds, an assertion could be raised when the server tried to send an OK packet to the client after having failed to detect errors during processing of the WHERE condition of an UPDATE statement. (Bug#54734)
· The database server could crash when renaming a table that had active transactions. (This issue only affected the database server when built for debugging.) (Bug#54453)
· The server could crash during the recovery phase of startup, if it previously crashed while inserting BLOB or other large columns that use off-page storage into an InnoDB table created with ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT. (Bug#54408)
· For an InnoDB table created with ROW_FORMAT=COMPRESSED or ROW_FORMAT=DYNAMIC, a query using the READ UNCOMMITTED isolation level could cause the server to stop with an assertion error, if BLOB or other large columns that use off-page storage were being inserted at the same time. (Bug#54358)
· A client could supply data in chunks to a prepared statement parameter other than of type TEXT or BLOB using the mysql_stmt_send_long_data() C API function (or COM_STMT_SEND_LONG_DATA command). This led to a crash because other data types are not valid for long data. (Bug#54041)
· mysql_secure_installation did not properly identify local accounts and could incorrectly remove nonlocal root accounts. (Bug#54004)
· Transactions could be incorrectly committed during recovery, rather than rolled back, if the server crashed and was restarted after performing ALTER TABLE...ADD PRIMARY KEY on an InnoDB table, or some other operation that involves copying the entire table. (Bug#53756)
· Portability problems in SHOW STATUS could lead to incorrect results on some platforms. (Bug#53493)
· Builds of MySQL generated a large number of warnings. (Bug#53445)
· With lower_case_table_names set to a nonzero value, searches for table or database names in INFORMATION_SCHEMA tables could produce incorrect results. (Bug#53095)
· The ABI check for MySQL failed to compile with gcc 4.5. (Bug#52514)
· mysql_secure_installation sometimes failed to locate the mysql client. (Bug#52274)
· Reading a ucs2 data file with LOAD DATA INFILE was subject to three problems. 1) Incorrect parsing of the file as ucs2 data, resulting in incorrect length of the parsed string. This is fixed by truncating the invalid trailing bytes (incomplete multibyte characters) when reading from the file. 2) Reads from a proper ucs2 file did not recognize newline characters. This is fixed by first checking whether a byte is a newline (or any other special character) before reading it as a part of a multibyte character. 3) When using user variables to hold column data, the character set of the user variable was set incorrectly to the database charset. This is fixed by setting it to the character set specified in the LOAD DATA INFILE statement, if any. (Bug#51876)
· Searches in INFORMATION_SCHEMA tables for rows matching a nonexistent database produced an error instead of an empty query result. (Bug#49542)
· On FreeBSD, memory mapping for MERGE tables could fail if underlying tables were empty. (Bug#47139)
· The my_like_range_xxx() functions returned badly formed maximum strings for Asian character sets, which caused problems for storage engines. (Bug#45012)
· A debugging assertion could be raised after a write failure to a closed socket. (Bug#42496)
· An assertion failure occurred within yaSSL for very long keys. (Bug#29784)
August 5th, 2010InnoDB Notes:
· InnoDB has been upgraded to version 1.1.1. This version is considered of “early adopter” quality. Section 13.7.12, “InnoDB Storage Engine Change History”, may contain information in addition to those changes reported here.
InnoDB is now the default storage engine, rather than MyISAM, in the regular and enterprise versions of MySQL. This change has the following consequences:
· Existing tables are not affected by this change, only new tables that are created.
· Some of the InnoDB option settings also change, so that the default configuration represents the best practices for InnoDB functionality, reliability, and file management: innodb_file_format=Barracuda rather than Antelope, innodb_strict_mode=ON rather than OFF, and innodb_file_per_table=ON rather than OFF.
· The system tables remain in MyISAM format.
· MyISAM remains the default storage engine for the embedded version of MySQL.
Follow these steps to ensure a smooth transition:
· Familiarize yourself with the new default setting for the InnoDB file-per-table option, which creates a separate .ibd file for each user table. Adapt any backup procedure to include these files. For details, see Section 13.6.2, “Using Per-Table Tablespaces”.
· Test the installation and operation for any applications that you run on the database server, to determine if they use any features specific to MyISAM that cause problems during installation (when the tables are created) or at runtime (when MyISAM-specific features might fail, or reliance on MyISAM settings for performance might become apparent). The InnoDB “strict” mode might also alert you to problems while setting up tables for an application.
· As a preliminary test for individual tables rather than an entire application, you can use the statement ALTER TABLE table_name ENGINE=INNODB; to convert an existing table to use the InnoDB storage engine, and then run compatibility and performance tests.
· Where necessary, add ENGINE=MYISAM clauses to CREATE TABLE statements, for tables that use features specific to MyISAM, such as full-text search.
· Benchmark the most important queries, to check whether you need to make changes to the table indexes.
· Measure the performance of applications under typical load, to check whether you need to change any additional InnoDB configuration settings.
· As a last resort, if a database server is devoted entirely to applications that can only run with MyISAM tables, you could add a default-storage-engine line in the configuration file, or a --default-storage-engine option in the database server startup command, to re-enable MyISAM as the default storage engine for that server. For details about setting the default storage engine, see Section 13.3, “Setting the Storage Engine”.
Functionality added or changed:
· InnoDB stores redo log records in a hash table during recovery. On 64-bit systems, this hash table was 1/8 of the buffer pool size. To reduce memory usage, the dimension of the hash table was reduced to 1/64 of the buffer pool size (or 1/128 on 32-bit systems). (Bug#53122)
· Previously, the innodb_file_format_check system variable served a dual purpose. Setting it at server startup would keep InnoDB from starting if any tables used a more recent file format than supported by the current level of InnoDB. If InnoDB could start, the same system variable was set to the “highest” file format value used by any InnoDB table in the database. Thus, its value could change from the value you specified.
· Now, checking and recording the file format tag are handled using separate variables. innodb_file_format_check can be set to 1 or 0 at server startup to enable or disable whether InnoDB checks the file format tag in the system tablespace. If the tag is checked and is higher than that supported by the current version of InnoDB, an error occurs and InnoDB does not start. If the tag is not higher, InnoDB sets the value of innodb_file_format_max to the file format tag.
· For background information about InnoDB file-format management, see Section 13.7.4, “InnoDB File Format Management”. (Bug#49792, Bug#53654)
· The Rows_examined value in slow query log rows now is nonzero for UPDATE and DELETE statements that modify rows. (Bug#49756)
· The deprecated mysql_fix_privilege_tables script has been removed. (Bug#42589)
· There is a new system variable, skip_name_resolve, that is set from the value of the --skip-name-resolve server option. This provides a way to determine at runtime whether the server uses name resolution for client connections. (Bug#37168)
· Added the SHA2() function, which calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). (Contributed by Bill Karwin) (Bug#13174)
· All numeric operators and functions on integer, floating point and DECIMAL values now throw an “out of range” error (ER_DATA_OUT_OF_RANGE) rather than returning an incorrect value or NULL, when the result is out of the supported range for the corresponding data type. (Bug#8433)
Bugs fixed:
· Performance: Deadlock detection could be a bottleneck in InnoDB processing, if many transactions attempted to update the same row simultaneously. The algorithm has been improved to enhance performance and scalability. (Bug#49047)
· Performance: While looking for the shortest index for a covering index scan, the optimizer did not consider the full row length for a clustered primary key, as in InnoDB. Secondary covering indexes will now be preferred, making full table scans less likely. (Bug#39653)
· Security Fix: The server failed to check the table name argument of a COM_FIELD_LIST command packet for validity and compliance to acceptable table name standards. This could be exploited to bypass almost all forms of checks for privileges and table-level grants by providing a specially crafted table name argument to COM_FIELD_LIST.
· In MySQL 5.0 and above, this permitted an authenticated user with SELECT privileges on one table to obtain the field definitions of any table in all other databases and potentially of other MySQL instances accessible from the server's file system.
· Additionally, for MySQL version 5.1 and above, an authenticated user with DELETE or SELECT privileges on one table could delete or read content from any other table in all databases on this server, and potentially of other MySQL instances accessible from the server's file system. (Bug#53371, CVE-2010-1848)
· Security Fix: The server was susceptible to a buffer-overflow attack due to a failure to perform bounds checking on the table name argument of a COM_FIELD_LIST command packet. By sending long data for the table name, a buffer is overflown, which could be exploited by an authenticated user to inject malicious code. (Bug#53237, CVE-2010-1850)
· Security Fix: Privilege checking for UNINSTALL PLUGIN was incorrect. (Bug#51770, CVE-2010-1621)
· Security Fix: The server could be tricked into reading packets indefinitely if it received a packet larger than the maximum size of one packet. (Bug#50974, CVE-2010-1849)
· Incompatible Change: TRUNCATE TABLE did not take an exclusive lock on a table if truncation was done by deleting all rows in the table. For InnoDB tables, this could break proper isolation because InnoDB ended up aborting some granted locks when truncating a table. Now an exclusive metadata lock is taken before TRUNCATE TABLE can proceed. This guarantees that no other transaction is using the table.
· Incompatible change: Truncation using delete no longer fails if sql_safe_updates is enabled (this was an undocumented side effect). (Bug#42643)
· Incompatible Change: After SET TRANSACTION ISOLATION LEVEL to set the isolation level for the next transaction, the session value of the tx_isolation system variable could appear to change after completion of statements within the transaction to the transaction isolation level. Now the current transaction isolation level is now established at transaction start. If there was a SET TRANSACTION ISOLATION LEVEL statement, the value is taken from it. Otherwise, the session tx_isolation value is used. A change in the session value while a transaction is active is still allowed, but no longer affects the current transaction isolation level. This is an incompatible change. A change in the session isolation level made while there is no active transaction overrides a SET TRANSACTION ISOLATION LEVEL statement, if there was any. (Bug#20837)
· Important Change: Replication: It was possible to set sql_log_bin with session scope inside a transaction or subquery. (Bug#53437)
· Important Change: Replication: When changing binlog_format or binlog_direct_non_transactional_updates, permissions were not checked prior to checking the scope and context of the variable being changed.
· As a result of this fix, an error is no longer reported when—in the context of a transaction or a stored function—you try to set a value for a session variable that is the same as its previous value, or for a variable whose scope is global only. (Bug#51277)
· Important Change: Replication: When invoked, CHANGE MASTER TO and SET GLOBAL sql_slave_skip_counter now cause information to be written to the error log about the slave's state prior to execution of the statement. For CHANGE MASTER TO, this information includes the previous values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and MASTER_LOG_POS. For SET GLOBAL sql_slave_skip_counter, this information includes the previous values of sql_slave_skip_counter, the group relay log name, and the group relay log position. (Bug#43406, Bug#43407)
· Important Change: When using fast ALTER TABLE, different internal ordering of indexes in the MySQL optimizer and the InnoDB storage engine could cause error messages about possibly mixed up .frm files and incorrect index use. (Bug#47622)
· Partitioning: Replication: Attempting to execute LOAD DATA on a partitioned MyISAM table while using statement-based logging mode caused the master to hang or crash. (Bug#51851)
· Partitioning: Replication: The NO_DIR_IN_CREATE server SQL mode was not enforced when defining subpartitions. In certain cases, this could lead to failures on replication slaves. (Bug#42954)
· Partitioning: Rows inserted into a table created using a PARTITION BY LIST COLUMNS option referencing multiple columns could be inserted into the wrong partition. (Bug#52815)
· Partitioning: Partition pruning on RANGE partitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not using MAXVALUE). Now the last partition is not included if the partitioning function value is not within the range. (Bug#51830)
· Partitioning: Attempting to partition a table using a DECIMAL column caused the server to crash; this not supported and is now specifically not permitted. (Bug#51347)
· Partitioning: ALTER TABLE statements that cause table partitions to be renamed or dropped (such as ALTER TABLE ... ADD PARTITION, ALTER TABLE ... DROP PARTITION, and ALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against the INFORMATION_SCHEMA.PARTITIONS table — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that the INFORMATION_SCHEMA database ignored the name lock imposed by the ALTER TABLE statement on the partitions affected. In particular, this led to problems with InnoDB tables, because InnoDB would accept the rename operation, but put it in a background queue, so that subsequent rename operations failed when InnoDB was unable to find the correct partition. Now, INFORMATION_SCHEMA honors name locks imposed by ongoing ALTER TABLE statements that cause partitions to be renamed or dropped. (Bug#50561)
· See also Bug#47343, Bug#45808.
· Partitioning: The insert_id server system variable was not reset following an insert that failed on a partitioned MyISAM table having an AUTO_INCREMENT column. (Bug#50392)
· Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible via an ALTER TABLE statement to set a foreign key on a partitioned table; it was also possible to partition a table with a single foreign key. (Bug#50104)
· Partitioning: When attempting to perform DDL on a partitioned table and the table's .par file could not be found, the server returned the inaccurate error message Out of memory; restart server and try again (needed 2 bytes). Now in such cases, the server returns the error Failed to initialize partitions from .par file. (Bug#49161)
· Partitioning: GROUP BY queries performed poorly for some partitioned tables. This was due to the block size not being set for partitioned tables, thus the keys per block was not correct, which could cause such queries to be optimized incorrectly. (Bug#48229)
· See also Bug#37252.
· Partitioning: REPAIR TABLE failed for partitioned ARCHIVE tables. (Bug#46565)
· Replication: When using unique keys on NULL columns in row-based replication, the slave sometimes chose the wrong row when performing an update. This happened because a table having a unique key on such a column could have multiple rows containing NULL for the column used by the unique key, and the slave merely picked the first row containing NULL in that column. (Bug#53893)
· Replication: When a CREATE TEMPORARY TABLE ... SELECT statement was executed within a transaction that updated only transactional engines and was later rolled back (for example, due to a deadlock) the changes—including the creation of the temporary table—were not written to the binary log, which caused subsequent updates to this table to fail on the slave. (Bug#53421)
· Replication: When using the statement-based logging format, statements that used CONNECTION_ID() were always kept in the transaction cache; consequently, nontransactional changes that should have been flushed before the transaction were kept in the transaction cache. (Bug#53075)
· This regression was introduced by Bug#51894.
· Replication: In some cases, attempting to update a column with a value of an incompatible type resulted in a mismatch between master and slave because the column value was set to its implicit default value on the master (as expected), but the same column on the slave was set to NULL. (Bug#52868)
· Replication: ACK packets in semisynchronous replication were not checked for length and malformed packets could cause a server crash. (Bug#52748)
· Replication: When temporary tables were in use, switching the binary logging format from STATEMENT to ROW did not take effect until all temporary tables were dropped. (The existence of temporary tables should prevent switching the format only from ROW to STATEMENT from taking effect, not the reverse.) (Bug#52616)
· Replication: A buffer overrun in the handling of DATE column values could cause mysqlbinlog to fail when reading back logs containing certain combinations of DML on a table having a DATE column followed by dropping the table. (Bug#52202)
· Replication: The failure of a REVOKE statement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. (Bug#51987)
· Replication: Issuing any DML on a temporary table temp followed by DROP TEMPORARY TABLE temp, both within the same transaction, caused replication to fail.
The fix introduces a change to statement-based binary logging with respect to temporary tables. Within a transaction, changes to temporary tables are saved to the transaction cache and written to the binary log when the transaction commits. Otherwise, out-of-order logging of events could occur. This means that temporary tables are treated similar to transactional tables for purposes of caching and logging. This affects assessment of statements as safe or unsafe and the associated error message was changed from:
· Unsafe statement written to the binary log using statement format
· since BINLOG_FORMAT = STATEMENT. Statements that read from both
· transactional and non-transactional tables and write to any of them
· are unsafe.
To:
· Unsafe statement written to the binary log using statement format
· since BINLOG_FORMAT = STATEMENT. Statements that read from both
· transactional (or a temporary table of any engine type) and
· non-transactional tables and write to any of them are unsafe.
· (Bug#51894)
· See also Bug#51291, Bug#53075.
· This regression was introduced by Bug#46364.
· Replication: The flag stating whether a user value was signed or unsigned (unsigned_flag) could sometimes change between the time that the user value was recorded for logging purposes and the time that the value was actually written to the binary log, which could lead to inconsistency. Now unsigned_flag is copied when the user variable value is copied, and the copy of unsigned_flag is then used for logging. (Bug#51426)
· See also Bug#49562.
Replication: Enabling binlog_direct_non_transactional_updates causes nontransactional changes to be written to the binary log upon committing the statement. However, even when not enabled, the addition of this variable introduced a number of undesired changes in behavior:
· When using ROW or MIXED logging mode: Nontransactional changes executed within a transaction prior to any transactional changes were written to the statement cache, but those following any transactional changes were written to the transactional cache instead, causing these (later) nontransactional changes to be lost.
· When using ROW or MIXED logging mode: When rolling back a transaction, any nontransactional changes that might be in the transaction cache were disregarded and truncated along with the transactional changes.
· When using STATEMENT logging mode: A statement that combined transactional and nontransactional changes prior to any other transactional changes within the transaction, but failed, was kept in the transactional cache until the transaction ended, rather than being written to the binary log at the instant of failure (and not deferred to the end of the transaction).
These problems have been handled as follows:
· The setting for binlog_direct_non_transactional_updates no longer has any effect when the value of binlog_format is either ROW or MIXED. This addresses the first two issues previously listed.
· When using statement-based logging with binlog_direct_non_transactional_updates set to ON, any statement combining transactional and nontransactional changes within the same transaction is now stored in the transaction cache, whether it succeeds or not, and regardless of its order of execution among any transactional statements within that transaction. This means that such a statement is now written to the binary log only on transaction commit or rollback.
· (Bug#51291)
· This regression was introduced by Bug#46364.
· Replication: TRUNCATE TABLE performed on a temporary table using the InnoDB storage engine was logged even when using row-based mode. (Bug#51251)
· Replication: When using temporary tables the binary log needs to insert a pseudo-thread ID for threads that are using temporary tables, each time a switch happens between two threads, both of which are using temporary tables. However, if a thread issued a failing statement before exit, its ID was not recorded in the binary log, and this in turn caused the ID for the next thread that tried to do something with a temporary table not to be logged as well. Subsequent replays of the binary log failed with the error Table ... doesn't exist. (Bug#51226)
· Replication: If the master was using sql_mode='TRADITIONAL', duplicate key errors were not sent to the slave, which received 0 rather than the expected error code. This caused replication to fail even when such an error was expected. (Bug#51055)
· Replication: DDL statements that lock tables (such as ALTER TABLE, CREATE INDEX, and CREATE TRIGGER) caused spurious ER_BINLOG_ROW_MODE_AND_STMT_ENGINE or ER_BINLOG_STMT_MODE_AND_ROW_ENGINE errors, even though they did not insert rows into any tables.
· Note
· The error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE is generated when binlog_format=ROW and a statement modifies a table restricted to statement-based logging; ER_BINLOG_STMT_MODE_AND_ROW_ENGINE is generated when binlog_format=STATEMENT and a statement modifies a table restricted to row-based logging.
· (Bug#50479)
· This regression was introduced by Bug#39934.
· Replication: When run with the --database option, mysqlbinlog printed ROLLBACK statements but did not print any corresponding SAVEPOINT statements. (Bug#50407)
· Replication: When a CREATE EVENT statement was followed by an additional statement and the statements were executed together as a single statement, the CREATE EVENT statement was padded with “garbage” characters when written to the binary log, which led to a syntax error when trying to read back from the log. (Bug#50095)
· Replication: When using a non-transactional table on the master with autocommit disabled, no COMMIT was recorded in the binary log following a statement affecting this table. If the slave's copy of the table used a transactional storage engine, the result on the slave was as though a transaction had been started, but never completed. (Bug#49522)
· See also Bug#29288.
· Replication: Reading from a table that used a self-logging storage engine and updating a table that used a transactional engine (such as InnoDB) generated changes that were written to the binary log using statement format which could make slaves diverge. However, when using mixed logging format, such changes should be written to the binary log using row format. (This issue did not occur when reading from tables using a self-logging engine and updating MyISAM tables, as this was already handled by checking for combinations of non-transactional and transactional engines.) Now such statements are classified as unsafe, and in mixed mode, cause a switch to row-based logging. (Bug#49019)
· The make_binary_distribution target to make could fail on some platforms because the lines generated were too long for the shell. (Bug#54590)
· The server could crash during shutdown, if started with the option --innodb_use_sys_malloc=0. (Bug#54453)
· Inconsistent checking of the relationship between SHOW statements and INFORMATION_SCHEMA queries caused such queries to fail sometimes. (Bug#54422)
· A crash occurred if a table that was locked with LOCK TABLES was listed twice in a DROP TABLE statement. (Bug#54282)
· ALTER TABLE for views is not legal but did not produce an error. (If you need to rename a view, use RENAME TABLE.) (Bug#53976)
· The server could crash with a message InnoDB: Assertion failure in thread nnnn, typically during shutdown on a Windows system. (Bug#53947)
· Valgrind warnings resulting from passing incomplete DATETIME values to the TIMESTAMP() function were corrected. (Bug#53942)
· Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908, Bug#53912)
· The definition of the MY_INIT macro in my_sys.h included an extraneous semicolon, which could cause compilation failure. (Bug#53906)
· Queries that used MIN() or MAX() on indexed columns could be optimized incorrectly. (Bug#53859)
· UPDATE on an InnoDB table modifying the same index that was used to satisfy the WHERE condition could trigger a debug assertion under some circumstances. (Bug#53830)
· MySQL incorrectly processed ALTER DATABASE `#mysql50#` UPGRADE DATA DIRECTORY NAME where was ., .., or a sequence starting with ./ or ../. It used the server data directory (that contains other regular databases) as the database directory. (Bug#53804, CVE-2010-2008)
· OPTIMIZE TABLE could be run on a table in use by a transaction in a different session, causing repeatable read to break. (Bug#53798)
· Some combinations of SELECT and SELECT FOR UPDATE statements could fail with errors about locks, or incorrectly release a row lock during a semi-consistent read operation. (Bug#53674)
· InnoDB mistakenly considered the sequence /*/ to be an open/close comment sequence. (Bug#53644)
· InnoDB crashed when replacing duplicates in a table after a fast ALTER TABLE added a unique index. (Bug#53592)
· For InnoDB tables, the error handler for a fast CREATE INDEX did not reset the error state of the transaction before attempting to undo a failed operation, resulting in a crash. (Bug#53591)
· For single-table DELETE statements that used quick select and index scan simultaneously caused a server crash or assertion failure. (Bug#53450)
· Certain path names passed to LOAD_FILE() could cause a server crash. (Bug#53417)
· If the completion_type session variable was changed after a stored procedure or prepared statement had been cached, the change had no effect on subsequent executions of the procedure or statement. (Bug#53346)
· The AND CHAIN option for COMMIT and ROLLBACK failed to preserve the current transaction isolation level. Setting completion_type to 1 also failed to do so. (Bug#53343)
· Incorrect results could be returned for LEFT JOIN of InnoDB tables with an impossible WHERE condition. (Bug#53334)
· Adding a unique key on multiple columns, where one of the columns is null, could mistakenly report duplicate key errors. (Bug#53290)
· When reporting a foreign key constraint violation during INSERT, InnoDB could display uninitialized data for the DB_TRX_ID and DB_ROLL_PTR system columns. (Bug#53202)
· The Lock_time value in the slow query log was negative for stored routines. (Bug#53191)
· Setting the innodb_change_buffering system variable to DEFAULT produced an incorrect result. (Bug#53165)
· mysqldump and SELECT ... INTO OUTFILE truncated long BLOB and TEXT values to 766 bytes. (Bug#53088)
· The values of innodb_buffer_pool_pages_total and innodb_buffer_pool_pages_misc in the information_schema.global_status table could be computed incorrectly. (Bug#52983)
· InnoDB page splitting could enter an infinite loop for compressed tables. (Bug#52964)
· On some systems, such as Mac OS X, the sockaddr_in and sockaddr_in6 structures contain a non-standard field (sin_len / sin6_len) that must be set but was not. This resulted in hostname lookup failure. (Bug#52923)
· In the debug version of the server, the FreeState() function could in some circumstances be called twice, leading to an assertion failure. (Bug#52884)
· Concurrent SHOW COLUMNS statements could cause a server crash. (Bug#52856)
· With a non-latin1 ASCII-based current character set, the server inappropriately converted DATETIME values to strings. This resulted in the optimizer not using indexes on such columns. (Bug#52849)
· An overly strict assertion could fail during the purge of delete-marked records in DYNAMIC or COMPRESSED InnoDB tables that contain column prefix indexes. (Bug#52746)
· InnoDB attempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, in DYNAMIC and COMPRESSED formats, InnoDB stores locally any non-BLOB columns having a maximum length not exceeding 256 bytes. This is because there is no room for the “external storage” flag when the maximum length is 255 bytes or less. This restriction trivially holds in REDUNDANT and COMPACT formats, because there InnoDB always stores locally columns having a length up to local_len = 788 bytes. (Bug#52745)
· mysqld_safe set plugin_dir using a default path name rather than a path depending on basedir. (Bug#52737)
· Semi-consistent read was implemented for InnoDB to address Bug#3300. Semi-consistent reads do not block when a nonmatching record is already locked by some other transaction. If the record is not locked, a lock is acquired, but is released if the record does not match the WHERE condition. However, semi-consistent read was attempted even for UPDATE statements having a WHERE condition of the form pk_col1=constant1, ..., pk_colN=constantN. Some code that was designed with the assumption that semi-consistent read would be only attempted on table scans, failed. (Bug#52663)
· Setting @@GLOBAL.debug to an empty string failed to clear the current debug settings. (Bug#52629)
· SHOW CREATE TABLE was blocked if the table was write locked by another session. (Bug#52593)
· The length and max_length metadata values were incorrect for columns with the TEXT family of data types that used multibyte character sets This bug was introduced in MySQL 5.5.3. (Bug#52520)
· mysql_upgrade attempted to work with stored routines before they were available. (Bug#52444)
· The check_table_is_closed() debugging function did not protect access to the MyISAM open tables list, with the result that server crashes could occur during table drop or rename operations. (Bug#52432)
· Spurious duplicate-key errors occurred for multiple-column indexes on columns with the BINARY data type. (Bug#52430)
· EXPLAIN EXTENDED crashed trying to resolve references to freed temporary table columns for GROUP_CONCAT() ORDER BY arguments. (Bug#52397)
· Two sessions trying to set the global event_scheduler system variable to OFF resulted in one of them hanging waiting for the event scheduler to stop. (Bug#52367)
· There was a race condition between flags used for signaling that a query was killed, which led to error-reporting and lock-acquisition problems. (Bug#52356)
· For a concurrent load of 16 or more connections containing many LOCK TABLES WRITE statements for the same table, server throughput was significantly lower for MySQL 5.5.3 and 5.5.4 than for earlier versions (10%–40% lower depending on concurrency). (Bug#52289)
· Operations on geometry data types failed on some systems for builds compiled with Sun Studio. (Bug#52208)
· The optimizer could attempt to evaluate the WHERE clause before any rows had been read, resulting in a server crash. (Bug#52177)
· Cast operations on NULL DECIMAL values could cause server crashes or Valgrind warnings. (Bug#52168)
· An assertion was raised as a result of a NULL string being passed to the dtoa code. (Bug#52165)
· A memory leak occurred due to missing deallocation of the comparators array (a member of the Arg_comparator class). (Bug#52124)
· For debug builds, creating a view containing a subquery that might require collation adjustment caused an assertion to be raised. For example, this could occur if some items had different collations but the result collation could be adjusted to the one of them. (Bug#52120)
· Aggregate functions could incorrectly return NULL in outer join queries. (Bug#52051)
· For outer joins, the optimizer could fail to properly calculate table dependencies. (Bug#52005)
· A COUNT(DISTINCT) query on a view could cause a server crash. (Bug#51980)
· For LDML-defined collations, some data structures were not initialized properly to enable UPPER() and LOWER() to work correctly. (Bug#51976)
· Connections waiting for an InnoDB row lock ignored KILL until the row lock wait ended. Now, KILL during lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. The corresponding transaction is rolled back. (Bug#51920)
· On Windows, LOAD_FILE() could cause a crash for some pathnames. (Bug#51893)
· Invalid memory reads occurred for HANDLER ... READ NEXT after a failed HANDLER ... READ FIRST. (Bug#51877)
· After TRUNCATE TABLE of a MyISAM table, subsequent queries could crash the server if myisam_use_mmap was enabled. (Bug#51868)
· If myisam_sort_buffer_size was set to a small value, table repair for MyISAM tables with FULLTEXT indexes could crash the server. (Bug#51866)
· Stored routine DDL statements were written to the binary log using statement-based format regardless of the current logging format. (Bug#51839)
· A problem with equality propagation optimization for prepared statements and stored procedures caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#51650)
· See also Bug#8115, Bug#8849.
· The optimizer performed an incorrect join type when COALESCE() appeared within an IN() operation. (Bug#51598)
· Locking involving the LOCK_plugin, LOCK_global_system_variables, and LOCK_status mutexes could deadlock. (Bug#51591)
· Executing a LOAD XML INFILE statement could sometimes lead to a crash of the MySQL Server. (Bug#51571)
· The server crashed when the optimizer attempted to determine constant tables but a table storage engine did not support exact record count. (Bug#51494)
· The server could crash populating the INFORMATION_SCHEMA.PROCESSLIST table due to lack of mutex protection. (Bug#51377)
· Use of HANDLER statements with tables that had spatial indexes caused a server crash. (Bug#51357)
· With an XA transaction active, SET autocommit = 1 could cause side effects such as memory corruption or a server crash. (Bug#51342)
· Corrupt MyISAM tables were automatically repaired even when myisam_recover_options was set to OFF. (Bug#51327)
· Following a bulk insert into a MyISAM table, if MyISAM failed to build indexes using repair by sort, data file corruption could occur. (Bug#51307)
· CHECKSUM TABLE could compute the checksum for BIT columns incorrectly. (Bug#51304)
· ALTER TABLE on InnoDB tables (including partitioned tables) acquired exclusive locks on rows of the table being altered. If there was a concurrent transaction that did locking reads from this table, this sometimes led to a deadlock that was not detected by the metadata lock subsystem or by InnoDB (and was reported only after exceeding innodb_lock_wait_timeout). (Bug#51263)
· A HAVING clause on a joined table in some cases failed to eliminate rows which should have been excluded from the result set. (Bug#51242)
· Two sessions trying to set the global event_scheduler system variable to different values could deadlock. (Bug#51160)
· InnoDB fast index creation could incorrectly use a table copy in some cases. (Bug#50946)
· The Loose Index Scan optimization method assumed that it could depend on the partitioning engine to maintain interval endpoint information, as if it were a storage engine. (Bug#50939)
· The type inference used for view columns caused some columns in views to be handled as the wrong type, as compared to the same columns in base tables. DATE columns in base tables were treated as TIME columns in views, and base table TIME columns as view DATETIME columns. (Bug#50918)
· A syntactically invalid trigger could cause the server to crash when trying to list triggers. (Bug#50755)
· Previously, the server held a global mutex while performing file operations such as deleting an .frm or data file, or reading table metadata from an .frm file or index statistics from a data file. Now the mutex is not held for these operations. Instead, the server uses metadata locks. (Bug#50589, Bug#51557, Bug#49463)
· User-defined variables of type REAL that contained NULL were handled improperly when assigned to a column of another type. (Bug#50511)
· InnoDB checks to see whether a row could possibly exceed the maximum size if all columns are fully used. This produced Row size too large errors for some tables that could be created with the built-in InnoDB from older MySQL versions. Now the check is only done when innodb_strict_mode is enabled or if the table is dynamic or compressed. (Bug#50495)
· Setting --secure-file-priv to the empty string left the value unaffected. (Bug#50373)
· Calculation of intervals for Event Scheduler events was not portable. (Bug#50087)
· The YEAR values 2000 and 0000 could be treated as equal. (Bug#49910)
· Performing a single in-place ALTER TABLE containing ADD INDEX and DROP INDEX options that used the same index name could result in a corrupt table definition file. Now such ALTER TABLE statements are no longer performed in place. (Bug#49838)
· mysql_upgrade did not detect when CSV log tables incorrectly contained columns that could be NULL. Now these columns are altered to be NOT NULL. (Bug#49823)
· Selecting from INFORMATION_SCHEMA.ROUTINES or INFORMATION_SCHEMA.PARAMETERS resulted in a memory leak. (Bug#48729)
· In MySQL 5.1, READ COMMITTED was changed to use less locking due to the availability of row based binary logging (see the Note under READ COMMITTED at Section 12.3.6, “SET TRANSACTION Syntax”). However, READ UNCOMMITTED did not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so that READ UNCOMMITTED now also uses the lesser amount of locking and has the same restrictions for binary logging. (Bug#48607)
· On Intel x86 machines, the optimizer could choose different execution plans for a query depending on the compiler version and optimization flags used to build the server binary. (Bug#48537)
· A trigger could change the behavior of assigning NULL to a NOT NULL column. (Bug#48525)
· The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic ON clauses such as the ones containing the RAND() function, a user-defined function, or a NOT DETERMINISTIC stored function. (Bug#48483)
· EXPLAIN could cause a server crash for some queries with subqueries. (Bug#48419)
· The MERGE engine failed to open a child table from a different database if the child table or database name contained characters that were the subject of table name to filename encoding.
· Further, the MERGE engine did not properly open a child table from the same database if the child table name contained characters such as '/', '#'. (Bug#48265)
· On Windows, the server failed to find a description for Event ID 100. (Bug#48042)
· Multi-statement execution could fail with an error about foreign key constraints. This problem could affect calls to mysql_query() and mysql_real_query(), and CALL statements that invoke stored procedures. (Bug#48024)
A query that read from a derived table (of the form SELECT ... FROM (SELECT ...)) produced incorrect results when the following conditions were present:
· The table subquery contained a derived query ((SELECT ... ) AS column).
· The derived query could potentially produce zero rows or a single NULL (that is, no rows matched, or the query used an aggregate function such as SUM() running over zero rows).
· The table subquery joined at least two tables.
· The join condition involved an index.
· (Bug#47904)
· The optimization to read MIN() or MAX() values from an index did not properly handle comparisons with NULL values. This could produce incorrect results for MIN() or MAX()when the WHERE clause tested a NOT NULL column for NULL. (Bug#47762)
· Killing a query during the optimization phase of a subquery could cause a server crash. (Bug#47761)
· 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)
· The query shown by EXPLAIN EXTENDED plus SHOW WARNINGS could produce results different from the original query. (Bug#47669)
· MyISAM could write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug#47598)
· OPTIMIZE TABLE for an InnoDB table could raise an assertion if another session issued a concurrent DROP TABLE. (Bug#47459)
· For updates to InnoDB tables, TIMESTAMP columns could be updated even when no values actually changed. (Bug#47453)
· Setting myisam_repair_threads larger than 1 could result in the cardinality for all indexes of a MyISAM table being set to 1 after parallel index repair. (Bug#47444)
· mysqld_safe did not always pass --open-files-limit through to mysqld. mysqld_safe did not treat dashes and underscores as equivalent in option names. (Bug#47095)
For events of MYSQL_AUDIT_GENERAL_CLASS, the event subclass was not passed to audit plugins even though the server passed the subclass to the plugin handler. The subclass is now available through the following changes:
· The struct mysql_event_general structure has a new event_subclass member.
· The new member changes the interface, so the audit plugin interface version, MYSQL_AUDIT_INTERFACE_VERSION, has been incremented from 0x0100 to 0x0200. Plugins that require access to the new member must be recompiled to use version 0x0200 or higher.
· The example plugin in the plugin/audit_null directory has been modified to count events of each subclass, based on the event_subclass value. See Section 22.2.5.2, “Writing Audit Plugins”. (Bug#47059)
· When the transaction isolation level was REPEATABLE READ and binary logging used statement or mixed format, SELECT statements with subqueries referencing InnoDB tables unnecessarily acquired shared locks on rows in these tables. (Bug#46947)
· In debug builds, if the listed columns in the view definition of the table used in an INSERT ... SELECT statement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug#46615)
· For the COMMIT and ROLLBACK statements, the AND CHAIN and RELEASE modifiers should be mutually exclusive, but the parser allowed both to be specified. (Bug#46527)
· If the server is started with --skip-grant-tables, plugin loading and unloading should be prohibited, but the server failed to reject INSTALL PLUGIN and UNINSTALL PLUGIN statements. (Bug#46261)
· gcc 4.4.0 could fail to compile dtoa.c. (Bug#45882)
· ALTER TABLE ... ADD COLUMN for a table with multiple foreign keys caused a server crash. (Bug#45052)
· A mismatch between index information maintained within the .frm files and the corresponding information in the InnoDB system tablespace could produce this error: [ERROR] Index index of table has n columns unique inside InnoDB, but MySQL is asking statistics for m columns. Have you mixed up .frm files from different installations? (Bug#44571)
· Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) that generated multiple result sets (such as a stored procedure or a multi-statement command) left the connection unusable. (Bug#42373)
· The server could crash with an out of memory error when trying to parse a query that was too long to fit in memory. Now the parser rejects such queries with an ER_OUT_OF_RESOURCES error. (Bug#42064)
· InnoDB could fail to create a unique index on NULL columns. (Bug#41904)
· For a query that selected from a view and used an alias for the view, the metadata used the alias name rather than the view name in the MYSQL_FIELD.table member. (Bug#41788)
· mysql_upgrade did not create temporary files properly. (Bug#41057)
· It was possible for DROP TABLE of one MyISAM table to remove the data and index files of a different MyISAM table. (Bug#40980)
· If the arguments to a CONCAT() call included a local routine variable, selecting the return value into a user variable could produce an incorrect result. (Bug#40625)
· Column names displayed from the PARTITION_EXPRESSION column of the INFORMATION_SCHEMA.PARTITIONS table did not include escape characters as necessary. (Bug#39338)
· When SET TRANSACTION ISOLATION LEVEL was used to set the isolation level for the next transaction, the level could persist for subsequent transactions. (Bug#39170)
· When using UNINSTALL PLUGIN to remove a loaded plugin, open tables and connections caused mysqld to hang until the open connections had been closed. (Bug#39053)
· Valgrind warnings in the InnoDB compare_record() function were corrected. (Bug#38999)
· The optimizer sometimes used filesort for ORDER BY when it should have used an index. (Bug#38745)
· Setting the session value of the debug system variable also set the global value. (Bug#38054)
· Accessing a MERGE table with an empty underlying table list incorrectly resulted in a “wrong index” error message rather than “end of file.” (Bug#35274)
· The test for readline during configuration failed when trying to build MySQL in a directory other than the source tree root. (Bug#35250)
· mysqld could fail during execution when using SSL. (Bug#34236)
A query on a FEDERATED table in which the data was ordered by a TEXT column returned incorrect results. For example, a query such as the following would result in incorrect results if column column1 was a TEXT column:
· SELECT * FROM table1 ORDER BY column1;
· (Bug#32426)
· MySQL Makefiles relied on GNU extensions. (Bug#30708)
· The parser allocated too much memory for a query containing multiple statements. (Bug#27863)
· The behavior of the RPM installation for both new installations and upgrade installations has changed.
· During a new installation, the server boot scripts are installed, but the MySQL server is not started at the end of the installation, since the status of the system during an unattended installation is not known.
· During an upgrade installation using the RPM packages, if the server is running when the upgrade occurs, the server is stopped, the upgrade occurs, and server is restarted. If the server is not already running when the RPM upgrade occurs, the server is not started at the end of the installation.
· The boot scripts for MySQL are installed in the appropriate directories in /etc, so the MySQL server will be restarted automatically at the next machine reboot. (Bug#27072)
ROW_COUNT() returned a meaningful value only for some DML statements. Now it returns a value as follows:
· DDL statements: 0. This applies to statements such as CREATE TABLE or DROP TABLE.
· DML statements other than SELECT: The number of affected rows. This applies to statements such as UPDATE, INSERT, or DELETE (as before), but now also to statements such as ALTER TABLE and LOAD DATA INFILE.
· SELECT: -1 if the statement returns a result set, or the number of rows “affected” if it does not. For example, for SELECT * FROM t1, ROW_COUNT() returns -1. For SELECT * FROM t1 INTO OUTFILE 'file_name', ROW_COUNT() returns the number of rows written to the file.
· SIGNAL statements: 0.
July 26th, 2010InnoDB Notes:
· InnoDB Plugin has been upgraded to version 1.0.10. This version is considered of General Availability (GA) quality.
· 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 generic ia64.
Bugs fixed:
· Replication: When using unique keys on NULL columns in row-based replication, the slave sometimes chose the wrong row when performing an update. This happened because a table having a unique key on such a column could have multiple rows containing NULL for the column used by the unique key, and the slave merely picked the first row containing NULL in that column. (Bug#53893)
· Replication: FLUSH LOGS could in some circumstances crash the server. This occurred because the I/O thread could concurrently access the relay log I/O cache while another thread was performing the FLUSH LOGS, which closes and reopens the relay log and, while doing so, initializes (or re-initializes) its I/O cache. This could cause problems if some other thread (in this case, the I/O thread) is accessing it at the same time.
· Now the thread performing the FLUSH LOGS takes a lock on the relay log before actually flushing it. (Bug#53657)
· See also Bug#50364.
Replication: Two related issues involving temporary tables and transactions were introduced by a fix made in MySQL 5.1.37:
· When a temporary table was created or dropped within a transaction, any failed statement that following the CREATE TEMPORARY TABLE or DROP TEMPORARY TABLE statement triggered a rollback, which caused the slave diverge from the master.
· When a CREATE TEMPORARY TABLE ... SELECT * FROM ... statement was executed within a transaction in which only tables using transactional storage engines were used and the transaction was rolled back at the end, the changes—including the creation of the temporary table—were not written to the binary log.
· The current fix restores the correct behavior in both of these cases. (Bug#53560)
· This regression was introduced by Bug#43929.
· Replication: When CURRENT_USER() or CURRENT_USER was used to supply the name and host of the affected user or of the definer in any of the statements DROP USER, RENAME USER, GRANT, REVOKE, and ALTER EVENT, the reference to CURRENT_USER() or CURRENT_USER was not expanded when written to the binary log. This resulted in CURRENT_USER() or CURRENT_USER being expanded to the user and host of the slave SQL thread on the slave, thus breaking replication. Now CURRENT_USER() and CURRENT_USER are expanded prior to being written to the binary log in such cases, so that the correct user and host are referenced on both the master and the slave. (Bug#48321)
· An ALTER TABLE statement could convert an InnoDB compressed table (with row_format=compressed) back to an uncompressed table (with row_format=compact). (Bug#54679)
· A signal-handler redefinition for SIGUSR1 was removed. The redefinition could cause the server to encounter a kernel deadlock on Solaris when there are many active threads. Other POSIX platforms might also be affected. (Bug#54667)
· InnoDB could issue an incorrect message on startup, if tables were created under the setting innodb_file_per_table=ON and the server was restarted under the setting innodb_file_per_table=OFF. The message was of the form InnoDB: Warning: allocated tablespace n, old maximum was 0. (Bug#54658)
· The make_binary_distribution target to make could fail on some platforms because the lines generated were too long for the shell. (Bug#54590)
· The server failed to disregard sort order for some zero-length tuples, leading to an assertion failure. (Bug#54459)
· The default value of myisam_max_extra_sort_file_size could be higher than the maximum accepted value, leading to warnings upon the server start. (Bug#54457)
· If a session tried to drop a database containing a table opened with HANDLER in another session, any DATABASE statement (CREATE, DROP, ALTER) executed by that session produced a deadlock. (Bug#54360)
· Fast index creation could fail, leaving the new secondary index corrupted. (Bug#54330)
· A client could supply data in chunks to a prepared statement parameter other than of type TEXT or BLOB using the mysql_stmt_send_long_data() C API function (or COM_STMT_SEND_LONG_DATA command). This led to a crash because other data types are not valid for long data. (Bug#54041)
· Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908, Bug#53912)
· The definition of the MY_INIT macro in my_sys.h included an extraneous semicolon, which could cause compilation failure. (Bug#53906)
· A client with automatic reconnection enabled saw the error message Lost connection to MySQL server during query if the connection was lost between the mysql_stmt_prepare() and mysql_stmt_execute() C API functions. However, mysql_stmt_errno() returned 0, not the corresponding error number 2013. (Bug#53899)
· Queries that used MIN() or MAX() on indexed columns could be optimized incorrectly. (Bug#53859)
· The Lock_time value in the slow query log was negative for stored routines. (Bug#53191)
· The results of some ORDER BY ... DESC queries were sorted incorrectly. (Bug#51431)
· Index Merge between three indexes could return incorrect results. (Bug#50389)
· Performing large numbers of RENAME TABLE statements caused excessive memory use. (Bug#47991)
· The server could crash with an out of memory error when trying to parse a query that was too long to fit in memory. Now the parser rejects such queries with an ER_OUT_OF_RESOURCES error. (Bug#42064)
· Sort-index_merge for join tables other than the first table used excessive memory. (Bug#41660)
· Valgrind warnings in the InnoDB compare_record() function were corrected. (Bug#38999)
· mysqld could fail during execution when using SSL. (Bug#34236)
· The behavior of the RPM upgrade installation has changed. During an upgrade installation using the RPM packages, if the MySQL server is running when the upgrade occurs, the server is stopped, the upgrade occurs, and server is restarted. If the server is not already running when the RPM upgrade occurs, the server is not started at the end of the upgrade. The boot scripts for MySQL are installed in the appropriate directories in /etc, so the MySQL server will be restarted automatically at the next machine reboot.
June 17th, 2010Functionality added or changed:
· The Rows_examined value in slow query log rows now is nonzero for UPDATE and DELETE statements that modify rows. (Bug#49756)
Bugs fixed:
· Important Change: Replication: MyISAM transactions replicated to a transactional slave left the slave in an unstable condition. This was due to the fact that, when replicating from a nontransactional storage engine to a transactional engine with autocommit turned off, no BEGIN and COMMIT statements were written to the binary log; thus, on the slave, a never-ending transaction was started.
· The fix for this issue includes enforcing autocommit mode on the slave by replicating all autocommit=1 statements from the master. (Bug#29288)
· Partitioning: ALTER TABLE statements that cause table partitions to be renamed or dropped (such as ALTER TABLE ... ADD PARTITION, ALTER TABLE ... DROP PARTITION, and ALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against the INFORMATION_SCHEMA.PARTITIONS table — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that the INFORMATION_SCHEMA database ignored the name lock imposed by the ALTER TABLE statement on the partitions affected. In particular, this led to problems with InnoDB tables, because InnoDB would accept the rename operation, but put it in a background queue, so that subsequent rename operations failed when InnoDB was unable to find the correct partition. Now, INFORMATION_SCHEMA honors name locks imposed by ongoing ALTER TABLE statements that cause partitions to be renamed or dropped. (Bug#50561)
· See also Bug#47343, Bug#45808.
· Partitioning: It was possible to execute a CREATE TEMPORARY TABLE tmp LIKE pt statement, where pt is a partitioned table, even though partitioned temporary tables are not permitted, which caused the server to crash. Now a check is performed to prevent such statements from being executed. (Bug#49477)
· Partitioning: When attempting to perform DDL on a partitioned table and the table's .par file could not be found, the server returned the inaccurate error message Out of memory; restart server and try again (needed 2 bytes). Now in such cases, the server returns the error Failed to initialize partitions from .par file. (Bug#49161)
· Replication: In some cases, attempting to update a column with a value of an incompatible type resulted in a mismatch between master and slave because the column value was set to its implicit default value on the master (as expected), but the same column on the slave was set to NULL. (Bug#52868)
· Replication: When using a non-transactional table on the master with autocommit disabled, no COMMIT was recorded in the binary log following a statement affecting this table. If the slave's copy of the table used a transactional storage engine, the result on the slave was as though a transaction had been started, but never completed. (Bug#49522)
· See also Bug#29288.
· Replication: Reading from a table that used a self-logging storage engine and updating a table that used a transactional engine (such as InnoDB) generated changes that were written to the binary log using statement format which could make slaves diverge. However, when using mixed logging format, such changes should be written to the binary log using row format. (This issue did not occur when reading from tables using a self-logging engine and updating MyISAM tables, as this was already handled by checking for combinations of non-transactional and transactional engines.) Now such statements are classified as unsafe, and in mixed mode, cause a switch to row-based logging. (Bug#49019)
· Valgrind warnings resulting from passing incomplete DATETIME values to the TIMESTAMP() function were corrected. (Bug#53942)
· Builds of the embedded mysqld would fail due to a missing element of the struct NET. (Bug#53908)
· UPDATE on an InnoDB table modifying the same index that was used to satisfy the WHERE condition could trigger a debug assertion under some circumstances. (Bug#53830)
· For single-table DELETE statements that used quick select and index scan simultaneously caused a server crash or assertion failure. (Bug#53450)
· Incorrect results could be returned for LEFT JOIN of InnoDB tables with an impossible WHERE condition. (Bug#53334)
· Fixed a checksum error reported for compressed tables when the --innodb_checksums option is enabled. (Bug#53248)
· Corrected the handling of the setting innodb_change_buffering=default. (The appropriate default value is different between MySQL 5.1 and 5.5.) (Bug#53165)
· mysqldump and SELECT ... INTO OUTFILE truncated long BLOB and TEXT values to 766 bytes. (Bug#53088)
· DBUG code could in some cirsumstances call FreeState() twice, leading to a server crash or failure. (Bug#52884)
· Aggregate functions could incorrectly return NULL in outer join queries. (Bug#52051)
· The Loose Index Scan optimization method assumed that it could on the storage engine to maintain interval endpoint information, which was not true for the partitioning engine. (Bug#50939)
· Calculation of intervals for Event Scheduler events was not portable. (Bug#50087)
· Selecting from INFORMATION_SCHEMA.ROUTINES or INFORMATION_SCHEMA.PARAMETERS resulted in a memory leak. (Bug#48729)
· When the transaction isolation level was REPEATABLE READ and binary logging used statement or mixed format, SELECT statements with subqueries referencing InnoDB tables unnecessarily acquired shared locks on rows in these tables. (Bug#46947)
· Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) that generated multiple result sets (such as a stored procedure or a multi-statement command) left the connection unusable. (Bug#42373)
· If a crash occurs while creating an index using the InnoDB “Fast Index Creation” mechanism, the partially created index is dropped during the crash recovery processing when the database is restarted.
May 21st, 2010InnoDB Plugin Notes:
· InnoDB Plugin has been upgraded to version 1.0.8. This version is considered of General Availability (GA) quality. InnoDB Plugin Change History, may contain information in addition to those changes reported here.
· 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 generic ia64.
Functionality added or changed:
· InnoDB stores redo log records in a hash table during recovery. On 64-bit systems, this hash table was 1/8 of the buffer pool size. To reduce memory usage, the dimension of the hash table was reduced to 1/64 of the buffer pool size (or 1/128 on 32-bit systems). (Bug#53122)
Bugs fixed:
· Security Fix: The server failed to check the table name argument of a COM_FIELD_LIST command packet for validity and compliance to acceptable table name standards. This could be exploited to bypass almost all forms of checks for privileges and table-level grants by providing a specially crafted table name argument to COM_FIELD_LIST.
· In MySQL 5.0 and above, this allowed an authenticated user with SELECT privileges on one table to obtain the field definitions of any table in all other databases and potentially of other MySQL instances accessible from the server's file system.
· Additionally, for MySQL version 5.1 and above, an authenticated user with DELETE or SELECT privileges on one table could delete or read content from any other table in all databases on this server, and potentially of other MySQL instances accessible from the server's file system. (Bug#53371, CVE-2010-1848)
· Security Fix: The server was susceptible to a buffer-overflow attack due to a failure to perform bounds checking on the table name argument of a COM_FIELD_LIST command packet. By sending long data for the table name, a buffer is overflown, which could be exploited by an authenticated user to inject malicious code. (Bug#53237, CVE-2010-1850)
· Security Fix: The server could be tricked into reading packets indefinitely if it received a packet larger than the maximum size of one packet. (Bug#50974, CVE-2010-1849)
· Important Change: Replication: When invoked, CHANGE MASTER TO and SET GLOBAL sql_slave_skip_counter now cause information to be written to the error log about the slave's state prior to execution of the statement. For CHANGE MASTER TO, this information includes the previous values for MASTER_HOST, MASTER_PORT, MASTER_LOG_FILE, and MASTER_LOG_POS. For SET GLOBAL SQL_SLAVE_SKIP_COUNTER, this information includes the previous values of sql_slave_skip_counter, the group relay log name, and the group relay log position. (Bug#43406, Bug#43407)
· Replication: The failure of a REVOKE statement was logged with the wrong error code, causing replication slaves to stop even when the failure was expected on the master. (Bug#51987)
· Certain path names passed to LOAD_FILE() could cause a server crash. (Bug#53417)
· When reporting a foreign key constraint violation during INSERT, InnoDB could display uninitialized data for the DB_TRX_ID and DB_ROLL_PTR system columns. (Bug#53202)
· InnoDB page splitting could enter an infinite loop for compressed tables. (Bug#52964)
· An overly strict assertion could fail during the purge of delete-marked records in DYNAMIC or COMPRESSED InnoDB tables that contain column prefix indexes. (Bug#52746)
· InnoDB attempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, in DYNAMIC and COMPRESSED formats, InnoDB stores locally any non-BLOB columns having a maximum length not exceeding 256 bytes. This is because there is no room for the “external storage” flag when the maximum length is 255 bytes or less. This restriction trivially holds in REDUNDANT and COMPACT formats, because there InnoDB always stores locally columns having a length up to local_len = 788 bytes. (Bug#52745)
· Semi-consistent read was implemented for InnoDB to address Bug#3300. Semi-consistent reads do not block when a nonmatching record is already locked by some other transaction. If the record is not locked, a lock is acquired, but is released if the record does not match the WHERE condition. However, semi-consistent read was attempted even for UPDATE statements having a WHERE condition of the form pk_col1=constant1, ..., pk_colN=constantN. Some code that was designed with the assumption that semi-consistent read would be only attempted on table scans, failed. (Bug#52663)
· Setting @@GLOBAL.debug to an empty string failed to clear the current debug settings. (Bug#52629)
· A memory leak occurred due to missing deallocation of the comparators array (a member of the Arg_comparator class). (Bug#52124)
· For debug builds, creating a view containing a subquery that might require collation adjustment caused an assertion to be raised. For example, this could occur if some items had different collations but the result collation could be adjusted to the one of them. (Bug#52120)
· Connections waiting for an InnoDB row lock ignored KILL until the row lock wait ended. Now, KILL during lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. (Bug#51920)
· Locking involving the LOCK_plugin, LOCK_global_system_variables, and LOCK_status mutexes could deadlock. (Bug#51591)
· InnoDB fast index creation could incorrectly use a table copy in some cases. (Bug#50946)
· A syntactically invalid trigger could cause the server to crash when trying to list triggers. (Bug#50755)
· InnoDB Plugin checks to see whether a row could possibly exceed the maximum size if all columns are fully used. This produced Row size too large errors for some tables that could be created with the built-in InnoDB. Now the check is only done when innodb_strict_mode is enabled or if the table is dynamic or compressed. (Bug#50495)
· In MySQL 5.1, READ COMMITTED was changed to use less locking due to the availability of row based binary logging (see the Note under READ COMMITTED at Section 12.3.6, “SET TRANSACTION Syntax”). However, READ UNCOMMITTED did not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so that READ UNCOMMITTED now also uses the lesser amount of locking and has the same restrictions for binary logging. (Bug#48607)
· EXPLAIN could cause a server crash for some queries with subqueries. (Bug#48419)
· On Windows, the server failed to find a description for Event ID 100. (Bug#48042)
· For updates to InnoDB tables, TIMESTAMP columns could be updated even when no values actually changed. (Bug#47453)
· If the server is started with --skip-grant-tables, plugin loading and unloading should be disallowed, but the server failed to reject INSTALL PLUGIN and UNINSTALL PLUGIN statements. (Bug#46261)
· Storage engine plugins on Windows could've been built with a definition of time_t which was different from the server expectations. The difference could cause affected plugins to crash. In addition, the use of the time_t type in the storage engine API layer has been enforced. (Bug#39802, Bug#40092)
· When using UNINSTALL PLUGIN to remove a loaded plugin, open tables and connections caused mysqld to hang until the open connections had been closed. (Bug#39053)
· 1) In rare cases, if a thread was interrupted during a FLUSH PRIVILEGES operation, a debug assertion occurred later due to improper diagnostic area setup. 2) A KILL operation could cause a console error message referring to a diagnostic area state without first ensuring that the state existed. (Bug#33982)
April 23rd, 2010InnoDB Plugin Notes:
· InnoDB Plugin has been upgraded to version 1.0.7. This version is considered of General Availability (GA) quality. The InnoDB Plugin Change History may contain information in addition to those changes reported here.
· In this release, the InnoDB Plugin is included in source and binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64, ia64), and generic
Functionality added or changed:
· There is a new system variable, skip_name_resolve, that is set from the value of the --skip-name-resolve server option. This provides a way to determine at runtime whether the server uses name resolution for client connections. (Bug#37168)
Bugs fixed:
· Security Fix: Privilege checking for UNINSTALL PLUGIN was incorrect. (Bug#51770)
· Partitioning: Partition pruning on RANGE partitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not using MAXVALUE). Now the last partition is not included if the partitioning function value is not within the range. (Bug#51830)
· Partitioning: The insert_id server system variable was not reset following an insert that failed on a partitioned MyISAM table having an AUTO_INCREMENT column. (Bug#50392)
· Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible via an ALTER TABLE statement to set a foreign key on a partitioned table; it was also possible to partition a table with a single foreign key. (Bug#50104)
· Partitioning: GROUP BY queries performed poorly for some partitioned tables. This was due to the block size not being set for partitioned tables, thus the keys per block was not correct, which could cause such queries to be optimized incorrectly. (Bug#48229)
· See also Bug#37252.
· Partitioning: REPAIR TABLE failed for partitioned ARCHIVE tables. (Bug#46565)
· Replication: TRUNCATE TABLE performed on a temporary table using the InnoDB storage engine was logged even when using row-based mode. (Bug#51251)
· Replication: When using temporary tables the binary log needs to insert a pseudo-thread ID for threads that are using temporary tables, each time a switch happens between two threads, both of which are using temporary tables. However, if a thread issued a failing statement before exit, its ID was not recorded in the binary log, and this in turn caused the ID for the next thread that tried to do something with a temporary table not to be logged as well. Subsequent replays of the binary log failed with the error Table ... doesn't exist. (Bug#51226)
· Replication: If the master was using sql_mode='TRADITIONAL', duplicate key errors were not sent to the slave, which received 0 rather than the expected error code. This caused replication to fail even when such an error was expected. (Bug#51055)
· Replication: When run with the --database option, mysqlbinlog printed ROLLBACK statements but did not print any corresponding SAVEPOINT statements. (Bug#50407)
· Replication: CREATE EVENT statements were padded with “garbage” characters when written to the binary log, which caused a syntax error when trying to read back from the log. (Bug#50095)
· Replication: Column length information generated by InnoDB did not match that generated by MyISAM, which caused invalid metadata to be written to the binary log when trying to replicate BIT columns. (Bug#49618)
· Replication: The value of Slave_IO_running in the output of SHOW SLAVE STATUS did not distinguish between all 3 possible states of the slave I/O thread (not running; running but not connected; connected). Now the value Connecting (rather than No) is shown when the slave I/O thread is running but the slave is not connected to a replication master.
· The server system variable Slave_running also reflects this change, and is now consistent with what is shown for Slave_IO_running. (Bug#30703, Bug#41613, Bug#51089)
· EXPLAIN EXTENDED crashed trying to resolve references to freed temporary table columns for GROUP_CONCAT() ORDER BY arguments. (Bug#52397)
· For InnoDB Plugin, bit fields were causing problems with concurrency on SMP systems because of word-packing issues. (Bug#52360)
· The optimizer could attempt to evaluate the WHERE clause before any rows had been read, resulting in a server crash. (Bug#52177)
· For LDML-defined collations, some data structures were not initialized properly to enable UPPER() and LOWER() to work correctly. (Bug#51976)
· On Windows, LOAD_FILE() could cause a crash for some pathnames. (Bug#51893)
· Invalid memory reads occurred for HANDLER ... READ NEXT after a failed HANDLER ... READ FIRST. (Bug#51877)
· After TRUNCATE TABLE of a MyISAM table, subsequent queries could crash the server if myisam_use_mmap was enabled. (Bug#51868)
· If myisam_sort_buffer_size was set to a small value, table repair for MyISAM tables with FULLTEXT indexes could crash the server. (Bug#51866)
· In LOAD DATA INFILE, using a SET clause to set a column equal to itself caused a server crash. (Bug#51850)
· A problem with equality propagation optimization for prepared statements and stored procedures caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#51650)
· See also Bug#8115, Bug#8849.
· The optimizer performed an incorrect join type when COALESCE() appeared within an IN() operation. (Bug#51598)
· The server crashed when the optimizer attempted to determine constant tables but a table storage engine did not support exact record count. (Bug#51494)
· The server could crash populating the INFORMATION_SCHEMA.PROCESSLIST table due to lack of mutex protection. (Bug#51377)
· Use of HANDLER statements with tables that had spatial indexes caused a server crash. (Bug#51357)
· With an XA transaction active, SET autocommit = 1 could cause side effects such as memory corruption or a server crash. (Bug#51342)
· Following a bulk insert into a MyISAM table, if MyISAM failed to build indexes using repair by sort, data file corruption could occur. (Bug#51307)
· CHECKSUM TABLE could compute the checksum for BIT columns incorrectly. (Bug#51304)
· A HAVING clause on a joined table in some cases failed to eliminate rows which should have been excluded from the result set. (Bug#51242)
· The type inference used for view columns caused some columns in views to be handled as the wrong type, as compared to the same columns in base tables. DATE columns in base tables were treated as TIME columns in views, and base table TIME columns as view DATETIME columns. (Bug#50918)
· The YEAR values 2000 and 0000 could be treated as equal. (Bug#49910)
· Performing a single in-place ALTER TABLE containing ADD INDEX and DROP INDEX options that used the same index name could result in a corrupt table definition file. Now such ALTER TABLE statements are no longer performed in place. (Bug#49838)
· mysql_upgrade did not detect when CSV log tables incorrectly contained columns that could be NULL. Now these columns are altered to be NOT NULL. (Bug#49823)
· If a stored function contained a RETURN statement with an ENUM value in the ucs2 character set, SHOW CREATE FUNCTION and SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES returned incorrect values. (Bug#48766)
· The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic ON clauses such as the ones containing the RAND() function, a user-defined function, or a NOT DETERMINISTIC stored function. (Bug#48483)
A query that read from a derived table (of the form SELECT ... FROM (SELECT ...)) produced incorrect results when the following conditions were present:
· The table subquery contained a derived query ((SELECT ... ) AS column).
· The derived query could potentially produce zero rows or a single NULL (that is, no rows matched, or the query used an aggregate function such as SUM() running over zero rows).
· The table subquery joined at least two tables.
· The join condition involved an index.
· Bug#47904)
· The optimization to read MIN() or MAX() values from an index did not properly handle comparisons with NULL values. This could produce incorrect results for MIN() or MAX()when the WHERE clause tested a NOT NULL column for NULL. (Bug#47762)
· Killing a query during the optimization phase of a subquery could cause a server crash. (Bug#47761)
· The query shown by EXPLAIN EXTENDED plus SHOW WARNINGS could produce results different from the original query. (Bug#47669)
· Renaming a column of an InnoDB table caused the server to go out of sync with the InnoDB data dictionary. (Bug#47621)
· MyISAM could write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug#47598)
· Setting myisam_repair_threads larger than 1 could result in the cardinality for all indexes of a MyISAM table being set to 1 after parallel index repair. (Bug#47444)
· In debug builds, if the listed columns in the view definition of the table used in an INSERT ... SELECT statement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug#46615)
· For a query that selected from a view and used an alias for the view, the metadata used the alias name rather than the view name in the MYSQL_FIELD.table member. (Bug#41788)
· mysql_upgrade did not create temporary files properly. (Bug#41057)
· It was possible for DROP TABLE of one MyISAM table to remove the data and index files of a different MyISAM table. (Bug#40980)
· If the arguments to a CONCAT() call included a local routine variable, selecting the return value into a user variable could produce an incorrect result. (Bug#40625)
· SHOW CREATE VIEW returned invalid SQL if the definition contained a SELECT 'string' statement where the string was longer than the maximum length of a column name, due to the fact that this text was also used as an alias (in the AS clause).
· Because not all names retrieved from arbitrary SELECT statements can be used as view column names due to length and format restrictions, the server now checks the conformity of automatically generated column names and rewrites according to a predefined format any names that are not acceptable as view column names before storing the final view definition on disk.
· In such cases, the name is now rewritten as Name_exp_pos, where pos is the position of the column. To avoid this conversion scheme, define explicit, valid names for view columns using the column_list clause of the CREATE VIEW statement.
· As part of this fix, aliases are now generated only for top-level statements. (Bug#40277)
· While looking for the shortest index for a covering index scan, the optimizer ignored that a clustered primary key read the entire table. (Bug#39653)
· mysqlbinlog had a memory leak in its option-processing code. (Bug#38468)
· The test for readline during configuration failed when trying to build MySQL in a directory other than the source tree root. (Bug#35250)
March 17th, 2010· This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.
· 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 generic ia64.
Functionality added or changed:
· mysqltest has a new --max-connections option to set a higher number of maximum allowed server connections than the default 128. This option can also be passed via mysql-test-run.pl. (Bug#51135)
· mysql-test-run.pl has a new --portbase option and a corresponding MTR_PORT_BASE environment variable for setting the port range, as an alternative to the existing --build-thread option. (Bug#50182)
· mysql-test-run.pl has a new --gprof option that runs the server through the gprof profiler, much the same way the currently supported --gcov option runs it through gcov. (Bug#49345)
· mysqltest has a new lowercase_result command that converts the output of the next statement to lowercase. This is useful for test cases where the lettercase may vary between platforms. (Bug#48863)
· mysqltest has a new remove_files_wildcard command that removes files matching a pattern from a directory. (Bug#39774)
Bugs fixed:
· Partitioning: Attempting to drop a partitioned table from one connection while waiting for the completion of an ALTER TABLE that had been issued from a different connection, and that changed the storage engine used by the table, could cause the server to crash. (Bug#42438)
· Replication: Adding an index to a table on the master caused the slave to stop logging slow queries to the slow query log. (Bug#50620)
· Replication: Queries which were written to the slow query log on the master were not written to the slow query log on the slave. (Bug#23300)
· See also Bug#48632.
· mysqld_multi failed due to a syntax error in the script. (Bug#51468)
· Referring to a subquery result in a HAVING clause could produce incorrect results. (Bug#50995)
· Use of filesort plus the join cache normally is preferred to a full index scan. But it was used even if the index is clustered, in which case, the clustered index scan can be faster. (Bug#50843)
· For debug builds, SHOW BINARY LOGS caused an assertion to be raised if binary logging was not enabled. (Bug#50780)
· Incorrect handling of BIT columns in temporary tables could lead to spurious duplicate-key errors. (Bug#50591)
· Full-text queries that used the truncation operator (*) could enter an infinite loop. (Bug#50351)
· mysqltest no longer lets you execute an SQL statement on a connection after doing a send command, unless you do a reap first. This was previously accepted but could produce unpredictable results. (Bug#49269)
· For debug builds on Windows, warnings about incorrect use of debugging directives were written to the error log. The directives were rewritten to eliminate these messages. (Bug#49025)
· Building MySQL on Fedora Core 12 64-bit failed, due to errors in comp_err. (Bug#48864)
· An ARZ file missing from the database directory caused the server to crash. (Bug#48757)
· Slow CALL statements were not always logged to the slow query log because execution time for multiple-statement stored procedures was assessed incorrectly. (Bug#47905)
· Failure to open a view with a nonexistent DEFINER was improperly handled and the server would crash later attempting to lock the view. (Bug#47734)
· If EXPLAIN encountered an error in the query, a memory leak occurred. (Bug#45989)
· Grouping by a subquery in a query with a DISTINCT aggregate function led to incorrect and unordered grouping values. (Bug#45640)
· Propagation of a large unsigned numeric constant in WHERE expressions could lead to incorrect results. This also affected EXPLAIN EXTENDED, which printed incorrect numeric constants in such transformed WHERE expressions. (Bug#45360)
· Valgrind warnings about uninitialized variables in optimizer code were silenced. (Bug#45195)
· flush_cache_records() did not correctly check for errors that should cause statement execution to stop, leading to a server crash. (Bug#39022)
· When building MySQL when using a different target directory (for example using the VPATH environment variable), the build of the embedded readline component would fail. (Bug#35250)
· INSERT INTO ... VALUES(DEFAULT) failed to insert the correct value for ENUM columns. For MyISAM tables, an empty value was inserted. For CSV tables, the table became corrupt. (Bug#33717)
February 19th, 2010· This release includes InnoDB Plugin 1.0.6. This version is considered of Release Candidate (RC) quality.
· 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 generic ia64.
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 on 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)
February 1st, 2010Bugs 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 must 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 to the binary log without escaping the field names. (Bug#49473)
· See also Bug#47927.
· Replication: Spatial data types cause 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)
· 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)
January 6th, 2010Incompatible Change: Several changes have been made regarding the language and character set of error messages:
· The --language option for specifying the directory for the error message file is now deprecated. The new --lc-messages-dir and --lc-messages options should be used instead, and --language is handled as an alias for --lc-messages-dir.
· The language system variable has been removed and replaced with the new lc_messages_dir and lc_messages system variables. lc_messages_dir has only a global value and is read only. lc_messages has global and session values and can be modified at runtime, so the error message language can be changed while the server is running, and individual clients each can have a different error message language by changing their session lc_messages value to a different locale name.
· Error messages previously were constructed in a mix of character sets. This issue is resolved by constructing error messages internally within the server using UTF-8 and returning them to the client in the character set specified by the character_set_results system variable. The content of error messages therefore may in some cases differ from the messags returned previously.
· Partitioning: New PARTITION BY RANGE COLUMNS(column_list) and PARTITION BY LIST COLUMNS(column_list) options are added for the CREATE TABLE and ALTER TABLE statements.
· A major benefit of RANGE COLUMNS and LIST COLUMNS partitioning is that they make it possible to define ranges or lists based on column values that use string, date, or datetime values.
· These new extensions also broaden the scope of partition pruning to provide better coverage for queries using comparisons on multiple columns in the WHERE clause, some examples being WHERE a = 1 AND b < 10 and WHERE a = 1 AND b = 10 AND c < 10.
· For more information, see Section 17.2.1, “RANGE Partitioning”, Section 17.2.2, “LIST Partitioning”, and Section 17.4, “Partition Pruning”.
· Partitioning: A new ALTER TABLE option, TRUNCATE PARTITION, makes it possible to delete rows from one or more selected partitions only. Unlike the case with ALTER TABLE ... DROP PARTITION, ALTER TABLE ... TRUNCATE PARTITION merely deletes all rows from the specified partition or partitions, and does not change the definition of the table.
· Partitioning: It is now possible to assign indexes on partitioned MyISAM tables to key caches using the CACHE INDEX and to preload such indexes into the cache using LOAD INDEX INTO CACHE statements. Cache assignment and preloading of indexes for such tables can be performed for one, several, or all partitions of the table.
· This functionality is supported for only those partitioned tables that employ the MyISAM storage engine.
· Cluster Replication: Replication: A replication heartbeat mechanism has been added to facilitate monitoring. This provides an alternative to checking log files, making it possible to detect in real time when a slave has failed.
· Configuration of heartbeats is done via a new MASTER_HEARTBEAT_PERIOD = interval clause for the CHANGE MASTER TO statement (see Section 12.6.2.1, “CHANGE MASTER TO Syntax”); monitoring can be done by checking the values of the status variables Slave_heartbeat_period and Slave_received_heartbeats (see Section 5.1.7, “Server Status Variables”).
The addition of replication heartbeats addresses a number of issues:
· Relay logs were rotated every slave_net_timeout seconds even if no statements were being replicated.
· SHOW SLAVE STATUS displayed an incorrect value for Seconds_Behind_Master following a FLUSH LOGS statement.
· Replication master-slave connections used slave_net_timeout for connection timeouts.
· (Bug#20435, Bug#29309, Bug#30932)
· Replication: The global server variable sync_relay_log is introduced for use on replication slaves. Setting this variable to a nonzero integer value N causes the slave to synchronize the relay log to disk after every N events. Setting its value to 0 allows the operating system to handle synchronization of the file. The action of this variable, when enabled, is analogous to how the sync_binlog variable works with regard to binary logs on a replication master.
· The global server variables sync_master_info and sync_relay_log_info are introduced for use on replication slaves to control synchronization of, respectively, the master.info and relay.info files.
· In each case, setting the variable to a nonzero integer value N causes the slave to synchronize the corresponding file to disk after every N events. Setting its value to 0 allows the operating system to handle synchronization of the file instead.
· The actions of these variables, when enabled, are analogous to how the sync_binlog variable works with regard to binary logs on a replication master.
· An additional system variable relay_log_recovery is also now available. When enabled, this variable causes a replication slave to discard relay log files obtained from the replication master following a crash.
· These variables can also be set in my.cnf, or by using the --sync-relay-log, --sync-master-info, --sync-relay-log-info, and --relay-log-recovery server options.
· For more information, see Section 16.1.3.3, “Replication Slave Options and Variables”. (Bug#31665, Bug#35542, Bug#40337)
· Replication: Because SHOW BINLOG EVENTS cannot be used to read events from relay log files, a new SHOW RELAYLOG EVENTS statement has been added for this purpose. (Bug#28777)
· Replication: In circular replication, it was sometimes possible for an event to propagate such that it would be reapplied on all servers. This could occur when the originating server was removed from the replication circle and so could no longer act as the terminator of its own events, as normally happens in circular replication.
· In order to prevent this from occurring, a new IGNORE_SERVER_IDS option is introduced for the CHANGE MASTER TO statement. This option takes a list of replication server IDs; events having a server ID which appears in this list are ignored and not applied. For more information, see Section 12.6.2.1, “CHANGE MASTER TO Syntax”.
· In conjunction with the introduction of IGNORE_SERVER_IDS, SHOW SLAVE STATUS has a new field Replicate_Ignore_Server_Ids that displays information about ignored servers. (Bug#25998)
· See also Bug#27808.
· Replication: MySQL now supports an interface for semisynchronous replication: A commit performed on the master side blocks before returning to the session that performed the transaction until at least one slave acknowledges that it has received and logged the events for the transaction. Semisynchronous replication is implemented through an optional plugin component. See Section 16.2.8, “Semisynchronous Replication”.
· 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)
· 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. (Bug#42885)
· Columns that provide a catalog value in INFORMATION_SCHEMA tables (for example, TABLES.TABLE_CATALOG) now have a value of def rather than NULL. (Bug#35427)
· The deprecated --default-table-type server option has been removed. (Bug#34818)
· 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)
· Several undocumented C API functions were removed: mysql_manager_close(), mysql_manager_command(), mysql_manager_connect(), mysql_manager_fetch_line(), mysql_manager_init(), mysql_disable_reads_from_master(), mysql_disable_rpl_parse(), mysql_enable_reads_from_master(), mysql_enable_rpl_parse(), mysql_master_query(), mysql_master_send_query(), mysql_reads_from_master_enabled(), mysql_rpl_parse_enabled(), mysql_rpl_probe(), mysql_rpl_query_type(), mysql_set_master(), mysql_slave_query(), and mysql_slave_send_query(). (Bug#31952, Bug#31954)
· Sinhala collations utf8_sinhala_ci and ucs2_sinhala_ci were added for the utf8 and ucs2 character sets. (Bug#26474)
· If the value of the --log-warnings option is greater than 1, the server now writes access-denied errors for new connection attempts to the error log (for example, if a client user name or password is incorrect). (Bug#25822)
· On WIndows, use of POSIX I/O interfaces in mysys was replaced with Win32 API calls (CreateFile(), WriteFile(), and so forth) and the default maximum number of open files has been increased to 16384. The maximum can be increased further by using the --open-files-limit=N option at server startup. (Bug#24509)
· The TRADITIONAL SQL mode now includes NO_ENGINE_SUBSTITUTION. (Bug#21099)
· MySQL now implements the SQL standard SIGNAL and RESIGNAL statements. See Section 12.8.8, “SIGNAL and RESIGNAL”. (Bug#11661)
· The undocumented, deprecated, and not useful SHOW COLUMN TYPES statement has been removed. (Bug#5299)
· Dynamic plugins now need to be linked with the libmysqlservices.a library. For an example showing what Makefile.am should look like, see Section 21.2.3.3, “Creating a Plugin Library”.
· The FORMAT() function now supports an optional third parameter that enables a locale to be specified to be used for the result number's decimal point, thousands separator, and grouping between separators. Allowable locale values are the same as the legal values for the lc_time_names system variable (see Section 9.8, “MySQL Server Locale Support”). For example, the result from FORMAT(1234567.89,2,'de_DE') is 1.234.567,89. If no locale is specified, the default is 'en_US'.
· The Greek locale 'el_GR' is now an allowable value for the lc_time_names system variable.
· Previously, in the absence of other information, the MySQL client programs mysql, mysqladmin, mysqlcheck, mysqlimport, and mysqlshow used the compiled-in default character set, usually latin1.
· Now these clients can autodetect which character set to use based on the operating system setting, such as the value of the LANG or LC_ALL locale environment language on Unix system or the code page setting on Windows systems. For systems on which the locale is available from the OS, the client uses it to set the default character set rather than using the compiled-in default. Thus, users can configure the locale in their environment for use by MySQL clients. For example, setting LANG to ru_RU.KOI8-R causes the koi8r character set to be used. The OS character set is mapped to the closest MySQL character set if there is no exact match. If the client does not support the matching character set, it uses the compiled-in default. (For example, ucs2 is not supported as a connection character set.)
Third-party applications that wish to use character set autodetection based on the OS setting can use the following mysql_options() call before connecting to the server:
· mysql_options(mysql,
· MYSQL_SET_CHARSET_NAME,
· MYSQL_AUTODETECT_CHARSET_NAME);
· See Section 9.1.4, “Connection Character Sets and Collations”.
· mysql_upgrade now has an --upgrade-system-tables option that causes only the system tables to be upgraded. With this option, data upgrades are not performed.
· The CREATE TABLESPACE privilege has been introduced. This privilege exists at the global (superuser) level and enables you to create, alter, and drop tablespaces and logfile groups.
· 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.
· Added the TO_SECONDS() function, which converts a date or datetime value to a number of seconds since the year 0.
· Parser performance was improved for identifier scanning and conversion of ASCII string literals.
· The LOAD XML INFILE statement was added. This statement makes it possible to read data directly from XML files into database tables. For more information, see Section 12.2.7, “LOAD XML Syntax”.
Bugs fixed:
· Performance: The server unnecessarily acquired a query cache mutex even with the query cache disabled, resulting in a small performance decrement which could show up as threads often in state “invalidating query cache entries (table)”, particularly on a replication slave with row-based replication. Now if the server is started with query_cache_type set to 0, it does not acquire the query cache mutex. This has the implication that the query cache cannot be enabled at runtime. (Bug#38551)
· 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. (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)
· Incompatible Change: For system variables that take values of ON or OFF, OF was accepted as a legal variable. Now system variables that take “enumeration” values must be assigned the full value. This affects some other variables that previously could be assigned using unambiguous prefixes of allowable values, such as tx_isolation. (Bug#34828)
· 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)
Incompatible Change: Access privileges for several statements are more accurately checked:
· CHECK TABLE requires some privilege for the table.
· CHECKSUM TABLE requires SELECT for the table.
· CREATE TABLE ... LIKE requires SELECT for the source table and CREATE for the destination table.
· SHOW COLUMNS displays information only for those columns you have some privilege for.
· SHOW CREATE TABLE requires some privilege for the table (previously required SELECT).
· SHOW CREATE VIEW requires SHOW VIEW and SELECT for the view.
· SHOW INDEX requires some privilege for any column.
· SHOW OPEN TABLES displays only tables for which you have some privilege on any table column.
· (Bug#27145)
· Important Change: Replication: MyISAM transactions replicated to a transactional slave left the slave in an unstable condition. This was due to the fact that, when replicating from a nontransactional storage engine to a transactional engine with autocommit turned off, no BEGIN and COMMIT statements were written to the binary log; thus, on the slave, a never-ending transaction was started.
· The fix for this issue includes enforcing autocommit mode on the slave by replicating all autocommit=1 statements from the master. (Bug#29288)
· Important Change: Replication: The CHANGE MASTER TO statement required the value for RELAY_LOG_FILE to be an absolute path, while the MASTER_LOG_FILE path could be relative.
· The inconsistent behavior is resolved by allowing relative paths for RELAY_LOG_FILE, and by using the same basename for RELAY_LOG_FILE as for MASTER_LOG_FILE. For more information, see Section 12.6.2.1, “CHANGE MASTER TO Syntax”. (Bug#12190)
· Important Change: An option that requires a value, when specified in an option file without a value, was assigned the text of the next line in the file as the value. Now, if you fail to specify a required value in an option file, the server aborts with an error.
· This change does not effect how options are handled by the server when they are used on the command line. For example, starting the server using mysqld_safe --relay-log --relay-log-index & causes the server to create relay log files named --relay-log-index.000001, --relay-log-index.000002, and so on, because the --relay-log option expects an argument. (Bug#25192)
· 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: 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: 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)
· Partitioning: Truncating a partitioned MyISAM table did not reset the AUTO_INCREMENT value. (Bug#35111)
· Partitioning: For partitioned tables with more than ten partitions, a full table scan was used in some cases when only a subset of the partitions were needed. (Bug#33730)
· 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:
· The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.
· 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: Performing ALTER TABLE ... DISABLE KEYS on a slave table caused row-based replication to fail. (Bug#47312)
· 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: BEGIN statements were not included in the output of mysqlbinlog. (Bug#46998)
· 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 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: 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: 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: 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: This fix handles 2 issues encountered on replication slaves during startup:
· A failure while allocating the master info structure caused the slave to crash.
· A failure during recovery caused the relay log file not to be properly initialized which led to a crash on the slave.
· (Bug#43075)
· Replication: When the logging format was set without binary logging being enabled, the server failed to start. Now in such cases, the server starts successfully, binlog_format is set, and a warning is logged instead of an error. (Bug#42928)
· 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.
· 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: 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.
· Replication: When autocommit was set equal to 1 after starting a transaction, the binary log did not commit the outstanding transaction. The reason this happened was that the binary log commit function saw only the values of the new settings, and decided that there was nothing to commit.
· This issue was first observed when using the Falcon storage engine, but it is possible that it affected other storage engines as well. (Bug#37221)
· Replication: FLUSH LOGS did not actually close and reopen the binary log index file. (Bug#34582)
· 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: The value of Slave_IO_running in the output of SHOW SLAVE STATUS did not distinguish between all 3 possible states of the slave I/O thread (not running; running but not connected; connected). Now the value Connecting (rather than No) is shown when the slave I/O thread is running but the slave is not connected to a replication master.
· The server system variable Slave_running also reflects this change, and is now consistent with what is shown for Slave_IO_running. (Bug#30703, Bug#41613)
· Replication: Queries which were written to the slow query log on the master were not written to the slow query log on the slave. (Bug#23300)
· See also Bug#46832.
· Replication: Valgrind revealed an issue with mysqld that as corrected: memory corruption in replication slaves when switching databases. (Bug#19022)
· 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)
· Following a literal, the COLLATE clause was mishandled such that different results can be produced depending whether an index is used. (Bug#48447)
· 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)
· Searches using a non-default collation could return different results for a table when partitioning was and was not used. (Bug#48161)
· 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)
· The subquery optimizer had a memory leak. (Bug#48060)
· Server shutdown failed on Windows. (Bug#48047)
· In some cases, using a null microsecond part in a WHERE condition (for example, WHERE date_time_field = 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)
· 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)
· The pthread_cond_wait() implementations for Windows could deadlock in some rare circumstances. (Bug#47768)
· The encoding of values for SET system_variable = identifier statements was incorrect, resulting in incorrect error messages. (Bug#47597)
· 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)
· 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)
· Queries of the form SELECT SUM(DISTINCT varchar_key) FROM tbl_name caused a server crash. (Bug#47421)
· 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)
· A multiple-table UPDATE involving a natural join and a mergeable view raised an assertion. (Bug#47150)
· On FreeBSD, memory mapping for MERGE tables could fail if underlying tables were empty. (Bug#47139)
· Solaris binary packages now are compiled with -g0 rather than -g. (Bug#47137)
· 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)
· EXPLAIN caused a server crash for certain valid queries. (Bug#47106)
· 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)
· The mysql_config script contained a reference to @innodb_system_libs@ that was not replaced with the corresponding library flags during the build process and ended up in the output of mysql_config --libs. (Bug#47007)
· The configure option --without-server did not work. (Bug#46980)
· Failed multiple-table DELETE statements could raise an assertion. (Bug#46958)
· 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)
· 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)
· The test suite was missing from RPM packages. (Bug#46834)
· For InnoDB tables, an unnecessary table rebuild for ALTER TABLE could sometimes occur for metadata-only changes. (Bug#46760)
· 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)
· 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.
· Concurrent INSERT INTO ... SELECT statements for an InnoDB table could cause an AUTO_INCREMENT assertion failure. (Bug#46650)
· The Serbian locale name 'sr_YU' is obsolete. It is still recognized for backward compatibility, but 'sr_RS' now should be used instead. (Bug#46633)
· On Solaris and HP-UX systems with the environment set to the default C locale, MySQL client programs issued an Unknown OS character set error. (Bug#46619)
· SHOW CREATE TRIGGER for a MERGE table trigger caused an assertion failure. (Bug#46614)
· 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)
· 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)
· 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 server crashed if a shutdown occurred while a connection was idle. This happened because of a NULL pointer dereference while logging to the error log. (Bug#46267)
· Dropping an InnoDB table that used an unknown collation (created on a different server, for example) caused a server crash. (Bug#46256)
· 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)
· A query containing a subquery in the FROM clause and PROCEDURE ANALYSE() caused a server crash. (Bug#46184)
· See also Bug#48293.
· InnoDB did not disallow creation of an index with the name GEN_CLUST_INDEX, which is used internally. (Bug#46000)
· CREATE TABLE ... SELECT could cause a server crash if no default database was selected. (Bug#45998)
· Configuring MySQL for DTrace support resulted in a build failure on Solaris if the directory for the dtrace executable was not in PATH. (Bug#45810)
· 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)
· 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)
· The combination of MIN() or MAX() in the select list with WHERE and GROUP BY clauses could lead to incorrect results. (Bug#45386)
· 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.
· Client flags were incorrectly initialized for the embedded server, causing several tests in the jp test suite to fail. (Bug#45159)
· Concurrent execution of statements requiring a table-level lock and statements requiring a non-table-level write lock for a table could deadlock. (Bug#45143)
· For settings of lower_case_table_names greater than 0, some queries for INFORMATION_SCHEMA tables left entries with incorrect lettercase in the table definition cache. (Bug#44738)
· The have_community_features system variable was renamed to have_profiling.
· Previously, to enable profiling, it was necessary to run configure with the --enable-community-features and --enable-profiling options. Now only --enable-profiling is needed. (Bug#44651)
· 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)
· 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)
· 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)
· An InnoDB error message incorrectly referred to the nonexistent innodb_max_files_open variable rather than to innodb_open_files. (Bug#44338)
· 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)
· 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)
· Redefining a trigger could cause an assertion failure. (Bug#43054)
· The FORCE INDEX FOR ORDER BY index hint was ignored when join buffering was used. (Bug#43029)
· DROP DATABASE did not clear the message list. (Bug#43012, Bug#43138)
· The NUM_FLAG bit of the MYSQL_FIELD.flags member now is set for columns of type MYSQL_TYPE_NEWDECIMAL. (Bug#42980)
· 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)
· SHOW ERRORS returned an empty result set after an attempt to drop a nonexistent table. (Bug#42364)
· If the server was started with an option that had a missing or invalid value, a subsequent error that would cause normally the server to shut down could cause it to crash instead. (Bug#42244)
· Some queries with nested outer joins could lead to crashes or incorrect results because an internal data structure was handled improperly. (Bug#42116)
· 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)
· A Valgrind warning in open_tables() was corrected. (Bug#41759)
· 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)
· The mysql-stress-test.pl test script was missing from the noinstall packages on Windows. (Bug#41546)
· 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.
· When a storage engine plugin failed to initialize before allocating a slot number, it would acidentally unplug the engine in slot 0. (Bug#41013)
· Optimized builds of mysqld crashed when built with Sun Studio on SPARC platforms. (Bug#40244)
· CREATE TABLE failed if a column name in a FOREIGN KEY clause was given in a lettercase different from the corresponding index definition. (Bug#39932)
· The mysql_stmt_close() C API function did not flush all pending data associated with the prepared statement. (Bug#39519)
· INFORMATION_SCHEMA access optimizations did not work properly in some cases. (Bug#39270)
· 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)
· Simultaneous ANALYZE TABLE operations for an InnoDB tables could be subject to a race condition. (Bug#38996)
· mysqlbinlog had a memory leak in its option-processing code. (Bug#38468)
· The ALTER ROUTINE privilege incorrectly allowed SHOW CREATE TABLE. (Bug#38347)
· Setting the general_log_file or slow_query_log_file system variable to a nonconstant expression caused the variable to become unset. (Bug#38124)
· For certain SELECT statements using ref access, MySQL estimated an incorrect number of rows, which could lead to inefficient query plans. (Bug#38049)
· A workload consisting of CREATE TABLE ... SELECT and DML operations could cause deadlock. (Bug#37433)
· The client library mishandled EINPROGRESS errors for connections in nonblocking mode. (Bug#37267)
· 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)
· Some warnings were being reported as errors. (Bug#36777)
· 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)
· Result set metadata for columns retrieved from INFORMATION_SCHEMA tables did not have the db or org_table members of the MYSQL_FIELD structure set. (Bug#35428)
· SHOW CREATE EVENT output did not include the DEFINER clause. (Bug#35297)
· For its warning count, the mysql_info() C API function could print the number of truncated data items rather than the number of warnings. (Bug#34898)
· Concurrent execution of FLUSH TABLES along with SHOW FUNCTION STATUS or SHOW PROCEDURE STATUS could cause a server crash. (Bug#34895)
· Executing SHOW MASTER LOGS as a prepared statement without binary logging enabled caused a crash for debug builds. (Bug#34741)
· There were spurious warnings about "Truncated incorrect DOUBLE value" in queries with MATCH ... AGAINST and > or < with a constant (which was reported as an incorrect DOUBLE value) in the WHERE condition. (Bug#34374)
· A COMMENT longer than 64 characters caused CREATE PROCEDURE to fail. (Bug#34197)
· mysql_real_connect() did not check whether the MYSQL connection handler was already connected and connected again even if so. Now an CR_ALREADY_CONNECTED error occurs. (Bug#33831)
· INSTALL PLUGIN and UNINSTALL PLUGIN did not handle plugin identifiers consistently with respect to lettercase. (Bug#33731)
· The default values for the general query log and slow query log file are documented to be based on the server host name and located in the data directory. However, they were in fact being based on the basename and location of the process ID (PID) file. The name and location defaults for the PID file are based on the server host name and data directory, so if it was not assigned a different name explicitly, its defaults were used and the general query log and slow query log file defaults were as documented. But if the PID file was assigned a value with the --pid-file option, the defaults for the general query log and slow query log file were incorrect. This has been rectified so that the defaults for all three files are based on the server host name and data directory.
· A remaining problem is that the binary log and relay log .NNNNNN and .index basename defaults are based on the PID file basename, contrary to the documentation. This issue is to be addressed as Bug#45359. (Bug#33693)
· The SHOW FUNCTION CODE and SHOW PROCEDURE CODE statements are not present in nondebug builds, but attempting to use them resulted in a “syntax error” message. Now the error message indicates that the statements are disabled and that you must use a debug build. (Bug#33637)
· The LAST_DAY() and MAKEDATE() functions could return NULL, but the result metadata indicated NOT NULL. Thanks to Hiromichi Watari for the patch to fix this bug. (Bug#33629)
· Instance Manager (mysqlmanager) has been removed, but a reference to it still appeared in the mysql.server script. (Bug#33472)
· There was a race condition between the event scheduler and the server shutdown thread. (Bug#32771)
· 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)
· ALTER TABLE statements that added a column and added a nonpartial index on the column failed to add the index. (Bug#31031)
· For const tables that were optimized away EXPLAIN EXTENDED displayed them in the FROM clause. Now they are not displayed. If all tables are optimized away, FROM DUAL is displayed. (Bug#30302)
· There were cases where string-to-number conversions would produce warnings for CHAR values but not for VARCHAR values. (Bug#28299)
· 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)
· When building MySQL on Windows from source, the WITH_BERKELEY_STORAGE_ENGINE option would fail to configure BDB support correctly. (Bug#27693)
· The default database is no longer changed to NULL (“no database”) if DROP DATABASE for that database failed. (Bug#26704)
· DROP TABLE for INFORMATION_SCHEMA tables produced an Unknown table error rather than the more appropriate Access denied. (Bug#24062)
· Referring to a stored function qualified with the name of one database and tables in another database caused a “table doesn't exist” error. (Bug#18444)
· A Table ... doesn't exist error could occur for statements that called a function defined in another database. (Bug#17199)
January 2nd, 2010Bugs 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)
Important Change:
Replication - The following functions have been marked unsafe for statement-based replication:
· GET_LOCK()
· IS_FREE_LOCK()
· IS_USED_LOCK()
· MASTER_POS_WAIT()
· RELEASE_LOCK()
· SLEEP()
· SYSDATE()
· VERSION()
· 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. (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)
· 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)
· 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 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.
November 18th, 2009· 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 new 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)
· InnoDB Plugin has been upgraded to version 1.0.5. This version is considered of Release Candidate (RC) quality.
· 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 did not check server certificates presented by a server linked against yaSSL. (Bug#47320)
· 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:
· The length of the name of the database to which the temporary table belonged was greater than the length of the current database name.
· 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)
· 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
October 21st, 2009Bugs fixed:
· Incompatible Change: In binary installations of MySQL, the supplied binary-configure script would start and configure MySQL, even when request help on the command 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. (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, 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 new 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)
· 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)
· The server crashed when re-using outer column references in correlated subqueries when the enclosing query used a temp table. (Bug#46791)
· 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)
· MySQL 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)
· myisamchk performed parameter value casting at startup that generated unnecessary warning messages. (Bug#33785)
· When building MySQL on Windows from source, the WITH_BERKELEY_STORAGE_ENGINE option would fail to configure BDB support correctly. (Bug#27693
September 19th, 2009· 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: 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)
· 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:
· 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.
· A statement that updates transactional tables only is always considered safe.
· 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)
· 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)
· 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)
· Bulk insert performance could suffer with large read_buffer_size values. (Bug#44723)
· A buffer overflow could occur during handling of IS NULL ranges. (Bug#37044)
· mysqladmin --wait ping crashed on Windows systems. (Bug#35132)
September 2nd, 2009· 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, 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)
· 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:
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 some system variables do not exist on master (in the event the master is a very old version of MySQQL, 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 DETERMINSTIC 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 DETERMINSTIC) 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)
· 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)
· 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 wizardThis 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/6 addresses that a domain name maps to. (Bug#45017)
· 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)
· 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)
· 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)
August 3rd, 2009· Important Change: Replication: RESET MASTER and RESET SLAVE now reset the values shown for Last_IO_Error, Last_IO_Errno, Last_SQL_Error, and Last_SQL_Errno in the output of SHOW SLAVE STATUS. (Bug#44270)
· See also Bug#34654.
Bugs fixed:
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)
· 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: 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: Shutting down the server while executing FLUSH LOGS, CHANGE MASTER TO, or STOP SLAVE could sometimes cause mysqld 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)
· 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)
· 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)
· For replication of a stored procedure that uses the gbk character set, the result on the master and slave differed. (Bug#45485)
· 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)
· Bug#19027 caused --enable-plugin_name (for example, --enable-innodb) not to work. (Bug#45336)
· If autocommit was enabled, InnoDB did not roll back DELETE or UPDATE statements if the statement was killed. (Bug#45309)
· 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 that the table was opened again. (Bug#44653)
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 those the query had this form:
· SELECT * FROM (SELECT 1 FROM (SELECT 2 FROM (SELECT 3 FROM ...
· (Bug#44156)
· 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)
· A workaround for a Sun Studio bug was instituted. (Bug#41710)
· 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)
· 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)
· Renaming a column that appeared in a foreign key definition did not update the foreign key definition with the new column name. (Bug#21704)
July 2nd, 2009· 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)
· Bugs fixed
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· 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)
· The InnoDB adaptive hash latch is released (if held) for serveral 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)
· 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 converting tables to MEMORY or BLACKHOLE tables, which could result in data loss. (Bug#27149)
June 5th, 2009The .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:
· 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 erors 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 alises 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)
· 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)
· 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)
· 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)
· InnoDB had excessive contention for a character set mutex. (Bug#42649)
· 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)
· 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)
April 22nd, 2009· 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 a 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)
· 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 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)
March 4th, 2009Important Change:
· Replication: RESET MASTER and RESET SLAVE now reset the values shown for Last_IO_Error, Last_IO_Errno, Last_SQL_Error, and Last_SQL_Errno in the output of SHOW SLAVE STATUS. (Bug#34654)
· 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 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)
· 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 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:
· An error was printed by InnoDB for TRUNCATE 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 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.
· TRUNCATE 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 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 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)
· 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)
· Packages for MySQL Cluster were missing the libndbclient.so and libndbclient.a files. (Bug#42278)
· 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)
· 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, non-matching 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)
· SELECT statements could be blocked by INSERT DELAYED statements that were waiting for a lock, even with low_priority_updates enabled. (Bug#40536)
· 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)
· 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)
· Enabling the sync_frm system variable had no effect on the handling of .frm files for views. (Bug#38145)
· 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)
· The mysql client sometimes improperly interpreted string escape sequences in non-string 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)
· 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)