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.21-beta. 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 BitKeeper 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.6.1, “What's New in MySQL 5.1”.
For a full list of changes, please refer to the changelog sections for each individual 5.1.x release.
Functionality added or changed:
If a MyISAM table is created with no
DATA DIRECTORY option, the
.MYD file is created in the database
directory. By default, if MyISAM finds an
existing .MYD file in this case, it
overwrites it. The same applies to .MYI
files for tables created with no INDEX
DIRECTORY option. To suppress this behavior, start
the server with the new
--keep_files_on_create option, in which case
MyISAM will not overwrite existing files
and returns an error instead. (Bug#29325)
The FOUND_ROWS() and
ROW_COUNT() functions do not replicate
correctly using statement-based replication. These functions
are now automatically replicated using row-baded replication.
(Bug#30244)
NDB Cluster: The following improvements
have been made in the ndb_size.pl utility:
The script is now able to be used with multiple databases; lists of databases and tables can be excluded from analysis.
Schema name information has been added to index table calculations.
The database name is now an optional parameter, the exclusion of which causes all databases to be examined.
If selecting from INFORMATION_SCHEMA
fails, the script now attempts to fall back to
SHOW TABLES.
A --real_table_name option has been
added; this designates a table to handle unique index
size calculations.
The report title has been amended to cover cases where more than one database is being analyzed.
Support for a --socket option was also added.
(Bug#28253)
For more information, see Section 16.9.15, “ndb_size.pl — NDBCluster Size Requirement Estimator”.
NDB Cluster: The output from the cluster
management client showing the progress of data node starts has
been improved. (Bug#23354)
NDB Cluster: Mapping of
NDB error codes to storage engine error
codes has been improved. (Bug#28423)
Bugs fixed:
NDB Cluster (Cluster APIs): A call to
CHECK_TIMEDOUT_RET() in
mgmapi.cpp should have been a call to
DBUG_CHECK_TIMEDOUT_RET(). (Bug#30681)
Reads on BLOB columns were not locked when
they needed to be, in order to guarantee consistency. (Bug#29102)
NDB Cluster: The description of the
--print option in the output from
ndb_restore --help was
incorrect. (Bug#27683)
NDB Cluster: An insufficiently descriptive
and potentially misleading Error 4006 (Connect
failure - out of connection objects...) was
produced when either of the following two conditions occurred:
There were no more transaction records in the transaction coordinator
an Ndb object in the NDB API was
initialized with insufficient parallellism
Separate error messages are now generated for each of these two cases. (Bug#11313)
NDB Cluster: An invalid subselect on an
NDB table could cause mysqld to crash. (Bug#27494)
NDB Cluster: Attempting to restore a backup
made on a cluster host using one endian to a machine using the
other endian could cause the cluster to fail. (Bug#29674)
NDB Cluster: Restoring a backup made on a
cluster host using one endian to a machine using the other
endian failed for BLOB and
DATETIME columns. (Bug#27543, Bug#30024)
NDB Cluster (Replication): Incorrect
handling of INSERT plus
DELETE operations with regard to local
checkpoints caused data node failures in multi-master
replication setups. (Bug#30914)
NDB Cluster: When handling
BLOB columns, the addition of read locks to
the lock queue was not handled correctly. (Bug#30764)
NDB Cluster: ndb_size.pl
failed on tables with FLOAT columns whose
definitions included commas (for example,
FLOAT(6,2)). (Bug#29228)
NDB Cluster: Discovery of NDB tables did
not work correctly with INFORMATION_SCHEMA.
(Bug#30667)
NDB Cluster: An attempt to perform a
SELECT ... FROM INFORMATION_SCHEMA.TABLES
whose result included information about NDB
tables for which the user had no privileges could crash the
MySQL Server on which the query was performed. (Bug#26793)
NDB Cluster: An issue with the
mysql.ndb_apply_status table could cause
NDB schema autodiscovery to fail in certain
rare circumstances. (Bug#20872)
NDB Cluster: A query using joins between
several large tables and requiring unique index lookups failed
to complete, eventually returning Uknown
Error after a very long period of time. This
occurred due to inadequate handling of instances where the
Transaction Coordinator ran out of
TransactionBufferMemory, when the cluster
should have returned NDB error code 4012 (Request
ndbd time-out). (Bug#28804)
NDB Cluster: A filesystem close operation
could fail during a node or system restart. (Bug#30646)
Killing an SSL connection on platforms where MySQL is compiled
with -DSIGNAL_WITH_VIO_CLOSE (Windows, Mac
OS X, and some others) could crash the server. (Bug#28812)
Using DISTINCT or GROUP
BY on a BIT column in a
SELECT statement caused the column to be
cast internally as an integer, with incorrect results being
returned from the query. (Bug#30245)
Issuing a DELETE statement having both an
ORDER BY clause and a
LIMIT clause could cause
mysqld to crash. (Bug#30385)
If a view used a function in its SELECT
statement, the columns from the view were not inserted into
the INFORMATION_SCHEMA.COLUMNS table. (Bug#29408)
mysqldump --skip-events
--all-databases dumped data from the
mysqld.event table, and when restoring from
this dump, events were created in spite of the
--skip-events option. (Bug#29938)
Replicating from a master table to a slave table where the
size of a CHAR or
VARCHAR column was a different size would
cause mysqld to crash. For more information
on replicating with different column definitions, see
Section 15.3.1.20, “Replication with Fewer Columns on the Slave”.
STR_TO_DATE() displayed an error message
that referred to STR_TO_TIME(). (Bug#27014)
mysql_upgrade could run binaries dynamically linked against incorrect versions of shared libraries. (Bug#28560)
MySQL failed to generate or retrieve an
AUTO_INCREMENT primary key for
InnoDB tables with user-defined
partitioning. (Bug#27405)
The query cache does not support retrieval of statements for which column level access control applies, but the server was still caching such statements, thus wasting memory. (Bug#30269)
Using HANDLER to open a table having a
storage engine not supported by HANDLER
properly returned an error, but also improperly prevented the
table from being dropped by other connections. (Bug#25856)
Statements within stored procedures ignored the value of the
low_priority_updates system variable. (Bug#28570)
When mysqlslap was given a query to execute
from a file via a
--query=
option, it executed the query one too many times. (Bug#29803)
file_name
A SELECT with more than 31 nested dependent
subqueries returned an incorrect result. (Bug#27352)
Some character mappings in the ascii.xml
file were incorrect. (Bug#27562)
Some SHOW statements and
INFORMATION_SCHEMA queries could expose
information not allowed by the user's access privileges. (Bug#27629)
If a LIMIT clause was present, the server
could fail to consider indexes that could be used for
ORDER BY or GROUP BY.
(Bug#28404)
mysqlbinlog produced incorrectly formatted
DATETIME and TIMESTAMP
values. (Bug#27894)
GROUP BY on BIT columns
produced incorrect results. (Bug#30219)
Functionality added or changed:
There is a new innodb_autoinc_lock_mode
system variable to configure the locking behavior that
InnoDB uses for generating auto-increment
values. The default behavior now is slightly different from
before, which involves a minor incompatibility for
multiple-row inserts that specify an explicit value for the
auto-increment column in some but not all rows. See
Section 13.5.6.3, “How AUTO_INCREMENT Handling Works in
InnoDB”.
Bugs fixed:
NDB Cluster: Backups of
TIMESTAMP columns made with
ndb_restore on a MySQL Cluster using data
nodes hosts of one endian could not be used to restore the
cluster's data to data node hosts of the other endian.
(Bug#30134)
NDB Cluster (Replication): Multi-master
replication setups did not handle
--log-slave-updates correctly. (Bug#30017)
For an InnoDB table if a
SELECT was ordered by the primary key and
also had a WHERE field = value clause on a
different field that was indexed, a DESC
order instruction would be ignored. (Bug#31001)
Replication of InnoDB partitioned tables
could lose updates with row-based or mixed replication format.
(Bug#28430)
mysql_install_db could fail to find its message file. (Bug#30678)
Non-range queries of the form SELECT ... FROM ...
WHERE keypart_1=const, ..., keypart_n=const ORDER BY ... FOR
UPDATE sometimes were unneccesarily blocked waiting
for a lock if another transaction was using SELECT
... FOR UPDATE on the same table. (Bug#29804)
Under some circumstances, a UDF initialization function could be passed incorrect argument lengths. (Bug#29804)
CONNECTION_ID() always returned 0 for the
embedded server (libmysqld). (Bug#30389)
The mysql_list_fields() C API function
incorrectly set MYSQL_FIELD::decimals for
some view columns. (Bug#29306)
Read lock requests that were blocked by a pending write lock request were not allowed to proceed if the statement requesting the write lock was killed. (Bug#21281)
Memory corruption occurred for some queries with a top-level
OR operation in the
WHERE condition if they contained equality
predicates and other sargable predicates in disjunctive parts
of the condition. (Bug#30396)
The server created temporary tables for filesort operations in
the working directory, not in the directory specified by the
tmpdir system variable. (Bug#30287)
Using KILL QUERY or KILL
CONNECTION to kill a SELECT
statement caused a server crash if the query cache was
enabled. (Bug#30201)
Operations that used the time zone replicated the time zone only for successful operations, but did not replicate the time zone for errors that need to know it. (Bug#29536)
mysqldump from the MySQL 5.1.21 distribution could not be used to create a dump from a MySQL 5.1.20 or older server. (Bug#30123)
When using a combination of HANDLER... READ
and DELETE on a table, MySQL continued to
open new copies of the table every time, leading to an
exhaustion of file descriptors. This was caused in MySQL
5.1.15 by a fix for Bug#21587; the current fix consists of
reverting the earlier fix. (Bug#29474)
Tables using the InnoDB storage engine
incremented AUTO_INCREMENT values
incorrectly with ON DUPLICATE KEY UPDATE.
(Bug#28781)
This section contains change history information for MySQL Cluster 5.1 Carrier Grade Edition releases based on MySQL 5.1.22.
This is a new Beta development release, fixing recently discovered bugs and incorporating improvements made since the previous MySQL Cluster 5.1 Carrier Grade Edition release.
NOTE: Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at http://bugs.mysql.com/ for more details about the individual bugs fixed in this version.
This Beta release incorporates all bugfixes and feature changes made in MySQL 5.1.19-ndb-6.3.0 and MySQL 5.1.19-ndb-6.3.1, as well as all bugfixes and feature changes which were added in the mainline 5.1.21 and 5.1.22 releases; information about these can be found in Section C.1.4, “Changes in release 5.1.21 (16 August 2007)” and Section C.1.2, “Changes in release 5.1.22 (14 September 2007: Release Candidate)”.
Functionality added or changed:
It is now possible to control whether fixed-width or
variable-width storage is used for a given column of an
NDB table by means of the
COLUMN_FORMAT specifier as part of the
column's definition in a CREATE TABLE or
ALTER TABLE statement.
It is also possible to control whether a given column of an
NDB table is stored in memory or on disk,
using the STORAGE specifier as part of
the column's definition in a CREATE TABLE
or ALTER TABLE statement.
For permitted values and other information about
COLUMN_FORMAT and
STORAGE, see
Section 12.1.10, “CREATE TABLE Syntax”.
A new cluster management server startup option
--bind-address makes it possible to
restrict management client connections to
ndb_mgmd to a single host and port. For
more information, see
Section 16.6.5.3, “Command Options for ndb_mgmd”.
The protocol for handling global checkpoints has been
changed. It is now possible to control how often the GCI
number is updated, and how often global checkpoints are
written to disk, using the
TimeBetweenEpochs configuration
parameter. This improves the reliability and performance of
MySQL Cluster Replication.
GCPs handled using the new protocol are sometimes referred to as “micro-GCPs”.
For more information, see
TimeBetweenEpochs.
This release fixes the following bugs:
For micro-GCPs, fixed the assignment of “fake” CGI events so that they do not cause buckets to be sent out of order. Now, when assigning a GCI to a non-GCI event (that is, creating a pseudo-GCI or “fake” CGI), the GCI that is to arrive is always initiated, even if no known GCI exists, which could occur in the event of a node failure. (Bug#30884)
This is a new Beta development release, fixing recently discovered bugs.
NOTE: Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at http://bugs.mysql.com/ for more details about the individual bugs fixed in this version.
This Beta release incorporates all bugfixes and feature changes
made in MySQL 5.1.18-ndb-6.2.1, MySQL 5.1.18-ndb-6.2.2 (see
Section C.1.9, “Changes in MySQL 5.1.18 Carrier Grade Edition”), MySQL 5.1.19-ndb-6.2.3,
MySQL 5.1.19-ndb-6.2.4, and MySQL 5.1.22-ndb-6.2.5, as well as
all bugfixes and feature changes which were added in the
mainline 5.1.20, 5.1.21 and 5.1.22 releases; information about
these can be found in Section C.1.5, “Changes in release 5.1.20 (25 June 2007)”,
Section C.1.4, “Changes in release 5.1.21 (16 August 2007)”, and
Section C.1.2, “Changes in release 5.1.22 (14 September 2007: Release Candidate)”. Also included are most (but not
all) bugfixes made in the MCCGE 6.1.x
series through MySQL 5.1.15-ndb-6.1.16.
This release fixes the following bugs:
For micro-GCPs, fixed the assignment of “fake” CGI events so that they do not cause buckets to be sent out of order. Now, when assigning a GCI to a non-GCI event (that is, creating a pseudo-GCI or “fake” CGI), the GCI that is to arrive is always initiated, even if no known GCI exists, which could occur in the event of a node failure. (Bug#30884)
EXPLAIN PARTITIONS reported partition
usage by queries on NDB tables according
to the standard MySQL hash function than the hash function
used in the NDB storage engine. (Bug#29550)
This is a new Beta development release, fixing recently discovered bugs.
Like all releases for MySQL Cluster 5.1 Carrier Grade Edition, this is a source-only
release which you must compile and install using the
instructions found in Section 2.9, “MySQL Installation Using a Source Distribution”, and
in Section 16.4.1, “Building MySQL Cluster from Source Code”. You can download
the source code archive for this release from the MySQL FTP site
at
ftp://ftp.mysql.com/pub/mysql/download/cluster_telco/mysql-5.1.22-ndb-6.2.5.
The file
mysqlcom-5.1.22-ndb-6.2.5-telco.tar.gz in
this directory contains the complete source archive.
NOTE: Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at http://bugs.mysql.com/ for more details about the individual bugs fixed in this version.
This Beta release incorporates all bugfixes and feature changes
made in MySQL 5.1.18-ndb-6.2.1, MySQL 5.1.18-ndb-6.2.2 (see
Section C.1.9, “Changes in MySQL 5.1.18 Carrier Grade Edition”), MySQL 5.1.19-ndb-6.2.3, and
MySQL 5.1.19-ndb-6.2.4, as well as all bugfixes and feature
changes which were added in the mainline 5.1.20, 5.1.21 and
5.1.22 releases; information about these can be found in
Section C.1.5, “Changes in release 5.1.20 (25 June 2007)”, Section C.1.4, “Changes in release 5.1.21 (16 August 2007)”,
and Section C.1.2, “Changes in release 5.1.22 (14 September 2007: Release Candidate)”. Also included are most (but
not all) bugfixes made in the MCCGE
6.1.x series through MySQL
5.1.15-ndb-6.1.16.
Functionality added or changed:
It is now possible to control whether fixed-width or
variable-width storage is used for a given column of an
NDB table by means of the
COLUMN_FORMAT specifier as part of the
column's definition in a CREATE TABLE or
ALTER TABLE statement.
It is also possible to control whether a given column of an
NDB table is stored in memory or on disk,
using the STORAGE specifier as part of
the column's definition in a CREATE TABLE
or ALTER TABLE statement.
For permitted values and other information about
COLUMN_FORMAT and
STORAGE, see
Section 12.1.10, “CREATE TABLE Syntax”.
A new cluster management server startup option
--bind-address makes it possible to
restrict management client connections to
ndb_mgmd to a single host and port. For
more information, see
Section 16.6.5.3, “Command Options for ndb_mgmd”.
The following improvements have been made in the ndb_size.pl utility:
The script is now able to be used with multiple databases; lists of databases and tables can be excluded from analysis.
Schema name information has been added to index table calculations.
The database name is now an optional parameter, the exclusion of which causes all databases to be examined.
If selecting from
INFORMATION_SCHEMA fails, the
script now attempts to fall back to SHOW
TABLES.
A --real_table_name option has been
added; this designates a table to handle unique index
size calculations.
The report title has been amended to cover cases where more than one database is being analyzed.
Support for a --socket option was also
added. (Bug#28253)
For more information, see Section 16.9.15, “ndb_size.pl — NDBCluster Size Requirement Estimator”.
The protocol for handling global checkpoints has been
changed. It is now possible to control how often the GCI
number is updated, and how often global checkpoints are
written to disk, using the
TimeBetweenEpochs configuration
parameter. This improves the reliability and performance of
MySQL Cluster Replication.
GCPs handled using the new protocol are sometimes referred to as “micro-GCPs”.
For more information, see
TimeBetweenEpochs.
This release fixes the following bugs:
An attempt to perform a SELECT ... FROM
INFORMATION_SCHEMA.TABLES whose result included
information about NDB tables for which
the user had no privileges could crash the MySQL Server on
which the query was performed. (Bug#26793)
ndb_size.pl failed on tables with
FLOAT columns whose definitions included
commas (for example, FLOAT(6,2)). (Bug#29228)
A query using joins between several large tables and
requiring unique index lookups failed to complete,
eventually returning Uknown Error
after a very long period of time. This occurred due to
inadequate handling of instances where the Transaction
Coordinator ran out of
TransactionBufferMemory, when the cluster
should have returned NDB error code 4012 (Request
ndbd time-out). (Bug#28804)
Cluster Replication:
Cluster replication did not handle large
VARCHAR columns correctly. (Bug#29904)
When handling BLOB columns, the addition
of read locks to the lock queue was not handled correctly.
(Bug#30764)
Reads on BLOB columns were not locked
when they needed to be, in order to guarantee consistency.
(Bug#29102)
APIs: A call to
CHECK_TIMEDOUT_RET() in
mgmapi.cpp should have been a call to
DBUG_CHECK_TIMEDOUT_RET(). (Bug#30681)
Discovery of NDB tables did not work correctly with
INFORMATION_SCHEMA. (Bug#30667)
A filesystem close operation could fail during a node or system restart. (Bug#30646)
Using the --ndb-cluster-connection-pool
option could cause DDL statements to be executed twice. (Bug#30598)
An issue with the mysql.ndb_apply_status
table could cause NDB schema
autodiscovery to fail in certain rare circumstances. (Bug#20872)
This is a new Beta development release, fixing recently discovered bugs.
NOTE: This Beta release, as any other pre-production release, should not be installed on production level systems or systems with critical data. It is good practice to back up your data before installing any new version of software. Although MySQL has worked very hard to ensure a high level of quality, protect your data by making a backup as you would for any software beta release. Please refer to our bug database at http://bugs.mysql.com/ for more details about the individual bugs fixed in this version.
Subsequent to release, it was discovered that on some platforms, mysql_install_db could fail to find its message file, resulting in error messages of the following form:
shell> mysql_install_db
Installing MySQL system tables...
070830 9:33:24 [ERROR] Can't find messagefile 'path/share/english/errmsg.sys'
070830 9:33:24 [ERROR] Aborting
To deal with this problem, specify a --language
option to specify the proper pathname to the language file
directory. For example:
shell> mysql_install_db --language=/path/to/share/english/
This problem is corrected in MySQL 5.1.22.
This section documents all changes and bug fixes that have been applied since the last official MySQL release. 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.
Functionality added or changed:
Incompatible change: On Windows only, the mysqld-nt has been removed from this release and all future releases. The mysqld server now includes named-pipe support as standard, and you do not have to use the mysqld-nt version to enable named-pipe support.
Incompatible change: In MySQL
5.1.6, when log tables were implemented, the default log
destination for the general query and slow query log was
TABLE. This default has been changed to
FILE, which is compatible with MySQL 5.0,
but incompatible with earlier releases of MySQL 5.1 from 5.1.6
to 5.1.20. If you are upgrading from MySQL 5.0 to this
release, no logging option changes should be necessary.
However, if you are upgrading from 5.1.6 through 5.1.20 to
this release and were using TABLE logging,
use the --log-output=TABLE option explicitly
to preserve your server's table-logging behavior. (Bug#29993)
The --syslog option that was introduced in
5.1.20 for mysqld_safe (to send error
output to syslog) did not work correctly:
Error output was buffered and not logged immediately. This has
been corrected. In addition, some feature changes were made:
The default mysqld_safe logging
behavior now is --skip-syslog rather
than --syslog, which is compatible with
the default behavior of writing an error log file for
releases prior to 5.1.20.
A new option,
--syslog-tag=,
modifies the default tags written by
mysqld_safe and
mysqld to syslog to be
tagmysqld_safe-
and
tagmysqld-
rather than the default tags of
tagmysqld_safe and
mysqld.
Several programs now accept --debug-check and
--debug-info options:
mysql, mysqladmin,
mysqlbinlog, mysqlcheck,
mysqldump, mysqlimport,
mysqlshow, mysqlslap,
mysqltest,
mysql_upgrade. (Note:
mysql and mysqltest
already accepted --debug-info.)
--debug-check prints debugging information at
program exit. --debug-info is similar but
also prints memory and CPU usage statistics. This patch also
corrects a problem for mysql that
--debug-info did not display statistics at
exit time. (Bug#30127)
Transaction support in the FEDERATED
storage engine has been disabled due to issues with multiple
active transactions and sessions on the same
FEDERATED table. (Bug#29875)
Previously, prepared statements processed using
PREPARE and EXECUTE were
not subject to caching in the query cache if they contained
any ? parameter markers. This limitation
has been lifted. (Bug#29318)
Replication between master and slaves now supports different column numbers within a table on both master and slave. The rules for replication where the table definitions are different has also changed. This supercedes the functionality for replication from the master table to a slave table with more columns that was added in MySQL 5.1.12. For more information, see Section 15.3.1.20, “Replication with Fewer Columns on the Slave”.
The SQL thread on a slave now is always allowed to enter
InnoDB even if this would exceed the limit
imposed by the innodb_thread_concurrency
system variable. In cases of high load on the slave server
(when innodb_thread_concurrency is
reached), this change helps the slave stay more up to date
with the master; in the previous behavior, the SQL thread was
competing for resources with all client threads active on the
slave server. (Bug#25078)
Bugs fixed:
Incompatible change: Several issues were identified for stored programs (stored functions and procedures, triggers, and events) and views containing non-ASCII symbols. These issues involved conversion errors due to incomplete character set information when translating these objects to and from stored format, such as:
Parsing the original object definition so that it can be stored.
Compiling the stored definition into executable form when the object is invoked.
Retrieval of object definitions from
INFORMATION_SCHEMA tables.
Displaying the object definition in
SHOW statements. This issue also
affected mysqldump, which uses
SHOW.
The fix for the problems is to store character set information from the object creation context so that this information is available when the object needs to be used later. The context includes the client character set, the connection character set and collation, and the collation of the database with which the object is associated.
As a result of the patch, several tables have new columns:
In the mysql database, the
proc and event
tables now have these columns:
character_set_client,
collation_connection,
db_collation,
body_utf8.
In INFORMATION_SCHEMA, the
VIEWS table now has these columns:
CHARACTER_SET_CLIENT,
COLLATION_CONNECTION. The
ROUTINES, TRIGGERS,
and EVENT tables now have these
columns: CHARACTER_SET_CLIENT,
COLLATION_CONNECTION,
DATABASE_COLLATION.
These columns store the session values of the
character_set_client and
collation_connection system variables, and
the collation of the database with which the object is
associated. The values are those in effect at object creation
time. (The saved database collation is not the value of the
collation_database system variable, which
applies to the default database; the database that contains
the object is not necessarily the default database.)
Several SHOW statements now display
additional columns corresponding to the new table columns.
These statements are: SHOW CREATE EVENT,
SHOW CREATE FUNCTION, SHOW CREATE
PROCEDURE, SHOW CREATE VIEW,
SHOW EVENTS, SHOW FUNCTION
STATUS, SHOW PROCEDURE STATUS,
SHOW TRIGGERS.
A new statement, SHOW CREATE TRIGGER is
introduced and is used by mysqldump for
producing CREATE TRIGGER statements.
(Bug#11986, Bug#16291, Bug#19443, Bug#21249, Bug#25212, Bug#25221, Bug#30027)
Subsequent to the patch just described, it was discovered that the patch broke mysql_upgrade; this has been corrected. (Bug#30029)
The fixes for the problems just describe affect
all existing stored programs and views.
(For example, you will see warnings about “no creation
context.”) To avoid warnings from the server about
the use of old definitions from any release prior to 5.1.21,
you should dump stored programs and views with
mysqldump after upgrading to 5.1.21, and
then reload them to recreate them with new definitions.
Invoke mysqldump with a
--default-character-set option that names
the non-ASCII character set that was used for the
definitions when the objects were originally defined.
Storage engine error conditions in row-based replication were not correctly reported to the user. (Bug#29570)
NDB Cluster: DELETE FROM
, where the
table WHERE
primary_key IN
(value_list)value_list contained more than one
value, called from an AFTER DELETE trigger
on an NDB table, caused
mysqld to crash. (Bug#30337)
NDB Cluster: A problem with the fix for Bug#29354 caused an assertion when two local checkpoints were run
during node recovery.
NDB Cluster: The server would not compile
with NDB support on AIX 5.2. (Bug#10776)
NDB Cluster (Replication): Inconsistencies
could occur between the master and the slave when replicating
Disk Data tables. (Bug#19259)
NDB Cluster (Replication):
mysqld would segfault on startup when the
NDB storage engine was enabled and the
default character set was a strictly multi-byte character set
such as UCS2. (Bug#27404)
This issue does not apply to character sets that can contain single-byte characters in addition to multi-byte characters such as UTF-8.
Additional issues remain with regard to the use of multi-byte character sets in MySQL Cluster Replication; see Section 16.10.3, “Known Issues in MySQL Cluster Replication”, for more information.
NDB Cluster: Warnings and errors generated
by ndb_config
--config-file=
were sent to filestdout, rather than to
stderr. (Bug#25941)
NDB Cluster (Disk Data): Performing Disk
Data schema operations during a node restart could cause
forced shutdowns of other data nodes. (Bug#29501)
NDB Cluster (Disk Data): Disk data
meta-information that existed in ndbd might
not be visible to mysqld. (Bug#28720)
NDB Cluster (Disk Data): The number of free
extents was incorrectly reported for some tablespaces. (Bug#28642)
NDB Cluster (Cluster Replication): When
executing a statement where
binlog_format=statement, the result of the
statement was logged both as a statement and as rows. (Bug#29222)
NDB Cluster: Replica redo logs were
inconsistently handled during a system restart. (Bug#29354)
NDB Cluster: When restarting a data node,
queries could hang during that node's start phase 5, and only
continue once the node entered phase 6. (Bug#29364)
NDB Cluster: When a node failed to respond
to a COPY_GCI signal as part of a global
checkpoint, the master node was killed instead instead of the
node that actually failed. (Bug#29331)
NDB Cluster: An invalid comparison made
during REDO validation that could lead to
an Error while reading REDO log
condition. (Bug#29118)
NDB Cluster: The wrong data pages were
sometimes invalidated following a global checkpoint. (Bug#29067)
NDB Cluster: If at least 2 files were
involved in REDO invalidation, then file 0
of page 0 was not updated and so pointed to an invalid part of
the redo log. (Bug#29057)
The server acquired a global mutex for temporary tables, although such tables are thread-specific. This affected performance by blocking other threads. (Bug#27062)
INSERT DELAYED statements on a master
server are replicated as non-DELAYED
inserts on slaves (which is normal, to preserve
serialization), but the inserts on the slave did not use
concurrent inserts. Now INSERT DELAYED on a
slave is converted to a concurrent insert when possible, and
to a normal insert otherwise. (Bug#29152)
If one thread was performing concurrent inserts, other threads reading from the same table using equality key searches could see the index values for new rows before the data values had been written, leading to reports of table corruption. (Bug#29838)
On Windows, client libraries lacked symbols required for linking. (Bug#30118)
On Windows, the CMake build process did not produce the embedded server library or related binaries. (Bug#29903)
SESSION_USER() returned garbage data
(rather than the correct value of the empty string) when
executed by a slave SQL thread. (Bug#29878)
For the SHOW TABLE TYPES statement, the
server sent incorrect output to clients, possibly causing them
to crash. (Bug#30036)
Coercion of ASCII values to character sets that are a superset of ASCII sometimes was not done, resulting in illegal mix of collations errors. These cases now are resolved using repertoire, a new string expression attribute (see Section 9.6, “String Repertoire”). (Bug#28875)
REPAIR TABLE ... USE_FRM could corrupt
tables. (Bug#29980)
FEDERATED tables had an artificially low
maximum of key length. (Bug#26909)
In some cases, INSERT INTO ... SELECT ... GROUP
BY could insert rows even if the
SELECT by itself produced an empty result.
(Bug#29717)
In a stored function or trigger, when
InnoDB detected deadlock, it attempted
rollback and displayed an incorrect error message
(Explicit or implicit commit is not allowed in
stored function or trigger). Now
InnoDB returns an error under these
conditions and does not attempt rollback. Rollback is handled
outside of InnoDB above the
function/trigger level. (Bug#24989)
--myisam-recover="" (empty option value) did
not disable MyISAM recovery. (Bug#29856)
Very long prepared statements in stored procedures could cause a server crash. (Bug#29856)
Index creation could fail due to truncation of key values to the maximum key length rather than to a mulitiple of the maximum character length. (Bug#28125)
mysql_setpermission tried to grant global-only privileges at the database level. (Bug#14618)
An error that happened inside INSERT,
UPDATE, or DELETE
statements performed from within a stored function or trigger
could cause inconsistency between master and slave servers.
(Bug#27417)
An assertion failure occurred within yaSSL for very long keys. (Bug#29784)
Repeatedly accessing a view in a stored procedure (for example, in a loop) caused a small amount of memory to be allocated per access. Although this memory is deallocated on disconnect, it could be a problem for a long running stored procedures that make repeated access of views. (Bug#29834)
The IS_UPDATABLE column in the
INFORMATION_SCHEMA.VIEWS table was not
always set correctly. (Bug#30020)
A slave running with --log-slave-updates
would fail to write INSERT DELAY IGNORE
statements to its binary log, resulting in different binary
log contents on the master and slave. (Bug#29571)
InnoDB could crash if the server was shut
down while innodb_table_monitor was
running. (Bug#28254)
If MySQL/InnoDB crashed very quickly after
starting up, it would not force a checkpoint. In this case,
InnoDB would skip crash recovery at next
startup, and the database would become corrupt. Fix: If the
redo log scan at InnoDB startup goes past
the last checkpoint, force crash recovery. (Bug#23710)
A maximum of 4TB InnoDB free space was
reported by SHOW TABLE STATUS, which is
incorrect on systems with more than 4TB space. (Bug#29097)
InnoDB refused to start on some versions of
FreeBSD with LinuxThreads. This is fixed by enabling file
locking on FreeBSD. (Bug#29155)
Certain statements with unions, subqueries, and joins could result in huge memory consumption. (Bug#29582)
SHOW statements were being written to the
slow query log that should not have been. (Bug#30000)
Use of local variables with non-ASCII names in stored procedures crashed the server. (Bug#30120)
INSERT ... VALUES(CONNECTION_ID(), ...)
statements were written to the binary log in such a way that
they could not be properly restored. (Bug#29928)
Prepared statements containing
CONNECTION_ID() could be written improperly
to the binary log. (Bug#30200)
mysql_install_db could fail to find script files that it needs. (Bug#28585)
On Windows, executables did not include Vista manifests. (Bug#24732)
On Windows, the server used 10MB of memory for each connection thread, resulting in memory exhaustion. Now each thread uses 1MB. (Bug#20815)
Dropping a temporary InnoDB table that had
been locked with LOCK TABLES caused a
server crash. (Bug#24918)
Log table locking was redesigned, eliminating several lock-related problems:
Truncating mysql.slow_log in a stored procedure after use of a cursor caused the thread to lock. (Bug#17876)
Flushing a log table resulted in warnings. (Bug#23044)
The server would hang when performing concurrent
ALTER TABLE or TRUNCATE
TABLE statements against the log tables. (Bug#25422)
Changing the value of the general_log
system variable while a global read lock was in place
resulted in deadlock. (Bug#29129)
The changes provide more well-defined interface characteristics. See Section 5.11.1, “Selecting General Query and Slow Query Log Output Destinations”.
LOCK TABLES did not pre-lock tables used in triggers of the
locked tables. Unexpected locking behavior and statement
failures similar to failed: 1100: Table
'xx' was not locked with LOCK
TABLES could result. (Bug#29929)
Creating an event to be executed at a time close to the end of the allowed range (2038-01-19 03:14:07 UTC) would cause the server to crash. (Bug#28641)
On Windows, Instance Manager would crash if an instance object failed to initialize during startup. This could happen if an incorrect mysqld path was supplied in the configuration file. (Bug#28012)
Instance Manager had a race condition when it received a shutdown request while a guarded mysqld instance was starting such that it could fail to stop the mysqld instance. (Bug#28030)
Fast ALTER TABLE (that works without
rebuilding the table) acquired duplicate locks in the storage
engine. In MyISAM, if ALTER
TABLE was issued under LOCK
TABLE, it caused all data inserted after
LOCK TABLE to disappear. (Bug#28838)
After the first read of a TEMPORARY table,
CHECK TABLE could report the table as being
corrupt. (Bug#26325)
The server was blocked from opening other tables while the
FEDERATED engine was attempting to open a
remote table. Now the server does not check the correctness of
a FEDERATED table at CREATE
TABLE time, but waits until the table actually is
accessed. (Bug#25679)
On Mac OS X, shared-library installation pathnames were incorrect. (Bug#28544)
For MyISAM tables on Windows,
INSERT, DELETE, or
UPDATE followed by ALTER
TABLE within LOCK TABLES could
cause table corruption. (Bug#29957)
When determining which transaction to kill after deadlock has
been detected, InnoDB now adds the number
of locks to a transaction's weight, and avoids killing
transactions that mave modified non-transactional tables. This
should reduce the likelihood of killing long-running
transactions containing SELECT ... FOR
UPDATE or INSERT/REPLACE INTO ...
SELECT statements, and of causing partial updates if
the target is a MyISAM table. (Bug#21293)
When using a FEDERATED table, the value of
last_insert_id() would not correctly update
the C API interface, which would affect the autogenerated ID
returned both through the C API and the MySQL protocol,
affecting Connectors that used the protocol and/or C API. (Bug#25714)
Optimization of queries with DETERMINISTIC
stored functions in the WHERE clause was
ineffective: A sequential scan was always used. (Bug#29338)
SQL_BIG_RESULT had no effect for
CREATE TABLE ... SELECT SQL_BIG_RESULT ...
statements. (Bug#15130)
For InnoDB tables, MySQL unnecessarily
sorted records in certain cases when the records were
retrieved by InnoDB in the proper order
already. (Bug#28591)
EXPLAIN produced Impossible
where for statements of the form SELECT ...
FROM t WHERE c=0, where c was an
ENUM column defined as a primary key. (Bug#29661)
On Windows, ALTER TABLE hung if records
were locked in share mode by a long-running transaction. (Bug#29644)
A field packet with NULL fields caused a
libmysqlclient crash. (Bug#29494)
A byte-order issue in writing a spatial index to disk caused bad index files on some systems. (Bug#29070)
mysqldump produced output that incorrectly
discarded the NO_AUTO_VALUE_ON_ZERO value
of the SQL_MODE variable after dumping
triggers. (Bug#29788)
Adding DISTINCT could cause incorrect rows
to appear in a query result. (Bug#29911)
Killing an INSERT DELAYED thread caused a
server crash. (Bug#29431)
For updates to InnoDB tables, a
TIMESTAMP column with the ON
UPDATE CURRENT_TIMESTAMP attribute could be updated
even when no values actually changed. (Bug#29310)
The special “zero” ENUM value
was coerced to the normal empty string ENUM
value during a column-to-column copy. This affected
CREATE ... SELECT statements and
SELECT statements with aggregate functions
on ENUM columns in the GROUP
BY clause. (Bug#29360)
Conversion of ASCII DEL (0x7F) to Unicode
incorrectly resulted in QUESTION MARK
(0x3F) rather than DEL. (Bug#29499)
A left join between two views could produce incorrect results. (Bug#29604)
For MEMORY tables, the
index_merge union access method could
return incorrect results. (Bug#29740)
If query execution involved a temporary table,
GROUP_CONCAT() could return a result with
an incorrect character set. (Bug#29850)
Slave servers could incorrectly interpret an out-of-memory error from the master and reconnect using the wrong binary log position. (Bug#24192)
Comparison of TIME values using the
BETWEEN operator led to string comparison,
producing incorrect results in some cases. Now the values are
compared as integers. (Bug#29739)
An incorrect result was returned when comparing string values
that were converted to TIME values with
CAST(). (Bug#29555)
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)
On Windows, the mysql client died if the user entered a statement and Return after entering Control-C. (Bug#29469)
For the general query log, logging of prepared statements
executed via the C API differed from logging of prepared
statements performed with PREPARE and
EXECUTE. Logging for the latter was missing
the Prepare and Execute
lines. (Bug#13326)
Under heavy load with a large query cache, invalidating part of the cache could cause the server to freeze (that is, to be unable to service other operations until the invalidation was complete). (Bug#21074)
If an operation had an InnoDB table, and
two triggers, AFTER UPDATE and
AFTER INSERT, competing for different
resources (such as two distinct MyISAM
tables), the triggers were unable to execute concurrently. In
addition, INSERT and
UPDATE statements for the
InnoDB table were unable to run
concurrently. (Bug#26141)
On 64-bit platforms, the filesort code (for queries with
GROUP BY or ORDER BY)
could crash due to an incorrect pointer size. (Bug#29610)
Using the DATE() function in a
WHERE clause did not return any records
after encountering NULL. However, using
TRIM or CAST produced
the correct results. (Bug#29898)
Using the --skip-add-drop-table option with
mysqldump generated incorrect SQL if the
database included any views. The recreation of views requires
the creation and removal of temporary tables. This option
suppressed the removal of those temporary tables. The same
applied to --compact since this option also
invokes --skip-add-drop-table. (Bug#28524)
A race condition in the interaction between
MyISAM and the query cache code caused the
query cache not to invalidate itself for concurrently inserted
data. (Bug#28249)
The full-text parser could enter an infinite loop if it encountered an illegal multi-byte sequence or a sequence that has no mapping to Unicode. (Bug#29464)
Failure to consider collation when comparing space characters could lead to incorrect index entry order, making it impossible to find some index values. (Bug#29461)
Several InnoDB assertion failures were
corrected. (Bug#25645)
InnoDB displayed an incorrect error message
when a CREATE TABLE statement exceeded the
InnoDB maximum allowable row size. (Bug#21101)
InnoDB produced an unnecessary (and
harmless) warning: InnoDB: Error: trying to declare
trx to enter InnoDB, but InnoDB: it already is
declared. (Bug#20090)
Backup software can cause
ERROR_SHARING_VIOLATION or
ERROR_LOCK_VIOLATION conditions during file
operations. InnoDB now retries forever
until the condition goes away. (Bug#9709)
In strict SQL mode, errors silently stopped the SQL thread
even for errors named using the
--slave-skip-errors option. (Bug#28839)
MyISAM corruption could occur with the
cp932_japanese_ci collation for the
cp932 character set due to incorrect
comparison for trailing space. (Bug#29333)
Searching a FULLTEXT index for a word with
the boolean mode truncation operator could cause an infinite
loop. (Bug#29445)
CHECK TABLE could erroneously report table
corruption for a CSV table if multiple
threads were modifying the table at the same time. (Bug#29253)
Clients using SSL could hang the server. (Bug#29579)
Single-row inserts could report a row count greater than one. (Bug#29692)
For a table with a DATE column
date_col such that selecting rows
with WHERE
yielded a non-empty result, adding date_col =
'date_val 00:00:00'GROUP BY
caused the
result to be empty. (Bug#29729)
date_col
If a stored procedure was created and invoked prior to
selecting a default database with USE, a
No database selected error occurred.
(Bug#28551)
Indexing column prefixes in InnoDB tables
could cause table corruption. (Bug#28138)
SHOW INNODB STATUS caused an assertion
failure under high load. (Bug#22819)
If a slave timed out while registering with the master to which it was connecting, auto-reconnect failed thereafter. (Bug#19328)
For the embedded server, the
mysql_stmt_store_result() C API function
caused a memory leak for empty result sets. (Bug#29687)
mysql-stress-test.pl and mysqld_multi.server.sh were missing from some binary distributions. (Bug#21023, Bug#25486)
SELECT ... INTO OUTFILE followed by
LOAD DATA could result in garbled
characters when the FIELDS ENCLOSED BY
clause named a delimiter of '0',
'b', 'n',
'r', 't',
'N', or 'Z' due to an
interaction of character encoding and doubling for data values
containing the enclosed-by character. (Bug#29294)
A duplicate-key error message could display an incorrect key value when not all columns of the key were used to select rows for update. (Bug#28158)
For some event-creation problems, the server displayed messages that implied the problems were errors when they were only warnings. (Bug#27406)
Error returns from the time() system call
were ignored. (Bug#27198)
ALTER DATABASE did not require at least one
option. (Bug#25859)
Creation of a legal stored procedure could fail if no default database had been selected. (Bug#29050)
mysqld_safe produced error messages and did not create the error log file under some circumstances. (Bug#29634)
The thread ID was not reset properly after execution of
mysql_change_user(), which could cause
replication failure when replicating temporary tables. (Bug#29734)
The FEDERATED storage engine failed
silently for INSERT ... ON DUPLICATE KEY
UPDATE if a duplicate key violation occurred.
FEDERATED does not support ON
DUPLICATE KEY UPDATE, so now it correctly returns an
ER_DUP_KEY error if a duplicate key
violation occurs. (Bug#25511)
For a multiple-row insert into a FEDERATED
table that refers to a remote transactional table, if the
insert failed for a row due to constraint failure, the remote
table would contain a partial commit (the rows preceding the
failed one) instead of rolling back the statement completely.
This occurred because the rows were treated as individual
inserts.
Now FEDERATED performs bulk-insert handling
such that multiple rows are sent to the remote table in a
batch. This provides a performance improvement and enables the
remote table to perform statement rollback properly should an
error occur. This capability has the following limitations:
The size of the insert cannot exceed the maximum packet size between servers. If the insert exceeds this size, it is broken into multiple packets and the rollback problem can occur.
Bulk-insert handling does not occur for INSERT
... ON DUPLICATE KEY UPDATE.
ALTER VIEW is not supported as a prepared
statement but was not being rejected. ALTER
VIEW is now prohibited as a prepared statement or
when called within stored routines. (Bug#28846)
Calling mysql_options() after
mysql_real_connect() could cause clients to
crash. (Bug#29247)
If an ENUM column contained
'' as one of its members (represented with
numeric value greater than 0), and the column contained error
values (represented as 0 and displayed as
''), using ALTER TABLE
to modify the column definition caused the 0 values to be
given the numeric value of the non-zero ''
member. (Bug#29251)
Aggregations in subqueries that refer to outer query columns were not always correctly referenced to the proper outer query. (Bug#27333)
Use of SHOW BINLOG EVENTS for a
non-existent log file followed by PURGE MASTER
LOGS caused a server crash. (Bug#29420)
A number of unsupported constructs — including
prohibited constructs, the UCASE()
function, and nested function calls — were permitted in
partitioning expressions. (Bug#18198, Bug#26082, Bug#29308)
SHOW BINLOG EVENTS displayed incorrect
values of End_log_pos for events associated
with transactional storage engines. (Bug#22540)
mysqldump created a stray file when a given a too-long filename argument. (Bug#29361)
The semantics of BIGINT depended on
platform-specific characteristics. (Bug#29079)
mysqld failed to exit during shutdown. (Bug#29133)
Inserting a negative number into a CSV
table could corrupt it. (Bug#29353)
Deleting from a CSV table could corrupt it.
(Bug#29411)
For a statement of the form CREATE t1 SELECT
, the
server created the column using the integer_constantDECIMAL
data type for large negative values that are within the range
of BIGINT. (Bug#28625)
Runtime changes to the
log_queries_not_using_indexes system
variable were ignored. (Bug#28808)
Under ActiveState Perl, mysql-test-run.pl
would not run. (Bug#18415)
Under ActiveState Perl, mysql-test-run.pl
could kill itself when attempting to kill other processes.
(Bug#25657)
Assertion failure could occur for grouping queries that
employed DECIMAL user variables with
assignments to them. (Bug#29417)
For CAST(,
the limits of 65 and 30 on the precision
(expr AS
DECIMAL(M,D))M) and scale
(D) were not enforced. (Bug#29415)
Corrupt data resulted from use of SELECT ... INTO
OUTFILE 'file_name' FIELDS ENCLOSED