# Functionality Added or Changed
* Previously, ALTER TABLE in MySQL 5.6 could alter a table such that the result had temporal columns in both 5.5 and 5.6 format. Now ALTER TABLE upgrades old temporal columns to 5.6 format for ADD COLUMN, CHANGE COLUMN, MODIFY COLUMN, ADD INDEX, and FORCE operations. This conversion cannot be done using the INPLACE algorithm, so specifying ALGORITHM=INPLACE in these cases results in an error.
* CMake now supports a -DTMPDIR=dir_name option to specify the default tmpdir value. If unspecified, the value defaults to P_tmpdir in <stdio.h>. Thanks to Honza Horak for the patch.
# Bugs Fixed
* InnoDB; Replication: Using the InnoDB memcached plugin (see InnoDB Integration with memcached) with innodb_api_enable_binlog set to 1 caused the server to leak memory.
* InnoDB: A boolean mode full-text search query would result in a memory access violation during parsing.
* InnoDB: When new indexes are added by an ALTER TABLE operation, instead of only saving table-level statistics and statistics for the new indexes, InnoDB would save statistics for the entire table, including the table's other indexes. This behavior slowed ALTER TABLE performance.
* InnoDB: Due to a parser error, full-text search queries that include a sub-expression could return the wrong result.
* InnoDB: The innochecksum tool did not use a Windows-specific API to retrieve file size information, which resulted in an incorrect error message (Error: ibdata1 cannot be found) when the MySQL 5.6 innochecksum 2GB file size limit was exceeded. innochecksum now provides support for files larger than 2GB in both MySQL 5.6 and MySQL 5.7.
* InnoDB: Due to a regression introduced by the fix for Bug#17371537, memory was not allocated for the default memcached engine when using the default memcached engine as the backstore for data instead of InnoDB.
* InnoDB: InnoDB would report an incorrect operating system error code after failing to initialize.
* InnoDB: Manipulating a table after discarding its tablespace using ALTER TABLE ... DISCARD TABLESPACE could result in a serious error.
* InnoDB: Persistent optimizer statistics would cause stalls due to latch contention.
* InnoDB: MATCH() ... AGAINST queries that use a long string as an argument for AGAINST() could result in an error when run on an InnoDB table with a full-text search index.
* InnoDB: An InnoDB full-text search failure would occur due to an “unended” token. The string and string length should be passed for string comparison.
* InnoDB: In debug builds, a merge insert buffer during a page read would cause a memory access violation.
* InnoDB: Truncating a memcached InnoDB table while memcached is performing DML operations would result in a serious error.
* InnoDB: In sync0rw.ic, rw_lock_x_lock_func_nowait would needlessly call os_thread_get_curr_id.
* InnoDB: Attempting to rename a table to a missing database would result in a serious error.
* InnoDB: If a tablespace data file path is updated in a .isl file and then a crash recovery is performed, the updated tablespace data file path is read from the .isl file but the SYS_DATAFILES table would not be not updated. The SYS_DATAFILES table is now updated with the new data file path after crash recovery.
* InnoDB: If the first page (page 0) of file-per-table tablespace data file was corrupt, recovery would be halted even though the doublewrite buffer contained a clean copy of the page.
* InnoDB: The InnoDB memcached Readme file (README-innodb_memcached) incorrectly stated that libevent 1.6.0 is linked statically into daemon memcached. The bundled version of libevent is 1.4.12, not 1.6.0.
* InnoDB: Attempting to reset a replication slave while innodb_force_recovery is greater than 0 would return a cryptic error message: ERROR(1030) HY000: Got error -1 from storage engine. The error message has been changed to: ERROR HY000: Operation not allowed when innodb_force_recovery > 0. Replication options such as --relay-log-info-repository=TABLE and --master-info-repository=TABLE store information in tables in InnoDB. When innodb_force_recovery is greater than 0, replication tables cannot be updated which may cause replication administration commands to fail.
* InnoDB: The ALTER TABLE INPLACE algorithm would fail to decrease the auto-increment value.
* InnoDB: Comments in btr0cur.cc incorrectly stated that btr_cur_pessimistic_update() and btr_cur_optimistic_update() would accept a NULL value.
* InnoDB: dict_table_schema_check would call dtype_sql_name needlessly.
* InnoDB: The function os_file_get_status would not work with raw devices.
* InnoDB: During crash recovery, an incorrect transaction active time would result in rolling back an uncommitted transaction.
* InnoDB: Heap block debugging information (file_name, lineno), used for logging diagnostics, would appear in release builds. This information should only appear in debug builds.
* InnoDB: Renaming a column while also adding or dropping columns in the same ALTER TABLE operation would cause an error.
* InnoDB: An online ALTER TABLE operation would consume more memory than expected. During an online ALTER TABLE operation, an online log buffer containing a head and tail buffer is created for each index that is created or rebuilt. The tail buffer is the writer context and is only required for concurrent write operations on an index while the ALTER TABLE operation is in progress. The head buffer is the reader context and is only required during the log apply phase. To reduce memory consumption, the tail buffer is now allocated when the first DML statement is run on the index, and the head buffer is only allocated in the log apply phase and freed afterwards.
* InnoDB: On Windows, the full-text search (FTS) object ID was not in the expected hexadecimal format.
* InnoDB: Fetching and releasing pages from the buffer pool and tracking the page state are expensive and complex operations. Prior to the bug fix, these operations were performed using a page mutex. Using a page mutex to track several things is expensive and does not scale well. The bug fix separates fetch and release tracking (in-use state) of a page from page I/O state tracking. Fetch and release is now tracked using atomics where available.
* InnoDB: Table renaming errors would appear in the LATEST FOREIGN KEY ERROR section of the SHOW ENGINE INNODB STATUS output.
* InnoDB: UNIV_SYNC_DEBUG, which was disabled in univ.i with the fix for Bug#16720368, is now enabled.
* Partitioning: Queries using the index_merge optimization (see Index Merge Optimization) could return invalid results when run against tables that were partitioned by HASH.
* Partitioning: When no partition had returned a row since the last HA_ERR_KEY_NOT_FOUND error, the use of uninitialized memory in the priority queue used for returning rows in sorted order could lead to a crash of the server.
* Replication: When the binary log I/O cache grew to exactly 32768 bytes and the current transaction was preceded by a transaction whose size was greater than 32768 bytes, events could be corrupted when written into the binary log.
* Replication: Creating and dropping large numbers of temporary tables could lead to increased memory consumption.
* Replication: mysqlbinlog --verbose failed when it encountered a corrupt row event in the binary log. Such a row event could also cause the slave to fail.
* Replication: When log_warnings is greater than 1, the master prints binary log dump thread information—containing the slave server ID, binary log file name, and binary log position—in mysqld.1.err. A slave server ID greater than 2 billion was printed with a negative value in such cases.
* Replication: mysqlbinlog did not properly decode DECIMAL values in a row-based binary log. This could cause invalid values to be printed out for DECIMAL columns.
* Replication: Seconds_Behind_Master in the output of SHOW SLAVE STATUS could under some conditions be reported as 0 when it should have had a value greater than zero.
* Replication: The semisynchronous replication plugin was called twice for a DDL statement, incrementing Rpl_semi_sync_master_yes_tx by 2 instead of 1 each time such a statement was executed.
* Compilation errors occurred on Solaris 10; resolved by including my_config.h before system header files.
* FORCE INDEX [FOR ORDER BY] (index_name) did not work for joins.
* With the compressed client/server protocol enabled, Performance Schema statement instrumentation could raise an assertion.
* In some cases, UNIX_TIMESTAMP() could return NULL when it should return 0.
* An assertion could be raised if a filesort failed to resize its main buffer when record properties changed.
* The cache used for the Index Merge access method was freed only after successful retrieval of all rows. Interruption or failure of the operation led to a file descriptor leak.
* Using the mysqldump --set-gtid-purged option with no value caused mysqldump to crash.
* A race condition between Performance Schema statement event threads led to a server exit.
* In a view definition requireing resolution of aggregrate expressions within a subquery to an outer query, selecting from the view could cause a server exit.
* An addressing error in accessing the join buffer could produce invalid results or a server exit.
* mysql_config incorrectly included some flags to generate compiler warning output.
* With semi-join optimization enabled, queries with nested subqueries could cause a server exit due to incorrect resolution of references to columns in the middle query block.
* In some cases, the optimizer wrote fixed-length temporary MyISAM tables to disk rather than variable-length temporary tables.
* Enabling the validate_password plugin could result in incorrect password hashes being stored in the mysql.user table.
* For accounts authenticated using the sha256_password plugin, setting the password after the password had been expired did not clear the password-expired flag.
* On Mac OS X 10.7, a race condition involving vio_shutdown() and the select-based implementation of vio_io_wait() could cause a server exit.
* Host names in example URLs used within the source code were replaced by names in the example.com domain, the domain intended by IANA for this purpose.
* For utf8 and utf8mb4 strings, handler functions unnecessarily called a Unicode conversion function.
* Several -W warning flags were turned off for compilation in maintainer mode if MySQL was configured with -DWITH_INNODB_MEMCACHED=1.
* Calling the ExtractValue() function with an invalid XPath expression could in some cases lead to a failure of the server.
* Use of a nonmulti-byte algorithm for skipping leading spaces in multi-byte strings could cause a server exit.
* With ONLY_FULL_GROUP_BY SQL mode enabled, a query that uses GROUP BY on a column derived from a subquery in the FROM clause failed with a column isn't in GROUP BY error, if the query was in a view.
* For the utf8_bin collation, ORDER BY LOWER(col_name) could produce incorrect ordering.
* Several issues identified by the Coverity static analysis tool were fixed. Thanks to Honza Horak for the patch.
* On Windows, the --local-service server option did not work, and was not displayed in the --help message.
* It was not possible to query a view with an ORDER BY clause that referenced an alias in the SELECT clause of the view definition, unless all columns in the view were named in the select list.
* To handle this problem, the server now writes a view differently into the .frm file that stores the view definition. If you experience view-evaluation errors such as just described, drop and recreate the view so that the .frm file contains the updated view representation.
* The prototype of the Performance Schema instrumentation API mysql_cond_timedwait() call was fixed to be drop-in compatible with pthread_cond_timedwait(). This fix affects only implementers of third-party plugins.
* The make_atomic_cas_body64 implementation on IA32 with gcc but without gcc builtins could be miscompiled due to an incorrect constraint. The patch also causes MySQL to use builtin atomics when compiled using Clang.
* Complex updates of Performance Schema tables involving joins or subqueries failed to update every row.
* For the path specified with the --basedir option, mysql_plugin attempted to unlink the path rather than free the memory in which the path was stored.
* COUNT(DISTINCT) sometimes produced an incorrect result when the last read row contained a NULL value.
* sql_resolver.cc referred to partitioning code that should have been protected by an #ifdef, even when MySQL was configured with -DWITH_PARTITION_STORAGE_ENGINE=OFF.
* In incorrect result could be returned for a query with an IF() predicate in the WHERE clause combined with OUTER JOIN in a subquery that is transformed to a semi-join. (A workaround is to disable semi-join using SET optimizer_switch='semijoin=off';)
* A full-text search combined with derived tables (subqueries in the FROM clause) caused a server exit.
* Now if a full-text operation depends on a derived table, the server produces an error indicating that a full-text search cannot be done on a materialized table.
* Some scripts displayed out-of-date information regarding where to report bugs.
* Some files in the Performance Schema file_instances table were not being removed because the file-removal operation was not instrumented.
* mysqldump --single-transaction acquired metadata locks for each dumped table but did not release them until the dump operation finished. Consequently, other DDL operations on a dumped table blocked even after the table itself had been dumped. mysqldump now attempts to release metadata locks earlier.
* Updating a FEDERATED table with UPDATE... JOIN caused a server exit when the local table contained a single row and that row could be joined to a row in the FEDERATED table.
* mysql_install_db referred to the obsolete mysqlbug script for reporting problems.