Table of Contents
This appendix lists the changes from version to version in the MySQL source code through the latest version of MySQL 5.1, which is currently MySQL 5.1.40. Starting with MySQL 5.0, we began offering a new version of the Manual for each new series of MySQL releases (5.0, 5.1, and so on). For information about changes in previous release series of the MySQL database software, see the corresponding version of this Manual. For information about legacy versions of the MySQL software through the 4.1 series, see MySQL 3.23, 4.0, 4.1 Reference Manual.
We update this section as we add new features in the 5.1 series, so that everybody can follow the development process.
Note that we tend to update the manual at the same time we make changes to MySQL. If you find a recent version of MySQL listed here that you can't find on our download page (http://dev.mysql.com/downloads/), it means that the version has not yet been released.
The date mentioned with a release version is the date of the last Bazaar ChangeSet on which the release was based, not the date when the packages were made available. The binaries are usually made available a few days after the date of the tagged ChangeSet, because building and testing all packages takes some time.
The manual included in the source and binary distributions may not be fully accurate when it comes to the release changelog entries, because the integration of the manual happens at build time. For the most up-to-date release changelog, please refer to the online version instead.
An overview of which features were added in MySQL 5.1 can be found here: Section 1.4.1, “What Is New in MySQL 5.1”.
For a full list of changes, please refer to the changelog sections for each individual 5.1 release.
For discussion of upgrade issues that you many encounter for upgrades to MySQL 5.1 from MySQL 5.0, see Section 2.12.1.1, “Upgrading from MySQL 5.0 to 5.1”.
For changes relating to MySQL Cluster NDB 6.x, see Section 17.15, “Changes in MySQL Cluster NDB 6.X and 7.X”.
Bugs fixed:
Partitioning:
An INSERT ...
SELECT statement on an empty partition of a
partitioned table failed with ERROR 1030 (HY000): Got
error 124 from storage engine. This issue also
caused queries run against a partitioned table while a
LOAD DATA CONCURRENT
INFILE statement was in progress to fail with the same
error.
(Bug#46639)
Partitioning:
A partitioned table having a
TIMESTAMP column with a default
value of CURRENT_TIMESTAMP and this column
was not defined using an ON UPDATE option, an
ALTER TABLE ...
REORGANIZE PARTITION statement on the table caused the
TIMESTAMP column value to be set
to CURRENT_TIMESTAMP regardless.
(Bug#46478)
Partitioning: Attempting to access a partitioned table when partitioning support was disabled in a MySQL server binary that had been compiled with partitioning support caused the server to crash. (Bug#39893)
Partitioning:
The use of TO_DAYS() in the
partitioning expression led to selection failures when the
column having the date value contained invalid dates. This
occurred because the function returns NULL in
such cases, and the partition containing NULL values was pruned
away. For example, this problem occurred if
'2001-02-00' was inserted into a
DATE column of such a table, and
a subsequent query on this table used WHERE
— while date_col < '2001-02-00''2001-01-01' is less than
'2001-02-00',
TO_DAYS('2001-02-00') evaluates as
NULL, and so the row containing
'2001-01-01' was not returned. Now, for
tables using RANGE or LIST
partitioning and having TO_DAYS()
in the partitioning expression, the NULL
partition is also scanned instead of being ignored.
The fix for this issue also corrects misbehavior such that a
query of the form SELECT * FROM
on a table
partitioned by table WHERE
date_col <
date_valRANGE or
LIST was handled as though the server SQL
mode included
ALLOW_INVALID_DATES even if
this was not actually part of the server SQL mode at the time
the query was issued.
(Bug#20577)
Replication:
Performing a multi-row update of the
AUTO_INCREMENT column of a transactional
table could result in an inconsistency between master and slave
when there was a trigger on the transactional table that updated
a non-transactional table. When such an update failed on the
master, no rows were updated on the master, but some rows could
(erroneously) be updated on the slave.
(Bug#46864)
Replication:
When using the
--replicate-rewrite-db option and
the database referenced by this option on the master was the
current database when the connection to the slave was closed,
any temporary tables existing in this database were not properly
dropped.
(Bug#46861)
Replication: When a statement that changed both transactional and non-transactional tables failed, the transactional changes were automatically rolled back on the master but the slave ignored the error and did not roll them back, thus leading to inconsistencies between master and slave.
This issue is fixed by automatically rolling back a statement
that fails on the slave; however, the transaction is not rolled
back unless a corresponding
ROLLBACK
statement is found in the relay log file.
(Bug#46130)
See also Bug#33864.
Replication:
When slave_transaction_retries
is set, a statement that replicates, but is then rolled back due
to a deadlock on the slave, should be retried. However, in
certain cases, replication was stopped with error 1213
(Deadlock found when trying to get lock; try
restarting transaction) instead, even when this
variable was set.
(Bug#45694)
Replication:
The binary logging behavior (and thus, the replication behavior)
of CREATE
DATABASE IF NOT EXISTS,
CREATE TABLE IF
NOT EXISTS, and
CREATE EVENT IF
NOT EXISTS was not consistent among these statements,
nor with that of
DROP DATABASE IF
EXISTS,
DROP TABLE IF
EXISTS, and
DROP EVENT IF
EXISTS: A DROP ... IF EXISTS
statement is always logged even if the database object named in
the statement does not exist. However, of the CREATE
... IF NOT EXISTS statements, only the
CREATE EVENT IF
NOT EXISTS statement was logged when the database
object named in the statement already existed.
Now, every CREATE ... IF NOT EXISTS statement
is written to the binary log (and thus replicated), whether the
database object named in the statement exists or not. For more
information, see
Section 16.3.1.3, “Replication of CREATE ... IF NOT EXISTS Statements”.
Exception.
Replication and logging of
CREATE TABLE IF
NOT EXISTS ... SELECT continues to be handled
according to existing rules. See
Section 16.3.1.4, “Replication of CREATE
TABLE ... SELECT Statements”, for more
information.
Replication:
When using statement-based replication, database-level character
sets were not always honored by the replication SQL thread. This
could cause data inserted on the master using
LOAD DATA to be replicated using
the wrong character set.
This was not an issue when using row-based replication.
Replication:
In some cases, a STOP SLAVE
statement could cause the replication slave to crash. This issue
was specific to MySQL on Windows or Macintosh platforms.
(Bug#45238, Bug#45242, Bug#45243, Bug#46013, Bug#46014, Bug#46030)
Replication:
Creating a scheduled event whose DEFINER
clause was either set to
CURRENT_USER or not set
explicitly caused the master and the slave to become
inconsistent. This issue stems from the fact that, in both
cases, the DEFINER is set to the
CURRENT_USER of the current
thread. (On the master, the
CURRENT_USER is the
mysqld user; on the slave, the
CURRENT_USER is empty.)
This behavior has been modified as follows:
If CURRENT_USER is used as
the DEFINER, it is replaced with the
value of
CURRENT_USER before the
CREATE EVENT statement is
written to the binary log.
If the definer is not set explicitly, a
DEFINER clause using the value of
CURRENT_USER is added to the
CREATE EVENT statement before
it is written to the binary log.
See also Bug#42217.
Replication:
When using the statement-based logging format, the only possible
safe combination of transactional and non-transactional
statements within the same transaction is to perform any updates
on non-transactional tables (such as
MyISAM tables) first, before
updating any transactional tables (such as those using the
InnoDB storage engine). This is due
to the fact that, although a modification made to a
non-transactional table is immediately visible to other
connections, the update is not immediately written to the binary
log, which can lead to inconsistencies between master and slave.
(Other combinations may hide a causal dependency, thus making it
impossible to write statements updating non-transactional tables
to the binary log in the correct order.)
However, in some cases, this situation was not handled properly, and the determination whether a given statement was safe or not under these conditions was not always correct. In particular, a multi-table update that affected both transactional and non-transactional tables or a statement modifying data in a non-transactional table having a trigger that operated on a transactional table (or the reverse) was not determined to be unsafe when it should have been.
With this fix, the following determinations regarding replication safety are made when combining updates to transactional and non-transactional tables within the same transaction in statement-based logging mode:
Any statement modifying data in a non-transactional table within a given transaction is considered safe if it is issued prior to any data modification statement accessing a transactional table within the same transaction.
A statement that updates transactional tables only is always considered safe.
A statement affecting both transactional and
non-transactional tables within a transaction is always
considered unsafe. It is not necessary that both tables be
modified for this to be true; for example, a statement such
as INSERT INTO
is also
considered unsafe.
innodb_table SELECT * FROM
myisam_table
The current fix is valid only when using statement-based
logging mode; we plan to address similar issues occurring when
using the MIXED or ROW
format in a future MySQL release.
Stack overflow checking did not account for the size of the structure stored in the heap. (Bug#46807)
In queries for which the loose index scan access method was
chosen, using a condition of the form
col_name rather than the equivalent
caused an assertion failure.
(Bug#46607)col_name <>
0
Killing a query that was performing a sort could result in a memory leak. (Bug#45962)
Truncation of DECIMAL values
could lead to assertion failures; for example, when deducing the
type of a table column from a literal
DECIMAL value.
(Bug#45261)
Bulk insert performance could suffer with large
read_buffer_size values.
(Bug#44723)
A buffer overflow could occur during handling of IS
NULL ranges.
(Bug#37044)
mysqladmin --wait ping crashed on Windows systems. (Bug#35132)
As of MySQL 5.1.38, the InnoDB Plugin is
included in MySQL 5.1 releases, in addition to the
built-in version of InnoDB that has been
included in previous releases. This version of the InnoDB
Plugin is 1.0.4 and is considered of Beta quality.
The InnoDB Plugin offers new features, improved
performance and scalability, enhanced reliability and new
capabilities for flexibility and ease of use. Among the features
of the InnoDB Plugin are “Fast index
creation,” table and index compression, file format
management, new INFORMATION_SCHEMA tables,
capacity tuning, multiple background I/O threads, and group
commit.
For information about these features, see the InnoDB
Plugin Manual at
http://www.innodb.com/products/innodb_plugin/plugin-documentation.
For general information about using InnoDB in
MySQL, see Section 13.6, “The InnoDB Storage Engine”.
The InnoDB Plugin is included in source and
binary distributions, except RHEL3, RHEL4, SuSE 9 (x86, x86_64,
ia64), and generic Linux RPM packages.
To use the InnoDB Plugin, you must disable the
built-in version of InnoDB that is also
included and instruct the server to use InnoDB
Plugin instead. To accomplish this, use the following
lines in your my.cnf file:
[mysqld] ignore-builtin-innodb plugin-load=innodb=ha_innodb_plugin.so
For the plugin-load option,
innodb is the name to associate with the plugin
and ha_innodb_plugin.so is the name of the
shared object library that contains the plugin code. The extension
of .so applies for Unix (and similar)
systems. For HP-UX on HPPA (11.11) or Windows, the extension
should be .sl or .dll,
respectively, rather than .so.
If the server has problems finding the plugin when it starts up,
specify the pathname to the plugin directory. For example, if
plugins are located in the lib/mysql/plugin
directory under the MySQL installation directory and you have
installed MySQL at /usr/local/mysql, use
these lines in your my.cnf file:
[mysqld] ignore-builtin-innodb plugin-load=innodb=ha_innodb_plugin.so plugin_dir=/usr/local/mysql/lib/mysql/plugin
The previous examples show how to activate the storage engine part
of InnoDB Plugin, but the plugin also
implements several InnoDB-related
INFORMATION_SCHEMA tables. (For information
about these tables, see
http://www.innodb.com/doc/innodb_plugin-1.0/innodb-information-schema.html.)
To enable these tables, include additional
pairs in the value of the
name=libraryplugin-load option:
[mysqld] ignore-builtin-innodb plugin-load=innodb=ha_innodb_plugin.so ;innodb_trx=ha_innodb_plugin.so ;innodb_locks=ha_innodb_plugin.so ;innodb_cmp=ha_innodb_plugin.so ;innodb_cmp_reset=ha_innodb_plugin.so ;innodb_cmpmem=ha_innodb_plugin.so ;innodb_cmpmem_reset=ha_innodb_plugin.so
The plugin-load option value as
shown here is formatted on multiple lines for display purposes but
should be written in my.cnf using a single
line without spaces in the option value. On Windows, substitute
.dll for each instance of the
.so extension.
After the server starts up, verify that InnoDB
Plugin has been loaded by using the
SHOW PLUGINS statement. For
example, if you have loaded the storage engine and the
INFORMATION_SCHEMA tables, the output should
include lines similar to these:
mysql> SHOW PLUGINS;
+---------------------+--------+--------------------+---------------------...
| Name | Status | Type | Library ...
+---------------------+--------+--------------------+---------------------...
...
| InnoDB | ACTIVE | STORAGE ENGINE | ha_innodb_plugin.so ...
| INNODB_TRX | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
| INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
| INNODB_CMP | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
| INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
| INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
| INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | ha_innodb_plugin.so ...
+---------------------+--------+--------------------+---------------------...
If you build MySQL from a source distribution, InnoDB
Plugin is one of the storage engines that is built by
default. Build MySQL the way you normally do; for example, by
using the instructions at Section 2.10, “MySQL Installation Using a Source Distribution”.
After the build completes, you should find the plugin shared
object file under the storage/innodb_plugin
directory, and make install should install it
in the plugin directory. Configure MySQL to use InnoDB
Plugin as described earlier for binary distributions.
If you use gcc, InnoDB
Plugin cannot be compiled with gcc
3.x; you must use gcc 4.x instead.
Functionality added or changed:
Replication:
With statement-based logging (SBL), repeatedly calling
statements that are unsafe for SBL caused a warning message to
be written to the error log for each statement, and there was no
way to disable this behavior. Now the server logs messages about
statements that are unsafe for statement-based logging only if
the log_warnings variable is greater than 0.
(Bug#46265)
The undocumented TRANSACTIONAL and
PAGE_CHECKSUM keywords were removed from the
grammar.
(Bug#45829)
Previously, SELECT ...
INTO OUTFILE dumped column values without character
set conversion, which could produce data files that cannot be
imported without error if different columns used different
character sets. A consequence of this is that
mysqldump ignored the
--default-character-set option
if the --tab option was given
(which causes SELECT ...
INTO OUTFILE to be used to dump data.)
INTO OUTFILE now can be followed by a
CHARACTER SET clause indicating the character
set to which dumped values should be converted. Also,
mysqldump adds a CHARACTER
SET clause to the
SELECT ... INTO
OUTFILE statement used to dump data, so that
--default-character-set is no
longer ignored if --tab is
given.
Other changes are that
SELECT ... INTO
OUTFILE enforces that ENCLOSED BY
and ESCAPED BY arguments must be a single
character, and SELECT
... INTO OUTFILE and
LOAD DATA
INFILE produce warnings if non-ASCII field or line
separators are specified.
(Bug#30946)
The MySQL euckr character set now can store
extended codes [81...FE][41..5A,61..7A,81..FE], which makes
euckr compatible with the Microsoft
cp949 character set.
Bugs fixed:
Partitioning: Attempting to create a table using an invalid or inconsistent subpartition definition caused the server to crash. An example of such a statement is shown here:
CREATE TABLE t2 (s1 INT, s2 INT)
PARTITION BY LIST (s1) SUBPARTITION BY HASH (s2) SUBPARTITIONS 1
(
PARTITION p1 VALUES IN (1),
PARTITION p2 VALUES IN (2) (SUBPARTITION p3)
);
Partitioning:
When using a debug build of MySQL, if a query against a
partitioned table having an index on one or more
DOUBLE columns used that index,
the server failed with an assertion.
(Bug#45816)
Partitioning:
A failed RENAME TABLE operation
on a table with user-defined partitioning left the table in an
unusable state, due to only some of the table files having been
renamed.
(Bug#30102)
Replication:
When a statement that changes a non-transactional table failed,
the transactional cache was flushed, causing a mismatch between
the execution and logging histories. Now we avoid flushing the
transactional cache unless a
COMMIT or
ROLLBACK is
issued.
(Bug#46129)
Replication:
The internal function
get_master_version_and_clock() (defined in
sql/slave.cc) ignored errors and passed
directly when queries failed, or when queries succeeded but the
result retrieved was empty. Now this function tries to reconnect
the master if a query fails due to transient network problems,
and to fail otherwise. The I/O thread now prints a warning if
the same system variables do not exist on master (in the event
the master is a very old version of MySQL, compared to the
slave.)
(Bug#45214)
Replication:
When using the MIXED logging format, after
creating a temporary table and performing an update that
switched the logging format to ROW, the
format switch persisted following the update. This prevented any
subsequent DDL statements on temporary tables from being written
to the binary log until the temporary table was dropped.
(Bug#43046)
See also Bug#40013.
This regression was introduced by Bug#20499.
Replication:
If the
--log-bin-trust-function-creators
option is not enabled,
CREATE
FUNCTION requires one of the modifiers
DETERMINISTIC, NO SQL, or
READS SQL DATA. When using statement-based
mode, the execution of a stored function should follow the same
rules; however, only functions defined with
DETERMINSTIC could actually be executed. In
addition, the wrong error was generated
(ER_BINLOG_ROW_RBR_TO_SBR instead of
ER_BINLOG_UNSAFE_ROUTINE).
Now execution of stored functions is compatible with creation in
this regard; when a stored function without one of the modifiers
above is executed in STATEMENT mode, the
correct error is raised, and functions defined using NO
SQL, READS SQL DATA, or both (that
is, without using DETERMINSTIC) can be
excuted.
(Bug#41166)
The test suite was missing from RPM packages. (Bug#46834)
Incorrect index optimization could lead to incorrect results or server crashes. (Bug#46454)
The server printed warnings at startup about adjusting the value
of the max_join_size system
variable. (These were harmless, but might be seen by users as
significant.)
(Bug#46385)
After an error such as a table-full condition,
INSERT IGNORE
could cause an assertion failure for debug builds.
(Bug#46075)
An optimization that moved an item from a subquery to an outer query could cause a server crash. (Bug#46051)
Several Valgrind warnings were corrected. (Bug#46003, Bug#46034, Bug#46042)
CREATE TABLE ...
SELECT could cause a server crash if no default
database was selected.
(Bug#45998)
For problems reading SSL files during SSL initialization, the
server wrote error messages to stderr rather
than to the error log.
(Bug#45770)
The vendor name change from MySQL AB to Sun Microsystems, Inc. in RPM packages was not handled gracefully when upgrading MySQL using an RPM package. (Bug#45534)
A Windows Installation using the GUI installer would fail with:
MySQL Server 5.1 Setup Wizard ended prematurely The wizard was interrupted before MySQL Server 5.1. could be completely installed. Your system has not been modified. To complete installation at another time, please run setup again. Click Finish to exit the wizard
This was due to an step in the MSI installer that could fail to execute correctly on some environments. (Bug#45418)
Invalid memory reads could occur using the compressed client/server protocol. (Bug#45031)
The mysql_real_connect() C API
function only attempted to connect to the first IP address
returned for a hostname. This could be a problem if a hostname
mapped to multiple IP address and the server was not bound to
the first one returned. Now
mysql_real_connect() attempts to
connect to all IPv4/6 addresses that a domain name maps to.
(Bug#45017)
Invalid input could cause invalid memory reads by the parser. (Bug#45010)
Some files in an AIX tar file distribution unpacked with incorrect permissions. (Bug#44647)
For debug builds, executing a stored procedure as a prepared statement could sometimes cause an assertion failure. (Bug#44521)
Using mysql_stmt_execute() to
call a stored procedure could cause a server crash.
(Bug#44495)
Creating a new instance after previously removing an instance would fail to complete the installation properly because the security settings could not be applied correctly. (Bug#44428)
mysqlslap ignored the
--csv option if it was given
without an argument.
(Bug#44412)
Enabling the event scheduler from within the file specified by
--init-file caused a server
crash.
(Bug#43587)
The server did not always check the return value of calls to the
hash_init() function.
(Bug#43572)
The table cache lock (LOCK_open) is now an
adaptive mutex, which should improve performance in workloads
where this lock is heavily contended.
(Bug#43435)
mysqladmin --count=X
--sleep=Y incorrectly
delayed Y seconds after the last
iteration before exiting.
(Bug#42639)
A test for stack growth failed on some platforms, leading to server crashes. (Bug#42213)
mysqladmin did not have enough space
allocated for tracking all variables when using
--vertical or
--relative with
extended-status.
(Bug#40395)
Partitioning a log table caused a server crash. (Bug#40281)
When using quick access methods to search for rows in
UPDATE and DELETE
statements, there was no check whether a fatal error had already
been sent to the client while evaluating the quick condition.
Consequently, a false OK (following the error) was sent to the
client, causing the error to be incorrectly transformed into a
warning.
(Bug#40113)
SHOW PROCESSLIST could access freed memory of
a stored procedure run in a concurrent session.
(Bug#38816)
During installation on Windows, the MySQL Instance Configuration Wizard window could be opened at a size too small to be usable. (Bug#38723)
make_binary_distribution did not always generate correct distribution names. (Bug#37808)
The server crashed when executing a prepared statement
containing a duplicated MATCH() function call
in the select list and ORDER BY clause; for
example, SELECT MATCH(a) AGAINST('test') FROM t1 ORDER
BY MATCH(a) AGAINST('test').
(Bug#37740)
The output of mysqldump --tab for views
included a DROP TABLE statement
without the IF EXISTS qualifier.
(Bug#37377)
mysql_upgrade silently ignored the
--basedir and
--datadir options, which
it accepts for backward compatibility. Now it prints a warning.
(Bug#36558)
mysqlimport was not always compiled correctly
to enable thread support, which is required for the
--use-threads option.
(Bug#32991)
mysqlcheck failed to fix table names when the
--fix-table-names and
--all-in-1 options were both
specified.
(Bug#31821)
If the MySQL server was killed without the PID file being removed, attempts to stop the server with mysql.server stop waited 900 seconds before giving up. (Bug#31785)
When performing an installation on Windows using the GUI
installer, the installer would fail to wait long enough during
installation for the MySQL service to be installed, which would
cause the installation to fail and may cause security settings,
such as the root password to not be applied
correctly.
(Bug#30525)
mysql included extra spaces at the end of some result set lines. (Bug#29622)
The mysql client inconsistently handled NUL bytes in column data in various output formats. (Bug#28203)
mysqlimport did not correctly quote and escape table identifiers and file names. (Bug#28071)
When installing the Windows service, using quotes around command-line configuration parameters could cause the quotes to incorrectly placed around the entire command-line option, and not just the value. (Bug#27535)
If the mysql client was built with the
readline library and the
.inputrc file mapped
Space to the magic-space
function, it became impossible to enter spaces.
(Bug#27439)
If InnoDB reached its limit on the number of
concurrent transactions (1023), it wrote a descriptive message
to the error log but returned a misleading error message to the
client, or an assertion failure occurred.
(Bug#18828)
Functionality added or changed:
Important Change: Replication:
RESET MASTER and
RESET SLAVE now reset the values
shown for Last_IO_Error,
Last_IO_Errno,
Last_SQL_Error, and
Last_SQL_Errno in the output of
SHOW SLAVE STATUS.
(Bug#44270)
See also Bug#34654.
Bugs fixed:
Performance:
With InnoDB tables, MySQL used a
less-selective secondary index to avoid a filesort even if a
prefix of the primary key was much more selective.
The fix for this problem might cause other queries to run more slowly. (Bug#45828)
Partitioning: Security Fix:
Accessing a table having user-defined partitioning when the
server SQL mode included
ONLY_FULL_GROUP_BY caused the
MySQL server to crash. For example, the following sequence of
statements crashed the server:
DROP TABLE IF EXISTS t1;
SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
CREATE TABLE t1 (id INT, KEY(id))
PARTITION BY HASH(id) PARTITIONS 2;
Security Fix:
The strxnmov() library function could write a
null byte after the end of the destination buffer.
(Bug#44834)
Important Change: Replication:
When using STATEMENT or
MIXED binary logging format, a statement that
changes both non-transactional and transactional tables must be
written to the binary log whenever there are changes to
non-transactional tables. This means that the statement goes
into the binary log even when the changes to the transactional
tables fail. In particular, in the event of a failure such
statement is annotated with the error number and wrapped inside
a pair of
BEGIN and
ROLLBACK
statements.
On the slave, while applying the statement, it is expected that the same failure and the rollback prevent the transactional changes from persisting. However, statements that fail due to concurrency issues such as deadlocks and timeouts are logged in the same way, causing the slave to stop since the statements are applied sequentially by the SQL thread.
To address this issue, we ignore concurrency failures on the slave. Specifically, the following failures are now ignored: ER_LOCK_WAIT_TIMEOUT, ER_LOCK_DEADLOCK, and ER_XA_RBDEADLOCK. (Bug#44581)
Partitioning:
Truncating a partitioned MyISAM table did not
reset the AUTO_INCREMENT value.
(Bug#35111)
Replication:
The SHOW SLAVE STATUS connection
thread competed with the slave SQL thread for use of the error
message buffer. As a result, the connection thread sometimes
received incomplete messages. This issue was uncovered with
valgrind when message strings were passed
without NULL terminators, causing the error
Conditional jump or move depends on uninitialised
value(s).
(Bug#45511)
See also Bug#43076.
Replication:
The internal function purge_relay_logs() did
not propagate an error occurring in another internal function
count_relay_log_space().
(Bug#44115)
Replication:
Large transactions and statements could corrupt the binary log
if the size of the cache (as set by
max_binlog_cache_size) was not
large enough to store the changes.
Now, for transactions that do not fit into the cache, the statement is not logged, and the statement generates an error instead.
For non-transactional changes that do not fit into the cache, the statement is also not logged — an incident event is logged after committing or rolling back any pending transaction, and the statement then raises an error.
If a failure occurs before the incident event is written the binary log, the slave does not stop, and the master does not report any errors.
See also Bug#37148.
Replication:
The --database option for
mysqlbinlog was ignored when using the
row-based logging format.
(Bug#42941)
Replication:
Statements using LIMIT generated spurious
Statement is not safe to log in statement
format warnings in the error log, causing the log to
grow rapidly in size.
(Bug#42851)
See also Bug#46265, Bug#42415.
This regression was introduced by Bug#34768.
Replication:
Shutting down the server while executing FLUSH
LOGS, CHANGE MASTER TO,
or STOP SLAVE could sometimes
cause mysqld to crash.
(Bug#38240)
Replication: When reading a binary log that was in use by a master or that had not been properly closed (possibly due to a crash), the following message was printed: Warning: this binlog was not closed properly. Most probably mysqld crashed writing it. This message did not take into account the possibility that the file was merely in use by the master, which caused some users concern who were not aware that this could happen.
To make this clear, the original message has been replaced with Warning: this binlog is either is use or was not closed properly. (Bug#34687)
The server crashed if evaluation of
GROUP_CONCAT(... ORDER BY)
required allocation of a sort buffer but allocation failed.
(Bug#46080)
When creating tables using the IBMDB2I
storage engine with the
ibmdb2i_create_index_option option set to 1,
creating an IBMDB2I table with a primary key
should produce an additional index that uses EBCDIC hexadecimal
sorting, but this index was not created.
(Bug#45983)
The server crashed for attempts to use
REPLACE or
INSERT ... ON DUPLICATE
KEY UPDATE with a view defined using a join.
(Bug#45806)
Some collations were causing IBMDB2I to
report inaccurate key range estimations to the optimizer for
LIKE clauses that select substrings. This can
be seen by running EXPLAIN. This problem
primarily affects multi-byte and unicode character sets.
(Bug#45803)
Invalid memory reads and writes were generated when altering merge and base tables. This could lead to a crash or Valgrind errors:
==28038== Invalid write of size 1 at: memset (mc_replace_strmem.c:479) by: myrg_attach_children (myrg_open.c:433) by: ha_myisammrg::attach_children() (ha_myisammrg.cc:546) by: ha_myisammrg::extra(ha_extra_function) (ha_myisammrg.cc:944) by: attach_merge_children(TABLE_LIST*) (sql_base.cc:4147) by: open_tables(THD*, TABLE_LIST**, unsigned*, unsigned) (sql_base.cc:4709) by: open_and_lock_tables_derived(THD*, TABLE_LIST*, bool) (sql_base.cc:4977) by: open_n_lock_single_table (mysql_priv.h:1550) by: mysql_alter_table(sql_table.cc:6428) by: mysql_execute_command(THD*) (sql_parse.cc:2860) by: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5933) by: dispatch_command (sql_parse.cc:1213)
Inserting data into a table using the macce
character set with the IBMDB2I storage engine
would fail.
(Bug#45793)
There was a race condition when changing
innodb_commit_concurrency at
runtime to the value DEFAULT.
(Bug#45749)
See also Bug#42101.
Performing an empty XA transaction caused the server to crash for the next XA transaction. (Bug#45548)
For replication of a stored procedure that uses the
gbk character set, the result on the master
and slave differed.
(Bug#45485)
SHOW CREATE TRIGGER requires the
TRIGGER privilege but was not
checking privileges.
(Bug#45412)
An assertion failure could occur if InnoDB
tried to unlock a record when the clustered index record was
unknown.
(Bug#45357)
--enable-
options (for example, plugin_name--enable-innodb) did not
work correctly.
(Bug#45336)
See also Bug#19027.
If autocommit was enabled, InnoDB did not
roll back DELETE or
UPDATE statements if the
statement was killed.
(Bug#45309)
The optimizer mishandled “impossible range” conditions and returned empty results due to an uninitialized variable. (Bug#45266)
Use of DECIMAL constants with
more than 65 digits in
CREATE TABLE ...
SELECT statements led to spurious errors or assertion
failures.
(Bug#45262)
The mysql client could misinterpret some character sequences as commands under some circumstances. (Bug#45236)
Use of CONVERT() with an empty
SET value could cause an
assertion failure.
(Bug#45168)
InnoDB recovery could hang due to redo
logging of doublewrite buffer pages.
(Bug#45097)
when reading binary data, the concatenation function for geometry data collections did not rigorously check for available data, leading to invalid reads and server crashes. (Bug#44684)
If an error occurred during the creation of a table (for
example, the table already existed) having an
AUTO_INCREMENT column and a
BEFORE trigger that used the
INSERT ...
SELECT construct, an internal flag was not reset
properly. This led to a crash the next time that the table was
opened again.
(Bug#44653)
configure.in contained references to
literal instances of nm and
libc, rather than to variables parameterized
for the proper values on the current platform.
(Bug#42721)
configure.in did not properly check for the
pthread_setschedprio() function.
(Bug#42599)
SHOW ERRORS returned an empty
result set after an attempt to drop a nonexistent table.
(Bug#42364)
A workaround for a Sun Studio bug was instituted. (Bug#41710)
For queries with a sufficient number of subqueries in the
FROM clause of this form:
SELECT * FROM (SELECT 1) AS t1,
(SELECT 2) AS t2,
(SELECT 3) AS t3, ...
The query failed with a Too high level of nesting for
select error, as though the query had this form:
SELECT * FROM (SELECT 1 FROM (SELECT 2 FROM (SELECT 3 FROM ...
Some UPDATE statements that
affected no rows returned a rows-affected count of one.
(Bug#40565)
Valgrind warnings that occurred for SHOW
TABLE STATUS with InnoDB tables
were silenced.
(Bug#38479)
In the mysql client, if the server connection
was lost during repeated status commands, the
client would fail to detect this and command output would be
inconsistent.
(Bug#37274)
A Valgrind error during subquery execution was corrected. (Bug#36995)
When invoked to start multiple server instances, mysqld_multi sometimes would fail to start them all due to not changing location into the base directory for each instance. (Bug#36654)
Rows written to the slow query log could have an indeterminate
Rows_examined value due to improper
initialization.
(Bug#34002)
Renaming a column that appeared in a foreign key definition did not update the foreign key definition with the new column name. (Bug#21704)
Functionality added or changed:
Important Change: Replication: Previously, incident log events were represented as comments in the output from mysqlbinlog, making them effectively silent when playing back the binlog.
(An incident log event represents an incident that could cause the contents of the database to change without that event being recorded in the binary log.)
This meant that, if the SQL were applied to a server, it could potentially lead to the master and the slave having different data. To make it possible to handle incident log events without breaking applications that expect the previous behavior, the nonsense statement RELOAD DATABASE is added to the SQL output for that incident log event, which causes an error.
To use this functionality currently requires hand editing of the dump file and handling of each case on an individual basis by a database administrator before applying the output to a server. (Bug#44442)
mysql_upgrade now displays a message indicating the connection parameters it uses when invoking mysqlcheck. (Bug#44638)
The time zone tables for Windows available at http://dev.mysql.com/downloads/timezones.html have been updated. (Bug#39923)
The mysqltest program now has a
move_file command for renaming files. This
should be used in test cases rather than invoking an external
command that might be platform specific.
(Bug#39542)from_file
to_file
The maximum value for max_binlog_cache_size
has been increased from 232 – 1
to 264 – 1 (even on 32-bit
platforms), which enables transactions 4GB and larger to be
performed when binary logging is enabled.
(Bug#10206)
Bugs fixed:
Performance:
The InnoDB adaptive hash latch is released
(if held) for serveral potentially long-running operations. This
improves throughput for other queries if the current query is
removing a temporary table, changing a temporary table from
memory to disk, using
CREATE TABLE ...
SELECT, or performing a MyISAM
repair on a table used within a transaction.
(Bug#32149)
Security Fix:
The server crashed if an account with the
CREATE ROUTINE privilege but not
the EXECUTE privilege attempted
to create a stored procedure.
(Bug#44798)
Security Fix: The server crashed if an account without the proper privileges attempted to create a stored procedure. (Bug#44658)
Security Fix: Four potential format string vulnerabilities were fixed (discovered by the Veracode code analysis). (Bug#44166)
Incompatible Change:
The server can load plugins under the control of startup
options. For example, many storage engines can be built in
pluggable form and loaded when the server starts. In the
following descriptions, plugin_name
stands for a plugin name such as innodb.
Previously, plugin options were handled like other boolean options (see Section 4.2.3.2, “Program Option Modifiers”). That is, any of these options enabled the plugin:
--plugin_name--plugin_name=1 --enable-plugin_name
And these options disabled the plugin:
--plugin_name=0 --disable-plugin_name--skip-plugin_name
However, use of a boolean option for plugin loading did not
provide control over what to do if the plugin failed to start
properly: Should the server exit, or start with the plugin
disabled? The actual behavior has been that the server starts
with the plugin disabled, which can be problematic. For example,
if InnoDB fails to start, existing
InnoDB tables become inaccessible, and
attempts to create new InnoDB tables result
in tables that use the default storage engine unless the
NO_ENGINE_SUBSTITUTION SQL
mode has been enabled to cause an error to occur instead.
Now, there is a change in the options used to control plugin loading, such that they have a tristate format:
--
plugin_name=OFF
Do not enable the plugin.
--
plugin_name[=ON]
Enable the plugin. If plugin initialization fails, start the
server anyway, but with the plugin disabled. Specifying the
option as
--
without a value also enables the plugin.
plugin_name
--
plugin_name=FORCE
Enable the plugin. If plugin initialization fails, do not start the server. In other words, force the server to run with the plugin or not at all.
The values OFF, ON, and
FORCE are not case sensitive.
Suppose that CSV and
InnoDB have been built as pluggable storage
engines and that you want the server to load them at startup,
subject to these conditions: The server is allowed to run if
CSV initialization fails, but must require
that InnoDB initialization succeed. To
accomplish that, use these lines in an option file:
[mysqld] csv=ON innodb=FORCE
This change is incompatible with the previous implementation if
you used options of the form
-- or
plugin_name=0--,
which should be changed to
plugin_name=1-- or
plugin_name=OFF--,
respectively.
plugin_name=ON
--enable-
is still supported and is the same as
plugin_name--.
plugin_name=ON--disable-
and
plugin_name--skip-
are still supported and are the same as
plugin_name--.
(Bug#19027)plugin_name=OFF
See also Bug#45336.
Important Change: Replication:
BEGIN,
COMMIT, and
ROLLBACK
statements are no longer affected by
--replicate-do-db or
--replicate-ignore-db rules.
(Bug#43263)
Partitioning:
Queries using DISTINCT on multiple columns or
GROUP BY on multiple columns did not return
correct results with partitioned tables.
(Bug#44821)
See also Bug#41136.
Replication: When using row-based logging, the length of an event for which the field metadata exceeded 255 bytes in size was incorrectly calculated. This could lead to corruption of the binary log, or cause the server to hang. (Bug#42749)
Replication: The warning Statement is not safe to log in statement format, issued in situations when it cannot be determined that a statement or other database event can be written reliably to the binary log using the statement-based format, has been changed to Statement may not be safe to log in statement format. (Bug#42415)
Replication:
The Query_log_event used by replication to
transfer a query to the slave has been refactored.
Query_log_event also stores and sends the
error code resulting from the execution since it, in some cases,
is necessary to execute the statement on the slave as well,
which should result in the same error code. The
Query_log_event constructor previously worked
out for itself the error code using a complex routine, the
result of which was often set aside within the constructor
itself. This was also involved with at least 2 known bugs
relating to invalid errors, and taken as a clear sign that the
constructor was not well-designed and needed to be re-written.
(Bug#41948)
See also Bug#37145.
Replication:
When stopping and restarting the slave while it was replicating
temporary tables, the slave server could crash or raise an
assertion failure. This was due to the fact that, although
temporary tables were saved between slave thread restarts, the
reference to the thread being used
(table->in_use) was not being properly
updated when restarting, continuing to reference the old thread
instead of the new one. This issue affected statement-based
replication only.
(Bug#41725)
The combination of MIN() or
MAX() in the select list with
WHERE and GROUP BY clauses
could lead to incorrect results.
(Bug#45386)
Linker failures with libmysqld on VC++ 2008
were fixed.
(Bug#45326)
Compiler warnings on Mac OS X were fixed. (Bug#45286)
Running a SELECT query over an
IBMDB2I table using the
cp1250 character set would produce an error
ibmdb2i error 2027: Error converting single-byte sort sequence to UCS-2
Use of ROUND() on a
LONGTEXT or
LONGBLOB column of a derived
table could cause a server crash.
(Bug#45152)
DROP USER could fail to drop all
privileges for an account if the
PAD_CHAR_TO_FULL_LENGTH SQL
mode was enabled.
(Bug#45100)
GROUP BY on a constant
(single-row) InnoDB table joined to other
tables caused a server crash.
(Bug#44886)
ALTER TABLE on a view crashed the
server.
(Bug#44860)
When using partitioning with the IBMDB2I
storage engine, the engine could report that a valid character
set was not supported.
(Bug#44856)
Running queries on tables with the IBMDB2I
storage engine using the utf8 character would
fail when using the 64-bit version of MySQL.
(Bug#44811)
Index Merge followed by a filesort could result in a server
crash if sort_buffer_size was
not large enough for all sort keys.
(Bug#44810)
See also Bug#40974.
UNCOMPRESSED_LENGTH() returned a
garbage result when passed a string shorter than 5 bytes. Now
UNCOMPRESSED_LENGTH() returns
NULL and generates a warning.
(Bug#44796)
Several Valgrind warnings were silenced. (Bug#44774, Bug#44792)
Selecting
RAND(
function where N)N is a column of a
constant table (table with a single row)
failed with a SIGFPE signal.
(Bug#44768)
The PASSWORD() and
OLD_PASSWORD() functions could
read memory outside of an internal buffer when used with
BLOB arguments.
(Bug#44767)
Conversion of a string to a different character set could use the same buffer for input and output, leading to incorrect results or warnings. (Bug#44743, Bug#44766)
mysqld_safe could fail to find the logger program. (Bug#44736)
Code that optimized a read-only XA transaction failed to reset the XID once the transaction was no longer active. (Bug#44672)
A Valgrind warning related to transaction processing was silenced. (Bug#44664)
Some Perl scripts in AIX packages contained an incorrect path to the perl executable. (Bug#44643)
When creating tables using the IBMDB2I
storage engine, the RCDFMT (record format)
that would be applied to the corresponding files within the IBM
i would be set according to the table name. During whole table
operations, the name could get modified to a value inconsistent
with the table name. In addition, the record format would be
inconsistent compared to the file content. The
IBMDB2I storage engine now adds an explicit
RCDFMT clause to the CREATE
TABLE statement passed down to the DB2 storage engine
layer.
(Bug#44610)
innochecksum could incorrectly determine the input file name from the arguments. (Bug#44484)
Incorrect time was reported at the end of mysqldump output. (Bug#44424)
Caching of GROUP BY expressions could lead to
mismatches between compile-time and runtime calculations and
cause a server crash.
(Bug#44399)
Lettercase conversion in multibyte cp932 or
sjis character sequences could produce
incorrect results.
(Bug#44352)
InnoDB was missing
DB_ROLL_PTR information in Table Monitor
COLUMNS output.
(Bug#44320)
Assertion failure could occur for duplicate-key errors in
INSERT INTO ...
SELECT statements.
(Bug#44306)
Trying to use an unsupported character set on an
IBMDB2I table would produce DB2 error 2501 or
2511. The error has been updated to produce Error 2504
(Character set is unsupported).
(Bug#44232)
On 64-bit Windows systems, myisamchk did not
handle key_buffer_size values larger than
4GB.
(Bug#43940)
For user-defined utf8 collations, attempts to
store values too long for a column could cause a server crash.
(Bug#43827)
Invalidation of query cache entries due to table modifications could cause threads to hang inside the query cache with state “freeing items”. (Bug#43758)
EXPLAIN
EXTENDED could crash for
UNION queries in which the last
SELECT was not parenthesized and
included an ORDER BY clause.
(Bug#43612)
Multiple-table updates for InnoDB tables
could produce unexpected results.
(Bug#43580)
If the client lost the connection to the MySQL server after
mysql_stmt_prepare(), the first
call to mysql_stmt_execute()
returned an error (as expected) but consecutive calls to
mysql_stmt_execute() or
mysql_stmt_close() crashed the
client.
(Bug#43560)
For DELETE statements with ORDER BY
, where
varvar was a global system variable with
a NULL value, the server could crash.
(Bug#42778)
Builds linked against OpenSSL had a memory leak in association with use of X509 certificates. (Bug#42158)
There was a race condition when changing
innodb_commit_concurrency at
runtime from zero to nonzero or from nonzero to zero. Now this
variable cannot be changed at runtime from zero to nonzero or
vice versa. The value can still be changed from one nonzero
value to another.
(Bug#42101)
See also Bug#45749.
SELECT ... INTO
@var could produce values different from
SELECT ...
without the INTO clause.
(Bug#42009)
A crash occurred due to a race condition between the merge table
and table_cache evictions.
00000001403C452F mysqld.exe!memcpy()[memcpy.asm:151] 00000001402A275F mysqld.exe!ha_myisammrg::info()[ha_myisammrg.cc:854] 00000001402A2471 mysqld.exe!ha_myisammrg::attach_children()[ha_myisammrg.cc:488] 00000001402A2788 mysqld.exe!ha_myisammrg::extra()[ha_myisammrg.cc:863] 000000014015FC5D mysqld.exe!attach_merge_children()[sql_base.cc:4135] 000000014016A4C1 mysqld.exe!open_tables()[sql_base.cc:4697] 000000014016A898 mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:4956] 000000014018BB54 mysqld.exe!mysql_insert()[sql_insert.cc:613] 000000014019EDD3 mysqld.exe!mysql_execute_command()[sql_parse.cc:3066] 00000001401A2F06 mysqld.exe!mysql_parse()[sql_parse.cc:5791] 00000001401A3C1A mysqld.exe!dispatch_command()[sql_parse.cc:1202] 00000001401A4CD7 mysqld.exe!do_command()[sql_parse.cc:857] 0000000140246327 mysqld.exe!handle_one_connection()[sql_connect.cc:1115] 00000001402B82C5 mysqld.exe!pthread_start()[my_winthread.c:85] 00000001403CAC37 mysqld.exe!_callthreadstart()[thread.c:295] 00000001403CAD05 mysqld.exe!_threadstart()[thread.c:275] 0000000077D6B69A kernel32.dll!BaseThreadStart() Trying to get some variables. Some pointers may be invalid and cause the dump to abort...
Shared-memory connections did not work in Vista if mysqld was started from the command line. (Bug#41190)
For views created with a column list clause, column aliases were
not substituted when selecting through the view using a
HAVING clause.
(Bug#40825)
A multiple-table DELETE involving
a table self-join could cause a server crash.
(Bug#39918)
Creating an InnoDB table with a comment
containing a '#' character caused foreign key
constraints to be omitted.
(Bug#39793)
ALTER TABLE neglected to preserve
ROW_FORMAT information from the original
table, which could cause subsequent ALTER
TABLE and OPTIMIZE
TABLE statements to lose the row format for
InnoDB tables.
(Bug#39200)
The mysql option
--ignore-spaces was nonfunctional.
(Bug#39101)
If a query was such as to produce the error 1054
Unknown column '...' in 'field list', using
EXPLAIN
EXTENDED with the query could cause a server crash.
(Bug#37362)
In the mysql client, using a default
character set of binary caused internal
commands such as DELIMITER to become case
sensitive.
(Bug#37268)
mysqldump --tab dumped triggers to
stdout rather than to the
.sql file for the corresponding table.
(Bug#34861)
If the MYSQL_HISTFILE environment variable
was set to /dev/null, the
mysql client overwrote the
/dev/null device file as a normal file.
(Bug#34224)
mysqld_safe mishandled certain parameters if they contained spaces. (Bug#33685)
mysqladmin kill did not work for thread IDs larger than 32 bits. (Bug#32457)
Several client programs failed to interpret
--skip-password
as “send no password.”
(Bug#28479)
Output from mysql --html did not encode the
<, >, or
& characters.
(Bug#27884)
mysql_convert_table_format did not prevent
converting tables to MEMORY or
BLACKHOLE tables, which could result in data
loss.
(Bug#27149)
This release of MySQL has two known outstanding issues for Windows:
The .msi installer does not detect an
existing root password on the initial
configuration attempt. To work around this, install and
configure MySQL as normal, but skip any changes to security.
(There is a checkbox that allows this on the security screen
of the configuration wizard.) Then check your settings:
If the old root password and security
settings are okay, you are done and can proceed to use
MySQL.
Otherwise, reconfigure with the wizard and make any
changes on the second configuration attempt. The wizard
will properly prompt for the existing
root password and allow changes to be
made.
This issue has been filed as Bug#45200 for correction in a future release.
The Windows configuration wizard allows changes to
InnoDB settings during a reconfiguration
operation. For an upgrade, this may cause difficulties. To
work around this, use one of the following alternatives:
Do not change InnoDB settings.
Copy files from the old InnoDB location
to the new one.
This issue has been filed as Bug#45201 for correction in a future release.
Bugs fixed:
Performance:
InnoDB uses random numbers to
generate dives into indexes for calculating index cardinality.
However, under certain conditions, the algorithm did not
generate random numbers, so ANALYZE
TABLE did not update cardinality estimates properly. A
new algorithm has been introduced with better randomization
properties, together with a system variable,
innodb_use_legacy_cardinality_algorithm,
that controls which algorithm to use. The default value of the
variable is 1 (ON), to use the original
algorithm for compatibility with existing applications. The
variable can be set to 0 (OFF) to use the new
algorithm with improved randomness.
(Bug#43660)
Performance:
If the character set for a column being compared was neither the
default server character set nor latin1,
InnoDB was slower than necessary due to
excessive contention for a character set mutex.
As a workaround for earlier versions, set the default server
character set to the character set other than
latin1 that is most often used in indexed
columns.
(Bug#42649)
Important Change: Replication:
The transactional behavior of STOP
SLAVE has changed. Formerly, it took effect
immediately, even inside a transaction; now, it waits until the
current replication event group (if any) has finished executing,
or until the user issues a
KILL QUERY or
KILL CONNECTION
statement.
This was done in order to solve the problem encountered when
replication was stopped while a nontransactional slave was
replicating a transaction on the master. (It was impossible to
roll back a mixed-engines transaction when one of the engines
was nontransactional, which meant that the slave could not
safely re-apply any transaction that had been interrupted by
STOP SLAVE.)
(Bug#319, Bug#38205)
See also Bug#43217.
Partitioning:
When a value was equal to a PARTITION ... VALUES LESS
THAN ( value other
than value)MAXVALUE, the corresponding partition
was not pruned.
(Bug#42944)
Replication:
Unrelated errors occurring during the execution of
RESET SLAVE could cause the slave
to crash.
(Bug#44179)
Replication:
The --slave-skip-errors option
had no effect when using row-based logging format.
(Bug#39393)
Replication: The following errors were not correctly reported:
Failures during slave thread initialization
Failures while initializing the relay log position (immediately following the starting of the slave thread)
Failures while processing queries passed through the
--init_slave option.
Information about these types of failures can now be found in
the output of SHOW SLAVE
STATUS.
(Bug#38197)
Replication: Killing the thread executing a DDL statement, after it had finished its execution but before it had written the binlog event, caused the error code in the binlog event to be set (incorrectly) to ER_SERVER_SHUTDOWN or ER_QUERY_INTERRUPTED, which caused replication to fail. (Bug#37145)
Replication: Column aliases used inside subqueries were ignored in the binary log. (Bug#35515)
Valgrind warnings for the
DECODE(),
ENCRYPT(), and
FIND_IN_SET() functions were
corrected.
(Bug#44358, Bug#44365, Bug#44367)
On Windows, entries for build-vs9.bat and
build-vs9_x64.bat were missing in
win/Makefile.am.
(Bug#44353)
Incomplete cleanup of JOIN_TAB::select during
the filesort of rows for a GROUP BY clause
inside a subquery caused a server crash.
(Bug#44290)
Not all lock types had proper descriptive strings, resulting in garbage output from mysqladmin debug. (Bug#44164)
Use of HANDLER statements with
INFORMATION_SCHEMA tables caused a server
crash. Now HANDLER is prohibited
with such tables.
(Bug#44151)
MySQL Server allowed the creation of a merge table based on views but crashed when attempts were made to read from that table. The following example demonstrates this:
#Create a test table CREATE TABLE tmp (id int, c char(2)); #Create two VIEWs upon it CREATE VIEW v1 AS SELECT * FROM tmp; CREATE VIEW v2 AS SELECT * FROM tmp; #Finally create a MERGE table upon the VIEWs CREATE TABLE merge (id int, c char(2)) ENGINE=MERGE UNION(v1, v2); #Reading from the merge table lead to a crash SELECT * FROM merge;
The final line of the code generated the crash. (Bug#44040)
Some schema names longer than 8 characters were not supported by
IBMDB2I. The engine has been updated to allow
digits and underscore characters to be used in names longer than
8 characters.
(Bug#44025)
In some circumstances, when a table is created with the
IBMDB2I engine, the CREATE
TABLE statement will return successfully but the table
will not exist.
(Bug#44022)
The ucs2_swedish_ci and
utf8_swedish_ci collations did not work with
indexes using the IBMDB2I storage engine.
Support is now provided for MySQL when running on IBM i 6.1 or
higher.
(Bug#44020)
Invoking SHOW TABLE STATUS from
within a stored procedure could cause a Packets out of
order error.
(Bug#43962)
myisamchk could display a negative
Max keyfile length value.
(Bug#43950)
On 64-bit systems, a
key_buffer_size value larger
than 4GB could couse MyISAM index corruption.
(Bug#43932)
mysqld_multi incorrectly passed
--no-defaults to
mysqld_safe.
(Bug#43876)
SHOW VARIABLES did not properly
display the value of
slave_skip_errors.
(Bug#43835)
On Windows, a server crash occurred for attempts to insert a
floating-point value into a CHAR
column with a maximum length less than the converted
floating-point value length.
(Bug#43833)
Incorrect initialization of MyISAM table
indexes could cause incorrect query results.
(Bug#43737)
libmysqld crashed when it was reinitialized.
(Bug#43706, Bug#44091)
UNION of floating-point numbers
did unnecessary rounding.
(Bug#43432)
ALTER DATABASE
... UPGRADE DATA DIRECTORY NAME failed when the
database contained views.
(Bug#43385)
Certain statements might open a table and then wait for an
impending global read lock without noticing whether they hold a
table being waiting for by the global read lock, causing a hang.
Affected statements are
SELECT ... FOR
UPDATE,
LOCK TABLES ...
WRITE,
TRUNCATE
TABLE, and
LOAD DATA
INFILE.
(Bug#43230)
Using an XML function such as ExtractValue()
more than once in a single query could produce erroneous
results.
(Bug#43183)
See also Bug#43937.
Full-text prefix searches could hang the connection and cause 100% CPU consumption. (Bug#42907)
Incorrect elevation of warning messages to error messages for unsafe statements caused a server crash. (Bug#42640)
CHECK TABLE suggested use of
REPAIR TABLE for corrupt tables
for storage engines not supported by REPAIR
TABLE. Now CHECK TABLE
suggests that the user dump and reload the table.
(Bug#42563)
Compressing a table with the myisampack utility caused the server to produce Valgrind warnings when it opened the table. (Bug#41541)
For a MyISAM table with
DELAY_KEY_WRITE enabled, the index file could
be corrupted without the table being marked as crashed if the
server was killed.
(Bug#41330)
For some queries, an equality propagation problem could cause
a = b and b = a to be
handled differently.
(Bug#40925)
Killing an INSERT
... SELECT statement for a MyISAM
table could cause table corruption if the table had indexes.
(Bug#40827)
A multiple-table DELETE
IGNORE statement involving a foreign key constraint
caused an assertion failure.
(Bug#40127)
Multiple-table UPDATE statements
did not properly activate triggers.
(Bug#39953)
The mysql_setpermission operation for removing database privileges removed global privileges instead. (Bug#39852)
A stored routine contain a C-style comment could not be dumped and reloaded. (Bug#39559)
In an UPDATE or
DELETE via a secondary index,
InnoDB did not store the cursor position.
This made InnoDB crash in semi-consistent
read while attempting to unlock a nonmatching record.
(Bug#39320)
The functions listed in Section 11.13.4.2.3, “Creating Geometry Values Using MySQL-Specific Functions”, previously accepted WKB arguments and returned WKB values. They now accept WKB or geometry arguments and return geometry values.
The functions listed in Section 11.13.4.2.2, “Creating Geometry Values Using WKB Functions”, previously accepted WKB arguments and returned geometry values. They now accept WKB or geometry arguments and return geometry values. (Bug#38990)
On WIndows, running the server with
myisam_use_mmap enabled caused
MyISAM table corruption.
(Bug#38848)
CHECK TABLE did not properly
check whether MyISAM tables created by
servers from MySQL 4.0 or older needed to be upgraded. This
could cause problems upgrading to MySQL 5.1 or higher.
(Bug#37631)
An UPDATE statement that updated
a column using the same
DES_ENCRYPT() value for each row
actually updated different rows with different values.
(Bug#35087)
For shared-memory connections, the read and write methods did
not properly handle asynchronous close events, which could lead
to the client locking up waiting for a server response. For
example, a call to
mysql_real_query() would block
forever on the client side if the executed statement was aborted
on the server side. Thanks to Armin Schöffmann for the bug
report and patch.
(Bug#33899)
CHECKSUM TABLE was not killable
with KILL QUERY.
(Bug#33146)
myisamchk and myisampack
were not being linked with the library that enabled support for
* filename pattern expansion.
(Bug#29248)
For InnoDB tables that have their own
.ibd tablespace file, a superfluous
ibuf cursor restoration fails! message could
be written to the error log. This warning has been suppressed.
(Bug#27276)
COMMIT did not delete savepoints
if there were no changes in the transaction.
(Bug#26288)
Several memory allocation functions were not being checked for out-of-memory return values. (Bug#25058)
This is a Service Pack release of the MySQL Enterprise Server 5.1.
This section documents all changes and bugfixes that have been applied since the last MySQL Enterprise Server release (5.1.34).
The fix for Bug#40974 in MySQL 5.1.31 caused the regression problem reported in Bug#44810. Users for whom stability is of utmost priority should note that 5.1.34sp1 is affected by this problem because Bug#44810 is not fixed until MySQL 5.1.36.
If you would like to receive more fine-grained and personalized update alerts about fixes that are relevant to the version and features you use, please consider subscribing to MySQL Enterprise (a commercial MySQL offering). For more details please see http://www.mysql.com/products/enterprise/advisors.html.
Bugs fixed:
Incomplete cleanup of JOIN_TAB::select during
the filesort of rows for a GROUP BY clause
inside a subquery caused a server crash.
(Bug#44290)
Use of HANDLER statements with
INFORMATION_SCHEMA tables caused a server
crash. Now HANDLER is prohibited
with such tables.
(Bug#44151)
On 64-bit systems, a
key_buffer_size value larger
than 4GB could couse MyISAM index corruption.
(Bug#43932)
On Windows, a server crash occurred for attempts to insert a
floating-point value into a CHAR
column with a maximum length less than the converted
floating-point value length.
(Bug#43833)
libmysqld crashed when it was reinitialized.
(Bug#43706, Bug#44091)
Certain statements might open a table and then wait for an
impending global read lock without noticing whether they hold a
table being waiting for by the global read lock, causing a hang.
Affected statements are
SELECT ... FOR
UPDATE,
LOCK TABLES ...
WRITE,
TRUNCATE
TABLE, and
LOAD DATA
INFILE.
(Bug#43230)
Using an XML function such as ExtractValue()
more than once in a single query could produce erroneous
results.
(Bug#43183)
See also Bug#43937.
Incorrect elevation of warning messages to error messages for unsafe statements caused a server crash. (Bug#42640)
In an UPDATE or
DELETE via a secondary index,
InnoDB did not store the cursor position.
This made InnoDB crash in semi-consistent
read while attempting to unlock a nonmatching record.
(Bug#39320)
The functions listed in Section 11.13.4.2.3, “Creating Geometry Values Using MySQL-Specific Functions”, previously accepted WKB arguments and returned WKB values. They now accept WKB or geometry arguments and return geometry values.
The functions listed in Section 11.13.4.2.2, “Creating Geometry Values Using WKB Functions”, previously accepted WKB arguments and returned geometry values. They now accept WKB or geometry arguments and return geometry values. (Bug#38990)
Support Ending for AIX 5.2: Per the MySQL Support Lifecycle policy regarding ending support for OS versions that have reached vendor end of life, we plan to discontinue building or supporting MySQL binaries for AIX 5.2 as of April 30, 2009. This release of MySQL 5.1 (5.1.34) is the last MySQL 5.1 release with support for AIX 5.2. For more information, see the March 24, 2009 note at MySQL Product Support EOL Announcements.
Functionality added or changed:
The optimizer_switch system
variable is now available to control optimizations that can be
switched on and off. See
Section 7.2.18, “Using optimizer_switch to Control the
Optimizer”.
Bugs fixed:
Replication: Important Note:
Binary logging with
--binlog_format=ROW failed when a
change to be logged included more than 251 columns. This issue
was not known to occur with mixed-format or statement-based
logging.
(Bug#42977)
See also Bug#42914.
Replication:
Assigning an invalid directory for the
--slave-load-tmpdir caused the
replication slave to crash.
(Bug#42861)
Replication:
The mysql.procs_priv system table was not
replicated.
(Bug#42217)
Replication:
An INSERT
DELAYED into a
TIMESTAMP column issued
concurrently with an insert on the same column not using
DELAYED, but applied after the other insert,
was logged using the same timestamp as generated by the other
(non-DELAYED) insert.
(Bug#41719)
Replication:
The MIXED binary logging format did not
switch to row-based mode for statements containing the
LOAD_FILE() function.
(Bug#39701)
Replication:
When the server SQL mode included
IGNORE_SPACE, statement-based
replication of LOAD
DATA INFILE ... INTO
failed because the
statement was read incorrectly from the binary log; a trailing
space was omitted, causing the statement to fail with a syntax
error when run on the slave.
(Bug#22504)tbl_name
See also Bug#43746.
An attempt by a user who did not have the
SUPER privilege to kill a system
thread could cause a server crash.
(Bug#43748)
On Windows, incorrectly specified link dependencies in
CMakeLists.txt resulted in link errors for
mysql_embedded,
mysqltest_embedded, and
mysql_client_test_embedded.
(Bug#43715)
mysql crashed if a request for the current
database name returned an empty result, such as after the client
has executed a preceding SET
sql_select_limit=0 statement.
(Bug#43254)
If the value of the version_comment system
variable was too long, the mysql client
displayed a truncated startup message.
(Bug#43153)
Queries of the following form returned an empty result:
SELECT ... WHERE ... (col=colANDcol=col) OR ... (false expression)
The strings/CHARSET_INFO.txt file was not
included in source distributions.
(Bug#42937)
A dangling pointer in mysys/my_error.c
could lead to client crashes.
(Bug#42675)
Passing an unknown time zone specification to
CONVERT_TZ() resulted in a memory
leak.
(Bug#42502)
The MySQL Instance Configuration Wizard would fail to start correctly on Windows Vista. (Bug#42386)
With more than two arguments,
LEAST(),
GREATEST(), and
CASE could unnecessarily return
Illegal mix of collations errors.
(Bug#41627)
The mysql client could misinterpret its input if a line was longer than an internal buffer. (Bug#41486)
In the help command output displayed by
mysql, the description for the
\c (clear) command was
misleading.
(Bug#41268)
The load_defaults(),
my_search_option_files() and
my_print_default_files() functions in the C
client library were subject to a race condition in
multi-threaded operation.
(Bug#40552)
If --basedir was specified,
mysqld_safe did not use it when attempting to
locate my_print_defaults.
(Bug#39326)
When running the MySQL Instance Configuration Wizard in
command-line only mode, the service name would be ignored
(effectively creating all instances with the default
MySQL service name), irrespective of the name
specified on the command line. However, the wizard would attempt
to start the service with the specified name, and would fail.
(Bug#38379)
When MySQL was configured with the
--with-max-indexes=128 option,
mysqld crashed.
(Bug#36751)
Setting the join_buffer_size
variable to its minimum value produced spurious warnings.
(Bug#36446)
The use of NAME_CONST() can
result in a problem for
CREATE TABLE ...
SELECT statements when the source column expressions
refer to local variables. Converting these references to
NAME_CONST() expressions can
result in column names that are different on the master and
slave servers, or names that are too long to be legal column
identifiers. A workaround is to supply aliases for columns that
refer to local variables.
Now a warning is issued in such cases that indicate possible problems. (Bug#35383)
An attempt to check or repair an ARCHIVE table that had been subjected to a server crash returned a 144 internal error. The data appeared to be irrecoverable. (Bug#32880)
The Time column for SHOW
PROCESSLIST output and the value of the
TIME column of the
INFORMATION_SCHEMA.PROCESSLIST
table now can have negative values. Previously, the column was
unsigned and negative values were displayed incorrectly as large
positive values. Negative values can occur if a thread alters
the time into the future with
SET TIMESTAMP =
or the thread is
executing on a slave and processing events from a master that
has its clock set ahead of the slave.
(Bug#22047)value
Restoring a mysqldump dump file containing
FEDERATED tables failed because the file
contained the data for the table. Now only the table definition
is dumped (because the data is located elsewhere).
(Bug#21360)
Support Ending for AIX 5.2: Per the MySQL Support Lifecycle policy regarding ending support for OS versions that have reached vendor end of life, we plan to discontinue building or supporting MySQL binaries for AIX 5.2 as of April 30, 2009. The next release of MySQL 5.1 (5.1.34) will be the last MySQL 5.1 release with support for AIX 5.2. For more information, see the March 24, 2009 note at MySQL Product Support EOL Announcements.
Functionality added or changed:
Performance:
The query cache now checks whether a
SELECT statement begins with
SQL_NO_CACHE to determine whether it can skip
checking for the query result in the query cache. This is not
supported when SQL_NO_CACHE occurs within a
comment.
(Bug#37416)
mysql-test-run.pl now supports an
--experimental=
option. It enables you to specify a file that contains a list of
test cases that should be displayed with the file_name[ exp-fail
] code rather than [ fail ] if they
fail.
(Bug#42888)
The MD5 algorithm now uses the Xfree implementation. (Bug#42434)
Bugs fixed:
Partitioning: A duplicate key error raised when inserting into a partitioned table used a different error code from that returned by such an error raised when inserting into a table that was not partitioned. (Bug#38719)
See also Bug#28842.
Partitioning: Several error messages relating to partitioned tables were incorrect or missing. (Bug#36001)
Replication:
When --binlog_format was set to
STATEMENT, a statement unsafe for
statement-based logging caused an error or warning to be issued
even if sql_log_bin was set to
0.
(Bug#41980)
Replication:
When using MIXED replication format and
temporary tables were created in statement-based mode, but a
later operation in the same session caused a switch to row-based
mode, the temporary tables were not dropped on the slave at the
end of the session.
(Bug#40013)
See also Bug#43046.
This regression was introduced by Bug#20499.
Replication:
When using the MIXED replication format,
UPDATE and
DELETE statements that searched
for rows where part of the key had nullable
BIT columns failed. This occurred
because operations that inserted the data were replicated as
statements, but UPDATE and
DELETE statements affecting the
same data were replicated using row-based format.
This issue did not occur when using statement-based replication (only) or row-based replication (only). (Bug#39753)
See also Bug#39648.
Replication:
The server SQL mode in effect when a stored procedure was
created was not retained in the binary log. This could cause a
CREATE PROCEDURE statement that
succeeded on the master to fail on the slave.
This issue was first noticed when a stored procedure was created
when ANSI_QUOTES was in effect
on the master, but could possibly cause failed
CREATE PROCEDURE statements and
other problems on the slave when using other server SQL modes as
well.
(Bug#39526)
Replication:
If --secure-file-priv was set on
the slave, it was unable to execute
LOAD DATA
INFILE statements sent from the master when using
mixed-format or statement-based replication.
As a result of this fix, this security restriction is now
ignored on the slave in such cases; instead the slave checks
whether the files were created and should be read by the slave
in its --slave-load-tmpdir.
(Bug#38174)
Replication: Server IDs greater than 2147483647 (232 – 1) were represented by negative numbers in the binary log. (Bug#37313)
Replication:
When its disk becomes full, a replication slave may wait while
writing the binary log, relay log or
MyISAM tables, continuing after
space has been made available. The error message provided in
such cases was not clear about the frequency with which checking
for free space is done (once every 60 seconds), and how long the
server waits after space has been freed before continuing (also
60 seconds); this caused users to think that the server had
hung.
These issues have been addressed by making the error message clearer, and dividing it into two separate messages:
The error message Disk is full writing
'filename' (Errcode:
error_code). Waiting for someone
to free space... (Expect up to 60 secs delay for server to
continue after freeing disk space) is printed
only once.
The warning Retry in 60 secs, Message reprinted in 600 secs is printed once every for every 10 times that the check for free space is made; that is, the check is performed once each 60 seconds, but the reminder that space needs to be freed is printed only once every 10 minutes (600 seconds).
Replication:
The statements
DROP PROCEDURE
IF EXISTS and
DROP FUNCTION IF
EXISTS were not written to the binary log if the
procedure or function to be dropped did not exist.
(Bug#13684)
See also Bug#25705.
The IBM DB2i storage engine has been added to this release for
the IBM i Series platform. For more information, see
Section 13.7, “The IBMDB2I Storage Engine”.
(Bug#44217)
On 64-bit debug builds, code in safemalloc
resulted in errors due to use of a 32-bit value for 64-bit
allocations.
(Bug#43885)
make distcheck failed to properly handle
subdirectories of storage/ndb.
(Bug#43614)
Use of USE INDEX hints could cause
EXPLAIN
EXTENDED to crash.
(Bug#43354)
For InnoDB tables, overflow in an
AUTO_INCREMENT column could cause a server
crash.
(Bug#43203)
On 32-bit Windows, mysqld could not use large buffers due to a 2GB user mode address limit. (Bug#43082)
stderr should be unbuffered, but when the
server redirected stderr to a file, it became
buffered.
(Bug#42790)
The DATA_TYPE column of the
INFORMATION_SCHEMA.COLUMNS table
displayed the UNSIGNED attribute for
floating-point data types. (The column should contain only the
data type name.)
(Bug#42758)
For InnoDB tables, spurious duplicate-key
errors could occur when inserting into an
AUTO_INCREMENT column.
(Bug#42714)
mysqldump included views that were excluded
with the --ignore-table
option.
(Bug#42635)
An earlier bug fix resulted in the problem that the
InnoDB plugin could not be used with a server
that was compiled with the built-in InnoDB.
To handle this two changes were made:
The server now supports an
--ignore-builtin-innodb
option that causes the server to behave as if the built-in
InnoDB is not present. This option causes
other InnoDB options not to be
recognized.
For the INSTALL PLUGIN
statement, the server reads option
(my.cnf) files just as during server
startup. This enables the plugin to pick up any relevant
options from those files. Consequently, a plugin no longer
is started with each option set to its default value.
Because of this change, it is possible to add plugin options
to an option file even before loading a plugin (if the
loose prefix is used). It is also
possible to uninstall a plugin, edit
my.cnf, and install the plugin again.
Restarting the plugin this way enables it to the new option
values without a server restart.
InnoDB Plugin versions 1.0.4 and higher
will take advantage of this bug fix. Although the
InnoDB Plugin is source code compatible
with multiple MySQL releases, a given binary
InnoDB Plugin can be used only with a
specific MySQL release. When InnoDB Plugin
1.0.4 is released, it is expected to be compiled for MySQL
5.1.34. For 5.1.33, you can use InnoDB
Plugin 1.0.3, but you must build from source.
This regression was introduced by Bug#29263.
With the ONLY_FULL_GROUP_BY
SQL mode enabled, some legal queries failed.
(Bug#42567)
Tables could enter open table cache for a thread without being properly cleaned up, leading to a server crash. (Bug#42419)
For InnoDB tables, inserting into
floating-point AUTO_INCREMENT columns failed.
(Bug#42400)
The InnoDB
btr_search_drop_page_hash_when_freed()
function had a race condition.
(Bug#42279)
For InnoDB tables, there was a race condition
for ALTER TABLE,
OPTIMIZE TABLE,
CREATE INDEX, and
DROP INDEX operations when
periodically checking whether table copying can be committed.
(Bug#42152)
Parsing of the optional microsecond component of
DATETIME values did not fail
gracefully when that component width was larger than the allowed
six places.
(Bug#42146)
In InnoDB recovery after a server crash,
table lookup could fail and corrupt the data dictionary cache.
(Bug#42075)
mysqldumpslow parsed the
--debug and
--verbose options
incorrectly.
(Bug#42027)
Queries that used the loose index scan access method could return no rows. (Bug#41610)
In InnoDB recovery after a server crash,
rollback of a transaction that updated a column from
NULL to NULL could cause
another crash.
(Bug#41571)
The error message for a too-long column comment was
Unknown error rather than a more appropriate
message.
(Bug#41465)
Use of SELECT * allowed users with rights to
only some columns of a view to access all columns.
(Bug#41354)
If the tables underlying a MERGE table had a
primary key but the MERGE table itself did
not, inserting a duplicate row into the MERGE
table caused a server crash.
(Bug#41305)
The server did not robustly handle problems hang if a table
opened with HANDLER needed to be
re-opened because it had been altered to use a different storage
engine that does not support
HANDLER. The server also failed
to set an error if the re-open attempt failed. These problems
could cause the server to crash or hang.
(Bug#41110, Bug#41112)
SELECT statements executed
concurrently with INSERT
statements for a MyISAM table could cause
incorrect results to be returned from the query cache.
(Bug#41098)
For prepared statements, multibyte character sets were not
taking into account when calculating
max_length for string values and
mysql_stmt_fetch() could return
truncated strings.
(Bug#41078)
Deprecation warnings that referred to MySQL 5.2 were changed to refer to MySQL 6.0. (Bug#41077)
For user-defined variables in a query result, incorrect length values were returned in the result metadata. (Bug#41030)
On Windows, starting the server with an invalid value for
innodb_flush_method caused a
crash.
(Bug#40757)
MySQL 5.1 crashed with index merge algorithm and merge tables.
A query in the MyISAM merge table caused a crash if the index merge algorithm was being used. (Bug#40675)
With strict SQL mode enabled, setting a system variable to an out-of-bounds value caused an assertion failure. (Bug#40657)
Table temporary scans were slower than necessary due to use of
mmap rather than caching, even with the
myisam_use_mmap system variable
disabled.
(Bug#40634)
For a view that references a table in another database, mysqldump wrote the view name qualified with the current database name. This makes it impossible to reload the dump file into a different database. (Bug#40345)
On platforms where long and pointer variables have different
sizes, MyISAM could copy key statistics
incorrectly, resulting in a server crash or incorrect
cardinality values.
(Bug#40321)
DELETE tried to acquire write
(not read) locks for tables accessed within a subquery of the
WHERE clause.
(Bug#39843)
perror did not produce correct output for error codes 153 to 163. (Bug#39370)
Several functions in libmysqld called
exit() when an error occurred rather than
returning an error to the caller.
(Bug#39289)
The innodb_log_arch_dir system
variable is no longer available but was present in some of the
sample option files included with MySQL distributions (such as
my-huge.cnf). The line was present as a
comment but uncommenting it would cause server startup failure
so the line has been removed.
(Bug#38249)
Setting a savepoint with the same name as an existing savepoint
incorrectly deleted any other savepoints that had been set in
the meantime. For example, setting savepoints named
a, b,
c, b resulted in
savepoints a, b, rather
than the correct savepoints a,
c, b.
(Bug#38187)
--help output for
myisamchk did not list the
--HELP option.
(Bug#38103)
Comparisons between row constructors, such as (a, b) =
(c, d) resulted in unnecessary Illegal mix of
collations errors for string columns.
(Bug#37601)
If a user created a view that referenced tables for which the user had disjoint privileges, an assertion failure occurred. (Bug#37191)
An argument to the MATCH()
function that was an alias for an expression other than a column
name caused a server crash.
(Bug#36737)
The event, general_log,
and slow_log tables in the
mysql database store
server_id values, but did not
use an UNSIGNED column and thus were not able
to store the full range of ID values.
(Bug#36540)
On Windows, the _PC macro in
my_global.h was causing problems for modern
compilers. It has been removed because it is no longer used.
(Bug#34309)
For DROP FUNCTION with names that
were qualified with a database name, the database name was
handled in case-sensitive fashion even with
lower_case_table_names set to
1.
(Bug#33813)
mysqldump --compatible=mysql40 emitted
statements referring to the
character_set_client system
variable, which is unknown before MySQL 4.1. Now the statements
are enclosed in version-specific comments.
(Bug#33550)
Detection by configure of several functions
such as setsockopt(),
bind(), sched_yield(), and
gtty() could fail.
(Bug#31506)
Use of MBR spatial functions such as
MBRTouches() with columns of
InnoDB tables caused a server crash rather
than an error.
(Bug#31435)
The mysql client mishandled input parsing if
a delimiter command was not first on the
line.
(Bug#31060)
SHOW PRIVILEGES listed the
CREATE ROUTINE privilege as
having a context of Functions,Procedures, but
it is a database-level privilege.
(Bug#30305)
mysqld --help did not work as
root.
(Bug#30261)
CHECK TABLE,
REPAIR TABLE,
ANALYZE TABLE, and
OPTIMIZE TABLE erroneously
reported a table to be corrupt if the table did not exist or the
statement was terminated with
KILL.
(Bug#29458)
SHOW TABLE STATUS could fail to
produce output for tables with non-ASCII characters in their
name.
(Bug#25830)
Allocation of stack space for error messages could be too small on HP-UX, leading to stack overflow crashes. (Bug#21476)
Floating-point numbers could be handled with different numbers of digits depending on whether the text or prepared-statement protocol was used. (Bug#21205)
Incorrect length metadata could be returned for LONG
TEXT columns when a multibyte server character set was
used.
(Bug#19829)
ROUND() sometimes returned
different results on different platforms.
(Bug#15936)
Functionality added or changed:
The libedit library was upgraded to version
2.11.
(Bug#42433)
Bugs fixed:
Security Fix:
Using an XPath expression employing a scalar expression as a
FilterExpr
with ExtractValue() or
UpdateXML() caused the server to
crash. Such expressions now cause an error instead.
(Bug#42495)
Incompatible Change:
The fix for Bug#33699 introduced a change to the
UPDATE statement such that
assigning NULL to a NOT
NULL column caused an error even when strict SQL mode
was not enabled. The original behavior before was that such
assignments caused an error only in strict SQL mode, and
otherwise set the column to the implicit default value for the
column data type and generated a warning. (For information about
implicit default values, see
Section 10.1.4, “Data Type Default Values”.)
The change caused compatibility problems for applications that
relied on the original behavior. It also caused replication
problems between servers that had the original behavior and
those that did not, for applications that assigned
NULL to NOT NULL columns
in UPDATE statements without
strict SQL mode enabled. This change has been reverted so that
UPDATE again had the original
behavior. Problems can still occur if you replicate between
servers that have the modified
UPDATE behavior and those that do
not.
(Bug#39265)
Important Change:
When using the MySQL Instance Configuration Wizard with a
configuration where you already have an existing installation
with a custom datadir, the wizard could reset
the data to the default data directory. When performing an
upgrade installation in this situation, you must re-specify your
custom settings, including the datadir, to
ensure that your configuration file is not reset to the default
values.
(Bug#37534)
Important Change:
Uninstalling MySQL using the MySQL installer on Windows would
delete the my.ini file. The file is no longer
deleted. In addition, when a new installation is conducted, any
existing cofiguration file will be renamed to
myDATETIME.ini.bak during configuration.
(Bug#36493)
Important Change: When installing MySQL on Windows, it could be possible to install multiple editions (Complete, and Essential, for example) of the same version of MySQL, leading to two separate entries in the installed packages which were impossible to isolate. This could lead to problems with installation and uninstallation. The MySQL installer on Windows will no longer allow multiple installations of the same version of MySQL on a single machine. (Bug#4217)
Replication:
START SLAVE
UNTIL did not work correctly with
--replicate-same-server-id
enabled; when started with this option, the slave did not
perform events recorded in the relay log and that originated
from a different master.
Log rotation events are automatically generated and written when
rotating the binary log or relay log. Such events for relay logs
are usually ignored by the slave SQL thread because they have
the same server ID as that of the slave. However, when
--replicate-same-server-id was
enabled, the rotation event for the relay log was treated as if
it originated on the master, because the log's name and
position were incorrectly updated. This caused the
MASTER_POS_WAIT() function always
to return NULL and thus to fail.
(Bug#38734, Bug#38934)
Replication:
TRUNCATE statements failed to
replicate when statement-based binary logging mode was not
available. The issue was observed when using
InnoDB with the transaction
isolation level set to READ UNCOMMITTED (thus
forcing InnoDB not to allow
statement-based logging). However, the same behavior could be
reproduced using any transactional storage engine supporting
only row-based logging, regardless of the isolation level. This
was due to two separate problems:
An error was printed by InnoDB
for TRUNCATE when using
statement-based logging mode where the transaction isolation
level was set to READ COMMITTED or
READ UNCOMMITTED, because
InnoDB permits statement-based
replication for DML statements. However,
TRUNCATE is not
transactional; since it is the equivalent of
DROP TABLE followed by
CREATE TABLE, it is actually
DDL, and should therefore be allowed to be replicated as a
statement.
TRUNCATE was not logged in
mixed mode because of the error just described; however,
this error was not reported to the client.
As a result of this fix, TRUNCATE
is now treated as DDL for purposes of binary logging and
replication; that is, it is always logged as a statement and so
no longer causes an error when replicated using a transactional
storage engine such as InnoDB.
(Bug#36763)
See also Bug#42643.
Replication:
mysqlbinlog replay of
CREATE TEMPORARY
TABLE ... LIKE statements and of
TRUNCATE statements used on
temporary tables failed with Error 1146 (Table ...
doesn't exist).
(Bug#35583)
Replication:
In statement mode, mysqlbinlog failed to
issue a SET @@autommit statement when the
autocommit mode was changed.
(Bug#34541)
Replication:
LOAD DATA
INFILE statements did not replicate correctly from a
master running MySQL 4.1 to a slave running MySQL 5.1 or later.
(Bug#31240)
The use by libedit of the
__weak_reference() macro caused compilation
failure on FreeBSD.
(Bug#42817)
A '%' character in SQL statements could cause
the server to crash.
(Bug#42634)
An optimization introduced for Bug#37553 required an explicit
cast to be added for some uses of
TIMEDIFF() because automatic
casting could produce incorrect results. (It was necessary to
use TIME(TIMEDIFF(...)).)
(Bug#42525)
On the IBM i5 platform, the MySQL configuration process caused
the system version of pthread_setschedprio()
to be used. This function returns SIGILL on
i5 because it is not supported, causing the server to crash. Now
the my_pthread_setprio() function in the
mysys library is used instead.
(Bug#42524)
The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)
User variables within triggers could cause a crash if the
mysql_change_user() C API
function was invoked.
(Bug#42188)
Dependent subqueries such as the following caused a memory leak proportional to the number of outer rows:
SELECT COUNT(*) FROM t1, t2 WHERE t2.b IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a);
Some queries using NAME_CONST(.. COLLATE
...) led to a server crash due to a failed type cast.
(Bug#42014)
On Mac OS X, some of the universal client libraries were not actually universal and were missing code for one or more architectures. (Bug#41940)
String reallocation could cause memory overruns. (Bug#41868)
mysql_install_db did not pass some relevant options to mysqld. (Bug#41828)
Setting
innodb_locks_unsafe_for_binlog
should be equivalent to setting the transaction isolation level
to READ COMMITTED. However,
if both of those things were done, nonmatching semi-consistently
read rows were not unlocked when they should have been.
(Bug#41671)
REPAIR TABLE crashed for
compressed MyISAM tables.
(Bug#41574)
For a TIMESTAMP NOT
NULL DEFAULT ... column, storing
NULL as the return value from some functions
caused a “cannot be NULL” error.
NULL returns now correctly cause the column
default value to be stored.
(Bug#41370)
The server cannot execute
INSERT DELAYED
statements when statement-based binary logging is enabled, but
the error message displayed only the table name, not the entire
statement.
(Bug#41121)
FULLTEXT indexes did not work for Unicode
columns that used a custom UCA collation.
(Bug#41084)
The Windows installer displayed incorrect product names in some images. (Bug#40845)
Changing
innodb_thread_concurrency at
runtime could cause errors.
(Bug#40760)
SELECT statements could be blocked by
INSERT DELAYED
statements that were waiting for a lock, even with
low_priority_updates enabled.
(Bug#40536)
For InnoDB tables that used
ROW_FORMAT=REDUNDANT, storage size of
NULL columns could be determined incorrectly.
(Bug#40369)
The query cache stored only partial query results if a statement failed while the results were being sent to the client. This could cause other clients to hang when trying to read the cached result. Now if a statement fails, the result is not cached. (Bug#40264)
When a MEMORY table became full,
the error generated was returned to the client but was not
written to the error log.
(Bug#39886)
With row-based binary logging, replication of
InnoDB tables containing
NULL-valued
BIT columns could fail.
(Bug#39648)
The expression ROW(...) IN (SELECT ... FROM
DUAL) always returned TRUE.
(Bug#39069)
The greedy optimizer could cause a server crash due to improper handling of nested outer joins. (Bug#38795)
Use of COUNT(DISTINCT) prevented
NULL testing in the HAVING
clause.
(Bug#38637)
The innodb_stats_on_metadata
system variable was not displayed by SHOW
VARIABLES and was not settable at runtime.
(Bug#38189)
Enabling the sync_frm system
variable had no effect on the handling of
.frm files for views.
(Bug#38145)
The embedded server truncated some error messages. (Bug#37995)
For comparison of NULL to a subquery result
inside IS NULL, the comparison could evaluate
to NULL rather than to
TRUE or FALSE. This
occurred for expressions such as:
SELECT ... WHERE NULL IN (SELECT ...) IS NULL
Setting myisam_repair_threads
greater than 1 caused a server crash for table repair or
alteration operations for MyISAM
tables with multiple FULLTEXT indexes.
(Bug#37756)
When using the MySQL MSI Installer on Windows and selecting after a choosing Repair, you would be returned to the Fresh Install section of the installer. You are now correctly returned to the Install, Repair, Modify screen. (Bug#37294)
The mysql client sometimes improperly interpreted string escape sequences in nonstring contexts. (Bug#36391)
The query cache stored packets containing the server status of the time when the cached statement was run. This might lead to an incorrect transaction status on the client side if a statement was cached during a transaction and later served outside a transaction context (or vice versa). (Bug#36326)
If the system time was adjusted backward during query execution, the apparent execution time could be negative. But in some cases these queries would be written to the slow query log, with the negative execution time written as a large unsigned number. Now statements with apparent negative execution time are not written to the slow query log. (Bug#35396)
libmysqld was not built with all character
sets.
(Bug#32831)
For mysqld_multi, using the
--mysqld=mysqld_safe option
caused the --defaults-file
and --defaults-extra-file
options to behave the same way.
(Bug#32136)
Attempts to open a valid MERGE table sometimes resulted in a
ER_WRONG_MRG_TABLE error. This
happened after failure to open an invalid MERGE table had also
generated an ER_WRONG_MRG_TABLE
error.
(Bug#32047)
For Solaris package installation using
pkgadd, the postinstall script failed,
causing the system tables in the mysql
database not to be created.
(Bug#31164)
If the default database was dropped, the value of
character_set_database was not
reset to character_set_server
as it should have been.
(Bug#27208)
This is a Service Pack release of the MySQL Enterprise Server 5.1.
This section documents all changes and bugfixes that have been applied since the last MySQL Enterprise Server release (5.1.31).
If you would like to receive more fine-grained and personalized update alerts about fixes that are relevant to the version and features you use, please consider subscribing to MySQL Enterprise (a commercial MySQL offering). For more details please see http://www.mysql.com/products/enterprise/advisors.html.
Functionality added or changed:
The libedit library was upgraded to version
2.11.
(Bug#42433)
Bugs fixed:
Security Fix:
Using an XPath expression employing a scalar expression as a
FilterExpr
with ExtractValue() or
UpdateXML() caused the server to
crash. Such expressions now cause an error instead.
(Bug#42495)
On the IBM i5 platform, the MySQL configuration process caused
the system version of pthread_setschedprio()
to be used. This function returns SIGILL on
i5 because it is not supported, causing the server to crash. Now
the my_pthread_setprio() function in the
mysys library is used instead.
(Bug#42524)
The SSL certficates included with MySQL distributions were regenerated because the previous ones had expired. (Bug#42366)
User variables within triggers could cause a crash if the
mysql_change_user() C API
function was invoked.
(Bug#42188)
Some queries using NAME_CONST(.. COLLATE
...) led to a server crash due to a failed type cast.
(Bug#42014)
Functionality added or changed:
MySQL-shared-compat-advanced-gpl-5.1.31-0.*.rpm
and
MySQL-shared-compat-advanced-5.1.31-0.*.rpm
packages are now available. These client library compatibility
packages are like the MySQL-shared-compat
package, but are for the “MySQL Enterprise Server
–dash; Advanced Edition” products. Install these
packages rather than the normal
MySQL-shared-compat package if you want to
included shared client libraries for older MySQL versions.
(Bug#41838)
A new status variable,
Queries, indicates the number
of statements executed by the server. This includes statements
executed within stored programs, unlike the
Questions variable which
includes only statements sent to the server by clients.
(Bug#41131)
Performance of SELECT * retrievals from
INFORMATION_SCHEMA.COLUMNS was
improved slightly.
(Bug#38918)
Previously, index hints did not work for
FULLTEXT searches. Now they work as follows:
For natural language mode searches, index hints are silently
ignored. For example, IGNORE INDEX(i) is
ignored with no warning and the index is still used.
For boolean mode searches, index hints with FOR ORDER
BY or FOR GROUP BY are silently
ignored. Index hints with FOR JOIN or no
FOR modifier are honored. In contrast to how
hints apply for non-FULLTEXT searches, the
hint is used for all phases of query execution (finding rows and
retrieval, grouping, and ordering). This is true even if the
hint is given for a non-FULLTEXT index.
(Bug#38842)
Bugs fixed:
Important Change: Replication:
If a trigger was defined on an
InnoDB table and this trigger
updated a nontransactional table, changes performed on the
InnoDB table were replicated and
were visible on the slave before they were committed on the
master, and were not rolled back on the slave after a successful
rollback of those changes on the master.
As a result of the fix for this issue, the semantics of mixing
nontransactional and transactional tables in a transaction in
the first statement of a transaction have changed. Previously,
if the first statement in a transaction contained
nontransactional changes, the statement was written directly to
the binary log. Now, any statement appearing after a
BEGIN (or
immediately following a COMMIT if
AUTOCOMMIT = 0) is always considered part of
the transaction and cached. This means that nontransactional
changes do not propagate to the slave until the transaction is
committed and thus written to the binary log.
See Section 16.3.1.26, “Replication and Transactions”, for more information about this change in behavior. (Bug#40116)
Partitioning: Replication:
Changing the transaction isolation level while replicating
partitioned InnoDB tables could cause
statement-based logging to fail.
(Bug#39084)
Partitioning:
A comparison with an invalid DATE value in a
query against a partitioned table could lead to a crash of the
MySQL server.
Invalid DATE and
DATETIME values referenced in the
WHERE clause of a query on a partitioned
table are treated as NULL. See
Section 18.4, “Partition Pruning”, for more information.
Partitioning: This bug was introduced in MySQL 5.1.29. (Bug#40954)
This regression was introduced by Bug#30573, Bug#33257, Bug#33555.
Partitioning:
With READ COMMITTED
transaction isolation level, InnoDB
uses a semi-consistent read that releases nonmatching rows after
MySQL has evaluated the WHERE clause.
However, this was not happening if the table used partitions.
(Bug#40595)
Partitioning: A query that timed out when run against a partitioned table failed silently, without providing any warnings or errors, rather than returning Lock wait timeout exceeded. (Bug#40515)
Partitioning:
ALTER TABLE ... REORGANIZE PARTITION could
crash the server when the number of partitions was not changed.
(Bug#40389)
See also Bug#41945.
Partitioning:
For a partitioned table having an
AUTO_INCREMENT column: If the first statement
following a start of the server or a FLUSH
TABLES statement was an UPDATE
statement, the AUTO_INCREMENT column was not
incremented correctly.
(Bug#40176)
Partitioning:
The server attempted to execute the statements ALTER
TABLE ... ANALYZE PARTITION, ALTER TABLE ...
CHECK PARTITION, ALTER TABLE ... OPTIMIZE
PARTITION, and ALTER TABLE ... REORGANIZE
PARTITION on tables that were not partitioned.
(Bug#39434)
See also Bug#20129.
Partitioning:
The value of the CREATE_COLUMNS column in
INFORMATION_SCHEMA.TABLES was not
partitioned for partitioned tables.
(Bug#38909)
Partitioning:
When executing an ORDER BY query on a
partitioned InnoDB table using an index that
was not in the partition expression, the results were sorted on
a per-partition basis rather than for the table as a whole.
(Bug#37721)
Partitioning:
Dropping or creating an index on a partitioned table managed by
the InnoDB Plugin locked the table.
(Bug#37453)
Partitioning: Partitioned table checking sometimes returned a warning with an error code of 0, making proper response to errors impossible. The fix also renders the error message subject to translation in non-English deployments. (Bug#36768)
Partitioning:
SHOW TABLE STATUS could show a nonzero value
for the Mean record length of a partitioned
InnoDB table, even if the table
contained no rows.
(Bug#36312)
Partitioning:
When SHOW CREATE TABLE was used on a
partitioned table, all of the table's
PARTITION and SUBPARTITION
clauses were output on a single line, making it difficult to
read or parse.
(Bug#14326)
Replication:
Per-table AUTO_INCREMENT option values were
not replicated correctly for InnoDB
tables.
(Bug#41986)
Replication:
Some log_event types did not skip the
post-header when reading.
(Bug#41961)
Replication:
Attempting to read a binary log containing an
Incident_log_event having an invalid incident
number could cause the debug server to crash.
(Bug#40482)
Replication: When using row-based replication, an update of a primary key that was rolled back on the master due to a duplicate key error was not rolled back on the slave. (Bug#40221)
Replication: When rotating relay log files, the slave deletes relay log files and then edits the relay log index file. Formerly, if the slave shut down unexpectedly between these two events, the relay log index file could then reference relay logs that no longer existed. Depending on the circumstances, this could when restarting the slave cause either a race condition or the failure of replication. (Bug#38826, Bug#39325)
Replication:
With row-based replication, UPDATE and
DELETE statements using
LIMIT and a table's primary key could
produce different results on the master and slave.
(Bug#38230)
resolve_stack_dump was unable to resolve the stack trace format produced by mysqld in MySQL 5.1 and up (see Section 22.5.1.5, “Using a Stack Trace”). (Bug#41612)
In example option files provided in MySQL distributions, the
thread_stack value was
increased from 64K to 128K.
(Bug#41577)
The optimizer could ignore an error and rollback request during a filesort, causing an assertion failure. (Bug#41543)
DATE_FORMAT() could cause a
server crash for year-zero dates.
(Bug#41470)
SET PASSWORD caused a server
crash if the account name was given as
CURRENT_USER().
(Bug#41456)
When a repair operation was carried out on a
CSV table, the debug server
crashed.
(Bug#41441)
When substituting system constant functions with a constant
result, the server was not expecting NULL
function return values and could crash.
(Bug#41437)
Queries such as SELECT ... CASE AVG(...) WHEN
... that used aggregate functions in a
CASE expression crashed the server.
(Bug#41363)
INSERT INTO .. SELECT
... FROM and
CREATE TABLE ...
SELECT ... FROM a TEMPORARY table could inadvertently
change the locking type of the temporary table from a write lock
to a read lock, causing statement failure.
(Bug#41348)
The
INFORMATION_SCHEMA.SCHEMA_PRIVILEGES
table was limited to 7680 rows.
(Bug#41079)
In debug builds, obsolete debug code could be used to crash the server. (Bug#41041)
Some queries that used a “range checked for each record” scan could return incorrect results. (Bug#40974)
See also Bug#44810.
Certain SELECT queries could fail
with a Duplicate entry error.
(Bug#40953)
For debug servers, OPTIMIZE TABLE
on a compressed table caused a server crash.
(Bug#40949)
Accessing user variables within triggers could cause a server crash. (Bug#40770)
IF(..., CAST( as
an argument to an aggregate function could cause an assertion
failure.
(Bug#40761)longtext_val AS
UNSIGNED), signed_val)
For single-table UPDATE
statements, an assertion failure resulted from a runtime error
in a stored function (such as a recursive function call or an
attempt to update the same table as in the
UPDATE statement).
(Bug#40745)
TRUNCATE
TABLE for an InnoDB table did not
flush cached queries for the table.
(Bug#40386)
Prepared statements allowed invalid dates to be inserted when
the ALLOW_INVALID_DATES SQL
mode was not enabled.
(Bug#40365)
mc.exe is no longer needed to compile MySQL on Windows. This makes it possible to build MySQL from source using Visual Studio Express 2008. (Bug#40280)
The ':' character was incorrectly disallowed
in table names.
(Bug#40104)
Support for the revision field in
.frm files has been removed. This addresses
the downgrading problem introduced by the fix for Bug#17823.
(Bug#40021)
Retrieval speed from the following
INFORMATION_SCHEMA tables was improved by
shortening the VARIABLE_VALUE column to 1024
characters:
GLOBAL_VARIABLES,
SESSION_VARIABLES,
GLOBAL_STATUS,
and
SESSION_STATUS.
As a result of this change, any variable value longer than 1024
characters will be truncated with a warning. This affects only
the init_connect system
variable.
(Bug#39955)
For an InnoDB table,
DROP TABLE or
ALTER TABLE ...
DISCARD TABLESPACE could take a long time or cause a
server crash.
(Bug#39939)
If the operating system is configured to return leap seconds
from OS time calls or if the MySQL server uses a time zone
definition that has leap seconds, functions such as
NOW() could return a value having
a time part that ends with :59:60 or
:59:61. If such values are inserted into a
table, they would be dumped as is by
mysqldump but considered invalid when
reloaded, leading to backup/restore problems.
Now leap second values are returned with a time part that ends
with :59:59. This means that a function such
as NOW() can return the same
value for two or three consecutive seconds during the leap
second. It remains true that literal temporal values having a
time part that ends with :59:60 or
:59:61 are considered invalid.
For additional details about leap-second handling, see Section 9.7.2, “Time Zone Leap Second Support”. (Bug#39920)
The server could crash during a sort-order optimization of a dependent subquery. (Bug#39844)
For a server started with the
--temp-pool option on Windows,
temporary file creation could fail. This option now is ignored
except on Linux systems, which was its original intended scope.
(Bug#39750)
ALTER TABLE on a table with
FULLTEXT index that used a pluggable
FULLTEXT parser could cause debug servers to
crash.
(Bug#39746)
With the ONLY_FULL_GROUP_BY
SQL mode enabled, the check for nonaggregated columns in queries
with aggregate functions, but without a GROUP
BY clause was treating all the parts of the query as
if they were in the select list. This is fixed by ignoring the
nonaggregated columns in the WHERE clause.
(Bug#39656)
The server crashed if an integer field in a CSV file did not have delimiting quotes. (Bug#39616)
Creating a table with a comment of 62 characters or longer caused a server crash. (Bug#39591)
The do_abi_check program run during the build
process depends on mysql_version.h but that
file was not created first, resulting in build failure.
(Bug#39571)
CHECK TABLE failed for
MyISAM
INFORMATION_SCHEMA tables.
(Bug#39541)
On 64-bit Windows systems, the server accepted
key_buffer_size values larger
than 4GB, but allocated less. (For example, specifying a value
of 5GB resulted in 1GB being allocated.)
(Bug#39494)
InnoDB could hang trying to open an adaptive
hash index.
(Bug#39483)
Following ALTER
TABLE ... DISCARD TABLESPACE for an
InnoDB table, an attempt to determine the
free space for the table before the ALTER
TABLE operation had completely finished could cause a
server crash.
(Bug#39438)
Use of the PACK_KEYS or
MAX_ROWS table option in
ALTER TABLE should have triggered
table reconstruction but did not.
(Bug#39372)
The server returned a column type of
VARBINARY rather than
DATE as the result from the
COALESCE(),
IFNULL(),
IF(),
GREATEST(), or
LEAST() functions or
CASE expression if the result was
obtained using filesort in an anonymous
temporary table during the query execution.
(Bug#39283)
A server built using yaSSL for SSL support would crash if configured to use an RSA key and a client sent a cipher list containing a non-RSA key as acceptable. (Bug#39178)
When built with Valgrind, the server failed to access tables
created with the DATA DIRECTORY or
INDEX DIRECTORY table option.
(Bug#39102)
With binary logging enabled CREATE
VIEW was subject to possible buffer overwrite and a
server crash.
(Bug#39040)
The fast mutex implementation was subject to excessive lock contention. (Bug#38941)
Use of InnoDB monitoring
(SHOW ENGINE INNODB
STATUS or one of the
InnoDB Monitor tables) could cause
a server crash due to invalid access to a shared variable in a
concurrent environment.
(Bug#38883)
InnoDB could fail to generate
AUTO_INCREMENT values after an
UPDATE statement for the table.
(Bug#38839)
If delayed insert failed to upgrade the lock, it did not free
the temporary memory storage used to keep newly constructed
BLOB values in memory, resulting
in a memory leak.
(Bug#38693)
On Windows, a five-second delay occurred at shutdown of applications that used the embedded server. (Bug#38522)
On Solaris, a scheduling policy applied to the main server process could be unintentionally overwritten in client-servicing threads. (Bug#38477)
Building MySQL on FreeBSD would result in a failure during the gen_lex_hash phase of the build. (Bug#38364)
On Windows, the embedded server would crash in
mysql_library_init() if the
language file was missing.
(Bug#38293)
A mix of TRUNCATE
TABLE with LOCK TABLES
and UNLOCK
TABLES for an InnoDB could cause a
server crash.
(Bug#38231)
The ExtractValue() function did not work
correctly with XML documents containing a
DOCTYPE declaration.
(Bug#38227)
Queries with a HAVING clause could return a
spurious row.
(Bug#38072)
The Event Scheduler no longer logs “started in thread” or “executed” successfully messages to the error log. (Bug#38066)
Use of spatial data types in prepared statements could cause memory leaks or server crashes. (Bug#37956, Bug#37671)
An error in a debugging check caused crashes in debug servers. (Bug#37936)
A SELECT with a NULL NOT
IN condition containing a complex subquery from the
same table as in the outer select caused an assertion failure.
(Bug#37894)
The presence of a /* ... */ comment preceding
a query could cause InnoDB to use unnecessary
gap locks.
(Bug#37885)
Use of an uninitialized constant in
EXPLAIN evaluation caused an
assertion failure.
(Bug#37870)
When using ALTER TABLE on an
InnoDB table, the
AUTO_INCREMENT value could be changed to an
incorrect value.
(Bug#37788)
Primary keys were treated as part of a covering index even if only a prefix of a key column was used. (Bug#37742)
Renaming an ARCHIVE table to the
same name with different lettercase and then selecting from it
could cause a server crash.
(Bug#37719)
The MONTHNAME() and
DAYNAME() functions returned a
binary string, so that using
LOWER() or
UPPER() had no effect. Now
MONTHNAME() and
DAYNAME() return a value in
character_set_connection
character set.
(Bug#37575)
TIMEDIFF() was erroneously
treated as always returning a positive result. Also,
CAST() of
TIME values to
DECIMAL dropped the sign of
negative values.
(Bug#37553)
See also Bug#42525.
SHOW PROCESSLIST displayed
“copy to tmp table” when no such copy was
occurring.
(Bug#37550)
mysqlcheck used
SHOW FULL
TABLES to get the list of tables in a database. For
some problems, such as an empty .frm file
for a table, this would fail and mysqlcheck
then would neglect to check other tables in the database.
(Bug#37527)
Updating a view with a subquery in the CHECK
option could cause an assertion failure.
(Bug#37460)
Statements that displayed the value of system variables (for
example, SHOW VARIABLES) expect
variable values to be encoded in
character_set_system. However,
variables set from the command line such as
basedir or
datadir were encoded using
character_set_filesystem and
not converted correctly.
(Bug#37339)
CREATE INDEX could crash with
InnoDB plugin 1.0.1.
(Bug#37284)
Certain boolean-mode FULLTEXT searches that
used the truncation operator did not return matching records and
calculated relevance incorrectly.
(Bug#37245)
On a 32-bit server built without big tables support, the offset
argument in a LIMIT clause might be truncated
due to a 64-bit to 32-bit cast.
(Bug#37075)
For an InnoDB table with a FOREIGN
KEY constraint, TRUNCATE TABLE may
be performed using row by row deletion. If an error occurred
during this deletion, the table would be only partially emptied.
Now if an error occurs, the truncation operation is rolled back
and the table is left unchanged.
(Bug#37016)
The code for the ut_usectime() function in
InnoDB did not handle errors from the
gettimeofday() system call. Now it retries
gettimeofday() several times and updates
the value of the
Innodb_row_lock_time_max
status variable only if ut_usectime() was
successful.
(Bug#36819)
Use of CONVERT() with
GROUP BY to convert numeric values to
CHAR could return truncated
results.
(Bug#36772)
The mysql client, when built with Visual Studio 2005, did not display Japanese characters. (Bug#36279)
CREATE INDEX for
InnoDB tables could under very rare
circumstances cause the server to crash..
(Bug#36169)
A read past the end of the string could occur while parsing the
value of the
--innodb-data-file-path option.
(Bug#36149)
Setting the
slave_compressed_protocol
system variable to DEFAULT failed in the
embedded server.
(Bug#35999)
For upgrades to MySQL 5.1 or higher,
mysql_upgrade did not re-encode database or
table names that contained nonalphanumeric characters. (They
would still appear after the upgrade with the
#mysql50# prefix described in
Section 8.2.3, “Mapping of Identifiers to File Names”.) To correct this problem,
it was necessary to run mysqlcheck --all-databases
--check-upgrade --fix-db-names --fix-table-names
manually. mysql_upgrade now runs that command
automatically after performing the initial upgrade.
(Bug#35934)
SHOW CREATE TABLE did not display
a printable value for the default value of
BIT columns.
(Bug#35796)
The columns that store character set and collation names in
several INFORMATION_SCHEMA tables were
lengthened because they were not long enough to store some
possible values: SCHEMATA,
TABLES,
COLUMNS,
CHARACTER_SETS,
COLLATIONS, and
COLLATION_CHARACTER_SET_APPLICABILITY.
(Bug#35789)
The max_length metadata value was calculated
incorrectly for the FORMAT()
function, which could cause incorrect result set metadata to be
sent to clients.
(Bug#35558)
InnoDB was not updating the
Handler_delete or
Handler_update status
variables.
(Bug#35537)
InnoDB could fail to generate
AUTO_INCREMENT values if rows previously had
been inserted containing literal values for the
AUTO_INCREMENT column.
(Bug#35498, Bug#36411, Bug#39830)
The CREATE_OPTIONS column for
INFORMATION_SCHEMA.TABLES did not
display the KEY_BLOCK_SIZE option.
(Bug#35275)
Selecting from an INFORMATION_SCHEMA table
into an incorrectly defined MERGE
table caused an assertion failure.
(Bug#35068)
perror on Windows did not know about Win32 system error codes. (Bug#34825)
EXPLAIN
EXTENDED evaluation of aggregate functions that
required a temporary table caused a server crash.
(Bug#34773)
SHOW GLOBAL
STATUS shows values that aggregate the session status
values for all threads. This did not work correctly for the
embedded server.
(Bug#34517)
mysqldumpslow did not aggregate times. (Bug#34129)
mysql_config did not output
-ldl (or equivalent) when needed for
--libmysqld-libs, so its
output could be insufficient to build applications that use the
embedded server.
(Bug#34025)
The mysql client incorrectly parsed statements containing the word “delimiter” in mid-statement.
This fix is different from the one applied for this bug in MySQL 5.1.26. (Bug#33812)
See also Bug#38158.
For a stored procedure containing a SELECT * ... RIGHT
JOIN query, execution failed for the second call.
(Bug#33811)
Previously, use of index hints with views (which do not have indexes) produced the error ERROR 1221 (HY000): Incorrect usage of USE/IGNORE INDEX and VIEW. Now this produces ERROR 1176 (HY000): Key '...' doesn't exist in table '...', the same error as for base tables without an appropriate index. (Bug#33461)
Three conditions were discovered that could cause an upgrade
from MySQL 5.0 to 5.1 to fail: 1) Triggers associated with a
table that had a #mysql50# prefix in the name
could cause assertion failure. 2)
ALTER DATABASE
... UPGRADE DATA DIRECTORY NAME failed for databases
that had a #mysql50# prefix if there were
triggers in the database. 3) mysqlcheck
--fix-table-name didn't use UTF8 as the default
character set, resulting in parsing errors for tables with
nonlatin symbols in their names and trigger definitions.
(Bug#33094, Bug#41385)
Execution of a prepared statement that referred to a system variable caused a server crash. (Bug#32124)
Some division operations produced a result with incorrect precision. (Bug#31616)
Queries executed using join buffering of
BIT columns could produce
incorrect results.
(Bug#31399)
ALTER TABLE CONVERT TO CHARACTER SET did not
convert TINYTEXT or
MEDIUMTEXT columns to a longer
text type if necessary when converting the column to a different
character set.
(Bug#31291)
Server variables could not be set to their current values on Linux platforms. (Bug#31177)
See also Bug#6958.
For installation on Solaris using pkgadd
packages, the mysql_install_db script was
generated in the scripts directory, but the
temporary files used during the process were left there and not
deleted.
(Bug#31052)
Static storage engines and plugins that were disabled and
dynamic plugins that were installed but disabled were not listed
in the INFORMATION_SCHEMA appropriate
PLUGINS or
ENGINES table.
(Bug#29263)
Some SHOW statements and
retrievals from the INFORMATION_SCHEMA
TRIGGERS and
EVENTS tables used a temporary
table and incremented the
Created_tmp_disk_tables status
variable, due to the way that TEXT columns
are handled. The TRIGGERS.SQL_MODE,
TRIGGERS.DEFINER, and
EVENTS.SQL_MODE columns now are
VARCHAR to avoid this problem.
(Bug#29153)
For several read only system variables that were viewable with
SHOW VARIABLES, attempting to
view them with SELECT
@@ or set their
values with var_nameSET resulted in an
unknown system variable error. Now they can
be viewed with SELECT
@@ and attempting
to set their values results in a message indicating that they
are read only.
(Bug#28234)var_name
On Windows, Visual Studio does not take into account some x86
hardware limitations, which led to incorrect results converting
large DOUBLE values to unsigned
BIGINT values.
(Bug#27483)
SSL support was not included in some “generic” RPM packages. (Bug#26760)
The Questions status variable
is intended as a count of statements sent by clients to the
server, but was also counting statements executed within stored
routines.
(Bug#24289)
Setting the session value of the
max_allowed_packet or
net_buffer_length system
variable was allowed but had no effect. The session value of
these variables is now read only.
(Bug#22891)
See also Bug#32223.
A race condition between the mysqld.exe server and the Windows service manager could lead to inability to stop the server from the service manager. (Bug#20430)
On Windows, moving an InnoDB
.ibd file and then symlinking to it in the
database directory using a .sym file caused
a server crash.
(Bug#11894)
Bugs fixed:
Partitioning:
A SELECT using a range
WHERE condition with an ORDER
BY on a partitioned table caused a server crash.
(Bug#40494)
Replication:
Row-based replication failed with nonpartitioned
MyISAM tables having no indexes.
(Bug#40004)
With statement-based binary logging format and a transaction
isolation level of READ
COMMITTED or stricter, InnoDB
printed an error because statement-based logging might lead to
inconsistency between master and slave databases. However, this
error was printed even when binary logging was not enabled (in
which case, no such inconsistency can occur).
(Bug#40360)
The CHECK TABLE ...
FOR UPGRADE statement did not check for incompatible
collation changes made in MySQL 5.1.24 (Bug#27877). This also
affects mysqlcheck and
mysql_upgrade, which cause that statement to
be executed. See Section 2.12.3, “Checking Whether Table Indexes Must Be Rebuilt”.
Prior to this fix, a binary upgrade (performed without dumping
tables with mysqldump before the upgrade and
reloading the dump file after the upgrade) would corrupt tables
that have indexes that use the
utf8_general_ci or
ucs2_general_ci collation for columns that
contain 'ß' LATIN SMALL LETTER SHARP S
(German). After the fix,
CHECK TABLE ... FOR
UPGRADE properly detects the problem and warns about
tables that need repair.
However, the fix is not backward compatible and can result in a downgrading problem under these circumstances:
Perform a binary upgrade to a version of MySQL that includes the fix.
Run CHECK TABLE
... FOR UPGRADE (or mysqlcheck
or mysql_upgrade) to upgrade tables.
Perform a binary downgrade to a version of MySQL that does not include the fix.
The solution is to dump tables with mysqldump before the downgrade and reload the dump file after the downgrade. Alternatively, drop and recreate affected indexes. (Bug#40053)
Some recent releases for Solaris 10 were built on Solaris 10 U5,
which included a new version of libnsl.so
that does not work on U4 or earlier. To correct this, Solaris 10
builds now are created on machines that do not have that
upgraded libnsl.so, so that they will work
on Solaris 10 installations both with and without the upgraded
libnsl.so.
(Bug#39074)
With binary logging enabled,
CREATE TABLE ...
SELECT and
INSERT INTO ...
SELECT failed if the source table was a log table.
(Bug#34306)
XA transaction rollbacks could result in corrupted transaction states and a server crash. (Bug#28323)
ALTER TABLE for an
ENUM column could change column
values.
(Bug#23113)
Functionality added or changed:
Important Change:
The --skip-thread-priority option is now
deprecated such that the server won't change the thread
priorities by default. Giving threads different priorities might
yield marginal improvements in some platforms (where it actually
works), but it might instead cause significant degradation
depending on the thread count and number of processors. Meddling
with the thread priorities is a not a safe bet as it is very
dependent on the behavior of the CPU scheduler and system where
MySQL is being run.
(Bug#35164, Bug#37536)
Important Change:
The --log option now is
deprecated and will be removed (along with the
log system variable) in the future. Instead,
use the --general_log option to
enable the general query log and the
--general_log_file=
option to set the general query log file name. The values of
these options are available in the
file_namegeneral_log and
general_log_file system
variables, which can be changed at runtime.
Similar changes were made for the
--log-slow-queries option and
log_slow_queries system
variable. You should use the
--slow_query_log and
--slow_query_log_file=
options instead (and the
file_nameslow_query_log and
slow_query_log_file system
variables).
The BUILD/compile-solaris-* scripts now
compile MySQL with the mtmalloc library
rather than malloc.
(Bug#38727)
Bugs fixed:
Incompatible Change: Replication:
The default binary logging mode has been changed from
MIXED to STATEMENT for
compatibility with MySQL 5.0.
(Bug#39812)
Incompatible Change:
CHECK TABLE ... FOR
UPGRADE did not check for incompatible collation
changes made in MySQL 5.1.21 (Bug#29499) and 5.1.23 (Bug#27562,
Bug#29461). This also affects mysqlcheck and
mysql_upgrade, which cause that statement to
be executed. See Section 2.12.3, “Checking Whether Table Indexes Must Be Rebuilt”.
(Bug#39585)
See also Bug#40984.
Incompatible Change:
In connection with view creation, the server created
arc directories inside database directories
and maintained useless copies of .frm files
there. Creation and renaming procedures of those copies as well
as creation of arc directories has been
discontinued.
This change does cause a problem when downgrading to older server versions which manifests itself under these circumstances:
Create a view v_orig in MySQL 5.1.29 or
higher.
Rename the view to v_new and then back to
v_orig.
Downgrade to an older 5.1.x server and run mysql_upgrade.
Try to rename v_orig to
v_new again. This operation fails.
As a workaround to avoid this problem, use either of these approaches:
Dump your data using mysqldump before downgrading and reload the dump file after downgrading.
Instead of renaming a view after the downgrade, drop it and recreate it.
The downgrade problem introduced by the fix for this bug has been addressed as Bug#40021. (Bug#17823)
Important Change: Replication:
The SUPER privilege is now
required to change the session value of
binlog_format as well as its
global value. For more information about
binlog_format, see
Section 16.1.2, “Replication Formats”.
(Bug#39106)
Partitioning: Replication:
Replication to partitioned MyISAM tables
could be slow with row-based binary logging.
(Bug#35843)
Partitioning: If an error occurred when evaluating a column of a partitioned table for the partitioning function, the row could be inserted anyway. (Bug#38083)
Partitioning:
Using INSERT ...
SELECT to insert records into a partitioned
MyISAM table could fail if some partitions
were empty and others are not.
(Bug#38005)
Partitioning:
Ordered range scans on partitioned tables were not always
handled correctly. In some cases this caused some rows to be
returned twice. The same issue also caused GROUP
BY query results to be aggregated incorrectly.
(Bug#30573, Bug#33257, Bug#33555)
Replication: Server code used in binary logging could in some cases be invoked even though binary logging was not actually enabled, leading to asserts and other server errors. (Bug#38798)
Replication:
Replication of BLACKHOLE tables did not work
with row-based binary logging.
(Bug#38360)
Replication: In some cases, a replication master sent a special event to a reconnecting slave to keep the slave's temporary tables, but they still had references to the “old” slave SQL thread and used them to access that thread's data. (Bug#38269)
Replication:
Replication filtering rules were inappropiately applied when
executing BINLOG pseudo-queries.
One way in which this problem showed itself was that, when
replaying a binary log with mysqlbinlog, RBR
events were sometimes not executed if the
--replicate-do-db option was
specified. Now replication rules are applied only to those
events executed by the slave SQL thread.
(Bug#36099)
Replication:
For a CREATE TABLE
... SELECT statement that creates a table in a
database other than the current one, the table could be created
in the wrong database on replication slaves if row-based binary
logging is used.
(Bug#34707)
Replication:
A statement did not always commit or roll back correctly when
the server was shut down; the error could be triggered by having
a failing UPDATE or
INSERT statement on a
transactional table, causing an implicit rollback.
(Bug#32709)
See also Bug#38262.
The Sun Studio compiler failed to build debug versions of the server due to use of features specific to gcc. (Bug#39451)
For a TIMESTAMP column in an
InnoDB table, testing the column with
multiple conditions in the WHERE clause
caused a server crash.
(Bug#39353)
References to local variables in stored procedures are replaced
with
NAME_CONST( when written to the
binary log. However, an “illegal mix of collation”
error might occur when executing the log contents if the value's
collation differed from that of the variable. Now information
about the variable collation is written as well.
(Bug#39182)name,
value)
Queries of the form SELECT ... REGEXP BINARY
NULL could lead to a hung or crashed server.
(Bug#39021)
Statements of the form INSERT ... SELECT .. ON
DUPLICATE KEY UPDATE could result in a server crash.
(Bug#39002)col_name =
DEFAULT
Column names constructed due to wild-card expansion done inside a stored procedure could point to freed memory if the expansion was performed after the first call to the stored procedure. (Bug#38823)
Repeated CREATE
TABLE ... SELECT statements, where the created table
contained an AUTO_INCREMENT column, could
lead to an assertion failure.
(Bug#38821)
For deadlock between two transactions that required a timeout to resolve, all server tables became inaccessible for the duration of the deadlock. (Bug#38804)
When inserting a string into a duplicate-key error message, the server could improperly interpret the string, resulting in a crash. (Bug#38701)
A race condition between threads sometimes caused unallocated memory to be addressed. (Bug#38692)
A server crash resulted from concurrent execution of a
multiple-table UPDATE that used a
NATURAL or USING join
together with FLUSH
TABLES WITH READ LOCK or ALTER
TABLE for the table being updated.
(Bug#38691)
On ActiveState Perl, mysql-test-run.pl --start-and-exit started but did not exit. (Bug#38629)
An uninitialized variable in the query profiling code was corrected (detected by Valgrind). (Bug#38560)
A server crash resulted from execution of an
UPDATE that used a derived table
together with FLUSH
TABLES.
(Bug#38499)
Stored procedures involving substrings could crash the server on certain platforms due to invalid memory reads. (Bug#38469)
The handlerton-to-plugin mapping implementation did not free
handler plugin references when the plugin was uninstalled,
resulting in a server crash after several install/uninstall
cycles. Also, on Mac OS X, the server crashed when trying to
access an EXAMPLE table after the
EXAMPLE plugin was installed.
(Bug#37958)
The server crashed if an argument to a stored procedure was a subquery that returned more than one row. (Bug#37949)
When analyzing the possible index use cases, the server was incorrectly reusing an internal structure, leading to a server crash. (Bug#37943)
Access checks were skipped for SHOW
PROCEDURE STATUS and SHOW
FUNCTION STATUS, which could lead to a server crash or
insufficient access checks in subsequent statements.
(Bug#37908)
The <=>
operator could return incorrect results when comparing
NULL to DATE,
TIME, or
DATETIME values.
(Bug#37526)
The combination of a subquery with a GROUP
BY, an aggregate function calculated outside the
subquery, and a GROUP BY on the outer
SELECT could cause the server to
crash.
(Bug#37348)
The NO_BACKSLASH_ESCAPES SQL
mode was ignored for
LOAD DATA
INFILE and SELECT INTO ... OUTFILE.
The setting is taken into account now.
(Bug#37114)
In some cases, references to views were confused with references to anonymous tables and privilege checking was not performed. (Bug#36086)
For crash reports on Windows, symbol names in stack traces were not correctly resolved. (Bug#35987)
ALTER EVENT changed the
PRESERVE attribute of an event even when
PRESERVE was not specified in the statement.
(Bug#35981)
Host name values in SQL statements were not being checked for
'@', which is illegal according to RFC952.
(Bug#35924)
mysql_install_db failed on machines that had
the host name set to localhost.
(Bug#35754)
Dynamic plugins failed to load on i5/OS. (Bug#35743)
With the
PAD_CHAR_TO_FULL_LENGTH SQL
mode enabled, a ucs2
CHAR column returned additional
garbage after trailing space characters.
(Bug#35720)
A trigger for an InnoDB table activating
multiple times could lead to AUTO_INCREMENT
gaps.
(Bug#31612)
mysqldump could fail to dump views containing a large number of columns. (Bug#31434)
The server could improperly type user-defined variables used in the select list of a query. (Bug#26020)
For access to the
INFORMATION_SCHEMA.VIEWS table, the
server did not check the SHOW
VIEW and SELECT
privileges, leading to inconsistency between output from that
table and the SHOW CREATE VIEW
statement.
(Bug#22763)
mysqld_safe would sometimes fail to remove
the pid file for the old mysql process after
a crash. As a result, the server would fail to start due to a
false A mysqld process already exists...
error.
(Bug#11122)
Functionality added or changed:
Important Change:
mysqlbinlog now supports
--verbose and
--base64-output=DECODE-ROWS
options to display row events as commented SQL statements. (The
default otherwise is to display row events encoded as base-64
strings using BINLOG statements.)
See Section 4.6.7.2, “mysqlbinlog Row Event Display”.
(Bug#31455)
MySQL source distributions are now available in Zip format. (Bug#27742)
Added the SHOW PROFILES and
SHOW PROFILE statements to
display statement profile data, and the accompanying
INFORMATION_SCHEMA.PROFILING table.
Profiling is controlled via the
profiling and
profiling_history_size session
variables. see Section 12.5.5.33, “SHOW PROFILES Syntax”, and
Section 20.26, “The INFORMATION_SCHEMA PROFILING Table”. (Community contribution by
Jeremy Cole)
The profiling feature is enabled via the
--enable-community-features
and --enable-profiling options
to configure. These options are enabled by
default; to disable them, use
--disable-community-features
and
--disable-profiling.
(Bug#24795)
Bugs fixed:
Performance: Incompatible Change:
Some performance problems of
SHOW ENGINE INNODB
STATUS were reduced by removing used
cells and Total number of lock structs in row
lock hash table from the output. Now these values are
present only if the UNIV_DEBUG symbol is
defined at MySQL build time.
(Bug#36941, Bug#36942)
Performance:
Over-aggressive lock acquisition by InnoDB
when calculating free space for tablespaces could result in
performance degradation when multiple threads were executing
statements on multi-core machines.
(Bug#38185)
Important Change: Security Fix: Additional corrections were made for the symlink-related privilege problem originally addressed in MySQL 5.1.24. The original fix did not correctly handle the data directory path name if it contained symlinked directories in its path, and the check was made only at table-creation time, not at table-opening time later. (Bug#32167, CVE-2008-2079)
See also Bug#39277.
Security Enhancement:
The server consumed excess memory while parsing statements with
hundreds or thousands of nested boolean conditions (such as
OR (OR ... (OR ... ))). This could lead to a
server crash or incorrect statement execution, or cause other
client statements to fail due to lack of memory. The latter
result constitutes a denial of service.
(Bug#38296)
Incompatible Change:
There were some problems using DllMain()
hook functions on Windows that automatically do global and
per-thread initialization for
libmysqld.dll:
Per-thread initialization: MySQL internally counts the
number of active threads, which causes a delay in
my_end() if not all threads have
exited. But there are threads that can be started either by
Windows internally (often in TCP/IP scenarios) or by users.
Those threads do not necessarily use
libmysql.dll functionality but still
contribute to the open-thread count. (One symptom is a
five-second delay in times for PHP scripts to finish.)
Process-initialization:
my_init() calls
WSAStartup that itself loads DLLs and
can lead to a deadlock in the Windows loader.
To correct these problems, DLL initialization code now is not
invoked from libmysql.dll by default. To
obtain the previous behavior (DLL initialization code will be
called), set the LIBMYSQL_DLLINIT environment
variable to any value. This variable exists only to prevent
breakage of existing Windows-only applications that do not call
mysql_thread_init() and work
okay today. Use of LIBMYSQL_DLLINIT is
discouraged and is removed in MySQL 6.0.
(Bug#37226, Bug#33031)
Incompatible Change:
SHOW STATUS took a lot of CPU
time for calculating the value of the
Innodb_buffer_pool_pages_latched
status variable. Now this variable is calculated and included in
the output of SHOW STATUS only if
the UNIV_DEBUG symbol is defined at MySQL
build time.
(Bug#36600)
Incompatible Change:
An additional correction to the original MySQL 5.1.23 fix was
made to normalize directory names before adding them to the list
of directories. This prevents /etc/ and
/etc from being considered different, for
example.
(Bug#20748)
See also Bug#38180.
Partitioning:
When a partitioned table had a
TIMESTAMP column defined with
CURRENT_TIMESTAMP as the default but with no
ON UPDATE clause, the column's value was
incorrectly set to CURRENT_TIMESTAMP when
updating across partitions.
(Bug#38272)
Partitioning:
myisamchk failed with an assertion error when
analyzing a partitioned MyISAM table.
(Bug#37537)
Partitioning:
A LIST partitioned MyISAM
table returned erroneous results when an index was present on a
column in the WHERE clause and NOT
IN was used on that column.
Searches using the index were also much slower then if the index were not present. (Bug#35931)
Partitioning:
SELECT COUNT(*) was not correct for some
partitioned tables using a storage engine that did not support
HA_STATS_RECORDS_IS_EXACT. Tables using the
ARCHIVE storage engine were known to be
affected.
This was because ha_partition::records() was
not implemented, and so the default
handler::records() was used in its place.
However, this is not correct behavior if the storage engine does
not support HA_STATS_RECORDS_IS_EXACT.
The solution was to implement
ha_partition::records() as a wrapper around
the underlying partition records.
As a result of this fix, the rows column in the output of
EXPLAIN
PARTITIONS now includes the total number of records in
the partitioned table.
(Bug#35745)
Partitioning:
MyISAM recovery enabled with the
--myisam-recover option did not
work for partitioned MyISAM tables.
(Bug#35161)
Partitioning:
When one user was in the midst of a transaction on a partitioned
table, a second user performing an ALTER
TABLE on this table caused the server to hang.
(Bug#34604)
Partitioning:
Attempting to execute an INSERT
DELAYED statement on a partitioned table produced the
error Table storage engine for
'table' doesn't have this
option, which did not reflect the source of the
error accurately. The error message returned in such cases has
been changed to DELAYED option not supported for
table 'table'.
(Bug#31210)
Replication: Some kinds of internal errors, such as Out of memory errors, could cause the server to crash when replicating statements with user variables.
certain internal errors. (Bug#37150)
Replication:
Row-based replication did not correctly copy
TIMESTAMP values from a
big-endian storage engine to a little-endian storage engine.
(Bug#37076)
Replication:
INSTALL PLUGIN and
UNINSTALL PLUGIN caused row-based
replication to fail.
These statements are not replicated; however, when using
row-based logging, the changes they introduce in the
mysql system tables are written to the
binary log.
Server-side cursors were not initialized properly, which could cause a server crash. (Bug#38486)
A server crash or Valgrind warnings could result when a stored procedure selected from a view that referenced a function. (Bug#38291)
A failure to clean up binary log events was corrected (detected by Valgrind). (Bug#38290)
Incorrect handling of aggregate functions when loose index scan was used caused a server crash. (Bug#38195)
Queries containing a subquery with DISTINCT
and ORDER BY could cause a server crash.
(Bug#38191)
The fix for Bug#20748 caused a problem such that on Unix, MySQL
programs looked for options in ~/my.cnf
rather than the standard location of
~/.my.cnf.
(Bug#38180)
If the table definition cache contained tables with many
BLOB columns, much memory could
be allocated to caching BLOB
values. Now a size limit on the cached
BLOB values is enforced.
(Bug#38002)
For InnoDB tables, ORDER BY ...
DESC sometimes returned results in ascending order.
(Bug#37830)
If a table has a BIT NOT NULL column
c1 with a length shorter than 8 bits and some
additional NOT NULL columns
c2, ..., and a
SELECT query has a
WHERE clause of the form (c1 =
, the
query could return an unexpected result set.
(Bug#37799)constant) AND c2 ...
The server returned unexpected results if a right side of the
NOT IN clause consisted of the
NULL value and some constants of the same
type. For example, this query might return 3, 4, 5, and so forth
if a table contained those values:
SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2);
Setting the session value of the
innodb_table_locks system
variable caused a server crash.
(Bug#37669)
Nesting of IF() inside of
SUM() could cause an extreme
server slowdown.
(Bug#37662)
Killing a query that used an EXISTS subquery
as the argument to SUM() or
AVG() caused a server crash.
(Bug#37627)
When using indexed ORDER BY sorting,
incorrect query results could be produced if the optimizer
switched from a covering index to a noncovering index.
(Bug#37548)
After TRUNCATE
TABLE for an InnoDB table,
inserting explicit values into an
AUTO_INCREMENT column could fail to increment
the counter and result in a duplicate-key error for subsequent
insertion of NULL.
(Bug#37531)
Within stored programs or prepared statements,
REGEXP could return incorrect
results due to improper initialization.
(Bug#37337)
For a MyISAM table with CHECKSUM =
1 and ROW_FORMAT = DYNAMIC table
options, a data consistency check (maximum record length) could
fail and cause the table to be marked as corrupted.
(Bug#37310)
The max_length result set metadata value was
calculated incorrectly under some circumstances.
(Bug#37301)
If the length of a field was 3, internal
InnoDB to integer type conversion didn't work
on big-endian machines in the
row_search_autoinc_column() function.
(Bug#36793)
A query which had an ORDER BY DESC clause
that is satisfied with a reverse range scan could cause a server
crash for some specific CPU/compiler combinations.
(Bug#36639)
The CSV storage engine returned success even
when it failed to open a table's data file.
(Bug#36638)
SELECT
DISTINCT from a simple view on an
InnoDB table, where all selected columns
belong to the same unique index key, returned incorrect results.
(Bug#36632)
Dumping information about locks in use by sending a
SIGHUP signal to the server or by invoking
the mysqladmin debug command could lead to a
server crash in debug builds or to undefined behavior in
production builds.
(Bug#36579)
If initialization of an INFORMATION_SCHEMA
plugin failed, INSTALL PLUGIN
freed some internal plugin data twice.
(Bug#36399)
For InnoDB tables, the
DATA_FREE column of the
INFORMATION_SCHEMA.TABLES displayed
free space in kilobytes rather than bytes. Now it displays
bytes.
(Bug#36278)
When the fractional part in a multiplication of
DECIMAL values overflowed, the
server truncated the first operand rather than the longest. Now
the server truncates so as to produce more precise
multiplications.
(Bug#36270)
The mysql client failed to recognize comment
lines consisting of -- followed by a newline.
(Bug#36244)
The server could crash with an assertion failure (or cause the client to get a “Packets out of order” error) when the expected query result was that it should terminate with a “Subquery returns more than 1 row” error. (Bug#36135)
The UUID() function returned
UUIDs with the wrong time; this was because the offset for the
time part in UUIDs was miscalculated.
(Bug#35848)
The configure script did not allow
utf8_hungarian_ci to be specified as the
default collation.
(Bug#35808)
On 64-bit systems, assigning values of 2
63 – 1 or larger to
key_buffer_size caused memory
overruns.
(Bug#35616)
For InnoDB tables,
REPLACE statements used
“traditional” style locking, regardless of the
setting of
innodb_autoinc_lock_mode. Now
REPLACE works the same way as
“simple inserts” instead of using the old locking
algorithm. (REPLACE statements
are treated in the same way as as
INSERT statements.)
(Bug#35602)
Freeing of an internal parser stack during parsing of complex stored programs caused a server crash. (Bug#35577, Bug#37269, Bug#37228)
mysqlbinlog left temporary files on the disk after shutdown, leading to the pollution of the temporary directory, which eventually caused mysqlbinlog to fail. This caused problems in testing and other situations where mysqlbinlog might be invoked many times in a relatively short period of time. (Bug#35543)
Index scans performed with the sort_union()
access method returned wrong results, caused memory to be
leaked, and caused temporary files to be deleted when the limit
set by sort_buffer_size was
reached.
(Bug#35477, Bug#35478)
Table checksum calculation could cause a server crash for
FEDERATED tables with
BLOB columns containing
NULL values.
(Bug#34779)
A significant slowdown occurred when many
SELECT statements that return
many rows from InnoDB tables were running
concurrently.
(Bug#34409)
mysql_install_db failed if the server was
running with an SQL mode of
TRADITIONAL. This program now
resets the SQL mode internally to avoid this problem.
(Bug#34159)
Changes to build files were made to enable the MySQL distribution to compile on Microsoft Visual C++ Express 2008. (Bug#33907)
Fast ALTER TABLE operations were
not fast for columns that used multibyte character sets.
(Bug#33873)
The internal functions my_getsystime(),
my_micro_time(), and
my_micro_time_and_time() did not work
correctly on Windows. One symptom was that uniqueness of
UUID() values could be
compromised.
(Bug#33748)
Cached queries that used 256 or more tables were not properly
cached, so that later query invalidation due to a
TRUNCATE
TABLE for one of the tables caused the server to hang.
(Bug#33362)
mysql_upgrade attempted to use the
/proc file system even on systems that do
not have it.
(Bug#31605)
mysql_install_db failed if the default
storage engine was NDB. Now it
explicitly uses MyISAM as the storage engine
when running mysqld --bootstrap.
(Bug#31315)
Several MySQL programs could fail if the HOME
environment variable had an empty value.
(Bug#30394)
On NetWare, mysql_install_db could appear to execute normally even if it failed to create the initial databases. (Bug#30129)
The Serbian translation for the
ER_INCORRECT_GLOBAL_LOCAL_VAR
error was corrected.
(Bug#29738)
TRUNCATE
TABLE for InnoDB tables returned a
count showing too many rows affected. Now the statement returns
0 for InnoDB tables.
(Bug#29507)
The BUILD/check-cpu build script failed if gcc had a different name (such as gcc.real on Debian). (Bug#27526)
In some cases, the parser interpreted the ;
character as the end of input and misinterpreted stored program
definitions.
(Bug#26030)
The FLUSH
PRIVILEGES statement did not produce an error when it
failed.
(Bug#21226)
After executing a prepared statement that accesses a stored function, the next execution would fail to find the function if the stored function cache was flushed in the meantime. (Bug#12093, Bug#21294)
Functionality added or changed:
Bugs fixed:
Partitioning: Incompatible Change:
On Mac OS X with lower_case_table_names = 2,
the server could not read partitioned tables whose names
contained uppercase letters.
Partitioned tables using mixed case names should be renamed or dropped before upgrading to this version of the server on Mac OS X. (Bug#37402)
Important Change: Partitioning:
The statements ANALYZE TABLE,
CHECK TABLE,
OPTIMIZE TABLE, and
REPAIR TABLE are now supported
for partitioned tables.
Also as a result of this fix, the following statements which were disabled in MySQL 5.1.24 have been re-enabled:
ALTER TABLE ... ANALYZE PARTITION
ALTER TABLE ... CHECK PARTITION
ALTER TABLE ... OPTIMIZE PARTITION
ALTER TABLE ... REPAIR PARTITION
See also Bug#39434.
Replication:
Issuing a DROP DATABASE while any
temporary tables were open caused the server to switch to
statement-based mode.
(Bug#38773)
Replication:
The
--replicate-
options were not evaluated correctly when replicating
multi-table updates.
*-table
As a result of this fix, replication of multi-table updates no longer fails when an update references a missing table but does not update any of its columns. (Bug#37051)
The fix for Bug#33812 had the side effect of causing the mysql client not to be able to read some dump files produced with mysqldump. To address this, that fix was reverted. (Bug#38158)
Functionality added or changed:
Important Change: Incompatible Change:
The FEDERATED storage engine is now disabled
by default in binary distributions. The engine is still
available and can be enabled by starting the server with the
--federated option.
(Bug#37069)
mysqltest was changed to be more robust in the case of a race condition that can occur for rapid disconnect/connect sequences with the server. The account used by mysqltest could reach its allowed simultaneous-sessions user limit if the connect attempt occurred before the server had fully processed the preceding disconnect. mysqltest now checks specificaly for a user-limits error when it connects; if that error occurs, it delays briefly before retrying. (Bug#23921)
Bugs fixed:
Replication:
Row-based replication broke for utf8
CHAR columns longer than 85
characters.
(Bug#37426)
Replication:
Performing an insert on a table having an
AUTO_INCREMENT column and an
INSERT trigger that was being
replicated from a master running MySQL 5.0 or any version of
MySQL 5.1 up to and including MySQL 5.1.11 to a slave running
MySQL 5.1.12 or later caused the replication slave to crash.
(Bug#36443)
See also Bug#33029.
Some binary distributions had a duplicate “-64bit” suffix in the file name. (Bug#37623)
NOT IN subqueries that selected
MIN() or
MAX() values but produced an
empty result could cause a server crash.
(Bug#37004)
ha_innodb.so was incorrectly installed in
the lib/mysql directory rather than in
lib/mysql/plugin.
(Bug#36434)
An empty bit-string literal (b'') caused a
server crash. Now the value is parsed as an empty bit value
(which is treated as an empty string in string context or 0 in
numeric context).
(Bug#35658)
The code for detecting a byte order mark (BOM) caused mysql to crash for empty input. (Bug#35480)
The mysql client incorrectly parsed statements containing the word “delimiter” in mid-statement.
The fix for this bug had the side effect of causing the problem reported in Bug#38158, so it was reverted in MySQL 5.1.27. (Bug#33812)
Functionality added or changed:
Incompatible Change:
A change has been made to the way that the server handles
prepared statements. This affects prepared statements processed
at the SQL level (using the
PREPARE statement) and those
processed using the binary client-server protocol (using the
mysql_stmt_prepare() C API
function).
Previously, changes to metadata of tables or views referred to in a prepared statement could cause a server crash when the statement was next executed, or perhaps an error at execute time with a crash occurring later. For example, this could happen after dropping a table and recreating it with a different definition.
Now metadata changes to tables or views referred to by prepared
statements are detected and cause automatic repreparation of the
statement when it is next executed. Metadata changes occur for
DDL statements such as those that create, drop, alter, rename,
or truncate tables, or that analyze, optimize, or repair tables.
Repreparation also occurs after referenced tables or views are
flushed from the table definition cache, either implicitly to
make room for new entries in the cache, or explicitly due to
FLUSH TABLES.
Repreparation is automatic, but to the extent that it occurs, performance of prepared statements is diminished.
Table content changes (for example, with
INSERT or
UPDATE) do not cause
repreparation, nor do SELECT
statements.
An incompatibility with previous versions of MySQL is that a
prepared statement may now return a different set of columns or
different column types from one execution to the next. For
example, if the prepared statement is SELECT * FROM
t1, altering t1 to contain a
different number of columns causes the next execution to return
a number of columns different from the previous execution.
Older versions of the client library cannot handle this change in behavior. For applications that use prepared statements with the new server, an upgrade to the new client library is strongly recommended.
Along with this change to statement repreparation, the default
value of the
table_definition_cache system
variable has been increased from 128 to 256. The purpose of this
increase is to lessen the chance that prepared statements will
need repreparation due to referred-to tables/views having been
flushed from the cache to make room for new entries.
A new status variable, Com_stmt_reprepare,
has been introduced to track the number of repreparations.
(Bug#27420, Bug#27430, Bug#27690)
Important Change:
Some changes were made to
CHECK TABLE ... FOR
UPGRADE and REPAIR
TABLE with respect to detection and handling of tables
with incompatible .frm files (files created
with a different version of the MySQL server). These changes
also affect mysqlcheck because that program
uses CHECK TABLE and
REPAIR TABLE, and thus also
mysql_upgrade because that program invokes
mysqlcheck.
If your table was created by a different version of the
MySQL server than the one you are currently running,
CHECK TABLE ...
FOR UPGRADE indicates that the table has an
.frm file with an incompatible version.
In this case, the result set returned by
CHECK TABLE contains a line
with a Msg_type value of
error and a Msg_text
value of Table upgrade required. Please do "REPAIR
TABLE `
tbl_name`" to fix
it!
REPAIR TABLE without
USE_FRM upgrades the
.frm file to the current version.
If you use REPAIR TABLE ...USE_FRM and
your table was created by a different version of the MySQL
server than the one you are currently running,
REPAIR TABLE will not attempt
to repair the table. In this case, the result set returned
by REPAIR TABLE contains a
line with a Msg_type value of
error and a Msg_text
value of Failed repairing incompatible .FRM
file.
Previously, use of REPAIR TABLE
...USE_FRM with a table created by a different
version of the MySQL server risked the loss of all rows in
the table.
mysql_upgrade now has a
--tmpdir option to enable
the location of temporary files to be specified.
(Bug#36469)
mysqldump now adds the
LOCAL qualifier to the
FLUSH TABLES
statement that is sent to the server when the
--master-data option is
enabled. This prevents the
FLUSH TABLES
statement from replicating to slaves, which is disadvantageous
because it would cause slaves to block while the statement
executes.
(Bug#35157)
See also Bug#38303.
Bugs fixed:
Important Change:
The server no longer issues warnings for truncation of excess
spaces for values inserted into
CHAR columns. This reverts a
change in the previous release that caused warnings to be
issued.
(Bug#30059)
Replication:
CREATE PROCEDURE and
CREATE FUNCTION statements
containing extended comments were not written to the binary log
correctly, causing parse errors on the slave.
(Bug#36570)
See also Bug#32575.
Replication:
When flushing tables, there was a slight chance that the flush
occurred between the processing of one table map event and the
next. Since the tables were opened one by one, subsequent
locking of tables would cause the slave to crash. This problem
was observed when replicating
NDBCLUSTER or
InnoDB tables, when executing multi-table
updates, and when a trigger or a stored routine performed an
(additional) insert on a table so that two tables were
effectively being inserted into in the same statement.
(Bug#36197)
Replication:
CREATE VIEW statements containing
extended comments were not written to the binary log correctly,
causing parse errors on the slave. Now, all comments are
stripped from such statements before being written to the binary
log.
(Bug#32575)
See also Bug#36570.
On Windows 64-bit systems, temporary variables of
long types were used to store
ulong values, causing key cache
initialization to receive distorted parameters. The effect was
that setting key_buffer_size to
values of 2GB or more caused memory exhaustion to due allocation
of too much memory.
(Bug#36705)
Multiple-table UPDATE statements
that used a temporary table could fail to update all qualifying
rows or fail with a spurious duplicate-key error.
(Bug#36676)
A REGEXP match could return
incorrect rows when the previous row matched the expression and
used CONCAT() with an empty
string.
(Bug#36488)
mysqltest ignored the value of
--tmpdir in one place.
(Bug#36465)
When updating an existing instance (for example, from MySQL 5.0
to 5.1, or 5.1 to 6.0), the Instance Configuration Wizard
unnecessarily prompted for a root password
when there was an existing root password.
(Bug#36305)
Conversion of a FLOAT ZEROFILL value to
string could cause a server crash if the value was
NULL.
(Bug#36139)
On Windows, the installer attempted to use JScript to determine whether the target data directory already existed. On Windows Vista x64, this resulted in an error because the installer was attempting to run the JScript in a 32-bit engine, which wasn't registered on Vista. The installer no longer uses JScript but instead relies on a native WiX command. (Bug#36103)
mysqltest was performing escape processing
for the --replace_result command, which it
should not have been.
(Bug#36041)
An error in calculation of the precision of zero-length items
(such as NULL) caused a server crash for
queries that employed temporary tables.
(Bug#36023)
For EXPLAIN
EXTENDED, execution of an uncorrelated
IN subquery caused a crash if the subquery
required a temporary table for its execution.
(Bug#36011)
The MERGE storage engine did a table scan for
SELECT COUNT(*) statements when it could
calculate the number of records from the underlying tables.
(Bug#36006)
The server crashed inside NOT IN subqueries
with an impossible WHERE or
HAVING clause, such as NOT IN
(SELECT ... FROM t1, t2, ... WHERE 0).
(Bug#36005)
The Event Scheduler was not designed to work under the embedded
server. It is now disabled for the embedded server, and the
event_scheduler system variable
is not displayed.
(Bug#35997)
Grouping or ordering of long values in unindexed
BLOB or
TEXT columns with the
gbk or big5 character set
crashed the server.
(Bug#35993)
SET GLOBAL debug='' resulted in a Valgrind
warning in DbugParse(), which was reading
beyond the end of the control string.
(Bug#35986)
The “prefer full scan on clustered primary key over full scan of any secondary key” optimizer rule introduced by Bug#26447 caused a performance regression for some queries, so it has been disabled. (Bug#35850)
The server ignored any covering index used for
ref access of a table in a
query with ORDER BY if this index was
incompatible with the ORDER BY list and there
was another covering index compatible with this list. As a
result, suboptimal execution plans were chosen for some queries
that used an ORDER BY clause.
(Bug#35844)
mysql_upgrade did not properly update the
mysql.event table.
(Bug#35824)
An incorrect error and message was produced for attempts to
create a MyISAM table with an index
(.MYI) file name that was already in use by
some other MyISAM table that was open at the
same time. For example, this might happen if you use the same
value of the INDEX DIRECTORY table option for
tables belonging to different databases.
(Bug#35733)
Enabling the read_only system
variable while autocommit mode was enabled caused
SELECT statements for
transactional storage engines to fail.
(Bug#35732)
The combination of
GROUP_CONCAT(),
DISTINCT, and LEFT JOIN
could crash the server when the right table is empty.
(Bug#35298)
Some binaries produced stack corruption messages due to being built with versions of bison older than 2.1. Builds are now created using bison 2.3. (Bug#34926)
The log_output system variable
could be set to an illegal value.
(Bug#34820)
On Windows 64-bit builds, an apparent compiler bug caused memory
overruns for code in innobase/mem/*.
Removed optimizations so as not to trigger this problem.
(Bug#34297)
Several additional configuration scripts in the
BUILD directory now are included in source
distributions. These may be useful for users who wish to build
MySQL from source. (See
Section 2.10.3, “Installing from the Development Source Tree”, for information about
what they do.)
(Bug#34291)
Executing a FLUSH
PRIVILEGES statement after creating a temporary table
in the mysql database with the same name as
one of the MySQL system tables caused the server to crash.
While it is possible to shadow a system table in this way, the temporary table exists only for the current user and connection, and does not effect any user privileges.
UNION constructs cannot contain
SELECT ... INTO except in the final
SELECT. However, if a
UNION was used in a subquery and
an INTO clause appeared in the top-level
query, the parser interpreted it as having appeared in the
UNION and raised an error.
(Bug#32858)
Assignment of relative path names to
general_log_file or
slow_query_log_file did not
always work.
(Bug#32748)
The mysql.servers table was not created
during installation on Windows.
(Bug#28680, Bug#32797)
The jp test suite was not working.
(Bug#28563)
The internal init_time() library function
was renamed to my_init_time() to avoid
conflicts with external libraries.
(Bug#26294)
The parser used signed rather than unsigned values in some cases that caused legal lengths in column declarations to be rejected. (Bug#15776)
Functionality added or changed:
Important Change: MySQL Cluster: Packaging:
Beginning with this release, standard MySQL 5.1 binaries are no
longer built with support for the
NDBCLUSTER storage engine, and the
NDBCLUSTER code included in 5.1
mainline sources is no longer guaranteed to be maintained or
supported. Those using MySQL Cluster in MySQL 5.1.23 and earlier
MySQL 5.1 mainline releases should upgrade to MySQL Cluster NDB
6.2.15 or a later MySQL Cluster NDB 6.2 or 6.3 release.
(Bug#36193)
Important Change:
The FEDERATED storage engine is not included
in binary distributions of MySQL 5.1.24. (It will be included
again in 5.1.25.)
Replication:
Introduced the slave_exec_mode
system variable to control whether idempotent or strict mode is
used for replication conflict resolution. Idempotent mode
suppresses duplicate-key, no-key-found, and some other errors,
and is needed for circular replication, multi-master
replication, and some other complex replication setups when
using MySQL Cluster. Strict mode is the default.
(Bug#31609)
Replication:
When running the server with
--binlog-format=MIXED or
--binlog-format=STATEMENT, a
query that referred to a system variable used the slave's
value when replayed on the slave. This meant that, if the value
of a system variable was inserted into a table, the slave
differed from the master. Now, statements that refer to a system
variable are marked as “unsafe”, which means that:
When the server is using
--binlog-format=MIXED, the
row-based format is used automatically to replicate these
statements.
When the server is using
--binlog-format=STATEMENT,
these statements produce a warning.
See also Bug#34732.
The PROCESS privilege now is
required to start or stop the InnoDB monitor
tables (see Section 13.6.13.2, “SHOW ENGINE INNODB
STATUS and the InnoDB Monitors”). Previously, no
privilege was required.
(Bug#34053)
For binary .tar.gz packages,
mysqld and other binaries now are compiled
with debugging symbols included to enable easier use with a
debugger. If you do not need debugging symbols and are short on
disk space, you can use strip to remove the
symbols from the binaries.
(Bug#33252)
Formerly, when the MySQL server crashed, the generated stack dump was numeric and required external tools to properly resolve the names of functions. This is not very helpful to users having a limited knowledge of debugging techniques. In addition, the generated stack trace contained only the names of functions and was formatted differently for each platform due to different stack layouts.
Now it is possible to take advantage of newer versions of the GNU C Library provide a set of functions to obtain and manipulate stack traces from within the program. On systems that use the ELF binary format, the stack trace contains important information such as the shared object where the call was generated, an offset into the function, and the actual return address. Having the function name also makes possible the name demangling of C++ functions.
The library generates meaningful stack traces on the following platforms: i386, x86_64, PowerPC, IA64, Alpha, and S390. On other platforms, a numeric stack trace is still produced, and the use of the resolve_stack_dump utility is still required. (Bug#31891)
mysqltest now has mkdir
and rmdir commands for creating and removing
directories.
(Bug#31004)
The server uses less memory when loading privileges containing table grants. (Patch provided by Google.) (Bug#25175)
Added the
Uptime_since_flush_status
status variable, which indicates the number of seconds since the
most recent FLUSH STATUS statement.
(Community contribution by Jeremy Cole)
(Bug#24822)
SHOW OPEN TABLES now supports
FROM and LIKE clauses.
(Bug#12183)
The new read-only global system variables
report_host,
report_password,
report_port, and
report_user system variables
provide runtime access to the values of the corresponding
--report-host,
--report-password,
--report-port, and
--report-user options.
Formerly it was possible to specify an
innodb_flush_method value of
fdatasync to obtain the default flush
behavior of using fdatasync() for flushing.
This is no longer possible because it can be confusing that a
value of fdatasync causes use of
fsync() rather than
fdatasync().
The use of InnoDB hash indexes now can be
controlled by setting the new
innodb_adaptive_hash_index
system variable at server startup. By default, this variable is
enabled. See Section 13.6.10.4, “Adaptive Hash Indexes”.
Bugs fixed:
Performance:
InnoDB adaptive hash latches could be held
too long during filesort operations, resulting in a server
crash. Now the hash latch is released when a query on
InnoDB tables performs a filesort. This
eliminates the crash and may provide significant performance
improvements on systems on which many queries using filesorts
with temporary tables are being performed.
(Bug#32149)
Performance:
InnoDB exhibited thread thrashing with more
than 50 concurrent connections under an update-intensive
workload.
(Bug#22868)
Important Change: Security Fix:
It was possible to circumvent privileges through the creation of
MyISAM tables employing the DATA
DIRECTORY and INDEX DIRECTORY
options to overwrite existing table files in the MySQL data
directory. Use of the MySQL data directory in DATA
DIRECTORY and INDEX DIRECTORY is
now disallowed. This is now also true of these options when used
with partitioned tables and individual partitions of such
tables.
Additional fixes were made in MySQL 5.1.28.
See also Bug#39277.
Security Fix:
A client that connects to a malicious server could be tricked by
the server into sending files from the client host to the
server. This occurs because the
libmysqlclient client library would respond
to a FETCH LOCAL FILE request from the server
even if the request is sent for statements from the client other
than LOAD DATA LOCAL
INFILE. The client library has been modified to
respond to a FETCH LOCAL FILE request from
the server only if is is sent in response to a
LOAD DATA LOCAL
INFILE statement from the client.
The client library now also checks whether
CLIENT_LOCAL_FILE is set and refuses to send
a local file if not.
Binary distributions ship with the
local-infile capability enabled.
Applications that do not use this functionality should disable
it to be safe.
Important Change: Security Enhancement:
On Windows Vista and Windows Server 2008, a user without
administrative privileges does not have write permissions to the
Program Files directory where MySQL and the
associated data files are normally installed. Using data files
located in the standard Program Files
installation directory could therefore cause MySQL to fail, or
lead to potential security issues in an installed instance.
To address the problem, on Windows XP, Windows Vista and Windows
Server 2008, the datafiles and data file configuration are now
set to the Microsoft recommended AppData
folder. The AppData folder is typically
located within the user's home directory.
When upgrading an existing 5.1.23 or 6.0.4 installation of
MySQL you must take a backup of your data and configuration
file (my.ini before installing the new
version. To migrate your data, either extract the data and
re-import (using mysqldump, then upgrade
and re-import using mysql), or back up your
data, upgrade to the new version, and copy your existing data
files from your old datadir directory to
the new directory located within AppData.
Failure to back up your data and follow these procedures may lead to data loss.
Incompatible Change:
In MySQL 5.1.23, the last_errno and
last_error members of the
NET structure in
mysql_com.h were renamed to
client_last_errno and
client_last_error. This was found to cause
problems for connectors that use the internal
NET structure for error handling. The change
has been reverted.
(Bug#34655)
See also Bug#12713.
Incompatible Change:
It was possible to use FRAC_SECOND as a
synonym for MICROSECOND with
DATE_ADD(),
DATE_SUB(), and
INTERVAL; now, using
FRAC_SECOND with anything other than
TIMESTAMPADD() or
TIMESTAMPDIFF() produces a syntax
error.
It is now possible (and preferable) to use
MICROSECOND with
TIMESTAMPADD() and
TIMESTAMPDIFF(), and
FRAC_SECOND is now deprecated.
(Bug#33834)
Incompatible Change:
The UPDATE statement allowed
NULL to be assigned to NOT
NULL columns (the implicit default value for the
column data type was assigned). This was changed so that on
error occurs.
This change was reverted, because the original report was
determined not to be a bug: Assigning NULL to
a NOT NULL column in an
UPDATE statement should produce
an error only in strict SQL mode and set the column to the
implicit default with a warning otherwise, which was the
original behavior. See Section 10.1.4, “Data Type Default Values”, and
Bug#39265.
(Bug#33699)
Incompatible Change:
For packages that are built within their own prefix (for
example, /usr/local/mysql) the plugin
directory will be lib/plugin. For packages
that are built to be installed into a system-wide prefix (such
as RPM packages with a prefix of /usr), the
plugin directory will be lib/mysql/plugin
to ensure a clean /usr/lib hierarchy. In
both cases, the $pkglibdir configuration
setting is used at build time to set the plugin directory.
The current plugin directory location is available as the value
of the plugin_dir system
variable as before, but the mysql_config
script now has a
--plugindir option that can
be used externally to the server by third-party plugin writers
to obtain the default plugin directory path name and configure
their installation directory appropriately.
(Bug#31736)
Incompatible Change:
The utf8_general_ci and
ucs2_general_ci collations did not sort the
letter "U+00DF SHARP S" equal to 's'.
As a result of this bug fix, indexes must be rebuilt for columns
that use the utf8_general_ci or
ucs2_general_ci collation for columns that
contain SHARP S. See Section 2.12.3, “Checking Whether Table Indexes Must Be Rebuilt”.
(Bug#27877)
See also Bug#37046.
Important Change: Partitioning: The following statements did not function correctly with corrupted or crashed tables and have been disabled:
ALTER TABLE ... ANALYZE PARTITION
ALTER TABLE ... CHECK PARTITION
ALTER TABLE ... OPTIMIZE PARTITION
ALTER TABLE ... REPAIR PARTITION
ALTER TABLE ... REBUILD PARTITION is
unaffected by this change and continues to be available. This
statement and ALTER TABLE ... REORGANIZE
PARTITION may be used to analyze and optimize
partitioned tables, since these operations cause the partition
files to be rebuilt.
(Bug#20129)
See also Bug#39434.
Important Change: Replication:
When the master crashed during an update on a transactional
table while in autocommit mode,
the slave failed. This fix causes every transaction (including
autocommit transactions) to be
recorded in the binlog as starting with a
BEGIN and
ending with a COMMIT or
ROLLBACK.
(Bug#26395)
Important Change:
InnoDB free space information is now shown in
the Data_free column of
SHOW TABLE STATUS and in the
DATA_FREE column of the
INFORMATION_SCHEMA.TABLES table.
(Bug#32440)
See also Bug#11379.
Important Change:
The server handled truncation of values having excess trailing
spaces into CHAR,
VARCHAR, and
TEXT columns in different ways.
This behavior has now been made consistent for columns of all
three of these types, and now follows the existing behavior of
VARCHAR columns in this regard;
that is, a Note is always issued whenever
such truncation occurs.
This change does not affect columns of these three types when
using a binary encoding; BLOB
columns are also unaffected by the change, since they always use
a binary encoding.
(Bug#30059)
Important Change:
An AFTER UPDATE trigger was not invoked when
the UPDATE did not make any
changes to the table for which the trigger was defined. Now
AFTER UPDATE triggers behave the same in this
regard as do BEFORE UPDATE triggers, which
are invoked whether the UPDATE
makes any changes in the table or not.
(Bug#23771)
Replication: Important Note: Network timeouts between the master and the slave could result in corruption of the relay log. This fix rectifies a long-standing replication issue when using unreliable networks, including replication over wide area networks such as the Internet. If you experience reliability issues and see many You have an error in your SQL syntax errors on replication slaves, we strongly recommend that you upgrade to a MySQL version which includes this fix. (Bug#26489)
Partitioning:
In some cases, matching rows from a partitioned
MyISAM using a
BIT column as the primary key
were not found by queries.
(Bug#34358)
Partitioning:
Enabling innodb_file_per_table
produced problems with partitioning and tablespace operations on
partitioned InnoDB tables, in some cases
leading to corrupt partitions or causing the server to crash.
(Bug#33429)
Partitioning:
A table defined using PARTITION BY KEY and
having a BIT column referenced in
the partitioning key did not behave correctly; some rows could
be inserted into the wrong partition, causing wrong results to
be returned from queries.
(Bug#33379)
Partitioning:
For InnoDB tables, there was a race condition
involving the data dictionary and repartitioning.
(Bug#33349)
Partitioning:
When ALTER TABLE DROP PARTITION was executed
on a table on which there was a trigger, the statement failed
with an error. This occurred even if the trigger did not
reference any tables.
(Bug#32943)
Partitioning:
Currently, all partitions of a partitioned table must use the
same storage engine. One may optinally specify the storage
engine on a per-partition basis; however, where this is the
done, the storage engine must be the same as used by the table
as a whole. ALTER TABLE did not
enforce these rules correctly, the result being that incaccurate
error messages were shown when trying to use the statement to
change the storage engine used by an individual partition or
partitions.
(Bug#31931)
Partitioning:
Using the DATA DIRECTORY and INDEX
DIRECTORY options for partitions with
CREATE TABLE or
ALTER TABLE statements appeared
to work on Windows, although they are not supported by MySQL on
Windows systems, and subsequent attempts to use the tables
referenced caused errors. Now these options are disabled on
Windows, and attempting to use them generates a warning.
(Bug#30459)
Replication:
The failure of a CREATE TABLE ... ENGINE=InnoDB ...
SELECT statement caused the slave to lose data.
(Bug#35762)
Replication:
When using row-based replication, a slave could crash at startup
because it received a row-based replication event that
InnoDB could not handle due to an incorrect
test of the query string provided by MySQL, which was
NULL for row-based replication events.
(Bug#35226)
Replication:
insert_id was not written to
the binary log for inserts into BLACKHOLE
tables.
(Bug#35178)
Replication:
When using statement-based replication and a
DELETE,
UPDATE, or
INSERT ...
SELECT statement using a LIMIT
clause is encountered, a warning that the statement is not safe
to replicate in statement mode is now issued; when using
MIXED mode, the statement is now replicated
using the row-based format.
(Bug#34768)
Replication:
mysqlbinlog did not output the values of
auto_increment_increment and
auto_increment_offset when both
were equal to their default values (for both of these variables,
the default is 1). This meant that a binary log recorded by a
client using the defaults for both variables and then replayed
on another client using its own values for either or both of
these variables produced erroneous results.
(Bug#34732)
See also Bug#31168.
Replication:
When the Windows version of mysqlbinlog read
4.1 binlogs containing
LOAD DATA
INFILE statements, it output backslashes as path
separators, causing problems for client programs expecting
forward slashes. In such cases, it now converts
\\ to / in directory
paths.
(Bug#34355)
Replication:
SHOW SLAVE STATUS failed when
slave I/O was about to terminate.
(Bug#34305)
Replication: The character sets and collations used for constant identifiers in stored procedures were not replicated correctly. (Bug#34289)
Replication:
mysqlbinlog from a 5.1 or later MySQL
distribution could not read binary logs generated by a 4.1
server when the logs contained
LOAD DATA
INFILE statements.
(Bug#34141)
This regression was introduced by Bug#32407.
Replication:
A CREATE USER,
DROP USER, or
RENAME USER statement that fails
on the master, or that is a duplicate of any of these
statements, is no longer written to the binlog; previously,
either of these occurrences could cause the slave to fail.
See also Bug#29749.
Replication:
SHOW BINLOG EVENTS could fail
when the binlog contained one or more events whose size was
close to the value of
max_allowed_packet.
(Bug#33413)
Replication:
An extraneous
ROLLBACK
statement was written to the binary log by a connection that did
not use any transactional tables.
(Bug#33329)
Replication: mysqlbinlog failed to release all of its memory after terminating abnormally. (Bug#33247)
Replication:
When a stored routine or trigger, running on a master that used
MySQL 5.0 or MySQL 5.1.11 or earlier, performed an insert on an
AUTO_INCREMENT column, the
insert_id value was not
replicated correctly to a slave running MySQL 5.1.12 or later
(including any MySQL 6.0 release).
(Bug#33029)
See also Bug#19630.
Replication: The error message generated due to lack of a default value for an extra column was not sufficiently informative. (Bug#32971)
Replication:
When a user variable was used inside an
INSERT statement, the
corresponding binlog event was not written to the binlog
correctly.
(Bug#32580)
Replication: When using row-based replication, deletes from a table with a foreign key constraint failed on the slave. (Bug#32468)
Replication:
The --base64-output option
for mysqlbinlog was not honored for all types
of events. This interfered in some cases with performing
point-in-time recovery.
(Bug#32407)
Replication:
SQL statements containing comments using --
syntax were not replayable by mysqlbinlog,
even though such statements replicated correctly.
(Bug#32205)
Replication: When using row-based replication from a master running MySQL 5.1.21 or earlier to a slave running 5.1.22 or later, updates of integer columns failed on the slave with Error in Unknown event: row application failed. (Bug#31583)
This regression was introduced by Bug#21842.
Replication: Replicating write, update, or delete events from a master running MySQL 5.1.15 or earlier to a slave running 5.1.16 or later caused the slave to crash. (Bug#31581)
Replication: When using row-based replication, the slave stopped when attempting to delete nonexistent rows from a slave table without a primary key. In addition, no error was reported when this occurred. (Bug#31552)
Replication:
Errors due to server ID conflicts were reported only in the
slave's error log; now these errors are also shown in the
Server_IO_State column in the output of
SHOW SLAVE STATUS.
(Bug#31316)
Replication:
STOP SLAVE did not stop
connection attempts properly. If the IO slave thread was
attempting to connect, STOP SLAVE
waited for the attempt to finish, sometimes for a long period of
time, rather than stopping the slave immediately.
(Bug#31024)
See also Bug#30932.
Replication:
Issuing a DROP VIEW statement
caused replication to fail if the view did not actually exist.
(Bug#30998)
Replication:
Replication of LOAD
DATA INFILE could fail when
read_buffer_size was larger
than max_allowed_packet.
(Bug#30435)
Replication:
Replication crashed with the NDB
storage engine when mysqld was started with
--character-set-server=ucs2.
(Bug#29562)
Replication: The effects of scheduled events were not always correctly reproduced on the slave when using row-based replication. (Bug#29020)
Replication:
Setting server_id did not
update its value for the current session.
(Bug#28908)
Replication: Some older servers wrote events to the binary log using different numbering from what is currently used, even though the file format number in the file is the same. Slaves running MySQL 5.1.18 and later could not read these binary logs properly. Binary logs from these older versions now are recognized and event numbers are mapped to the current numbering so that they can be interpreted properly. (Bug#27779, Bug#32434)
This regression was introduced by Bug#22583.
Replication:
MASTER_POS_WAIT() did not return
NULL when the server was not a slave.
(Bug#26622)
Replication:
The nonspecific error message Wrong parameters to
function register_slave resulted when
START SLAVE failed to register on
the master due to excess length of any the slave server options
--report-host,
--report-user, or
--report-password. An error
message specific to each of these options is now returned in
such cases. The new error messages are:
Failed to register slave: too long 'report-host'
Failed to register slave: too long 'report-user'
Failed to register slave; too long 'report-password'
See also Bug#19328.
Replication:
PURGE BINARY LOGS TO and PURGE
BINARY LOGS BEFORE did not handle missing binary log
files correctly or in the same way. Now for both of these
statements, if any files listed in the
.index file are missing from the file
system, the statement fails with an error.
(Bug#18199, Bug#18453)
Replication:
START SLAVE UNTIL
MASTER_LOG_POS=
issued on a slave that was using
position--log-slave-updates and that was
involved in circular replication would cause the slave to run
and stop one event later than that specified by the value of
position.
(Bug#13861)
Manually replacing a binary log file with a directory having the same name caused an error that was not handled correctly. (Bug#35675)
Using LOAD DATA
INFILE with a view could crash the server.
(Bug#35469)
Selecting from
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
could cause a server crash.
(Bug#35406)
See also Bug#35108.
For a TEMPORARY table,
DELETE with no
WHERE clause could fail when preceded by
DELETE statements with a
WHERE clause.
(Bug#35392)
If the server crashed with an InnoDB error
due to unavailability of undo slots, errors could persist during
rollback when the server was restarted: There are two
UNDO slot caches (for
INSERT and
UPDATE). If all slots end up in
one of the slot caches, a request for a slot from the other slot
cache would fail. This can happen if the request is for an
UPDATE slot and all slots are in
the INSERT slot cache, or vice
versa.
(Bug#35352)
In some cases, when too many clients tried to connect to the
server, the proper SQLSTATE code was not
returned.
(Bug#35289)
Memory-allocation failures for attempts to set
key_buffer_size to large values
could result in a server crash.
(Bug#35272)
For InnoDB tables, ALTER TABLE
DROP failed if the name of the column to be dropped
began with “foreign”.
(Bug#35220)
Queries could return different results depending on whether
ORDER BY columns were indexed.
(Bug#35206)
When a view containing a reference to DUAL
was created, the reference was removed when the definition was
stored, causing some queries against the view to fail with
invalid SQL syntax errors.
(Bug#35193)
SELECT ... FROM
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS caused the
server to crash if the table referenced by a foreign key had
been dropped. This issue was observed on Windows platforms only.
(Bug#35108)
See also Bug#35406.
Debugging symbols were missing for some executables in Windows binary distributions. (Bug#35104)
Nonconnection threads were being counted in the value of the
Max_used_connections status
variable.
(Bug#35074)
A query that performed a
ref_or_null join where the
second table used a key having one or columns that could be
NULL and had a column value that was
NULL caused the server to crash.
(Bug#34945)
This regression was introduced by Bug#12144.
For some queries, the optimizer used an ordered index scan for
GROUP BY or DISTINCT when
it was supposed to use a loose index scan, leading to incorrect
results.
(Bug#34928)
Creating a foreign key on an InnoDB table
that was created with an explicit
AUTO_INCREMENT value caused that value to be
reset to 1.
(Bug#34920)
mysqldump failed to return an error code when
using the --master-data option
without binary logging being enabled on the server.
(Bug#34909)
Under some circumstances, the value of
mysql_insert_id() following a
SELECT ... INSERT statement could return an
incorrect value. This could happen when the last SELECT
... INSERT did not involve an
AUTO_INCREMENT column, but the value of
mysql_insert_id() was changed by
some previous statements.
(Bug#34889)
Table and database names were mixed up in some places of the subquery transformation procedure. This could affect debugging trace output and further extensions of that procedure. (Bug#34830)
If fsync() returned
ENOLCK, InnoDB could treat
this as fatal and cause abnormal server termination.
InnoDB now retries the operation.
(Bug#34823)
CREATE SERVER and
ALTER SERVER could crash the
server if out-of-memory conditions occurred.
(Bug#34790)
DROP SERVER does not release
memory cached for server structures created by
CREATE SERVER, so repeated
iterations of these statements resulted in a memory leak.
FLUSH
PRIVILEGES now releases the memory allocated for
CREATE SERVER.
(Bug#34789)
A malformed URL used for a FEDERATED
table's CONNECTION option value in a
CREATE TABLE statement was not
handled correctly and could crash the server.
(Bug#34788)
Queries such as SELECT ROW(1, 2) IN (SELECT t1.a, 2)
FROM t1 GROUP BY t1.a (combining row constructors and
subqueries in the FROM clause) could lead to
assertion failure or unexpected error messages.
(Bug#34763)
Using NAME_CONST() with a negative number and
an aggregate function caused MySQL to crash. This could also
have a negative impact on replication.
(Bug#34749)
A memory-handling error associated with use of
GROUP_CONCAT() in subqueries
could result in a server crash.
(Bug#34747)
For an indexed integer column
col_name and a value
N that is one greater than the
maximum value allowed for the data type of
col_name, conditions of the form
WHERE failed to return rows
where the value of col_name <
Ncol_name is
.
(Bug#34731)N - 1
A server running with the --debug
option could attempt to dereference a null pointer when opening
tables, resulting in a crash.
(Bug#34726)
Assigning an “incremental” value to the
debug system variable did not
add the new value to the current value. For example, if the
current debug value was
'T', the statement SET debug =
'+P' resulted in a value of 'P'
rather than the correct value of 'P:T'.
(Bug#34678)
For debug builds, reading from
INFORMATION_SCHEMA.TABLES or
INFORMATION_SCHEMA.COLUMNS could
cause assertion failures. This could happen under rare
circumstances when INFORMATION_SCHEMA fails
to get information about a table (for example, when a connection
is killed).
(Bug#34656)
Executing a TRUNCATE statement on
a table having both a foreign key reference and a
DELETE trigger crashed the
server.
(Bug#34643)
Some subqueries using an expression that included an aggregate function could fail or in some cases lead to a crash of the server. (Bug#34620)
Dangerous pointer arithmetic crashed the server on some systems. (Bug#34598)
Creating a view inside a stored procedure could lead to a crash of the MySQL Server. (Bug#34587)
A server crash could occur if
INFORMATION_SCHEMA tables built in memory
were swapped out to disk during query execution.
(Bug#34529)
CAST(AVG( produced incorrect results for
non-arg) AS
DECIMAL)DECIMAL arguments.
(Bug#34512)
The per-thread debugging settings stack was not being deallocated before thread termination, resulting in a stack memory leak. (Bug#34424)
Executing an ALTER VIEW statement
on a table crashed the server.
(Bug#34337)
InnoDB could crash if overflow occurred for
an AUTO_INCREMENT column.
(Bug#34335)
For InnoDB, exporting and importing a table
could corrupt TINYBLOB columns,
and a subsequent ALTER TABLE
could corrupt TINYTEXT columns as
well.
(Bug#34300)
DEFAULT 0 was not allowed for the
YEAR data type.
(Bug#34274)
Under some conditions, a SET GLOBAL
innodb_commit_concurrency or SET GLOBAL
innodb_autoextend_increment statement could fail.
(Bug#34223)
mysqldump attempts to set the
character_set_results system
variable after connecting to the server. This failed for pre-4.1
servers that have no such variable, but
mysqldump did not account for this and 1)
failed to dump database contents; 2) failed to produce any error
message alerting the user to the problem.
(Bug#34192)
Use of stored functions in the WHERE clause
for SHOW OPEN TABLES caused a
server crash.
(Bug#34166)
For a FEDERATED table with an index on a
nullable column, accessing the table could crash a server,
return an incorrect result set, or return ERROR 1030
(HY000): Got error 1430 from storage engine.
(Bug#33946)
Passing anything other than an integer argument to a
LIMIT clause in a prepared statement would
fail. (This limitation was introduced to avoid replication
problems; for example, replicating the statement with a string
argument would cause a parse failure in the slave). Now,
arguments to the LIMIT clause are converted
to integer values, and these converted values are used when
logging the statement.
(Bug#33851)
An internal buffer in mysql was too short. Overextending it could cause stack problems or segmentation violations on some architectures. (This is not a problem that could be exploited to run arbitrary code.) (Bug#33841)
A query using WHERE
(column1=', where
string1' AND
column2=constant1) OR
(column1='string2' AND
column2=constant2)col1 used a binary collation and
string1 matched
string2 except for case, failed to
match any records even when matches were found by a query using
the equivalent clause WHERE
column2=.
(Bug#33833)constant1 OR
column2=constant2
Large unsigned integers were improperly handled for prepared statements, resulting in truncation or conversion to negative numbers. (Bug#33798)
Reuse of prepared statements could cause a memory leak in the embedded server. (Bug#33796)
The server crashed when executing a query that had a subquery
containing an equality X=Y where Y referred to a named select
list expression from the parent select. The server crashed when
trying to use the X=Y equality for
ref-based access.
(Bug#33794)
Some queries using a combination of IN,
CONCAT(), and an implicit type
conversion could return an incorrect result.
(Bug#33764)
In some cases a query that produced a result set when using
ORDER BY ASC did not return any results when
this was changed to ORDER BY DESC.
(Bug#33758)
Disabling concurrent inserts caused some cacheable queries not to be saved in the query cache. (Bug#33756)
ORDER BY ... DESC sorts could produce
misordered results.
(Bug#33697)
The server could crash when
REPEAT
or another control instruction was used in conjunction with
labels and a
LEAVE
instruction.
(Bug#33618)
The parser allowed control structures in compound statements to have mismatched beginning and ending labels. (Bug#33618)
make_binary_distribution passed the
--print-libgcc-file option to the C compiler,
but this does not work with the ICC compiler.
(Bug#33536)
Threads created by the event scheduler were incorrectly counted
against the max_connections
thread limit, which could lead to client lockout.
(Bug#33507)
Dropping a function after dropping the function's creator could cause the server to crash. (Bug#33464)
Certain combinations of views, subselects with outer references and stored routines or triggers could cause the server to crash. (Bug#33389)
SET GLOBAL myisam_max_sort_file_size=DEFAULT
set myisam_max_sort_file_size
to an incorrect value.
(Bug#33382)
See also Bug#31177.
ENUM- or
SET-valued plugin variables could not be set
from the command line.
(Bug#33358)
Loading plugins via command-line options to mysqld could cause an assertion failure. (Bug#33345)
SLEEP(0) failed to return on
64-bit Mac OS X due to a bug in
pthread_cond_timedwait().
(Bug#33304)
Using Control-R in the mysql client caused it to crash. (Bug#33288)
For MyISAM tables, CHECK
TABLE (non-QUICK) and any form of
REPAIR TABLE incorrected treated
rows as corrupted under the combination of the following
conditions:
The table had dynamic row format
The table had a CHAR (not
VARCHAR) column longer than
127 bytes (for multi-byte character sets this could be less
than 127 characters)
The table had rows with a signifcant length of more than 127
bytes significant length in that
CHAR column (that is, a byte
beyond byte position 127 must be a nonspace character)
This problem affected CHECK
TABLE, REPAIR TABLE,
OPTIMIZE TABLE,
ALTER TABLE.
CHECK TABLE reported and marked
the table as crashed if any row was present that fulfilled the
third condition. The other statements deleted these rows.
(Bug#33222)
Granting the UPDATE privilege on
one column of a view caused the server to crash.
(Bug#33201)
For DECIMAL columns used with the
ROUND(
or
X,D)TRUNCATE(
function with a nonconstant value of
X,D)D, adding an ORDER
BY for the function result produced misordered output.
(Bug#33143)
The CSV engine did not honor update requests
for BLOB columns when the new
column value had the same length as the value to be updated.
(Bug#33067)
After receiving a SIGHUP signal, the server
could crash, and user-specified log options were ignored when
reopening the logs.
(Bug#33065)
When MySQL was built with OpenSSL, the SSL library was not properly initialized with information of which endpoint it was (server or client), causing connection failures. (Bug#33050)
Under some circumstances a combination of aggregate functions
and GROUP BY in a
SELECT query over a view could
lead to incorrect calculation of the result type of the
aggregate function. This in turn could lead to incorrect
results, or to crashes on debug builds of the server.
(Bug#33049)
For DISTINCT queries, MySQL 4.0 and 4.1
stopped reading joined tables as soon as the first matching row
was found. However, this optimization was lost in MySQL 5.0,
which instead read all matching rows. This fix for this
regression may result in a major improvement in performance for
DISTINCT queries in cases where many rows
match.
(Bug#32942)
Repeated creation and deletion of views within prepared statements could eventually crash the server. (Bug#32890)
See also Bug#34587.
Incorrect assertions could cause a server crash for
DELETE triggers for transactional
tables.
(Bug#32790)
In some cases where setting a system variable failed, no error was sent to the client, causing the client to hang. (Bug#32757)
Enabling the
PAD_CHAR_TO_FULL_LENGTH SQL
mode caused privilege-loading operations (such as
FLUSH
PRIVILEGES) to include trailing spaces from grant
table values stored in CHAR
columns. Authentication for incoming connections failed as a
result. Now privilege loading does not include trailing spaces,
regardless of SQL mode.
(Bug#32753)
The SHOW ENGINE
INNODB STATUS and
SHOW ENGINE INNODB
MUTEX statements incorrectly required the
SUPER privilege rather than the
PROCESS privilege.
(Bug#32710)
Inserting strings with a common prefix into a table that used
the ucs2 character set corrupted the table.
(Bug#32705)
Tables in the mysql database that stored the
current sql_mode value as part
of stored program definitions were not updated with newer mode
values
(NO_ENGINE_SUBSTITUTION,
PAD_CHAR_TO_FULL_LENGTH). This
causes various problems defining stored programs if those modes
were included in the current
sql_mode value.
(Bug#32633)
A view created with a string literal for one of the columns picked up the connection character set, but not the collation. Comparison to that field therefore used the default collation for that character set, causing an error if the connection collation was not compatible with the default collation. The problem was caused by text literals in a view being dumped with a character set introducer even when this was not necessary, sometimes leading to a loss of collation information. Now the character set introducer is dumped only if it was included in the original query. (Bug#32538)
See also Bug#21505.
Queries using LIKE on tables having indexed
CHAR columns using either of the
eucjpms or ujis character
sets did not return correct results.
(Bug#32510)
Executing a prepared statement associated with a materialized cursor sent to the client a metadata packet with incorrect table and database names. The problem occurred because the server sent the name of the temporary table used by the cursor instead of the table name of the original table.
The same problem occured when selecting from a view, in which case the name of the table name was sent, rather than the name of the view. (Bug#32265)
On Windows, mysqltest_embedded.exe did not
properly execute the send command.
(Bug#32044)
A variable named read_only
could be declared even though that is a reserved word.
(Bug#31947)
On Windows, the build process failed with four parallel build threads. (Bug#31929)
Queries testing numeric constants containing leading zeroes
against ZEROFILL columns were not evaluated
correctly.
(Bug#31887)
If an error occurred during file creation, the server sometimes did not remove the file, resulting in an unused file in the file system. (Bug#31781)
When upgrading from MySQL 5.1.19 to any version between MySQL 5.1.20 to MySQL 5.1.23, the MySQL Instance Configuration Wizard would fail to account for the change in name for the mysqld-nt.exe to mysqld.exe, causing MySQL to fail to start properly after the upgrade. (Bug#31674)
The server returned the error message Out of memory; restart server and try again when the actual problem was that the sort buffer was too small. Now an appropriate error message is returned in such cases. (Bug#31590)
A table having an index that included a
BLOB or
TEXT column, and that was
originally created with a MySQL server using version 4.1 or
earlier, could not be opened by a 5.1 or later server.
(Bug#31331)
The -, *, and
/ operators and the functions
POW() and
EXP() could misbehave when used
with floating-point numbers. Previously they might return
+INF, -INF, or
NaN in cases of numeric overflow (including
that caused by division by zero) or when invalid arguments were
used. Now NULL is returned in all such cases.
(Bug#31236)
The mysql_change_user() C API
function caused global
Com_ status
variable values to be incorrect.
(Bug#31222)xxx
When sorting privilege table rows, the server treated escaped
wildcard characters (\% and
\_) the same as unescaped wildcard characters
(% and _), resulting in
incorrect row ordering.
(Bug#31194)
On Windows, SHOW PROCESSLIST
could display process entries with a State
value of *** DEAD ***.
(Bug#30960)
ROUND(
or
X,D)TRUNCATE(
for nonconstant values of X,D)D could
crash the server if these functions were used in an
ORDER BY that was resolved using
filesort.
(Bug#30889)
Resetting the query cache by issuing a SET GLOBAL
query_cache_size=0 statement caused the server to
crash if it concurrently was saving a new result set to the
query cache.
(Bug#30887)
Manifest problems prevented MySQLInstanceConfig.exe from running on Windows Vista. (Bug#30823)
If an alias was used to refer to the value returned by a stored function within a subselect, the outer select recognized the alias but failed to retrieve the value assigned to it in the subselect. (Bug#30787)
Binary logging for a stored procedure differed depending on whether or not execution occurred in a prepared statement. (Bug#30604)
An orphaned PID file from a no-longer-running process could cause mysql.server to wait for that process to exit even though it does not exist. (Bug#30378)
The Table_locks_waited waited
variable was not incremented in the cases that a lock had to be
waited for but the waiting thread was killed or the request was
aborted.
(Bug#30331)
The Com_create_function status variable was
not incremented properly.
(Bug#30252)
View metadata returned from
INFORMATION_SCHEMA.VIEWS was
changed by the fix for Bug#11986, causing the information
returned in MySQL 5.1 to differ from that returned in 5.0.
(Bug#30217)
mysqld displayed the
--enable-pstack option in its
help message even if MySQL was configured without
--with-pstack.
(Bug#29836)
The mysql_config command would output
CFLAGS values that were incompatible with C++
for the HP-UX platform.
(Bug#29645)
Views were treated as insertable even if some base table columns with no default value were omitted from the view definition. (This is contrary to the condition for insertability that a view must contain all columns in the base table that do not have a default value.) (Bug#29477)
myisamchk always reported the character set
for a table as latin1_swedish_ci (8)
regardless of the table' actual character set.
(Bug#29182)
InnoDB could return an incorrect rows-updated
value for UPDATE statements.
(Bug#29157)
The MySQL preferences pane did not work to start or stop MySQL on Mac OS X 10.5 (Leopard). (Bug#28854)
For upgrading to a new major version using RPM packages (such as 4.1 to 5.0), if the installation procedure found an existing MySQL server running, it could fail to shut down the old server, but also erroneously removed the server's socket file. Now the procedure checks for an existing server package from a different vendor or major MySQL version. In such case, it refuses to install the server and recommends how to safely remove the old packages before installing the new ones. (Bug#28555)
mysqlhotcopy silently skipped databases with names consisting of two alphanumeric characters. (Bug#28460)
No information was written to the general query log for the
COM_STMT_CLOSE,
COM_STMT_RESET, and
COM_STMT_SEND_LONG_DATA commands. (These
occur when a client invokes the
mysql_stmt_close(),
mysql_stmt_reset() and
mysql_stmt_send_long_data() C
API functions.)
(Bug#28386)
Previously, the parser accepted the ODBC { OJ ... LEFT
OUTER JOIN ...} syntax for writing left outer joins.
The parser now allows { OJ ... } to be used
to write other types of joins, such as INNER
JOIN or RIGHT OUTER JOIN. This
helps with compatibility with some third-party applications, but
is not official ODBC syntax.
(Bug#28317)
The FEDERATED storage engine did not perform
identifier quoting for column names that are reserved words when
sending statements to the remote server.
(Bug#28269)
The SQL parser did not accept an empty
UNION=() clause. This meant that, when there
were no underlying tables specified for a
MERGE table, SHOW CREATE
TABLE and mysqldump both output
statements that could not be executed.
Now it is possible to execute a CREATE
TABLE or ALTER TABLE
statement with an empty UNION=() clause.
However, SHOW CREATE TABLE and
mysqldump do not output the
UNION=() clause if there are no underlying
tables specified for a MERGE table. This also
means it is now possible to remove the underlying tables for a
MERGE table using ALTER TABLE ...
UNION=().
(Bug#28248)
It was possible to exhaust memory by repeatedly running
index_merge queries and never
performing any FLUSH
TABLES statements.
(Bug#27732)
When utf8 was set as the connection character
set, using SPACE() with a
non-Unicode column produced an error.
(Bug#27580)
See also Bug#23637.
The parser rules for the SHOW
PROFILE statement were revised to work with older
versions of bison.
(Bug#27433)
resolveip failed to produce correct results for host names that begin with a digit. (Bug#27427)
In ORDER BY clauses, mixing aggregate
functions and nongrouping columns is not allowed if the
ONLY_FULL_GROUP_BY SQL mode is
enabled. However, in some cases, no error was thrown because of
insufficient checking.
(Bug#27219)
For the --record_log_pos
option, mysqlhotcopy now determines the slave
status information from the result of SHOW
SLAVE STATUS by using the
Relay_Master_Log_File and
Exec_Master_Log_Pos values rather than the
Master_Log_File and
Read_Master_Log_Pos values. This provides a
more accurate indication of slave execution relative to the
master.
(Bug#27101)
The MySQL Instance Configuration Wizard would not allow you to choose a service name, even though the criteria for the service name were valid. The code that checks the name has been updated to support the correct criteria of any string less than 256 character and not containing either a forward or backward slash character. (Bug#27013)
Memory corruption, a crash of the MySQL server, or both, could
take place if a low-level I/O error occurred while an
ARCHIVE table was being opened.
(Bug#26978)
DROP DATABASE failed for attempts
to drop databases with names that contained the legacy
#mysql50# name prefix.
(Bug#26703)
config-win.h unconditionally defined
bool as BOOL,
causing problems on systems where bool is 1
byte and BOOL is 4 bytes.
(Bug#26461)
On Windows, for distributions built with debugging support, mysql could crash if the user typed Control-C. (Bug#26243)
The XPath boolean() function did not cast
string and nodeset values correctly in some cases. It now
returns TRUE for any nonempty string or
nodeset and 0 for a NULL string, as specified
in the XPath standard..
(Bug#26051)
When symbolic links were disabled, either with a server startup
option or by enabling the
NO_DIR_IN_CREATE SQL mode,
CREATE TABLE silently ignored the
DATA DIRECTORY and INDEX
DIRECTORY table options. Now the server issues a
warning if symbolic links are disabled when these table options
are used.
(Bug#25677)
Attempting to create an index with a prefix on a
DECIMAL column appeared to
succeed with an inaccurate warning message. Now, this action
fails with the error Incorrect prefix key; the used
key part isn't a string, the used length is longer than the key
part, or the storage engine doesn't support unique prefix
keys.
(Bug#25426)
mysqlcheck -A -r did not correctly identify all tables that needed repairing. (Bug#25347)
On Windows, an error in configure.js caused
installation of source distributions to fail.
(Bug#25340)
The Qcache_free_blocks status
variable did not display a value of 0 if the query cache was
disabled.
(Bug#25132)
The client library had no way to return an error if no
connection had been established. This caused problems such as
mysql_library_init() failing
silently if no errmsg.sys file was
available.
(Bug#25097)
On Mac OS X, the StartupItem for MySQL did not work. (Bug#25008)
For Windows 64-bit builds, enabling shared-memory support caused client connections to fail. (Bug#24992)
mysql did not use its completion table. Also, the table contained few entries. (Bug#24624)
If a user installed MySQL Server and set a password for the
root user, and then uninstalled and
reinstalled MySQL Server to the same location, the user could
not use the MySQL Instance Config wizard to configure the server
because the uninstall operation left the previous data directory
intact. The config wizard assumed that any
new install (not an upgrade) would have the default data
directory where the root user has no
password. The installer now writes a registry key named
FoundExistingDataDir. If the installer finds
an existing data directory, the key will have a value of 1,
otherwise it will have a value of 0. When
MySQLInstanceConfig.exe is run, it will
attempt to read the key. If it can read the key, and the value
is 1 and there is no existing instance of the server (indicating