icc Notes:
This is the final release of MySQL 5.5 for which Generic Linux MySQL binary packages built with the icc compiler on x86 and x86_64 will be offered. These were previously produced as an alternative to our main packages built using gcc, as they provided noticeable performance benefits. In recent times the performance differences have diminished and build and runtime problems have surfaced, thus it is no longer viable to continue producing them.
We continue to use the icc compiler to produce our distribution-specific RPM packages on ia64.
InnoDB Notes:
InnoDBhas been upgraded to version 1.1.1. This version is considered of “early adopter” quality.InnoDBis now the default storage engine, rather thanMyISAM, 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
InnoDBoption settings also change, so that the default configuration represents the best practices forInnoDBfunctionality, reliability, and file management:innodb_file_format=Barracudarather thanAntelope,innodb_strict_mode=ONrather thanOFF, andinnodb_file_per_table=ONrather thanOFF.The system tables remain in
MyISAMformat.MyISAMremains 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
InnoDBfile-per-table option, which creates a separate.ibdfile for each user table. Adapt any backup procedure to include these files. For details, see Section 13.6.3, “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
MyISAMthat cause problems during installation (when the tables are created) or at runtime (whenMyISAM-specific features might fail, or reliance onMyISAMsettings for performance might become apparent). TheInnoDB“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 TABLEto convert an existing table to use thetable_nameENGINE=INNODB;InnoDBstorage engine, and then run compatibility and performance tests.Where necessary, add
ENGINE=MYISAMclauses toCREATE TABLEstatements, for tables that use features specific toMyISAM, 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
InnoDBconfiguration settings.As a last resort, if a database server is devoted entirely to applications that can only run with
MyISAMtables, you could add adefault-storage-engineline in the configuration file, or a--default-storage-engineoption in the database server startup command, to re-enableMyISAMas 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:
Incompatible Change: All numeric operators and functions on integer, floating-point and
DECIMALvalues now throw an “out of range” error (ER_DATA_OUT_OF_RANGE) rather than returning an incorrect value orNULL, when the result is out of the supported range for the corresponding data type. See Section 10.6, “Out-of-Range and Overflow Handling”. (Bug#8433)InnoDB Storage Engine: The
INFORMATION_SCHEMA.INNODB_TRXtable now includes a number of new fields that duplicate information from theSHOW ENGINE INNODB STATUSoutput. You no longer need to parse that output to get complete transaction information. (Bug#53336)InnoDB Storage Engine:
InnoDBstores 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_checksystem variable served a dual purpose. Setting it at server startup would keepInnoDBfrom starting if any tables used a more recent file format than supported by the current level ofInnoDB. IfInnoDBcould start, the same system variable was set to the “highest” file format value used by anyInnoDBtable 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_checkcan be set to 1 or 0 at server startup to enable or disable whetherInnoDBchecks the file format tag in the system tablespace. If the tag is checked and is higher than that supported by the current version ofInnoDB, an error occurs andInnoDBdoes not start. If the tag is not higher,InnoDBsets the value ofinnodb_file_format_maxto the file format tag.For background information about
InnoDBfile-format management, see Section 13.7.4, “InnoDB File Format Management”. (Bug#49792, Bug#53654)The
Rows_examinedvalue in slow query log rows now is nonzero forUPDATEandDELETEstatements 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-resolveserver 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)It is now possible to build MySQL on all platforms using CMake instead of the GNU autotools. (Prior to MySQL 5.5.5, CMake support was limited to Windows.) For instructions on using CMake to build MySQL, see http://forge.mysql.com/wiki/CMake.
Bugs fixed:
Performance: InnoDB Storage Engine: Deadlock detection could be a bottleneck in
InnoDBprocessing, if many transactions attempted to update the same row simultaneously. The algorithm has been improved to enhance performance and scalability, in the InnoDB Plugin for MySQL 5.1, and in InnoDB 1.1 for MySQL 5.5. (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)See also Bug#55656.
Security Fix: The server could crash if there were alternate reads from two indexes on a table using the
HANDLERinterface. (Bug#54007, CVE-2010-3681)Security Fix: The server failed to check the table name argument of a
COM_FIELD_LISTcommand 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 toCOM_FIELD_LIST.In MySQL 5.0 and above, this permitted an authenticated user with
SELECTprivileges 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
DELETEorSELECTprivileges 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_LISTcommand 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:
LOAD DATA INFILEdid not check for SQL errors and sent an OK packet even when errors were already reported. Also, an assert related to client/server protocol checking in debug servers sometimes was raised when it should not have been. (Bug#52512, CVE-2010-3683)Security Fix: Privilege checking for
UNINSTALL PLUGINwas 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 TABLEdid not take an exclusive lock on a table if truncation was done by deleting all rows in the table. ForInnoDBtables, this could break proper isolation becauseInnoDBended up aborting some granted locks when truncating a table. Now an exclusive metadata lock is taken beforeTRUNCATE TABLEcan proceed. This guarantees that no other transaction is using the table.Incompatible change: Truncation using delete no longer fails if
sql_safe_updatesis enabled (this was an undocumented side effect). (Bug#42643)Incompatible Change: After
SET TRANSACTION ISOLATION LEVELto set the isolation level for the next transaction, the session value of thetx_isolationsystem 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 aSET TRANSACTION ISOLATION LEVEL statement, the value is taken from it. Otherwise, the sessiontx_isolationvalue 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 aSET TRANSACTION ISOLATION LEVELstatement, if there was any. (Bug#20837)Important Change: Replication: It was possible to set
sql_log_binwith session scope inside a transaction or subquery. (Bug#53437)Important Change: Replication: When changing
binlog_formatorbinlog_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 TOandSET GLOBAL sql_slave_skip_counternow cause information to be written to the error log about the slave's state prior to execution of the statement. ForCHANGE MASTER TO, this information includes the previous values ofMASTER_HOST,MASTER_PORT,MASTER_LOG_FILE, andMASTER_LOG_POS. ForSET GLOBAL sql_slave_skip_counter, this information includes the previous values ofRELAY_LOG_FILE,RELAY_LOG_POS, andsql_slave_skip_counter. (Bug#43406, Bug#43407)Important Change: When using fast
ALTER TABLE, different internal ordering of indexes in the MySQL optimizer and theInnoDBstorage engine could cause error messages about possibly mixed up.frmfiles and incorrect index use. (Bug#47622)InnoDB Storage Engine: Replication:
TRUNCATE TABLEperformed on a temporary table using theInnoDBstorage engine was logged even when using row-based mode. (Bug#51251)InnoDB Storage Engine: 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 updatingMyISAMtables, 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)InnoDB Storage Engine: The server could crash during shutdown, if started with the option
--innodb_use_sys_malloc=0. (Bug#54453)InnoDB Storage Engine: The server could crash with a message
InnoDB: Assertion failure in thread, typically during shutdown on a Windows system. (Bug#53947)nnnnInnoDB Storage Engine: Some combinations of
SELECTandSELECT FOR UPDATEstatements could fail with errors about locks, or incorrectly release a row lock during a semi-consistent read operation. (Bug#53674)InnoDB Storage Engine: Adding a unique key on multiple columns, where one of the columns is null, could mistakenly report duplicate key errors. (Bug#53290)
InnoDB Storage Engine: Fixed a checksum error reported for compressed tables when the
--innodb_checksumsoption is enabled. Although the message stated that the table was corrupted, the table is actually fine after the fix. (Bug#53248)InnoDB Storage Engine: When reporting a foreign key constraint violation during
INSERT,InnoDBcould display uninitialized data for theDB_TRX_IDandDB_ROLL_PTRsystem columns. (Bug#53202)InnoDB Storage Engine: The values of
innodb_buffer_pool_pages_totalandinnodb_buffer_pool_pages_miscin theinformation_schema.global_statustable could be computed incorrectly. (Bug#52983)InnoDB Storage Engine:
InnoDBpage splitting could enter an infinite loop for compressed tables. (Bug#52964)InnoDB Storage Engine: An overly strict assertion could fail during the purge of delete-marked records in
DYNAMICorCOMPRESSEDInnoDBtables that contain column prefix indexes. (Bug#52746)InnoDB Storage Engine:
InnoDBattempted to choose off-page storage without ensuring that there was an “off-page storage” flag in the record header. To correct this, inDYNAMICandCOMPRESSEDformats,InnoDBstores locally any non-BLOBcolumns 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 inREDUNDANTandCOMPACTformats, because thereInnoDBalways stores locally columns having a length up tolocal_len= 788 bytes. (Bug#52745)InnoDB Storage Engine: Connections waiting for an
InnoDBrow lock ignoredKILLuntil the row lock wait ended. Now,KILLduring lock wait results in “query interrupted” instead of “lock wait timeout exceeded”. The corresponding transaction is rolled back. (Bug#51920)InnoDB Storage Engine:
InnoDBchecks to see whether a row could possibly exceed the maximum size if all columns are fully used. This producedRow size too largeerrors for some tables that could be created with the built-inInnoDBfrom older MySQL versions. Now the check is only done wheninnodb_strict_modeis enabled or if the table is dynamic or compressed. (Bug#50495)InnoDB Storage Engine: Multi-statement execution could fail with an error about foreign key constraints. This problem could affect calls to
mysql_query()andmysql_real_query(), andCALLstatements that invoke stored procedures. (Bug#48024)InnoDB Storage Engine: A mismatch between index information maintained within the
.frmfiles and the corresponding information in the InnoDB system tablespace could produce this error:[ERROR] Index(Bug#44571)indexoftablehasncolumns unique inside InnoDB, but MySQL is asking statistics formcolumns. Have you mixed up .frm files from different installations?Partitioning: Replication: Attempting to execute
LOAD DATAon a partitionedMyISAMtable while using statement-based logging mode caused the master to hang or crash. (Bug#51851)Partitioning: Replication: The
NO_DIR_IN_CREATEserver 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 COLUMNSoption referencing multiple columns could be inserted into the wrong partition. (Bug#52815)Partitioning: Partition pruning on
RANGEpartitioned tables did not always work correctly; the last partition was not excluded if the range was beyond it (when not usingMAXVALUE). 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
DECIMALcolumn caused the server to crash; this not supported and is now specifically not permitted. (Bug#51347)Partitioning:
ALTER TABLEstatements that cause table partitions to be renamed or dropped (such asALTER TABLE ... ADD PARTITION,ALTER TABLE ... DROP PARTITION, andALTER TABLE ... REORGANIZE PARTITION) — when run concurrently with queries against theINFORMATION_SCHEMA.PARTITIONStable — could fail, cause the affected partitioned tables to become unusable, or both. This was due to the fact that theINFORMATION_SCHEMAdatabase ignored the name lock imposed by theALTER TABLEstatement on the partitions affected. In particular, this led to problems withInnoDBtables, becauseInnoDBwould accept the rename operation, but put it in a background queue, so that subsequent rename operations failed whenInnoDBwas unable to find the correct partition. Now,INFORMATION_SCHEMAhonors name locks imposed by ongoingALTER TABLEstatements that cause partitions to be renamed or dropped. (Bug#50561)Partitioning: The
insert_idserver system variable was not reset following an insert that failed on a partitionedMyISAMtable having anAUTO_INCREMENTcolumn. (Bug#50392)Partitioning: Foreign keys are not supported on partitioned tables. However, it was possible using an
ALTER TABLEstatement 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: It was possible to execute a
CREATE TEMPORARY TABLE tmp LIKE ptstatement, whereptis 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
.parfile 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 BYqueries 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 TABLEfailed for partitionedARCHIVEtables. (Bug#46565)Replication: When using unique keys on
NULLcolumns 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 containingNULLfor the column used by the unique key, and the slave merely picked the first row containingNULLin that column. (Bug#53893)Replication: When a
CREATE TEMPORARY TABLE ... SELECTstatement 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
STATEMENTtoROWdid not take effect until all temporary tables were dropped. (The existence of temporary tables should prevent switching the format only fromROWtoSTATEMENTfrom taking effect, not the reverse.) (Bug#52616)Replication: A buffer overrun in the handling of
DATEcolumn values could cause mysqlbinlog to fail when reading back logs containing certain combinations of DML on a table having aDATEcolumn followed by dropping the table. (Bug#52202)Replication: The failure of a
REVOKEstatement 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
tempfollowed byDROP 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.
See also Bug#51291, Bug#53075, Bug#53259, Bug#53452, Bug#54872.
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. Nowunsigned_flagis copied when the user variable value is copied, and the copy ofunsigned_flagis then used for logging. (Bug#51426)See also Bug#49562.
Replication: Enabling
binlog_direct_non_transactional_updatescauses 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
ROWorMIXEDlogging 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
ROWorMIXEDlogging 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
STATEMENTlogging 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_updatesno longer has any effect when the value ofbinlog_formatis eitherROWorMIXED. This addresses the first two issues previously listed.When using statement-based logging with
binlog_direct_non_transactional_updatesset toON, 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.
This regression was introduced by Bug#46364.
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 received0rather 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, andCREATE 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.NoteThe error ER_BINLOG_ROW_MODE_AND_STMT_ENGINE is generated when
binlog_format=ROWand a statement modifies a table restricted to statement-based logging; ER_BINLOG_STMT_MODE_AND_ROW_ENGINE is generated whenbinlog_format=STATEMENTand a statement modifies a table restricted to row-based logging.This regression was introduced by Bug#39934.
Replication: When run with the
--databaseoption, mysqlbinlog printedROLLBACKstatements but did not print any correspondingSAVEPOINTstatements. (Bug#50407)Replication: When a
CREATE EVENTstatement was followed by an additional statement and the statements were executed together as a single statement, theCREATE EVENTstatement 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
COMMITwas 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.
The
make_binary_distributiontarget to make could fail on some platforms because the lines generated were too long for the shell. (Bug#54590)Inconsistent checking of the relationship between
SHOWstatements andINFORMATION_SCHEMAqueries caused such queries to fail sometimes. (Bug#54422)A crash occurred if a table that was locked with
LOCK TABLESwas listed twice in aDROP TABLEstatement. (Bug#54282)ALTER TABLEfor views is not legal but did not produce an error. (If you need to rename a view, useRENAME TABLE.) (Bug#53976)Valgrind warnings resulting from passing incomplete
DATETIMEvalues to theTIMESTAMP()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_INITmacro inmy_sys.hincluded an extraneous semicolon, which could cause compilation failure. (Bug#53906)Queries that used
MIN()orMAX()on indexed columns could be optimized incorrectly. (Bug#53859)UPDATEon anInnoDBtable modifying the same index that was used to satisfy theWHEREcondition could trigger a debug assertion under some circumstances. (Bug#53830)MySQL incorrectly processed
ALTER DATABASE `#mysql50#<where <special>` UPGRADE DATA DIRECTORY NAMEspecial> 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 TABLEcould be run on a table in use by a transaction in a different session, causing repeatable read to break. (Bug#53798)InnoDBcrashed when replacing duplicates in a table after a fastALTER TABLEadded a unique index. (Bug#53592)For
InnoDBtables, the error handler for a fastCREATE INDEXdid not reset the error state of the transaction before attempting to undo a failed operation, resulting in a crash. (Bug#53591)For single-table
DELETEstatements 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_typesession 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 CHAINoption forCOMMITandROLLBACKfailed to preserve the current transaction isolation level. Settingcompletion_typeto 1 also failed to do so. (Bug#53343)Incorrect results could be returned for
LEFT JOINofInnoDBtables with an impossibleWHEREcondition. (Bug#53334)The
Lock_timevalue in the slow query log was negative for stored routines. (Bug#53191)Setting the
innodb_change_bufferingsystem variable toDEFAULTproduced an incorrect result. (Bug#53165)mysqldump and
SELECT ... INTO OUTFILEtruncated longBLOBandTEXTvalues to 766 bytes. (Bug#53088)On some systems, such as Mac OS X, the
sockaddr_inandsockaddr_in6structures 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 COLUMNSstatements could cause a server crash. (Bug#52856)With a non-
latin1ASCII-based current character set, the server inappropriately convertedDATETIMEvalues to strings. This resulted in the optimizer not using indexes on such columns. (Bug#52849)mysqld_safe set
plugin_dirusing a default path name rather than a path depending onbasedir. (Bug#52737)Semi-consistent read was implemented for
InnoDBto 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 theWHEREcondition. However, semi-consistent read was attempted even forUPDATEstatements having aWHEREcondition of the formpk_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.debugto an empty string failed to clear the current debug settings. (Bug#52629)SHOW CREATE TABLEwas blocked if the table was write locked by another session. (Bug#52593)The
lengthandmax_lengthmetadata values were incorrect for columns with theTEXTfamily 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 theMyISAMopen 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
BINARYdata type. (Bug#52430)EXPLAIN EXTENDEDcrashed trying to resolve references to freed temporary table columns forGROUP_CONCAT()ORDER BYarguments. (Bug#52397)During installing of MySQL server using the MSI package on Windows, the
default-character-setoption would be included in the default configuration template file. This would cause the MySQL server to fail to start properly. (Bug#52380)Two sessions trying to set the global
event_schedulersystem variable toOFFresulted 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 WRITEstatements 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
WHEREclause before any rows had been read, resulting in a server crash. (Bug#52177)Cast operations on
NULLDECIMALvalues could cause server crashes or Valgrind warnings. (Bug#52168)An assertion was raised as a result of a
NULLstring being passed to thedtoacode. (Bug#52165)A memory leak occurred due to missing deallocation of the
comparatorsarray (a member of theArg_comparatorclass). (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
NULLin 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()andLOWER()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 NEXTafter a failedHANDLER ... READ FIRST. (Bug#51877)After
TRUNCATE TABLEof aMyISAMtable, subsequent queries could crash the server ifmyisam_use_mmapwas enabled. (Bug#51868)If
myisam_sort_buffer_sizewas set to a small value, table repair forMyISAMtables withFULLTEXTindexes 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)
The optimizer performed an incorrect join type when
COALESCE()appeared within anIN()operation. (Bug#51598)Locking involving the
LOCK_plugin,LOCK_global_system_variables, andLOCK_statusmutexes could deadlock. (Bug#51591)Executing a
LOAD XML INFILEstatement 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.PROCESSLISTtable due to lack of mutex protection. (Bug#51377)Use of
HANDLERstatements with tables that had spatial indexes caused a server crash. (Bug#51357)With an XA transaction active,
SET autocommit = 1could cause side effects such as memory corruption or a server crash. (Bug#51342)Corrupt
MyISAMtables were automatically repaired even whenmyisam_recover_optionswas set toOFF. (Bug#51327)Following a bulk insert into a
MyISAMtable, ifMyISAMfailed to build indexes using repair by sort, data file corruption could occur. (Bug#51307)CHECKSUM TABLEcould compute the checksum forBITcolumns incorrectly. (Bug#51304)ALTER TABLEonInnoDBtables (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 exceedinginnodb_lock_wait_timeout). (Bug#51263)A
HAVINGclause 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_schedulersystem variable to different values could deadlock. (Bug#51160)InnoDBfast 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.
DATEcolumns in base tables were treated asTIMEcolumns in views, and base tableTIMEcolumns as viewDATETIMEcolumns. (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
.frmor data file, or reading table metadata from an.frmfile 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
REALthat containedNULLwere handled improperly when assigned to a column of another type. (Bug#50511)Setting
--secure-file-privto the empty string left the value unaffected. (Bug#50373)Calculation of intervals for Event Scheduler events was not portable. (Bug#50087)
The
YEARvalues2000and0000could be treated as equal. (Bug#49910)Performing a single in-place
ALTER TABLEcontainingADD INDEXandDROP INDEXoptions that used the same index name could result in a corrupt table definition file. Now suchALTER TABLEstatements are no longer performed in place. (Bug#49838)mysql_upgrade did not detect when
CSVlog tables incorrectly contained columns that could beNULL. Now these columns are altered to beNOT NULL. (Bug#49823)support-files/mysql.spec.shhad unnecessary Perl dependencies. (Bug#49723)Selecting from
INFORMATION_SCHEMA.ROUTINESorINFORMATION_SCHEMA.PARAMETERSresulted in a memory leak. (Bug#48729)In MySQL 5.1,
READ COMMITTEDwas changed to use less locking due to the availability of row based binary logging (see the Note underREAD COMMITTEDat Section 12.3.6, “SET TRANSACTIONSyntax”). However,READ UNCOMMITTEDdid not have the same change, so it was using more locks than the higher isolation level, which is unexpected. This was changed so thatREAD UNCOMMITTEDnow 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
NULLto aNOT NULLcolumn. (Bug#48525)The server crashed when it could not determine the best execution plan for queries involving outer joins with nondeterministic
ONclauses such as the ones containing theRAND()function, a user-defined function, or aNOT DETERMINISTICstored function. (Bug#48483)EXPLAINcould 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)
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).columnThe derived query could potentially produce zero rows or a single
NULL(that is, no rows matched, or the query used an aggregate function such asSUM()running over zero rows).The table subquery joined at least two tables.
The join condition involved an index.
The optimization to read
MIN()orMAX()values from an index did not properly handle comparisons withNULLvalues. This could produce incorrect results forMIN()orMAX()when theWHEREclause tested aNOT NULLcolumn forNULL. (Bug#47762)Killing a query during the optimization phase of a subquery could cause a server crash. (Bug#47761)
Using
REPLACEto update a previously inserted negative value in anAUTO_INCREMENTcoumn in anInnoDBtable caused the table auto-increment value to be updated to 2147483647. (Bug#47720)The query shown by
EXPLAIN EXTENDEDplusSHOW WARNINGScould produce results different from the original query. (Bug#47669)MyISAMcould write uninitialized data to new index pages. Now zeros are written to unused bytes in the pages. (Bug#47598)OPTIMIZE TABLEfor anInnoDBtable could raise an assertion if another session issued a concurrentDROP TABLE. (Bug#47459)For updates to
InnoDBtables,TIMESTAMPcolumns could be updated even when no values actually changed. (Bug#47453)Setting
myisam_repair_threadslarger than 1 could result in the cardinality for all indexes of aMyISAMtable being set to 1 after parallel index repair. (Bug#47444)mysqld_safe did not always pass
--open-files-limitthrough 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_generalstructure has a newevent_subclassmember.The new member changes the interface, so the audit plugin interface version,
MYSQL_AUDIT_INTERFACE_VERSION, has been incremented from0x0100to0x0200. Plugins that require access to the new member must be recompiled to use version0x0200or higher.
The example plugin in the
plugin/audit_nulldirectory has been modified to count events of each subclass, based on theevent_subclassvalue. See Section 23.2.5.2, “Writing Audit Plugins”. (Bug#47059)When the transaction isolation level was
REPEATABLE READand binary logging used statement or mixed format,SELECTstatements with subqueries referencingInnoDBtables 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 ... SELECTstatement mismatched, an assertion was raised in the query cache invalidation code following the failing statement. (Bug#46615)For the
COMMITandROLLBACKstatements, theAND CHAINandRELEASEmodifiers 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 rejectINSTALL PLUGINandUNINSTALL PLUGINstatements. (Bug#46261)gcc 4.4.0 could fail to compile
dtoa.c. (Bug#45882)ALTER TABLE ... ADD COLUMNfor a table with multiple foreign keys caused a server crash. (Bug#45052)Manual pages for a few little-used programs were missing from RPM packages. (Bug#44370)
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_RESOURCESerror. (Bug#42064)InnoDBcould fail to create a unique index onNULLcolumns. (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.tablemember. (Bug#41788)mysql_upgrade did not create temporary files properly. (Bug#41057)
It was possible for
DROP TABLEof oneMyISAMtable to remove the data and index files of a differentMyISAMtable. (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_EXPRESSIONcolumn of theINFORMATION_SCHEMA.PARTITIONStable did not include escape characters as necessary. (Bug#39338)When
SET TRANSACTION ISOLATION LEVELwas used to set the isolation level for the next transaction, the level could persist for subsequent transactions. (Bug#39170)When using
UNINSTALL PLUGINto 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
InnoDBcompare_record()function were corrected. (Bug#38999)The optimizer sometimes used
filesortforORDER BYwhen it should have used an index. (Bug#38745)Setting the session value of the
debugsystem variable also set the global value. (Bug#38054)Accessing a
MERGEtable with an empty underlying table list incorrectly resulted in a “wrong index” error message rather than “end of file.” (Bug#35274)The test for
readlineduring 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
FEDERATEDtable in which the data was ordered by aTEXTcolumn returned incorrect results. For example, a query such as the following would result in incorrect results if columncolumn1was aTEXTcolumn:SELECT * FROM table1 ORDER BY column1;
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 TABLEorDROP TABLE.DML statements other than
SELECT: The number of affected rows. This applies to statements such asUPDATE,INSERT, orDELETE(as before), but now also to statements such asALTER TABLEandLOAD DATA INFILE.SELECT: -1 if the statement returns a result set, or the number of rows “affected” if it does not. For example, forSELECT * FROM t1,ROW_COUNT()returns -1. ForSELECT * FROM t1 INTO OUTFILE ',file_name'ROW_COUNT()returns the number of rows written to the file.SIGNALstatements: 0.