Version History of MySQL Server 5.1.23a
Functionality added or changed:
- Important Change: Partitioning: Security Fix: It was possible, by creating a partitioned table using the DATA DIRECTORY and INDEX DIRECTORY options to gain privileges on other tables having the same name as the partitioned table. As a result of this fix, any table-level DATA DIRECTORY or INDEX DIRECTORY options are now ignored for partitioned tables. (Bug #32091, CVE-2007-5970)
See also Bug #29325, Bug #32111.
- Incompatible Change: In MySQL 5.1.6, when log tables were implemented, the default log destination for the general query and slow query log was TABLE. This default has been changed to FILE, which is compatible with MySQL 5.0, but incompatible with earlier releases of MySQL 5.1 from 5.1.6 to 5.1.20. If you are upgrading from MySQL 5.0 to 5.1.21 or higher, no logging option changes should be necessary. However, if you are upgrading from 5.1.6 through 5.1.20 to 5.1.21 or higher and were using TABLE logging, use the --log-output=TABLE option explicitly to preserve your server's table-logging behavior.
The MySQL 5.1.23 fix is in addition to a fix in 5.1.21 because it turned out that the default was set in two places, only one of which was fixed the first time. (Bug #29993)
- Incompatible Change
The parser accepted statements that contained /* ... */ that were not properly closed with */, such as SELECT 1 /* + 2. Statements that contain unclosed /*-comments now are rejected with a syntax error.
This fix has the potential to cause incompatibilities. Because of Bug#26302, which caused the trailing */ to be truncated from comments in views, stored routines, triggers, and events, it is possible that objects of those types may have been stored with definitions that now will be rejected as syntactically invalid. Such objects should be dropped and re-created so that their definitions do not contain truncated comments. (Bug #28779)
- MySQL Cluster: The following improvements have been made in the ndb_size.pl utility:
- The script can now be used with multiple databases; lists of databases and tables can also be excluded from analysis.
- Schema name information has been added to index table calculations.
- The database name is now an optional parameter, the exclusion of which causes all databases to be examined.
- If selecting from INFORMATION_SCHEMA fails, the script now attempts to fall back to SHOW TABLES.
- A --real_table_name option has been added; this designates a table to handle unique index size calculations.
- The report title has been amended to cover cases where more than one database is being analyzed.
Support for a --socket option was also added.
For more information, see Section 16.4.21, “ndb_size.pl — NDBCLUSTER Size Requirement Estimator”. (Bug #28683, Bug #28253)
- MySQL Cluster: Mapping of NDB error codes to MySQL storage engine error codes has been improved. (Bug #28423)
- MySQL Cluster: The output of the ndb_mgm client SHOW and STATUS commands now indicates when the cluster is in single user mode. (Bug #27999)
- MySQL Cluster: The output from the cluster management client showing the progress of data node starts has been improved. (Bug #23354)
- Partitioning: Error messages for partitioning syntax errors have been made more descriptive. (Bug #29368)
- Replication: Replication of the following SQL functions now switches to row-based logging in MIXED mode, and generates a warning in STATEMENT mode:
- CURRENT_USER() and its alias CURRENT_USER
See Section 22.214.171.124, “Mixed Binary Logging Format”, for more information. (Bug #12092, Bug #28086, Bug #30244)
- mysqldump information at the top of the output now shows the same information as mysqldump invoked with the -V option, namely the mysqldump version number, the MySQL server version, and the distribution. (Bug #32350)
- mysqltest now has a change_user command to change the user for the current connection. (It invokes the mysql_change_user() C API function.) (Bug #31608)
- mysql-test-run.pl now permits a suite name prefix to be specified in command-line arguments that name test cases. The test name syntax now is [suite_name.]test_name[.suffix]. For example, mysql-test-run.pl binlog.mytest runs the mytest.test test in the binlog test suite. (Bug #31400)
- The --event-scheduler option without a value disabled the event scheduler. Now it enables the event scheduler. (Bug #31332)
- mysqldump produces a -- Dump completed on DATE comment at the end of the dump if --comments is given. The date causes dump files for identical data take at different times to appear to be different. The new options --dump-date and --skip-dump-date control whether the date is added to the comment. --skip-dump-date suppresses date printing. The default is --dump-date (include the date in the comment). (Bug #31077)
- Server parser performance was improved for expression parsing by lowering the number of state transitions and reductions needed. (Bug #30625)
- Server parser performance was improved for identifier lists, expression lists, and UDF expression lists. (Bug #30333)
- Server parser performance was improved for boolean expressions. (Bug #30237)
- The LAST_EXECUTED column of the INFORMATION_SCHEMA.EVENTS table now indicates when the event started executing rather than when it finished executing. As a result, the ENDS column is never less than LAST_EXECUTED. (Bug #29830)
- The mysql_odbc_escape_string() C API function has been removed. It has multi-byte character escaping issues, doesn't honor the NO_BACKSLASH_ESCAPES SQL mode and is not needed anymore by Connector/ODBC as of 3.51.17. (Bug #29592)
See also Bug #41728.
- If a MyISAM table is created with no DATA DIRECTORY option, the .MYD file is created in the database directory. By default, if MyISAM finds an existing .MYD file in this case, it overwrites it. The same applies to .MYI files for tables created with no INDEX DIRECTORY option. To suppress this behavior, start the server with the new --keep_files_on_create option, in which case MyISAM will not overwrite existing files and returns an error instead. (Bug #29325)
- The default value of the connect_timeout system variable was increased from 5 to 10 seconds. This might help in cases where clients frequently encounter errors of the form Lost connection to MySQL server at 'XXX', system error: errno. (Bug #28359)
- MySQL now can be compiled with gcc 4.2.x. There was a problem involving a conflict with the min() and max() macros in my_global.h. (Bug #28184)
- mysql-test-run.pl now supports a --combination option for specifying options to the mysqld server. This option is similar to --mysqld but should be given two or more times. mysql-test-run.pl executes multiple test runs, using the options for each instance of --combination in successive runs.
For test runs specific to a given test suite, an alternative to the use of --combination is to create a combinations file in the suite directory. The file should contain a section of options for each test run.
- The argument for the mysql-test-run.pl --do-test and --skip-test options is now interpreted as a Perl regular expression if there is a pattern metacharacter in the argument value. This enables more flexible specification of which tests to perform or skip.
- Performance: If a LIMIT clause was present, the server could fail to consider indexes that could be used for ORDER BY or GROUP BY. (Bug #28404)
- Security Fix: Replication: It was possible for any connected user to issue a BINLOG statement, which could be used to escalate privileges.
Use of the BINLOG statement now requires the SUPER privilege. (Bug #31611, CVE-2007-6313)
- Security Fix: Three vulnerabilities in yaSSL versions 1.7.5 and earlier were discovered that could lead to a server crash or execution of unauthorized code. The exploit requires a server with yaSSL enabled and TCP/IP connections enabled, but does not require valid MySQL account credentials. The exploit does not apply to OpenSSL.
The proof-of-concept exploit is freely available on the Internet. Everyone with a vulnerable MySQL configuration is advised to upgrade immediately.
(Bug #33814, CVE-2008-0226, CVE-2008-0227)
- Security Fix: Using RENAME TABLE against a table with explicit DATA DIRECTORY and INDEX DIRECTORY options can be used to overwrite system table information by replacing the symbolic link points. the file to which the symlink points.
MySQL will now return an error when the file to which the symlink points already exists. (Bug #32111, CVE-2007-5969)
- Security Fix: ALTER VIEW retained the original DEFINER value, even when altered by another user, which could enable that user to gain the access rights of the view. Now ALTER VIEW is permitted only to the original definer or users with the SUPER privilege. (Bug #29908)
- Security Fix: When using a FEDERATED table, the local server could be forced to crash if the remote server returned a result with fewer columns than expected. (Bug #29801)
- Security Enhancement: It was possible to force an error message of excessive length which could lead to a buffer overflow. This has been made no longer possible as a security precaution. (Bug #32707)
- Incompatible Change: It is no longer possible to create CSV tables with NULL columns. However, for backward compatibility, you can continue to use such tables that were created in previous MySQL releases. (Bug #32050)
- Incompatible Change: With ONLY_FULL_GROUP_BY SQL mode enabled, queries such as SELECT a FROM t1 HAVING COUNT(*)>2 were not being rejected as they should have been.
This fix results in the following behavior:
- There is a check against mixing group and nongroup columns only when ONLY_FULL_GROUP_BY is enabled.
- This check is done both for the select list and for the HAVING clause if there is one.
This behavior differs from previous versions as follows:
- Previously, the HAVING clause was not checked when ONLY_FULL_GROUP_BY was enabled; now it is checked.
- Previously, the select list was checked even when ONLY_FULL_GROUP_BY was not enabled; now it is checked only when ONLY_FULL_GROUP_BY is enabled.
- Incompatible Change: Inserting a row with a NULL value for a DATETIME column results in a CSV file that the storage engine cannot read.
All CSV tables now need to be defined with each column marked as NOT NULL. An error is raised if you try to create a CSV table with columns that are not defined with NOT NULL. (Bug #31473, Bug #32817)
- Incompatible Change: SET PASSWORD statements now cause an implicit commit, and thus are prohibited within stored functions and triggers. (Bug #30904)
- Incompatible Change: The mysql_install_db script could fail to locate some components (including resolveip) during execution if the --basedir option was specified on the command-line or within the my.cnf file. This was due to a conflict when comparing the compiled-in values and the supplied values.
The --source-install command-line option to the script has been removed and replaced with the --srcdir option. mysql_install_db now locates components either using the compiled-in options, the --basedir option or --srcdir option. (Bug #30759)
- Incompatible Change: Multiple-table DELETE statements containing ambiguous aliases could have unintended side effects such as deleting rows from the wrong table. Examples:
- DELETE FROM t1 AS a2 USING t1 AS a1 INNER JOIN t2 AS a2;
- DELETE t1 AS a2 FROM t1 AS a1 INNER JOIN t2 AS a2;
To avoid ambiguity, declaration of aliases other than in the table_references part of the statement should be avoided:
DELETE FROM t1 USING t1 AS a1 INNER JOIN t2 AS a2;
DELETE t1 FROM t1 AS a1 INNER JOIN t2 AS a2;
For the USING variant of multiple-table DELETE syntax, alias declarations outside the table_references part of the statement now are disallowed. (In MySQL 5.5, alias declarations outside table_references are disallowed for all multiple-table DELETE statements.) Statements containing aliases that are no longer permitted must be rewritten. (Bug #30234)
See also Bug #27525.
- Incompatible Change: Within a stored routine, it is no longer permissible to declare a cursor for a SHOW or DESCRIBE statement. This happened to work in some instances, but is no longer supported. In many cases, a workaround for this change is to use the cursor with a SELECT query to read from an INFORMATION_SCHEMA table that produces the same information as the SHOW statement. (Bug #29223)
- Incompatible Change: It was possible to create a view having a column whose name consisted of an empty string or space characters only.
One result of this bug fix is that aliases for columns in the view SELECT statement are checked to ensure that they are legal column names. In particular, the length must be within the maximum column length of 64 characters, not the maximum alias length of 256 characters. This can cause problems for replication or loading dump files. For additional information and workarounds, see Section E.4, “Restrictions on Views”. (Bug #27695)
See also Bug #31202.
- Incompatible Change: Several type-preserving functions and operators returned an incorrect result type that does not match their argument types: COALESCE(), IF(), IFNULL(), LEAST(), GREATEST(), CASE. These now aggregate using the precise SQL types of their arguments rather than the internal type. In addition, the result type of the STR_TO_DATE() function is now DATETIME by default. (Bug #27216)
- Incompatible Change: GRANT and REVOKE statements now cause an implicit commit, and thus are prohibited within stored functions and triggers. (Bug #21975, Bug #21422, Bug #17244)
- Incompatible Change: It was possible for option files to be read twice at program startup, if some of the standard option file locations turned out to be the same directory. Now duplicates are removed from the list of files to be read.
Also, users could not override system-wide settings using ~/.my.cnf because SYSCONFDIR/my.cnf was read last. The latter file now is read earlier so that ~/.my.cnf can override system-wide settings.
The fix for this problem had a side effect such that on Unix, MySQL programs looked for options in ~/my.cnf rather than the standard location of ~/.my.cnf. That problem was addressed as Bug#38180. (Bug #20748)
- Incompatible Change: A number of problems existed in the implementation of MERGE tables that could cause problems. The problems are summarized below:
- Bug#26379 - Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table. This was caused in a number of situations:
- A thread trying to lock a MERGE table performs busy waiting while REPAIR TABLE or a similar table administration task is ongoing on one or more of its MyISAM tables.
- A thread trying to lock a MERGE table performs busy waiting until all threads that did REPAIR TABLE or similar table administration tasks on one or more of its MyISAM tables in LOCK TABLES segments do UNLOCK TABLES. The difference against problem #1 is that the busy waiting takes place after the administration task. It is terminated by UNLOCK TABLES only.
- Two FLUSH TABLES within a LOCK TABLES segment can invalidate the lock. This does not require a MERGE table. The first FLUSH TABLES can be replaced by any statement that requires other threads to reopen the table. In 5.0 and 5.1 a single FLUSH TABLES can provoke the problem.
Trying DML on a MERGE table, which has a child locked and repaired by another thread, made an infinite loop in the server.
- Bug#26377 - Deadlock with MERGE and FLUSH TABLE
Locking a MERGE table and its children in parent-child order and flushing the child deadlocked the server.
- Bug#25038 - Waiting TRUNCATE TABLE
Truncating a MERGE child, while the MERGE table was in use, let the truncate fail instead of waiting for the table to become free.
- Bug#25700 - MERGE base tables get corrupted by OPTIMIZE TABLE, ANALYZE TABLE, or REPAIR TABLE.
Repairing a child of an open MERGE table corrupted the child. It was necessary to FLUSH the child first.
- Bug#30275 - MERGE tables: FLUSH TABLES or UNLOCK TABLES causes server to crash.
Flushing and optimizing locked MERGE children crashed the server.
- Bug#19627 - temporary merge table locking
Use of a temporary MERGE table with nontemporary children could corrupt the children.
Temporary tables are never locked. Creation of tables with nontemporary children of a temporary MERGE table is now prohibited.
- Bug#27660 - Falcon: MERGE table possible
It was possible to create a MERGE table with non-MyISAM children.
- Bug#30273 - MERGE tables: Can't lock file (errno: 155)
This was a Windows-only bug. Table administration statements sometimes failed with "Can't lock file (errno: 155)".
- The fix introduces the following changes in behavior:
- This patch changes the behavior of temporary MERGE tables. Temporary MERGE must have temporary children. The old behavior was wrong. A temporary table is not locked. Hence even nontemporary children were not locked. See Bug #19627.
- You cannot change the union list of a nontemporary MERGE table when LOCK TABLES is in effect. The following does not work:
- CREATE TABLE m1 ... ENGINE=MRG_MYISAM ...;
- LOCK TABLES t1 WRITE, t2 WRITE, m1 WRITE;
- ALTER TABLE m1 ... UNION=(t1,t2) ...;
However, you can do this with a temporary MERGE table.
- You cannot create a MERGE table with CREATE ... SELECT, neither as a temporary MERGE table, nor as a nontemporary MERGE table. For example, CREATE TABLE m1 ... ENGINE=MRG_MYISAM ... SELECT ...; causes the error message: table is not BASE TABLE.
(Bug #19627, Bug #25038, Bug #25700, Bug #26377, Bug #26379, Bug #26867, Bug #27660, Bug #30275, Bug #30491)
- Important Change: MySQL Cluster: AUTO_INCREMENT columns had the following problems when used in NDB tables:
- The AUTO_INCREMENT counter was not updated correctly when such a column was updated.
- AUTO_INCREMENT values were not prefetched beyond statement boundaries.
- AUTO_INCREMENT values were not handled correctly with INSERT IGNORE statements.
- After being set, ndb_autoincrement_prefetch_sz showed a value of 1, regardless of the value it had actually been set to.
As part of this fix, the behavior of ndb_autoincrement_prefetch_sz has changed. Setting this to less than 32 no longer has any effect on prefetching within statements (where IDs are now always obtained in batches of 32 or more), but only between statements. The default value for this variable has also changed, and is now 1. (Bug #25176, Bug #31956, Bug #32055)
- Partitioning: Important Note: An apostrophe or single quote character (') used in the DATA DIRECTORY, INDEX DIRECTORY, or COMMENT for a PARTITION clause caused the server to crash. When used as part of a CREATE TABLE statement, the crash was immediate. When used in an ALTER TABLE statement, the crash did not occur until trying to perform a SELECT or DML statement on the table. In either case, the server could not be completely restarted until the .frm file corresponding to the newly created or altered table was deleted.
Upgrading to the current (or later) release solves this problem only for tables that are newly created or altered. Tables created or altered in previous versions of the server to include ' characters in PARTITION options must still be removed by deleting the corresponding .frm files and re-creating them afterward.
- Important Note: The RENAME DATABASE statement was removed and replaced with ALTER DATABASE db_name UPGRADE DATA DIRECTORY NAME. The RENAME DATABASE statement was intended for upgrading database directory names to the encoding format used in 5.1 for representing identifiers in the file system (see Section 8.2.3, “Mapping of Identifiers to File Names”). However, the statement was found to be dangerous because it could result in loss of database contents. See Section 12.1.32, “RENAME DATABASE Syntax”, and Section 12.1.1, “ALTER DATABASE Syntax”. (Bug #17565, Bug #21741, Bug #28360)
- Replication: MySQL Cluster: Row-based replication from or to a big-endian machine where the table used the NDB storage engine failed, if the same table on the other machine was either non-NDB or the other machine was little-endian. (Bug #29549, Bug #30790)
See also Bug #24231, Bug #30024, Bug #30133, Bug #30134.
- MySQL Cluster: An improperly reset internal signal was observed as a hang when using events in the NDB API but could result in various errors. (Bug #33206)
- MySQL Cluster: Incorrectly handled parameters could lead to a crash in the Transaction Coordinator during a node failure, causing other data nodes to fail. (Bug #33168)
- MySQL Cluster: A memory leak occurred if a subscription start request was received by the subscription manager before the node making the request was fully connected to the cluster. (Bug #32652)
- MySQL Cluster: A local checkpoint could sometimes be started before the previous LCP was restorable from a global checkpoint. (Bug #32519)
- MySQL Cluster: High numbers of API nodes on a slow or congested network could cause connection negotiation to time out prematurely, leading to the following issues:
- Excessive retries
- Excessive CPU usage
- Partially connected API nodes
- MySQL Cluster: When a mysqld acting as a cluster SQL node starts the NDBCLUSTER storage engine, there is a delay during which some necessary data structures cannot be initialized until after it has connected to the cluster, and all MySQL Cluster tables should be opened as read only. This worked correctly when the NDB binlog thread was running, but when it was not running, Cluster tables were not opened as read only even when the data structures had not yet been set up. (Bug #32275, Bug #33763)
- MySQL Cluster: The failure of a master node could lead to subsequent failures in local checkpointing. (Bug #32160)
- MySQL Cluster: The management server was slow to respond when no data nodes were connected to the cluster. This was most noticeable when running SHOW in the management client. (Bug #32023)
- MySQL Cluster: An error with an if statement in sql/ha_ndbcluster.cc could potentially lead to an infinite loop in case of failure when working with AUTO_INCREMENT columns in NDB tables. (Bug #31810)
- MySQL Cluster: The NDB storage engine code was not safe for strict-alias optimization in gcc 4.2.1. (Bug #31761)
- MySQL Cluster: It was possible in some cases for a node group to be “lost” due to missed local checkpoints following a system restart. (Bug #31525)
- MySQL Cluster: A query against a table with TEXT or BLOB columns that would return more than a certain amount of data failed with Got error 4350 'Transaction already aborted' from NDBCLUSTER. (Bug #31482)
This regression was introduced by Bug #29102.
- MySQL Cluster: NDB tables having names containing nonalphanumeric characters (such as “$”) were not discovered correctly. (Bug #31470)
- MySQL Cluster: A node failure during a local checkpoint could lead to a subsequent failure of the cluster during a system restart. (Bug #31257)
- MySQL Cluster: A cluster restart could sometimes fail due to an issue with table IDs. (Bug #30975)
- MySQL Cluster: When handling BLOB columns, the addition of read locks to the lock queue was not handled correctly. (Bug #30764)
- MySQL Cluster: Discovery of NDB tables did not work correctly with INFORMATION_SCHEMA. (Bug #30667)
- MySQL Cluster: A file system close operation could fail during a node or system restart. (Bug #30646)
- MySQL Cluster: Transaction timeouts were not handled well in some circumstances, leading to excessive number of transactions being aborted unnecessarily. (Bug #30379)
- MySQL Cluster: The cluster management client could not connect, and would hang instead. This issue affected Mac OS X 64-bit only. (Bug #30366)
- MySQL Cluster: Attempting to restore a backup made on a cluster host using one endian to a machine using the other endian could cause the cluster to fail. (Bug #29674)
- MySQL Cluster: Log event requests to ndb_mgmd could time out, causing it to fail. (Bug #29621)
- MySQL Cluster: In some cases, the cluster managment server logged entries multiple times following a restart of ndb_mgmd. (Bug #29565)
- MySQL Cluster: ndb_mgm --help did not display any information about the -a option. (Bug #29509)
- MySQL Cluster: An interpreted program of sufficient size and complexity could cause all cluster data nodes to shut down due to buffer overruns. (Bug #29390)
- MySQL Cluster: ndb_size.pl failed on tables with FLOAT columns whose definitions included commas (for example, FLOAT(6,2)). (Bug #29228)
- MySQL Cluster: The error message for NDB error code 275 (Out of transaction records for complete phase) was missing. (Bug #29139)
- MySQL Cluster: Reads on BLOB columns were not locked when they needed to be to guarantee consistency. (Bug #29102)
See also Bug #31482.
- MySQL Cluster: A query using joins between several large tables and requiring unique index lookups failed to complete, eventually returning Uknown Error after a very long period of time. This occurred due to inadequate handling of instances where the Transaction Coordinator ran out of TransactionBufferMemory, when the cluster should have returned NDB error code 4012 (Request ndbd time-out). (Bug #28804)
- MySQL Cluster: There was a short interval during the startup process prior to the beginning of heartbeat detection such that, were an API or management node to reboot or a network failure to occur, data nodes could not detect this, with the result that there could be a lingering connection. (Bug #28445)
- MySQL Cluster: The description of the --print option provided in the output from ndb_restore --help was incorrect. (Bug #27683)
- MySQL Cluster: Restoring a backup made on a cluster host using one endian to a machine using the other endian failed for BLOB and DATETIME columns. (Bug #27543, Bug #30024)
- MySQL Cluster: An invalid subselect on an NDB table could cause mysqld to crash. (Bug #27494)
- MySQL Cluster: An attempt to perform a SELECT ... FROM INFORMATION_SCHEMA.TABLES whose result included information about NDB tables for which the user had no privileges crashed the MySQL Server on which the query was performed. (Bug #26793)
- MySQL Cluster: Performing DELETE operations after a data node had been shut down could lead to inconsistent data following a restart of the node. (Bug #26450)
- MySQL Cluster: UPDATE IGNORE could sometimes fail on NDB tables due to the use of unitialized data when checking for duplicate keys to be ignored. (Bug #25817)
- MySQL Cluster: The cluster log was formatted inconsistently and contained extraneous newline characters. (Bug #25064)
- MySQL Cluster: A restart of the cluster failed when more than 1 REDO phase was in use. (Bug #22696)
- MySQL Cluster: When inserting a row into an NDB table with a duplicate value for a nonprimary unique key, the error issued would reference the wrong key.
This improves on an initial fix for this issue made in MySQL 5.1.13. (Bug #21072)
- MySQL Cluster: An insufficiently descriptive and potentially misleading Error 4006 (Connect failure - out of connection objects...) was produced when either of the following two conditions occurred:
- There were no more transaction records in the transaction coordinator
- An NDB object in the NDB API was initialized with insufficient parallelism
Separate error messages are now generated for each of these two cases. (Bug #11313)
- Partitioning: Replication: Replication of partitioned tables using the InnoDB storage engine failed with binlog-format=ROW or binlog-format=MIXED. (Bug #28430)
- Partitioning: It was possible to partition a table to which a foreign key referred. (Bug #32948)
- Partitioning: A query of the form SELECT col1 FROM table GROUP BY (SELECT col2 FROM table LIMIT 1); against a partitioned table having a SET column crashed the server. (Bug #32772)
- Partitioning: SHOW CREATE TABLE misreported the value of AUTO_INCREMENT for partitioned tables using either of the InnoDB or ARCHIVE storage engines. (Bug #32247)
- Partitioning: Selecting from INFORMATION_SCHEMA.PARTITIONS while partition management statements (for example, ALTER TABLE ... ADD PARTITION) were executing caused the server to crash. (Bug #32178)
- Partitioning: An error in the internal function mysql_unpack_partition() led to a fatal error in subsequent calls to open_table_from_share(). (Bug #32158)
- Partitioning: Repeated updates of a table that was partitioned by KEY on a TIMESTAMP column eventually crashed the server. (Bug #32067)
- Partitioning: Changing the storage engine used by a table having subpartitions led to a server crash. (Bug #31893)
- Partitioning: ORDER BY ... DESC did not always work correctly when selecting from partitioned tables. (Bug #31890)
See also Bug #31001.
- Partitioning: Selecting from a table partitioned by KEY on a VARCHAR column whose size was greater than 65530 caused the server to crash. (Bug #31705)
- Partitioning: INSERT DELAYED on a partitioned table crashed the server. The server now rejects the statement with an error. (Bug #31210)
- Partitioning: Using ALTER TABLE to partition an existing table having an AUTO_INCREMENT column could crash the server. (Bug #30878)
This regression was introduced by Bug #27405.
- Partitioning: ALTER TABLE ... COALESCE PARTITION on a table partitioned by [LINEAR] HASH or [LINEAR] KEY caused the server to crash. (Bug #30822)
- Partitioning: LIKE queries on tables partitioned by KEY and using third-party storage engines could return incomplete results. (Bug #30480)
See also Bug #29320, Bug #29493, Bug #30563.
- Partitioning: It was not possible to insert the greatest possible value for a given data type into a partitioned table. For example, consider a table defined as shown here:
- CREATE TABLE t (c BIGINT UNSIGNED)
- PARTITION BY RANGE(c) (
- PARTITION p0 VALUES LESS THAN MAXVALUE
The largest possible value for a BIGINT UNSIGNED column is 18446744073709551615, but the statement INSERT INTO t VALUES (18446744073709551615); would fail, even though the same statement succeeded were t not a partitioned table.
In other words, MAXVALUE was treated as being equal to the greatest possible value, rather than as a least upper bound. (Bug #29258)
- Cluster Replication: Replication: A node failure during replication could lead to buckets out of order; now active subscribers are checked for, rather than empty buckets. (Bug #31701)
- Cluster Replication: Replication: Incorrect handling of INSERT plus DELETE operations with regard to local checkpoints caused data node failures in multi-master replication setups. (Bug #30914)
- Replication: When dropping a database containing a stored procedure while using row-cased replication, the delete of the stored procedure from the mysql.proc table was recorded in the binary log following the DROP DATABASE statement. To correct this issue, DROP DATABASE now uses statement-based replication. (Bug #32435)
- Replication: It was possible for the name of the relay log file to exceed the amount of memory reserved for it, possibly leading to a crash of the server. (Bug #31836)
See also Bug #28597.
- Replication: Corruption of log events caused the server to crash on 64-bit Linux systems having 4 GB or more of memory. (Bug #31793)
- Replication: Trying to replicate an update of a row that was missing on the slave led to a failure on the slave. (Bug #31702)
- Replication: Use of the @@hostname system variable in inserts in mysql_system_tables_data.sql did not replicate. The workaround is to select its value into a user variable (which does replicate) and insert that. (Bug #31167)
- Replication: Table names were displayed as binary “garbage” characters in slave error messages. The issue was observed on 64-bit Windows but may have effected other platforms. (Bug #30854)
- Replication: One thread could read uninitialized memory from the stack of another thread. This issue was only known to occur in a mysqld process acting as both a master and a slave. (Bug #30752)
- Replication: It was possible to set SQL_SLAVE_SKIP_COUNTER such that the slave would jump into the middle of a transaction. This fix improves on one made for this bug in MySQL 5.1.20; the previous fix insured that the slave could not be made to jump into the middle of an event group, but the slave failed to recognize that BEGIN, COMMIT, and ROLLBACK statements could begin or end an event group. (Bug #28618)
See also Bug #12691.
- Replication: Due a previous change in how the default name and location of the binary log file were determined, replication failed following some upgrades. (Bug #28597, Bug #28603)
See also Bug #31836.
This regression was introduced by Bug #20166.
- Replication: Stored procedures having BIT parameters were not replicated correctly. (Bug #26199)
- Replication: Issuing SHOW SLAVE STATUS as mysqld was shutting down could cause a crash. (Bug #26000)
- Replication: If a temporary error occured inside an event group on an event that was not the first event of the group, the slave could get caught in an endless loop because the retry counter was reset whenever an event was executed successfully. (Bug #24860)
See also Bug #12691, Bug #23171.
- Replication: An UPDATE statement using a stored function that modified a nontransactional table was not logged if it failed. This caused the copy of the nontransactional table on the master have a row that the copy on the slave did not.
In addition, when an INSERT ... ON DUPLICATE KEY UPDATE statement encountered a duplicate key constraint, but the UPDATE did not actually change any data, the statement was not logged. As a result of this fix, such statements are now treated the same for logging purposes as other UPDATE statements, and so are written to the binary log. (Bug #23333)
See also Bug #12713.
- Replication: A replication slave sometimes failed to reconnect because it was unable to run SHOW SLAVE HOSTS. It was not necessary to run this statement on slaves (since the master should track connection IDs), and the execution of this statement by slaves was removed. (Bug #21132)
See also Bug #13963, Bug #21869.
- Replication: A replication slave sometimes stopped for changes that were idempotent (that is, such changes should have been considered “safe”), even though it should have simply noted that the change was already done, and continued operation. (Bug #19958)
- Replication: Replicating from a master table to a slave table where the size of a CHAR or VARCHAR column was a different size would cause mysqld to crash. For more information on replicating with different column definitions, see Section 126.96.36.199, “Replication with Differing Table Definitions on Master and Slave”.
- Cluster Replication: A replication slave could return “garbage” data that was not in recognizable row format due to a problem with the internal all_set() method. (Bug #33375)
- Cluster Replication: Memory was mistakenly freed for NdbBlob objects when adding an index while replicating the cluster, which could cause mysqld to crash. (Bug #33142)
See also Bug #18106.
- Cluster Replication: Under certain conditions, the slave stopped processing relay logs. This resulted in the logs never being cleared and the slave eventually running out of disk space. (Bug #31958)
- Cluster Replication: Replicating NDB tables with extra VARCHAR columns on the master caused the slave to fail. (Bug #31646)
See also Bug #29549.
- Cluster Replication: When the master mysqld crashed or was restarted, no LOST_EVENTS entry was made in the binlog. (Bug #31484)
See also Bug #21494.
- Cluster Replication: An issue with the mysql.ndb_apply_status table could cause NDB schema autodiscovery to fail in certain rare circumstances. (Bug #20872)
- Cluster API: A call to CHECK_TIMEDOUT_RET() in mgmapi.cpp should have been a call to DBUG_CHECK_TIMEDOUT_RET(). (Bug #30681)
- API: When the language option was not set correctly, API programs calling mysql_server_init() crashed. This issue was observed only on Windows platforms. (Bug #31868)
- Corrected a typecast involving bool on Mac OS X 10.5 (Leopard), which evaluated differently from earlier Mac OS X versions. (Bug #38217)
- Use of uninitialized memory for filesort in a subquery caused a server crash. (Bug #33675)
- CREATE TABLE ... SELECT created tables that for date columns used the obsolete Field_date type instead of Field_newdate. (Bug #33256)
- Some valid SELECT statements could not be used as views due to incorrect column reference resolution. (Bug #33133)
- The fix for Bug#11230 and Bug#26215 introduced a significant input-parsing slowdown for the mysql client. This has been corrected. (Bug #33057)
- The correct data type for a NULL column resulting from a UNION could be determined incorrectly in some cases: 1) Not correctly inferred as NULL depending on the number of selects; 2) Not inferred correctly as NULL if one select used a subquery. (Bug #32848)
- For queries containing GROUP_CONCAT(DISTINCT col_list ORDER BY col_list), there was a limitation that the DISTINCT columns had to be the same as ORDER BY columns. Incorrect results could be returned if this was not true. (Bug #32798)
- SHOW EVENTS and selecting from the INFORMATION_SCHEMA.EVENTS table failed if the current database was INFORMATION_SCHEMA. (Bug #32775)
- Use of the cp932 character set with CAST() in an ORDER BY clause could cause a server crash. (Bug #32726)
- A subquery using an IS NULL check of a column defined as NOT NULL in a table used in the FROM clause of the outer query produced an invalid result. (Bug #32694)
- mysqld_safe looked for error messages in the wrong location. (Bug #32679)
- Specifying a nonexistent column for an INSERT DELAYED statement caused a server crash rather than producing an error. (Bug #32676)
- An issue with the NO_ENGINE_SUBSTITUTION sql_mode database can cause the creation of stored routines to fail. If you are having problems with creating stored routines while using this sql_mode value, remove this value from your sql_mode setting. (Bug #32633)
- Use of CLIENT_MULTI_QUERIES caused libmysqld to crash. (Bug #32624)
- The INTERVAL() function incorrectly handled NULL values in the value list. (Bug #32560)
- Use of a NULL-returning GROUP BY expression in conjunction with WITH ROLLUP could cause a server crash. (Bug #32558)
See also Bug #31095.
- ORDER BY UpdateXML(...) caused the server to crash in queries where UpdateXML() returned NULL. (Bug #32557)
- A SELECT ... GROUP BY bit_column query failed with an assertion if the length of the BIT column used for the GROUP BY was not an integer multiple of 8. (Bug #32556)
- Using SELECT INTO OUTFILE with 8-bit ENCLOSED BY characters led to corrupted data when the data was reloaded using LOAD DATA INFILE. This was because SELECT INTO OUTFILE failed to escape the 8-bit characters. (Bug #32533)
- For FLUSH TABLES WITH READ LOCK, the server failed to properly detect write-locked tables when running with low-priority updates, resulting in a crash or deadlock. (Bug #32528)
- The rules for valid column names were being applied differently for base tables and views. (Bug #32496)
- A query of the form SELECT @user_variable := constant AS alias FROM table GROUP BY alias WITH ROLLUP crashed the server. (Bug #32482)
- Sending several KILL QUERY statements to target a connection running SELECT SLEEP() could freeze the server. (Bug #32436)
- ssl-cipher values in option files were not being read by libmysqlclient. (Bug #32429)
- Repeated execution of a query containing a CASE expression and numerous AND and OR relations could crash the server. The root cause of the issue was determined to be that the internal SEL_ARG structure was not properly initialized when created. (Bug #32403)
- Referencing within a subquery an alias used in the SELECT list of the outer query was incorrectly permitted. (Bug #32400)
- If a global read lock acquired with FLUSH TABLES WITH READ LOCK was in effect, executing ALTER TABLE could cause a server crash. (Bug #32395)
- An ORDER BY query on a view created using a FEDERATED table as a base table caused the server to crash. (Bug #32374)
- Comparison of a BIGINT NOT NULL column with a constant arithmetic expression that evaluated to NULL mistakenly caused the error Column '...' cannot be null (error 1048). (Bug #32335)
- Assigning a 65,536-byte string to a TEXT column (which can hold a maximum of 65,535 bytes) resulted in truncation without a warning. Now a truncation warning is generated. (Bug #32282)
- The LAST_DAY() function returns a DATE value, but internally the value did not have the time fields zeroed and calculations involving the value could return incorrect results. (Bug #32270)
- MIN() and MAX() could return incorrect results when an index was present if a loose index scan was used. (Bug #32268)
- Some uses of user variables in a query could result in a server crash. (Bug #32260)
- Memory corruption could occur due to large index map in Range checked for each record status reported by EXPLAIN SELECT. The problem was based in an incorrectly calculated length of the buffer used to store a hexadecimal representation of an index map, which could result in buffer overrun and stack corruption under some circumstances. (Bug #32241)
- Various test program cleanups were made: 1) mytest and libmysqltest were removed. 2) bug25714 displays an error message when invoked with incorrect arguments or the --help option. 3) mysql_client_test exits cleanly with a proper error status. (Bug #32221)
- The default grant tables on Windows contained information for host production.mysql.com, which should not be there. (Bug #32219)
- Under certain conditions, the presence of a GROUP BY clause could cause an ORDER BY clause to be ignored. (Bug #32202)
- For comparisons of the form date_col OP datetime_const (where OP is =, <, >, <=, or >=), the comparison is done using DATETIME values, per the fix for Bug#27590. However that fix caused any index on date_col not to be used and compromised performance. Now the index is used again. (Bug #32198)
- DATETIME arguments specified in numeric form were treated by DATE_ADD() as DATE values. (Bug #32180)
- Killing a statement could lead to a race condition in the server. (Bug #32148)
- InnoDB does not support SPATIAL indexes, but could crash when asked to handle one. Now an error is returned. (Bug #32125)
- The server crashed on optimizations involving a join of INT and MEDIUMINT columns and a system variable in the WHERE clause. (Bug #32103)
- mysql-test-run.pl used the --user option when starting mysqld, which produces warnings if the current user is not root. Now --user is added only for root. (Bug #32078)
- mysqlslap was missing from the MySQL 5.1.22 Linux RPM packages. (Bug #32077)
- With lower_case_table_names set, CREATE TABLE LIKE was treated differently by libmysqld than by the nonembedded server. (Bug #32063)
- Within a subquery, UNION was handled differently than at the top level, which could result in incorrect results or a server crash. (Bug #32036, Bug #32051)
- On 64-bit platforms, assignments of values to enumeration-valued storage engine-specific system variables were not validated and could result in unexpected values. (Bug #32034)
- A DELETE statement with a subquery in the WHERE clause would sometimes ignore an error during subquery evaluation and proceed with the delete operation. (Bug #32030)
- Using dates in the range '0000-00-01' to '0000-00-99' range in the WHERE clause could result in an incorrect result set. (These dates are not in the supported range for DATE, but different results for a given query could occur depending on position of records containing the dates within a table.) (Bug #32021)
- User-defined functions are not loaded if the server is started with the --skip-grant-tables option, but the server did not properly handle this case and issued an Out of memory error message instead. (Bug #32020)
- If a user-defined function was used in a SELECT statement, and an error occurred during UDF initialization, the error did not terminate execution of the SELECT, but rather was converted to a warning. (Bug #32007)
- HOUR(), MINUTE(), and SECOND() could return nonzero values for DATE arguments. (Bug #31990)
- Changing the SQL mode to cause dates with “zero” parts to be considered invalid (such as '1000-00-00') could result in indexed and nonindexed searches returning different results for a column that contained such dates. (Bug #31928)
- The server used unnecessarily large amounts of memory when user variables were used as an argument to CONCAT() or CONCAT_WS(). (Bug #31898)
- In debug builds, testing the result of an IN subquery against NULL caused an assertion failure. (Bug #31884)
- mysql-test-run.pl sometimes set up test scenarios in which the same port number was passed to multiple servers, causing one of them to be unable to start. (Bug #31880)
- SHOW CREATE TRIGGER caused a server crash. (Bug #31866)
- The server crashed after insertion of a negative value into an AUTO_INCREMENT column of an InnoDB table. (Bug #31860)
- For libmysqld applications, handling of mysql_change_user() calls left some pointers improperly updated, leading to server crashes. (Bug #31850)
- Using ORDER BY led to the wrong result when using the ARCHIVE on a table with a BLOB when the table cache was full. The table could also be reported as crashed after the query had completed, even though the table data was intact. (Bug #31833)
- Comparison results for BETWEEN were different from those for operators like < and > for DATETIME-like values with trailing extra characters such as '2007-10-01 00:00:00 GMT-6'. BETWEEN treated the values as DATETIME, whereas the other operators performed a binary-string comparison. Now they all uniformly use a DATETIME comparison, but generate warnings for values with trailing garbage. (Bug #31800)
- Name resolution for correlated subqueries and HAVING clauses failed to distinguish which of two was being performed when there was a reference to an outer aliased field. This could result in error messages about a HAVING clause for queries that had no such clause. (Bug #31797)
- The server could crash during filesort for ORDER BY based on expressions with INET_NTOA() or OCT() if those functions returned NULL. (Bug #31758)
- For tables with certain definitions, UPDATE statements could fail to find the correct record to update and report an error when the record did in fact exist. (Bug #31747)
- For a fatal error during a filesort in find_all_keys(), the error was returned without the necessary handler uninitialization, causing an assertion failure. (Bug #31742)
- mysqlslap failed to commit after the final record load. (Bug #31704)
- The examined-rows count was not incremented for const queries. (Bug #31700)
- The server crashed if a thread was killed while locking the general_log table at the beginning of statement processing. (Bug #31692)
- The mysql_change_user() C API function was subject to buffer overflow. (Bug #31669)
- For SELECT ... INTO OUTFILE, if the ENCLOSED BY string is empty and the FIELDS TERMINATED BY string started with a special character (one of n, t, r, b, 0, Z, or N), every occurrence of the character within field values would be duplicated. (Bug #31663)
- SHOW COLUMNS and DESCRIBE displayed null as the column type for a view with no valid definer. This caused mysqldump to produce a nonreloadable dump file for the view. (Bug #31662)
- The mysqlbug script did not include the correct values of CFLAGS and CXXFLAGS that were used to configure the distribution. (Bug #31644)
- Queries that include a comparison of an INFORMATION_SCHEMA table column to NULL caused a server crash. (Bug #31633)
- EXPLAIN EXTENDED for SELECT from INFORMATION_SCHEMA tables caused an assertion failure. (Bug #31630)
- ucs2 does not work as a client character set, but attempts to use it as such were not rejected. Now character_set_client cannot be set to ucs2. This also affects statements such as SET NAMES and SET CHARACTER SET. (Bug #31615)
- A buffer used when setting variables was not dimensioned to accommodate the trailing '\0' byte, so a single-byte buffer overrun was possible. (Bug #31588)
- HAVING could treat lettercase of table aliases incorrectly if lower_case_table_names was enabled. (Bug #31562)
- Spurious duplicate-key errors could occur for multiple-row inserts into an InnoDB table that activate a trigger. (Bug #31540)
- Using ALTER EVENT to rename a disabled event caused it to become enabled. (Bug #31539)
- The fix for Bug#24989 introduced a problem such that a NULL thread handler could be used during a rollback operation. This problem is unlikely to be seen in practice. (Bug #31517)
- The length of the result from IFNULL() could be calculated incorrectly because the sign of the result was not taken into account. (Bug #31471)
- Queries that used the ref access method or index-based subquery execution over indexes that have DECIMAL columns could fail with an error Column col_name cannot be null. (Bug #31450)
- InnoDB now tracks locking and use of tables by MySQL only after a table has been successfully locked on behalf of a transaction. Previously, the locked flag was set and the table in-use counter was updated before checking whether the lock on the table succeeded. A subsequent failure in obtaining a lock on the table led to an inconsistent state as the table was neither locked nor in use. (Bug #31444)
- SELECT 1 REGEX NULL caused an assertion failure for debug servers. (Bug #31440)
- The UpdateXML() function did not check for the validity of all its arguments; in some cases, this could lead to a crash of the server. (Bug #31438)
- The mysql_change_user() C API function caused advisory locks (obtained with GET_LOCK()) to malfunction. (Bug #31418)
- NDB libraries and include files were missing from some binary tar file distributions. (Bug #31414)
- Executing RENAME while tables were open for use with HANDLER statements could cause a server crash. (Bug #31409)
- mysql-test-run.pl tried to create files in a directory where it could not be expected to have write permission. mysqltest created .reject files in a directory other than the one where test results go. (Bug #31398)
- For a table that had been opened with HANDLER and marked for reopening after being closed with FLUSH TABLES, DROP TABLE did not properly discard the handler. (Bug #31397)
- Automatically allocated memory for string options associated with a plugin was not freed if the plugin did not get installed. (Bug #31382)
- INFORMATION_SCHEMA.TABLES was returning incorrect information. (Bug #31381)
- DROP USER caused an increase in memory usage. (Bug #31347)
- For InnoDB tables with READ COMMITTED isolation level, semi-consistent reads used for UPDATE statements skipped rows locked by another transaction, rather than waiting for the locks to be released. Consequently, rows that possibly should have been updated were never examined. (Bug #31310)
- For an almost-full MyISAM table, an insert that failed could leave the table in a corrupt state. (Bug #31305)
- myisamchk --unpack could corrupt a table that when unpacked has static (fixed-length) row format. (Bug #31277)
- CONVERT(val, DATETIME) would fail on invalid input, but processing was not aborted for the WHERE clause, leading to a server crash. (Bug #31253)
- Allocation of an insufficiently large group-by buffer following creation of a temporary table could lead to a server crash. (Bug #31249)
- Use of DECIMAL(n, n) ZEROFILL in GROUP_CONCAT() could cause a server crash. (Bug #31227)
- When a TIMESTAMP with a nonzero time part was converted to a DATE value, no warning was generated. This caused index lookups to assume that this is a valid conversion and was returning rows that match a comparison between a TIMESTAMP value and a DATE keypart. Now a warning is generated so that TIMESTAMP with a nonzero time part will not match DATE values. (Bug #31221)
- Server variables could not be set to their current values on Linux platforms. (Bug #31177)
See also Bug #6958.
- With small values of myisam_sort_buffer_size, REPAIR TABLE for MyISAM tables could cause a server crash. (Bug #31174)
- If MAKETIME() returned NULL when used in an ORDER BY that was evaluated using filesort, a server crash could result. (Bug #31160)
- Data in BLOB or GEOMETRY columns could be cropped when performing a UNION query. (Bug #31158)
- LAST_INSERT_ID() execution could be handled improperly in subqueries. (Bug #31157)
- An assertion designed to detect a bug in the ROLLUP implementation would incorrectly be triggered when used in a subquery context with noncacheable statements. (Bug #31156)
- Selecting spatial types in a UNION could cause a server crash. (Bug #31155)
- Use of GROUP_CONCAT(DISTINCT bit_column) caused an assertion failure. (Bug #31154)
- The server crashed in the parser when running out of memory. Memory handling in the parser has been improved to gracefully return an error when out-of-memory conditions occur in the parser. (Bug #31153)
- MySQL declares a UNIQUE key as a PRIMARY key if it doesn't have NULL columns and is not a partial key, and the PRIMARY key must alway be the first key. However, in some cases, a nonfirst key could be reported as PRIMARY, leading to an assert failure by InnoDB. This is fixed by correcting the key sort order. (Bug #31137)
- mysqldump failed to handle databases containing a ‘-’ character in the name. (Bug #31113)
- Starting the server using --read-only and with the Event Scheduler enabled caused it to crash.
This issue occurred only when the server had been built with certain nonstandard combinations of configure options.
- GROUP BY NULL WITH ROLLUP could cause a server crash. (Bug #31095)
See also Bug #32558.
- A rule to prefer filesort over an indexed ORDER BY when accessing all rows of a table was being used even if a LIMIT clause was present. (Bug #31094)
- REGEXP operations could cause a server crash for character sets such as ucs2. Now the arguments are converted to utf8 if possible, to permit correct results to be produced if the resulting strings contain only 8-bit characters. (Bug #31081)
- Expressions of the form WHERE col NOT IN (col, ...), where the same column was named both times, could cause a server crash in the optimizer. (Bug #31075)
- Internal conversion routines could fail for several multi-byte character sets (big5, cp932, euckr, gb2312, sjis) for empty strings or during evaluation of SOUNDS LIKE. (Bug #31069, Bug #31070)
- Many nested subqueries in a single query could led to excessive memory consumption and possibly a crash of the server. (Bug #31048)
- Using ORDER BY with ARCHIVE tables caused a server crash. (Bug #31036)
- A server crash could occur when a non-DETERMINISTIC stored function was used in a GROUP BY clause. (Bug #31035)
- The MOD() function and the % operator crashed the server for a divisor less than 1 with a very long fractional part. (Bug #31019)
- Transactions were committed prematurely when LOCK TABLE and SET autocommit = 0 were used together. (Bug #30996)
- On Windows, the pthread_mutex_trylock() implementation was incorrect. (Bug #30992)
- A character set introducer followed by a hexadecimal or bit-value literal did not check its argument and could return an ill-formed result for invalid input. (Bug #30986)
- CHAR(str USING charset) did not check its argument and could return an ill-formed result for invalid input. (Bug #30982)
- The result from CHAR(str USING ucs2) did not add a leading 0x00 byte for input strings with an odd number of bytes. (Bug #30981)
- The GeomFromText() function could cause a server crash if the first argument was NULL or the empty string. (Bug #30955)
- MAKEDATE() incorrectly moved year values in the 100 to 200 range into the 1970 to 2069 range. (This is legitimate for 00 to 99, but three-digit years should be used unchanged.) (Bug #30951)
- When invoked with constant arguments, STR_TO_DATE() could use a cached value for the format string and return incorrect results. (Bug #30942)
- GROUP_CONCAT() returned ',' rather than an empty string when the argument column contained only empty strings. (Bug #30897)
- For MEMORY tables, lookups for NULL values in BTREE indexes could return incorrect results. (Bug #30885)
- A server crash could occur if a stored function that contained a DROP TEMPORARY TABLE statement was invoked by a CREATE TEMPORARY TABLE statement that created a table of the same name. (Bug #30882)
- Calling NAME_CONST() with nonconstant arguments triggered an assertion failure. Nonconstant arguments are no longer permitted. (Bug #30832)
- For a spatial column with a regular (non-SPATIAL) index, queries failed if the optimizer tried to use the index. (Bug #30825)
- Values for the --tc-heuristic-recover option incorrectly were treated as values for the --myisam-stats-method option. (Bug #30821)
- INFORMATION_SCHEMA.SCHEMATA was returning incorrect information. (Bug #30795)
- The optimizer incorrectly optimized conditions out of the WHERE clause in some queries involving subqueries and indexed columns. (Bug #30788)
- Improper calculation of CASE expression results could lead to value truncation. (Bug #30782)
- On Windows, the pthread_mutex_trylock() implementation was incorrect. One symptom was that invalidating the query cache could cause a server crash. (Bug #30768)
- A multiple-table UPDATE involving transactional and nontransactional tables caused an assertion failure. (Bug #30763)
- User-supplied names foreign key names might not be set to the right key, leading to foreign keys with no name. (Bug #30747)
- Under some circumstances, CREATE TABLE ... SELECT could crash the server or incorrectly report that the table row size was too large. (Bug #30736)
- Using the MIN() or MAX() function to select one part of a multi-part key could cause a crash when the function result was NULL. (Bug #30715)
- The embedded server did not properly check column-level privileges. (Bug #30710)
- INFORMATION_SCHEMA.VIEWS.VIEW_DEFINITION was incorrect for views that were defined to select from other INFORMATION_SCHEMA tables. (Bug #30689)
- Issuing an ALTER SERVER statement to update the settings for a FEDERATED server would cause the mysqld to crash. (Bug #30671)
- The optimizer could ignore ORDER BY in cases when the result set is ordered by filesort, resulting in rows being returned in incorrect order. (Bug #30666)
- A different execution plan was displayed for EXPLAIN than would actually have been used for the SELECT because the test of sort keys for ORDER BY did not consider keys mentioned in IGNORE KEYS FOR ORDER BY. (Bug #30665)
- The thread_handling system variable was treated as having a SESSION value and as being settable at runtime. Now it has only a GLOBAL read-only value. (Bug #30651)
- On Windows, LIMIT arguments greater than 232 did not work correctly. (Bug #30639)
- MyISAM tables could not exceed 4294967295 (232 – 1) rows on Windows. (Bug #30638)
- A failed HANDLER ... READ operation could leave the table in a locked state. (Bug #30632)
- mysql-test-run.pl could not run mysqld with root privileges. (Bug #30630)
- The mysqld_safe script contained a syntax error. (Bug #30624)
- The optimization that uses a unique index to remove GROUP BY did not ensure that the index was actually used, thus violating the ORDER BY that is implied by GROUP BY. (Bug #30596)
- SHOW STATUS LIKE 'Ssl_cipher_list' from a MySQL client connected using SSL returned an empty string rather than a list of available ciphers. (Bug #30593)
- For MEMORY tables, DELETE statements that remove rows based on an index read could fail to remove all matching rows. (Bug #30590)
- Using GROUP BY on an expression of the form timestamp_col DIV number caused a server crash due to incorrect calculation of number of decimals. (Bug #30587)
- Executing a SELECT COUNT(*) query on an InnoDB table partitioned by KEY that used a DOUBLE column as the partitioning key caused the server to crash. (Bug #30583)
- The options available to the CHECK TABLE statement were also permitted in OPTIMIZE TABLE and ANALYZE TABLE statements, but caused corruption during their execution. These options were never supported for these statements, and an error is now raised if you try to apply these options to these statements. (Bug #30495)
- A self-referencing trigger on a partitioned table caused the server to crash instead of failing with an error. (Bug #30484)
- The mysql_change_user() C API function did not correctly reset the character set variables to the values they had just after initially connecting. (Bug #30472)
- When expanding a * in a USING or NATURAL join, the check for table access for both tables in the join was done using only the grant information of the first table. (Bug #30468)
- When casting a string value to an integer, cases where the input string contained a decimal point and was long enough to overrun the unsigned long long type were not handled correctly. The position of the decimal point was not taken into account which resulted in miscalculated numbers and incorrect truncation to appropriate SQL data type limits. (Bug #30453)
- Versions of mysqldump from MySQL 4.1 or higher tried to use START TRANSACTION WITH CONSISTENT SNAPSHOT if the --single-transaction and --master-data options were given, even with servers older than 4.1 that do not support consistent snapshots. (Bug #30444)
- With libmysqld, use of prepared statements and the query cache at the same time caused problems. (Bug #30430)
- Issuing a DELETE statement having both an ORDER BY clause and a LIMIT clause could cause mysqld to crash. (Bug #30385)
- For CREATE ... SELECT ... FROM, where the resulting table contained indexes, adding SQL_BUFFER_RESULT to the SELECT part caused index corruption in the table. (Bug #30384)
- The Last_query_cost status variable value can be computed accurately only for simple “flat” queries, not complex queries such as those with subqueries or UNION. However, the value was not consistently being set to 0 for complex queries. (Bug #30377)
- The optimizer made incorrect assumptions about the value of the is_member value for user-defined functions, sometimes resulting in incorrect ordering of UDF results. (Bug #30355)
- Queries that had a GROUP BY clause and selected COUNT(DISTINCT bit_column) returned incorrect results. (Bug #30324)
- Some valid euc-kr characters having the second byte in the ranges [0x41..0x5A] and [0x61..0x7A] were rejected. (Bug #30315)
- When loading a dynamic plugin on FreeBSD, the plugin would fail to load. This was due to a build error where the required symbols would be not exported correctly. (Bug #30296)
- Simultaneous ALTER TABLE statements for BLACKHOLE tables caused 100% CPU use due to locking problems. (Bug #30294)
- Setting certain values on a table using a spatial index could cause the server to crash. (Bug #30286)
- Tables with a GEOMETRY column could be marked as corrupt if you added a non-SPATIAL index on a GEOMETRY column. (Bug #30284)
- Flushing a merge table between the time it was opened and its child table were actually attached caused the server to crash. (Bug #30273)
This regression was introduced by Bug #26379.
- The query cache does not support retrieval of statements for which column level access control applies, but the server was still caching such statements, thus wasting memory. (Bug #30269)
- Using DISTINCT or GROUP BY on a BIT column in a SELECT statement caused the column to be cast internally as an integer, with incorrect results being returned from the query. (Bug #30245)
- GROUP BY on BIT columns produced incorrect results. (Bug #30219)
- Short-format mysql commands embedded within /*! ... */ comments were parsed incorrectly by mysql, which discarded the rest of the comment including the terminating */ characters. The result was a malformed (unclosed) comment. Now mysql does not discard the */ characters. (Bug #30164)
- If the server crashed during an ALTER TABLE statement, leaving a temporary file in the database directory, a subsequent DROP DATABASE statement failed due to the presence of the temporary file. (Bug #30152)
- When mysqldump wrote DROP DATABASE statements within version-specific comments, it included the terminating semicolon in the wrong place, causing following statements to fail when the dump file was reloaded. (Bug #30126)
- It was not possible for client applications to distinguish between auto-set and auto-updated TIMESTAMP column values.
To rectify this problem, a new ON_UPDATE_NOW_FLAG flag is set by Field_timestamp constructors whenever a column should be set to NOW on UPDATE, and the get_schema_column_record() function now reports whether a timestamp column is set to NOW on UPDATE. In addition, such columns now display on update CURRENT_TIMESTAMP in the Extra column in the output from SHOW COLUMNS. (Bug #30081)
- Some INFORMATION_SCHEMA tables are intended for internal use, but could be accessed by using SHOW statements. (Bug #30079)
- On some 64-bit systems, inserting the largest negative value into a BIGINT column resulted in incorrect data. (Bug #30069)
- mysqlslap did not properly handle multiple result sets from stored procedures. (Bug #29985)
- Specifying the --without-geometry option for configure caused server compilation to fail. (Bug #29972)
- Statements within stored procedures ignored the value of the low_priority_updates system variable. (Bug #29963)
See also Bug #26162.
- With auto-reconnect enabled, row fetching for a prepared statement could crash after reconnect occurred because loss of the statement handler was not accounted for. (Bug #29948)
- mysqldump --skip-events --all-databases dumped data from the mysqld.event table, and when restoring from this dump, events were created in spite of the --skip-events option. (Bug #29938)
- When mysqlslap was given a query to execute from a file using a --query=file_name option, it executed the query one too many times. (Bug #29803)
- configure did not find nss on some Linux platforms. (Bug #29658)
- It was possible when creating a partitioned table using CREATE TABLE ... SELECT to refer in the PARTITION BY clause to columns in the table being selected from, which could cause the server to crash. An example of such a statement is:
- CREATE TABLE t1 (b INT)
- PARTITION BY RANGE(t2.b) (
- PARTITION p1 VALUES LESS THAN (10),
- PARTITION p2 VALUES LESS THAN (20)
- ) SELECT * FROM t2;
The fix is to disallow references in PARTITION BY clauses to columns not in the table being created. (Bug #29444)
- If a view used a function in its SELECT statement, the columns from the view were not inserted into the INFORMATION_SCHEMA.COLUMNS table. (Bug #29408)
- The mysql client program now ignores Unicode byte order mark (BOM) characters at the beginning of input files. Previously, it read them and sent them to the server, resulting in a syntax error.
Presence of a BOM does not cause mysql to change its default character set. To do that, invoke mysql with an option such as --default-character-set=utf8. (Bug #29323)
- For transactional tables, an error during a multiple-table DELETE statement did not roll back the statement. (Bug #29136)
- The log and log_slow_queries system variables were displayed by SHOW VARIABLES but could not be accessed in expressions as @@log and @@log_slow_queries. Also, attempting to set them with SET produced an incorrect Unknown system variable message. Now these variables are treated as synonyms for general_log and slow_query_log, which means that they can be accessed in expressions and their values can be changed with SET. (Bug #29131)
- Denormalized double-precision numbers cannot be handled properly by old MIPS pocessors. For IRIX, this is now handled by enabling a mode to use a software workaround. (Bug #29085)
- SHOW VARIABLES did not display the relay_log, relay_log_index, or relay_log_info_file system variables. (Bug #28893)
- When doing a DELETE on a table that involved a JOIN with MyISAM or MERGE tables and the JOIN referred to the same table, the operation could fail reporting ERROR 1030 (HY000): Got error 134 from storage engine. This was because scans on the table contents would change because of rows that had already been deleted. (Bug #28837)
- Killing an SSL connection on platforms where MySQL is compiled with -DSIGNAL_WITH_VIO_CLOSE (Windows, Mac OS X, and some others) could crash the server. (Bug #28812)
- SHOW VARIABLES did not correctly display the value of the thread_handling system variable. (Bug #28785)
- On Windows, mysql_upgrade created temporary files in C:\ and did not clean them up. (Bug #28774)
- Index hints specified in view definitions were ignored when using the view to select from the base table. (Bug #28702)
- Views do not have indexes, so index hints do not apply. Use of index hints when selecting from a view is no longer permitted. (Bug #28701)
- After changing the SQL mode to a restrictive value that would make already-inserted dates in a column be considered invalid, searches returned different results depending on whether the column was indexed. (Bug #28687)
- When running the MySQL Instance Configuration Wizard, a race condition could exist that would fail to connect to a newly configured instance. This was because mysqld had not completed the startup process before the next stage of the installation process. (Bug #28628)
- A SELECT in one connection could be blocked by INSERT ... ON DUPLICATE KEY UPDATE in another connection even when low_priority_updates is set. (Bug #28587)
- mysql_upgrade could run binaries dynamically linked against incorrect versions of shared libraries. (Bug #28560)
- The result from CHAR() was incorrectly assumed in some contexts to return a single-byte result. (Bug #28550)
- mysqldump reversed the event name and program name in one of its error messages. (Bug #28535)
- The parser confused user-defined function (UDF) and stored function creation for CREATE FUNCTION and required that there be a default database when creating UDFs, although there is no such requirement. (Bug #28318, Bug #29816)
- Fast-mutex locking was not thread-safe and optimization-safe on some platforms, which could cause program failures such as out-of-memory errors. (Bug #28284)
- The result of a comparison between VARBINARY and BINARY columns differed depending on whether the VARBINARY column was indexed. (Bug #28076)
- The metadata in some MYSQL_FIELD members could be incorrect when a temporary table was used to evaluate a query. (Bug #27990)
- Partition pruning was not used for queries having <= or >= conditions in the WHERE clause on a table using TO_DAYS() in the partitioning expression. (Bug #27927)
- mysqlbinlog produced incorrectly formatted DATETIME and TIMESTAMP values. (Bug #27894)
- Failure to log to the general_log or slow_log log tables were not logged to the error log at all or were logged incorrectly. (Bug #27858)
- An ORDER BY at the end of a UNION affected individual SELECT statements rather than the overall query result. (Bug #27848)
- comp_err created files with permissions such that they might be inaccessible during make install operations. (Bug #27789)
- SHOW COLUMNS returned NULL instead of the empty string for the Default value of columns that had no default specified. (Bug #27747)
- With recent versions of DBD::mysql, mysqlhotcopy generated table names that were doubly qualified with the database name. (Bug #27694)
- The anonymous accounts were not being created during MySQL installation. (Bug #27692)
- Some SHOW statements and INFORMATION_SCHEMA queries could expose information not permitted by the user's access privileges. (Bug #27629)
- ALTER TABLE tbl_name ROW_FORMAT=format_type did not cause the table to be rebuilt. (Bug #27610)
- A race condition between killing a statement and the thread executing the statement could lead to a situation such that the binary log contained an event indicating that the statement was killed, whereas the statement actually executed to completion. (Bug #27571)
- Some character mappings in the ascii.xml file were incorrect.
As a result of this bug fix, indexes must be rebuilt for columns that use the ascii_general_ci collation for columns that contain any of these characters: '`', '[', '\', ']', '~'. See Section 2.13.3, “Checking Whether Tables or Indexes Must Be Rebuilt”. (Bug #27562)
- Some queries using the NAME_CONST() function failed to return either a result or an error to the client, causing it to hang. This was due to the fact that there was no check to insure that both arguments to this function were constant expressions. (Bug #27545, Bug #32559)
- With the read_only system variable enabled, CREATE DATABASE and DROP DATABASE were permitted to users who did not have the SUPER privilege. (Bug #27440)
- For an event with an ON COMPLETION value of PRESERVE, an ALTER EVENT statement that specified no ON COMPLETION option caused the value to become NOT PRESERVE. (Bug #27407)
- MySQL failed to generate or retrieve an AUTO_INCREMENT primary key for InnoDB tables with user-defined partitioning. (Bug #27405)
- Changes to the sql_mode system variable were not tracked by INSERT DELAYED. (Bug #27358)
- A SELECT with more than 31 nested dependent subqueries returned an incorrect result. (Bug #27352)
- The ExtractValue() and UpdateXML() functions performed extremely slowly for large amounts of XML data (greater than 64 KB). These functions now execute approximately 2000 times faster than previously. (Bug #27287)
- On Windows, writes to the debug log were using freopen() instead of fflush(), resulting in slower performance. (Bug #27099)
- For a table that used different full-text parsers for different FULLTEXT indexes, SHOW CREATE TABLE displayed the first parser name for all of them. (Bug #27040)
- STR_TO_DATE() displayed an error message that referred to STR_TO_TIME(). (Bug #27014)
- The mysql_insert_id() C API function sometimes returned different results for libmysqld and libmysqlclient. (Bug #26921)
- Symbolic links on Windows could fail to work. (Bug #26811)
- mysqld sometimes miscalculated the number of digits required when storing a floating-point number in a CHAR column. This caused the value to be truncated, or (when using a debug build) caused the server to crash. (Bug #26788)
See also Bug #12860.
- LOAD DATA INFILE ran very slowly when reading large files into partitioned tables. (Bug #26527)
- It makes no sense to attempt to use ALTER TABLE ... ORDER BY to order an InnoDB table if there is a user-defined clustered index, because rows are always ordered by the clustered index. Such attempts now are ignored and produce a warning.
Also, in some cases, InnoDB incorrectly used a secondary index when the clustered index would produce a faster scan. EXPLAIN output now indicates use of the clustered index (for tables that have one) as lines with a type value of index, a key value of PRIMARY, and without Using index in the Extra value. (Bug #26447)
See also Bug #35850.
- Using HANDLER to open a table having a storage engine not supported by HANDLER properly returned an error, but also improperly prevented the table from being dropped by other connections. (Bug #25856)
- For a prepared statement stmt, changing the default database following PREPARE stmt but before EXECUTE stmt caused stmt to be recorded incorrectly in the binary log. (Bug #25843)
- CREATE TABLE LIKE did not work when the source table was an INFORMATION_SCHEMA table. (Bug #25629)
- Threads that were calculating the estimated number of records for a range scan did not respond to the KILL statement. That is, if a range join type is possible (even if not selected by the optimizer as a join type of choice and thus not shown by EXPLAIN), the query in the statistics state (shown by the SHOW PROCESSLIST) did not respond to the KILL statement. (Bug #25421)
- For InnoDB tables, CREATE TABLE a AS SELECT * FROM A would fail. (Bug #25164)
- For mysql --show-warnings, warnings were in some cases not displayed. (Bug #25146)
- The returns column of the mysql.proc table was CHAR(64), which is not long enough to store long data types such as ENUM types. The column has been changed to LONGBLOB and a warning is generated if truncation occurs when storing a row into the proc table. (Bug #24923)
- If the expected precision of an arithmetic expression exceeded the maximum precision supported by MySQL, the precision of the result was reduced by an unpredictable or arbitrary amount, rather than to the maximum precision. In some cases, exceeding the maximum supported precision could also lead to a crash of the server. (Bug #24907)
- For Vista installs, MySQLInstanceConfig.exe did not add the default MySQL port to the firewall exceptions. It now provides a check box that enables the user a choice of whether to do this. (Bug #24853)
- A CREATE TRIGGER statement could cause a deadlock or server crash if it referred to a table for which a table lock had been acquired with LOCK TABLES. (Bug #23713)
- For storage engines that do not redefine handler::index_next_same() and are capable of indexes, statements that include a WHERE clause might select incorrect data. (Bug #22351)
- The parser treated the INTERVAL() function incorrectly, leading to situations where syntax errors could result depending on which side of an arithmetic operator the function appeared. (Bug #22312)
- Entries in the general query log were truncated at 1000 characters. (Bug #21557)
- A memory leak occurred when CREATE TEMPORARY TABLE .. SELECT was invoked from a stored function that in turn was called from CREATE TABLE ... SELECT. (Bug #21136)
- It was possible to execute CREATE TABLE t1 ... SELECT ... FROM t2 with the CREATE privilege for t1 and SELECT privilege for t2, even in the absence of the INSERT privilege for t1. (Bug #20901)
- Worked around an icc problem with an incorrect machine instruction being generated in the context of software pre-fetching after a subroutine got in-lined. (Upgrading to icc 10.0.026 makes the workaround unnecessary.) (Bug #20803)
- If a column selected by a view referred to a stored function, the data type reported for the column in INFORMATION_SCHEMA.COLUMNS could be incorrect. (Bug #20550)
- The mysql_change_user() C API function changed the value of the sql_big_selects session variable. (Bug #20023)
See also Bug #40363.
- Host names sometimes were treated as case sensitive in account-management statements (CREATE USER, GRANT, REVOKE, and so forth). (Bug #19828)
- Issuing an SQL KILL of the active connection caused an error on Mac OS X. (Bug #19723)
- The readline library has been updated to version 5.2. This addresses issues in the mysql client where history and editing within the client would fail to work as expected. (Bug #18431)
- The -lmtmalloc library was removed from the output of mysql_config on Solaris, as it caused problems when building DBD::mysql (and possibly other applications) on that platform that tried to use dlopen() to access the client library. (Bug #18322)
- MySQLInstanceConfig.exe failed to grant certain privileges to the 'root'@'%' account. (Bug #17303)
- The Aborted_clients status variable was incremented twice if a client exited without calling mysql_close(). (Bug #16918)
- Use of GRANT statements with grant tables from an old version of MySQL could cause a server crash. (Bug #16470)
- Clients were ignoring the TCP/IP port number specified as the default port using the --with-tcp-port configuration option. (Bug #15327)
- Parameters of type DATETIME or DATE in stored procedures were silently converted to VARBINARY. (Bug #13675)
- Zero-padding of exponent values was not the same across platforms. (Bug #12860)
- Values of types REAL ZEROFILL, DOUBLE ZEROFILL, FLOAT ZEROFILL, were not zero-filled when converted to a character representation in the C prepared statement API. (Bug #11589)
- mysql stripped comments from statements sent to the server. Now the --comments or --skip-comments option can be used to control whether to retain or strip comments. The default is --skip-comments. (Bug #11230, Bug #26215)
- Several buffer-size system variables were either being handled incorrectly for large values (for settings larger than 4GB, they were truncated to values less than 4GB without a warning), or were limited unnecessarily to 4GB even on 64-bit systems. The following changes were made:
- For key_buffer_size, values larger than 4GB are permitted on 64-bit platforms.
- For join_buffer_size, sort_buffer_size, and myisam_sort_buffer_size, values larger than 4GB are permitted on 64-bit platforms (except Windows, for which large values are truncated to 4GB with a warning).
In addition, settings for read_buffer_size and read_rnd_buffer_size are limited to 2GB on all platforms. Larger values are truncated to 2GB with a warning. (Bug #5731, Bug #29419, Bug #29446)
- Executing DISABLE KEYS and ENABLE KEYS on a nonempty table would cause the size of the index file for the table to grow considerable. This was because the DISABLE KEYS operation would only mark the existing index, without deleting the index blocks. The ENABLE KEYS operation would re-create the index, adding new blocks, while the previous index blocks would remain. Existing indexes are now dropped and recreated when the ENABLE KEYS statement is executed. (Bug #4692)
- Grant table checks failed in libmysqld.