This appendix lists the changes from version to version in the MySQL
source code through the latest version of MySQL 4.1.
We are working actively on MySQL 4.1 and 5.0, and provide only
critical bugfixes for MySQL 4.0. We update this section as we add
new features, so that everybody can follow the development.
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.
INSERT ... ON DUPLICATE KEY UPDATE ...
syntax. This allows you to UPDATE an existing
row if the insert would cause a duplicate value in a
PRIMARY or UNIQUE key.
(REPLACE allows you to overwrite an existing
row, which is something entirely different.) See
Section 13.2.4, “INSERT Syntax”.
Table names and column names now are stored in
UTF8. This makes MySQL more flexible, but
might cause some problems upgrading if you have table or column
names that use characters outside of the standard 7-bit US-ASCII
range. See Section 2.10.1, “Upgrading from MySQL 4.0 to 4.1”.
Character sets can be defined per column, table, and database.
New key cache for MyISAM tables with many
tunable parameters. You can have multiple key caches, preload
index into caches for batches...
Create Table: CREATE [TEMPORARY] TABLE [IF NOT EXISTS]
table2 LIKE table1.
Server based HELP command that can be used in
the mysql command-line client (and other
clients) to get help for SQL statements.
For a full list of changes, please refer to the changelog sections
for each individual 4.1.x release.
D.1.1. Changes in release 4.1.17 (Not yet released)
Functionality added or changed:
In the latin5_turkish_ci collation, the
order of the characters A WITH CIRCUMFLEX,
I WITH CIRCUMLEX, and U WITH
CIRCUMFLEX was changed. If you have used these
characters in any indexed columns, you should rebuild those
indexes. (Bug#13421)
Bugs fixed:
Symbolic links did not funciton properly on Windows platforms.
(Bug #14960, Bug #14310)
BDB: A DELETE,
INSERT, or UPDATE of a
BDB table could cause the server to crash
where the query contained a subquery using an index read. (Bug
#15536)
DELETE could report full-text index
corruption (Invalid key for table …)
if the index was built with repair-by-sort, the data in the
full-text index used UCA collation, and some word appeared in
the data terminated by a 0xC2A0 character as well as by other
non-letter characters. (Bug #11336)
A race condition when creating temporary files caused a
deadlock on Windows with threads in Opening
tables or Waiting for table
states. (Bug #12071)
InnoDB: If
FOREIGN_KEY_CHECKS was 0,
InnoDB allowed inconsistent foreign keys to
be created. (Bug #13778)
NDB Cluster: A memory leak occurred when
performing ordered index scans using indexes a columns larger
than 32 bytes, which would eventually lead to the forced
shutdown of all mysqld server processes
used with the cluster. (Bug #13078)
NDB Cluster: Under some circumstances, it
was possible for a restarting node to undergo a forced
shutdown. (Bug #15632)
NDB Cluster: If an abort by the Transaction
Co-ordinator timed out, the abort condition was incorrectly
handled, causing the transacviton record to be released
prematurely. (Bug #15685)
NDB Cluster: A node which failed during
cluster startup was sometimes not removed from the internal
list of active nodes. (Bug #15587)
NDB Cluster: There was a small window for a
node failure to occur during a backup without an error being
reported. (Bug #15425)
Multiple-table update operations were counting updates and not
updated rows. As a result, if a row had several updates it was
counted several times for the “rows matched”
value but updated only once. (Bug #15028)
SELECT queries that began with an opening
parenthesis were not being placed in the query cache. (Bug
#14652)
D.1.2. Changes in release 4.1.16 (29 November 2005)
Functionality added or changed:
The CHAR() function now takes an optional
USING charset
clause that may be used to produce a result in a specific
character set rather than in the connection character set.
MySQL 4.1 now supports character set conversion for seven
additional cp950 characters into the
big5 character set:
0xF9D6, 0xF9D7,
0xF9D8, 0xF9D9,
0xF9DA, 0xF9DB, and
0xF9DC.
Note: If you move
data containing these additional characters to an older MySQL
installation which does not support them, you may encounter
errors. (Bug #12476)
NDBCluster: The perror
utility included with the MySQL-Server RPM
now provides support for the --ndb option,
and so can be used to obtain error message text for MySQL
Cluster error codes. (Bug #13740)
When executing single-table UPDATE or
DELETE queries containing an ORDER
BY ... LIMIT N clause,
but not having any WHERE clause, MySQL can
now take advantage of an index to read the first
N rows in the ordering specified in
the query. If an index is used, only the first
N records will be read, as opposed
to scanning the entire table. (Bug #12915)
The MySQL-server RPM now explicitly assigns
the mysql system user to the
mysql user group during the
postinstallation process. This corrects an issue with
upgrading the server on some Linux distributions whereby a
previously existing mysql user was not
changed to the mysql group, resulting in
wrong groups for files created following the installation.
(Bug #12823)
Bugs fixed:
InnoDB: During replication, There was a
failure to record events in the binary log that still occurred
even in the event of a ROLLBACK. For
example, this sequence of commands:
BEGIN;
CREATE TEMPORARY TABLE t1 (a INT) ENGINE=INNODB;
ROLLBACK;
INSERT INTO t1 VALUES (1);
would succeed on the replication master as expected. However,
the INSERT would fail on the slave because
the ROLLBACK would (erroneously) cause the
CREATE TEMPORARY TABLE statement not to be
written to the binlog. (Bug #7947)
NDB Cluster: Creating a table with packed
keys failed silently. NDB now supports the
PACK_KEYS option to CREATE
TABLE correctly. (Bug #14514)
Non-latin1 object names were written with
wrong character set to grant tables. (Bug #14406)
Issuing STOP SLAVE after having acquired a
global read lock with FLUSH TABLES WITH READ
LOCK caused a deadlock. Now STOP
SLAVE is generates an error in such circumstances.
(Bug #10942)
Portability fixes to support OpenSSL 0.9.8a. (Bug #14221)
Closed a memory leak in the SSL code. (Bug #14780)
Perform character set conversion of constant values whenever
possible without data loss. (Bug #10446)
A UNION of DECIMAL
columns could produce incorrect results. (Bug #14216)
InnoDB: Pad UTF-8
VARCHAR columns with
0x20. Pad UCS2 CHAR
columns with 0x0020. (Bug #10511)
Full-text indexing/searching failed for words that end with
more than one apostrophe. (Bug #5686)
Selecting from a table in both an outer query and a subquery
could cause a server crash. (Bug #14482)
Creating a table containing an ENUM or
SET column from within a stored procedure
or prepared statement caused a server crash later when
executing the procedure or statement. (Bug #14410)
mysql_fix_privilege_tables.sql contained
an erroneous comment that resulted in an error when the file
contents were processed. (Bug #14469)
On Windows, the server could crash during shutdown if both
replication threads and normal client connection threads were
active. (Re-fix of Bug #11796)
A LIMIT-related optimization failed to take
into account that MyISAM table indexes can
be disabled, causing Error 124 when it tried to use such an
index. (Bug #14616)
For a table that had been opened with HANDLER
OPEN, issuing OPTIMIZE TABLE,
ALTER TABLE, or REPAIR
TABLE caused a server crash. (Bug #14397)
CREATE TABLE tbl_name
(…) SELECT … could crash the server
and write invalid data into the .frm file
if the CREATE TABLE and
SELECT both contained a column with the
same name. Also, if a default value is specified in the column
definition, it is now actually used. (Bug #14480)
For MyISAM tables, incorrect query results
or incorrect updates could occur under these conditions: There
is a multiple-column index that includes a
BLOB column that is not the last column in
the index, and the statement performs a lookup on the index
using key column values that have NULL for
the BLOB column and that provide values for
all columns up to the BLOB column and at
least the next column in the index. (Bug #13814)
Deletes from a CSV table could cause table
corruption. (Bug #14672)
An update of a CSV table could cause a
server crash. (Bug #13894)
mysqld_safe did not correctly start the
-max version of the server (if it was
present) if the --ledir option was given.
(Bug #13774)
The endian byte in for spatial values in WKB format was not
consistently respected. (Bug #12839)
An expression in an ORDER BY clause failed
with Unknown column
'col_name' in 'order
clause' if the expression referred to a column
alias. (Bug #11694)
Statements of the form CREATE TABLE … SELECT
… that created a column with a multi-byte
character set could incorrectly calculate the maximum length
of the column, resulting in a Specified key was too
long error. (Bug #14139)
Use of col_name =
VALUES(col_name) in the
ON DUPLICATE KEY UPDATE clause of an
INSERT statement failed with an
Column 'col_name' in field
list is ambiguous error. (Bug #13392)
On Windows, the server was not ignoring hidden or system
directories that Windows may have created in the data
directory, and would treat them as available databases. (Bug
#4375)
LIKE operations did not work reliably for
the cp1250 character set. (Bug #13347)
Maximum values were handled incorrectly for command-line
options of type GET_LL. (Bug #12925)
Use of WITH ROLLUP PROCEDURE ANALYSE()
could hang the server. (Bug #14138)
TIMEDIFF(), ADDTIME(),
and STR_TO_DATE() were not reporting that
they could return NULL, so functions that
invoked them might misinterpret their results. (Bug #14009)
The example configuration files supplied with MySQL
distributions listed the thread_cache_size
variable as thread_cache. (Bug #13811)
LOAD DATA INFILE would not accept the same
character for both the ESCAPED BY and the
ENCLOSED BY clauses. (Bug #11203)
NDB Cluster: Repeated transactions using
unique index lookups could cause a memory leak leading to
error 288, Out of index operations in transaction
coordinator. (Bug #14199)
SELECT DISTINCT
CHAR(col_name) returned
incorrect results after SET NAMES utf8.
(Bug #13233)
Character set conversion was not being done for
FIND_IN_SET(). (Bug #13751)
The default value of query_prealloc_size
was set to 8192, lower than its minimum of 16384. The minimum
has been lowered to 8192. (Bug #13334)
The server did not take character set into account in checking
the width of the mysql.user.Password
column. As a result, it could incorrectly generate long
password hashes even if the column was not long enough to hold
them. (Bug #13064)
CAST(1E+300 TO SIGNED INT) produced an
incorrect result on little-endian machines. (Bug #13344)
mysqladmin and mysqldump
would hang on SCO OpenServer. (Bug #13238)
Specifying --default-character-set=cp-932 for
mysqld would cause SQL scripts containing
comments written using that character set to fail with a
syntax error. (Bug #13487)
Given a column col_name defined as
NOT NULL, a SELECT ... FROM ...
WHERE col_name IS NULL
query following SHOW TABLE STATUS would
erroneously return a non-empty result. (Bug #13535)
Corrected a memory-copying problem for big5
values when using icc compiler on Linux
IA-64 systems. (Bug #10836)
On BSD systems, the system crypt() call
could return an error for some salt values. The error was not
handled, resulting in a server crash. (Bug #13619)
Character set file parsing during
mysql_real_connect() read past the end of a
memory buffer. (Bug #6413)
The --interactive-timeout and
--slave-net-timeout options for
mysqld were not being obeyed on Mac OS X
and other BSD-based platforms. (Bug #8731)
Queries of the form (SELECT ...) ORDER BY
... were being treated as a
UNION. This improperly resulted in only
distinct values being returned (because
UNION by default eliminates duplicate
results). Also, references to column aliases in ORDER
BY clauses following parenthesized
SELECT statements were not resolved
properly. (Bug #7672)
Multiple update queries using any type of subquery would be
ignored by a replication slave when a condition such as
--replicate-ignore-table like condition was
used. (Bug #13236)
An UPDATE query using a join would be
executed incorrectly on a replication slave. (Bug #12618)
NDBCluster: Placing multiple [TCP
DEFAULT] sections in the cluster
config.ini file crashed
ndb_mgmd. (The process now exits gracefully
with an appropriate error message.) (Bug #13611)
Multiple race conditions existed in OpenSSL, particularly
noticeable on Solaris. (Bug #9270)
With --log-slave-updatesExec_master_log_pos of SQL thread lagged IO
(Bug #13023)
PURGE MASTER LOGS statement that used
subselect for date crashed server. (Bug #10308)
D.1.3. Changes in release 4.1.15 (13 October 2005)
Functionality added or changed:
The limit of 255 characters on the input buffer for
mysql on Windows has been lifted. The exact
limit depends on what the system allows, but can be up to 64K
characters. A typical limit is 16K characters. (Bug #12929)
Added the myisam_stats_method, which controls
whether NULL values in indexes are considered
the same or different when collecting statistics for
MyISAM tables. This influences the query
optimizer as described in
Section 7.4.7, “MyISAM Index Statistics Collection”. (Bug #12232)
Better detection of connection timeout for replication servers
on Windows allows elimination of extraneous Lost
connection errors in the error log. (Bug #5588)
When using IF NOT EXISTS with
CREATE DATABASE or CREATE
TABLE, a warning now is generated if the database or
table already exists. (Bug #6008):
A new command line argument was added to
mysqld to ignore client character set
information sent during handshake, and use server side
settings instead, to reproduce 4.0 behavior (Bug #9948):
mysqld --skip-character-set-client-handshake
Bugs fixed:
A prepared statement failed with Illegal mix of
collations if the client character set was
utf8 and the statement used a table that
had a character set of latin1. (Bug #12371)
If special characters such as '_' ,
'%', or the escape character were included
within the prefix of a column index, LIKE
pattern matching on the indexed column did not return the
correct result. (Bug #13046, Bug #13919)
NDBCluster: Updating a text-type column
during a cluster backup could cause the
ndbd process to crash, due to the incorrect
use of charset-normalized reads for. This could also lead to
“wrong” data in the backup if such a column was
updated during the backup; for example, supposing that the
column used latin_ci, then
“aAa” might be stored in the
backup as “AAA”. (Bug #12950)
NDBCluster: When performing a delete of a
great many (tens of thousands of) rows at once from a Cluster
table, an improperly dereferenced pointer could cause the
mysqld process to crash. (Bug #9282)
Server could over-allocate memory when performing a
FULLTEXT search for stopwords only. (Bug
#13582)
UNION of two DECIMAL
columns returned wrong field type. (Bug #13372)
CHECKSUM TABLE locked
InnoDB tables and did not use a consistent
read. (Bug #12669)
SHOW CREATE TABLE did not display any
FOREIGN KEY clauses if a temporary file
could not be created. Now SHOW CREATE TABLE
displays an error message in an SQL comment if this occurs.
(Bug #13002)
Display of the AUTO_INCREMENT attribute by
SHOW CREATE TABLE was not controlled by the
NO_FIELD_OPTIONS SQL mode as it should have
been. (Bug #7977)
For VARCHAR columns with the
ucs2 character set,
InnoDB trimmed trailing
0x20 bytes rather than
0x0020 words, resulting in incorrect index
lookups later. (Bug #12178)
MySQL programs in binary distributions for Solaris 8/9/10 x86
systems would not run on Pentium III machines. (Bug #6772)
NDB Cluster: Multiple
ndb_mgmd processes in a cluster would not
know each other's IP addresses. (Bug #12037)
NDB Cluster: With two
mgmd processes in a cluster,
ndb_mgm output for SHOW
would display the same IP address for both processes, even
when they were on different hosts. (Bug #11595)
The --replicate-rewrite-db and
--replicate-do-table options did not work for
statements in which tables were aliased to names other than
those listed by the options. (Bug #11139)
After running configure with the
--with-embedded-privilege-control option, the
embedded server failed to build. (Bug #13501)
Queries against a MERGE table that has a
composite index could produce incorrect results. (Bug #9112)
Comparisons involving row constructors containing constants
could cause a server crash. (Bug #13356)
MySQL would pass an incorrect key length to storage engines
for MIN(). This could cause warnings such
as InnoDB: Warning: using a partial-field key prefix
in search. in the .err log.
(Bug #13218, same as Bug #11039 in MySQL 5.0.7)
NDB Cluster: LOAD DATA
INFILE with a large data file failed. (Bug #10694)
NDB Cluster: Adding an index to a table
with a large number of columns (more then 100) crashed the
storage node. (Bug #13316)
Aggregate functions sometimes incorrectly were allowed in the
WHERE clause of UPDATE
and DELETE statements. (Bug #13180)
MIN() and MAX()
sometimes returned a non-NULL value for an
empty row set (for example, SELECT MAX(1) FROM
empty_table). (Bug #12882)
LOAD DATA INFILE did not respect the
NO_AUTO_VALUE_ON_ZERO SQL mode setting.
(Bug #12053)
Use of a user-defined function within the
HAVING clause of a query resulted in an
Unknown column error. (Bug #11553)
The data type for DECIMAL columns was not
respected when updating the column from another column. For
example, updating a DECIMAL(10,1) column
with the value from a DECIMAL(10,5) column
resulted in a DECIMAL(10,5) value being
stored. Similarly, altering a column with a
DECIMAL(10,5) datatype to a
DECIMAL(10,1) data type did not properly
convert data values. (Bug #7598)
NDB: A cluster shutdown following the crash
of a data node would fail to terminate the remaining node
processes, even though ndb_mgm showed the
shutdown request as having been completed. (Bug #10938, Bug
#9996, Bug #11623)
For queries with DISTINCT and WITH
ROLLUP, the DISTINCT should be
applied after the rollup operation, but was not always. (Bug
#12887)
The counters for the Key_read_requests,
Key_reads,
Key_write_requests, and
Key_writes status variables were changed
from unsigned long to unsigned
longlong to accommodate larger variables without
rollover. (Bug #12920)
A column that can be NULL was not handled
properly for WITH ROLLUP in a subquery or
view. (Bug #12885)
Shared-memory connections were not working on Windows. (Bug
#12723)
A concurrency problem for CREATE ... SELECT
could cause a server crash. (Bug #12845)
Performing an IS NULL check on the
MIN() or MAX() of an
indexed column in a complex query could produce incorrect
results. (Bug #12695)
The NDB START BACKUP command could be
interrupted by a SHOW command. (Bug #13054)
The LIKE ... ESCAPE syntax produced invalid
results when escape character was larger than one byte. (Bug
#12611)
A client connection thread cleanup problem caused the server
to crash when closing the connection if the binary log was
enabled. (Bug #12517)
CHECKSUM TABLE command returned incorrect
results for tables with deleted rows. After upgrading, users
who used stored checksum information to detect table changes
should rebuild their checksum data. (Bug #12296)
The value of character_set_results could be
set to NULL, but returned the string
"NULL" when retrieved. (Bug #12363)
GROUP_CONCAT() ignored an empty string if
it was the first value to occur in the result. (Bug #12863)
Outer join elimination was erroneously applied for some
queries that used a NOT BETWEEN condition,
an
IN(value_list)
condition, or an IF() condition. (Bug
#12101, Bug #12102)
Reverted a change introduced in MySQL 4.1.13 to fix a problem
of SHOW FIELDS truncating the
TYPE column to 40 characters. This fix was
reverted for MySQL 4.1 because it broke existing applications.
The fix will be made to MySQL 5.0 instead (5.0.13). (Bug
#7142, Bug #12817)
On HP-UX 11.x (PA-RISC), the -L option caused
mysqlimport to crash. (Bug #12958)
After changing the character set with SET CHARACTER
SET, the result of the
GROUP_CONCAT() function was not converted
to the proper character set. (Bug #12829)
myisampack did not properly pack
BLOB values larger than
224 bytes. (Bug #4214)
The server crashed when one thread resized the query cache
while another thread was using it. (Bug #12848)
mysqld_multi now quotes arguments on
command lines that it constructs to avoid problems with
arguments that contain shell metacharacters. (Bug #11280)
When any --replicate-wild-* option is used,
the slave ignores SET ONE_SHOT TIME_ZONE
statements as belonging to a non-replicated table. (Bug
#12542)
Deadlock occurred when several account management statements
were run (particularly between FLUSH
PRIVILEGES/SET PASSWORD and
GRANT/REVOKE
statements). (Bug #12423)
On Windows, the server was preventing tables from being
created if the table name was a prefix of a forbidden name.
For example, nul is a forbidden name
because it's the same as a Windows device name, but a table
with the name of n or nu
was being forbidden as well. (Bug #12325)
InnoDB was too permissive with
LOCK TABLE ... READ LOCAL and alowed new
inserts into the table. Now READ LOCAL is
equivalent to READ for
InnoDB. This will cause slightly more
locking in mysqldump, but makes
InnoDB table dumps consistent with
MyISAM table dumps. (Bug #12410)
The have_innodb read-only system variable
could not be selected with SELECT
@@have_innodb. (Bug #9613)
A UNION of long utf8VARCHAR columns was sometimes returned as a
column with a LONGTEXT data type rather
than VARCHAR. This could prevent such
queries from working at all if selected into a
MEMORY table because the
MEMORY storage engine does not support the
TEXT data types. (Bug #12537)
NDB Cluster: Corrected the parsing of the
CLUSTERLOG command by
ndb_mgm to allow multiple items. (Bug
#12833)
NDB Cluster: Improved error messages
related to filesystem issues. (Bug #11218)
NDB Cluster: When a schema was detected to
be corrupt, ndb neglected to close it,
resulting in a “file already open” error if the
schema was opened again later. written. (Bug #12027)
NDB Cluster: When it could not copy a
fragment, ndbd exited without printing a
message about the condition to the error log. Now the message
is written. (Bug #12900)
NDB Cluster: When a disk full condition
occurred, ndbd exited without printing a
message about the condition to the error log. Now the message
is written. (Bug #12716)
If a client has opened an InnoDB table for
which the .ibd file is missing,
InnoDB would not honor a DROP
TABLE statement for the table. (Bug #12852)
SELECT GROUP_CONCAT(...) FROM DUAL in a
subquery could cause the client to hang. (Bug #12861)
NDB Cluster: Bad values in
config.ini caused
ndb_mdmd to crash. (Bug #12043)
TRUNCATE TABLE did not work with
TEMPORARYInnoDB tables.
(Bug #11816)
ALTER TABLE db_name.t
RENAME t did not move the
table to default database unless the new name was qualified
with the database name. (Bug #11493)
Spatial index corruption could occur during updates. (Bug
#9645)
If a DROP DATABASE fails on a master server
due to the presence of a non-database file in the database
directory, the master have have the database tables deleted,
but not the slaves. To deal with failed database drops, we now
write DROP TABLE statements to the binary
log for the tables so that they are dropped on slaves. (Bug
#4680)
DELETE or UPDATE for an
indexed MyISAM table could fail. This was
due to a change in end-space comparison behavior from 4.0 to
4.1. (Bug #12565)
The ARCHIVE storage engine does not support
deletes, but it was possible to delete by using
DELETE or TRUNCATE TABLE
with a FEDERATED table that points to an
ARCHIVE table. (Bug #12836)
Queries that created implicit temporary tables could return
incorrect column types for some columns. (Bug #11718)
An optimizer estimate of zero rows for a non-empty
InnoDB table used in a left or right join
could cause incomplete rollback for the table. (Bug #12779)
A SELECT DISTINCT query with a constant
value for one of the columns would return only a single row.
(Bug #12625)
Users created using an IP address or other alias rather than a
hostname listed in /etc/hosts could not
set their own passwords. (Bug #12302)
NDB Cluster: An ALTER
TABLE command caused loss of data stored prior to
the issuing of the command. (Bug #12118)
MEMORY tables using
B-Tree index on 64-bit platforms could
produce false table is full errors. (Bug #12460)
MySQL failed to compile when
--with-ndb-ccflags was specified. (Bug
#11538)
On Windows when the
--innodb_buffer_pool_awe_mem_mb option has
been given, the server detects whether AWE support is
available and has been compiled into the server, and displays
an appropriate error message if not. (Bug #6581)
D.1.4. Changes in release 4.1.14 (17 Aug 2005)
Functionality added or changed:
SHOW CHARACTER SET and
INFORMATION_SCHEMA now properly report the
Latin1 character set as
cp1252. (Bug #11216)
MySQL Cluster: A new -P
option is available for use with the
ndb_mgmd client. When called with this
option, ndb_mgmd prints all configuration
data to stdout, then exits.
The output of perror --help now displays
the --ndb option. (Bug #11999)
NDB: Improved handling of the configuration
variables NoOfPagesToDiskDuringRestartACC,
NoOfPagesToDiskAfterRestartACC,
NoOfPagesToDiskDuringRestartTUP, and
NoOfPagesToDiskAfterRestartTUP should
result in noticeably faster startup times for MySQL Cluster.
(Bug #12149)
Added support of where clause for queries with FROM
DUAL. (Bug #11745)
Added an optimization that avoids key access with
NULL keys for the ref
method when used in outer joins. (Bug #12144)
Added new query cache test for the embedded server to the test
suite, there are now specific tests for the embedded and
non-embedded servers. (Bug #9508)
Bugs fixed:
If a thread (connection) has tables locked, the query cache is
switched off for that thread. This prevents invalid results
where the locking thread inserts values between a second
thread connecting and selecting from the table. (Bug #12385)
Prepared statement parameters could cause errors in the binary
log if the character set was cp932. (Bug
#11338)
Queries with subqueries that contain outer joins could return
wrong results. (Bug #11479)
Slave I/O threads were considered to be in the running state
when launched (rather than after successfully connecting to
the master server), resulting in incorrect SHOW SLAVE
STATUS output. (Bug #10780)
On Windows, the server could crash during shutdown if both
replication threads and normal client connection threads were
active. (Bug #11796)
Some subqueries of the form SELECT ... WHERE ROW(...)
IN (subquery) were being
handled incorrectly. (Bug #11867)
The mysql_info() C API function could
return incorrect data when executed as part of a
multi-statement that included a mix of statements that do and
do not return information. (Bug #11688)
Renamed the rest() macro in
my_list.h to
list_rest() to avoid name clashes with user
code. (Bug #12327)
myisampack failed to delete
.TMD temporary files when run with
-T option. (Bug #12235)
Concatenating
USER()/DATEBASE() with a
column produces invalid results. (Bug #12351)
For PKG installs on Mac OS X, the preinstallation and
postinstallation scripts were being run only for new
installations and not for upgrade installations, resulting in
an incomplete installation process. (Bug #11380)
User variables were not automatically cast for comparisons,
causing queries to fail if the column and connection character
sets differed. Now when mixing strings with different
character sets but the same coercibility, allow conversion if
one character set is a superset of the other. (Bug #10892)
Pathame values for options such as ---basedir
or --datadir didn't work on Japanese Windows
machines for directory names containing multi-byte characters
having a second byte of 0x5C
(‘\’). (Bug #5439)
Mishanding of comparison for rows containg
NULL values against rows produced by an
IN subquery could cause a server crash.
(Bug #12392)
INSERT ... SELECT ... ON DUPLICATE KEY
UPDATE could fail with an erroneous “Column
'col_name' specified twice”
error. (Bug #10109)
myisam.test failed when server compiled
using --without-geometry option. (Bug #11083)
Creation of the mysql group account failed
during the RPM installation. (Bug #12348)
FLUSH TABLES WITH READ LOCK combined with
LOCK TABLE .. WRITE caused deadlock. (Bug
#9459)
GROUP_CONCAT ignores the
DISTINCT modifier when used in a query
joining multiple tables where one of the tables has a single
row. (Bug #12095)
UNION query with
FULLTEXT could cause server crash. (Bug
#11869)
Performing
DATE(LEFT(column,8))
on a DATE column produces incorrect
results. (Bug #12266)
max_connections_per_hour setting was being
capped by unrelated max_user_connections
setting. (Bug #9947)
big5 strings were not being stored in
FULLTEXT index. (Bug #12075)
Updated dependency list for RPM builds to include missing
dependencies such as useradd and
groupadd. (Bug #12233)
Multiplying ABS() output by a negative
number would return incorrect results. (Bug #11402)
SELECT @@local... returned
@@session... in the column header. (Bug
#10724)
Character data truncated when GBK characters
0xA3A0 and 0xA1 are
present. (Bug #11987)
Comparisons like SELECT "A\\" LIKE "A\\";
fail when using SET NAMES utf8;. (Bug
#11754)
Attempting to repair a table having a fulltext index on a
column containing words whose length exceeded 21 characters
and where myisam_repair_threads was greater
than 1 would crash the server. (Bug #11684)
Two threads could potentially initialize different characters
sets and overwrite each other. (Bug #12109)
NDB: Attempting to create or drop tables
during a backup would cause the cluster to shut down. (Bug
#11942)
NDB_MGMD was leaking file descriptors. (Bug
#11898)
NDB ignored the Hostname option in the
NDBD DEFAULT section of the NDB
configuration file. (Bug #12028)
The temporary tables created by an ALTER
TABLE on a cluster table were visible to all MySQL
servers. (Bug #12055)
For prepared statements, the SQL parser did not disallow
‘?’ parameter markers
immediately adjacent to other tokens, which could result in
malformed statements in the binary log. (For example,
SELECT * FROM t WHERE? = 1 could become
SELECT * FROM t WHERE0 = 1.) (Bug #11299)
GROUP_CONCAT() sometimes returned a result
with a different collation that that of its arguments. (Bug
#10201)
When two threads compete for the same table, a deadlock could
occur if one thread has also a lock on another table through
LOCK TABLES and the thread is attempting to
remove the table in some manner and the other thread want
locks on both tables. (Bug #10600)
Incorrect error message displayed if user attempted to create
a table in a non-existing database using CREATE
database_name.table_name
syntax. (Bug #10407)
The LPAD() and RPAD()
functions returned the wrong length to
mysql_fetch_fields(). (Bug #11311)
The C API function mysql_statement_reset()
did not clear error information. (Bug #11183)
Multiple-table UPDATE queries using
CONVERT_TZ() would fail with an error. (Bug
#9979)
mysql_fetch_fields() returned incorrect
length information for MEDIUM and
LONGTEXT and
BLOB columns. (Bug #9735)
LIKE pattern matching using prefix index didn't return correct
result. (Bug #11650)
The MySQL server had issues with certain combinations of
basedir and datadir. (Bug #7249)
mysql_next_result() returns incorrect value
if final query in a batch fails. (Bug #12001)
SHOW BINARY LOGS displayed a file size of 0
for all log files but the current one if the files were not
located in the data directory. (Bug #12004)
Server-side prepared statements failed for columns with a
character set of ucs2. (Bug #9442)
References to system variables in an SQL statement prepared
with PREPARE were evaluated during
EXECUTE to their values at prepare time,
not to their values at execution time. (Bug #9359)
For server shutdown on Windows, error messages of the form
Forcing close of thread n
user: 'name' were being
written to the error log. Now connections are closed more
gracefully without generating error messages. (Bug #7403)
Corrected a problem with the optimizer incorrectly adding
NOT NULL constraints, producing in
incorrect results for complex queries. (Bug #11482)
Corrected an optimizer problem with NOT
NULL constraints within a subquery in an
UPDATE statement that resulted in a server
crash. (Bug #11868)
Creating a table with a SET or
ENUM column with the DEFAULT
0 clause caused a server crash if the table's
character set was utf8. (Bug #11819)
In SQL prepared statements, comparisons could fail for values
not equally space-padded. For example, SELECT 'a' =
'a '; returns 1, but PREPARE s FROM
'SELECT ?=?'; SET @a = 'a', @b = 'a '; PREPARE s FROM
'SELECT ?=?'; EXECUTE s USING @a, @b; incorrectly
returned 0. (Bug #9379)
InnoDB: Do not flush after each write, not
even before setting up the doublewrite buffer. Flushing can be
extremely slow on some systems. (Bug #12125)
ISO-8601 formatted dates were not being
parsed correctly. (Bug #7308)
D.1.5. Changes in release 4.1.13 (15 Jul 2005)
Functionality added or changed:
Security improvement: Applied a patch that addresses a
zlib data vulnerability that could result
in a buffer overflow and code execution.
(CAN-2005-2096)
(Bug #11844). Shortly after MySQL 4.1.13 was released, a
second potential zlib security flaw was discovered and fixed -
the issue is tracked by the Mitre CVE ID
(CAN-2005-1849).
A patch for this flaw was applied on top of the 4.1.13 sources
and published as 4.1.13a. The affected binaries have been
rebuilt.
Added --add-drop-database option to
mysqldump. (Bug #3716)
Added mysql_set_character_set() C API
function for setting the default character set of the current
connection. This allows clients to affect the character set
used by mysql_real_escape_string(). (Bug
#8317)
The statements CREATE TABLE,
TRUNCATE TABLE, DROP
DATABASE, and CREATE DATABASE
cause an implicit commit. (Bug #6883)
Added the --log-slow-admin-statements server
option to request logging of slow administrative statements
such as OPTIMIZE TABLE, ANALYZE
TABLE, and ALTER TABLE to the
slow query log. These statements were logged in MySQL 4.0, but
not in 4.1. (Bug #9141)
SHOW BINARY LOGS now displays a
File_size column that indicates the size of
each file.
You can again refer to other tables in the ON
DUPLICATE KEY UPDATE part of an INSERT ...
SELECT statement as long as there is no
GROUP BY in the SELECT
part. One side effect of this is that you may have to qualify
non-unique column names in the values part of ON
DUPLICATE KEY UPDATE. (Bug #9728, Bug #8147)
The table, type, and
rows columns of EXPLAIN
output can now be NULL. This is required
for using EXPLAIN on
SELECT queries that use no tables, such as
EXPLAIN SELECT 1). (Bug #9899)
Expanded on information provided in general log and slow query
log for prepared statements. (Bug #8367, Bug #9334)
InnoDB: When creating or extending an
InnoDB data file, allocate at most one megabyte at a time for
initializing the file. Previously, InnoDB used to allocate and
initialize 1 or 8 megabytes of memory, even if a few
16-kilobyte pages were to be written. This fix improves the
performance of CREATE TABLE in
innodb_file_per_table mode.
Bugs fixed:
Security fix: On Windows
systems, a user with any of the following privileges
REFERENCES
CREATE TEMPORARY TABLES
GRANT OPTION
CREATE
SELECT
on *.* could crash
mysqld by issuing a USE
LPT1; or USE PRN; command. In
addition, any of the commands USE NUL;,
USE CON;, USE COM1;, or
USE AUX; would report success even though
the database was not in fact changed. (Bug #9148,
CAN-2005-0799
A CREATE TABLE
db_name.tbl_name
LIKE ... statement would crash the server when no
database was selected. (Bug #11028)
IP addresses not shown in ndb_mgm SHOW
command on second ndb_mgmd (or on ndb_mgmd restart). (Bug
#11596)
SHOW FIELDS truncated the
TYPE column to 40 characters. (Bug #7142,
Bug #12817) (Note: This fix was reverted in MySQL 4.1.15
because it broke existing applications.)
Prepared statement with subselects returned corrupt data. (Bug
#11458)
A ROLLUP query could return a wrong result
set when its GROUP BY clause contained
references to the same column. (Bug #11543)
Queries with subqueries in the FROM clause
were not being added to the query cache. (Bug #11522)
Possible crash on Windows when performing GROUP BY on a
calculated field. (Bug #11414)
The mysql_config script did not handle
symbolic linking properly. (Bug #10986)
When used within a subquery, SUBSTRING()
returned an empty string. (Bug #10269)
On Mac OS X, libmysqlclient_r.a now is
built with --fno-common to make it possible
to link a shared two-level namespace library against
libmysqlclient_r.a. (Bug #10638)
The handling by the HEX() function of
numbers larger than 264 was
improved. (Bug #9854)
Added a missing mutex when rotating the relay logs. Also, the
server now logs an error message if the size of a relay log
cannot be read. (Bug #6987)
Added a missing mutex when rotating the relay logs. Also, the
server now logs an error message if the size of a relay log
cannot be read. (Bug #6987)
mysqldump could crash for illegal or
nonexistent table names. (Bug #9358)
The --no-data option for
mysqldump was being ignored if table names
were given after the database name. (Bug #9558)
mysqldump now exports
HASH index definitions using
USING rather than TYPE
when the index name is optional. This corrects a problem when
reloading the output for PRIMARY KEY
definition, because TYPE must be preceded
an index name, which is not given for a PRIMARY
KEY. (Bug #11635)
The --master-data option for
mysqldump resulted in no error if the
binary log was not enabled. Now an error occurs unless the
--force option is given. (Bug #11678)
Corrected an optimization failure where a query returned an
incorrect result for use of a newly populated table until the
table was flushed. (Bug #11700)
Modifying a CHAR column with the
utf8 character set to a shorter length did
not properly truncate values due to not computing their length
in utf8 character units. (Bug #11591)
DES_ENCRYPT() and
DES_DECRYPT() require SSL support to be
enabled, but were not checking for it. Checking for incorrect
arguments or resource exhaustion was also improved for these
functions. (Bug #10589)
Invoking the DES_ENCRYPT() function could
cause a server crash if the server was started without the
--des-key-file option. (Bug #11643)
Selecting the result of an aggregate function for an
ENUM or SET column
within a subquery could result in a server crash. (Bug #11821)
When used in joins, SUBSTRING() failed to
truncate to zero those string values that could not be
converted to numbers. (Bug #10124)
Error when performing GROUP BY on
calculated values of a single row table. (Bug #11414)
mysqldump --xml did not format
NULL column values correctly. (Bug #9657)
SHOW WARNINGS did not properly display
warnings generated by executing a cached query. (Bug #9414)
Temporary tables were created in the data directory instead of
tmpdir. (Bug #11440)
LOAD DATA ... REPLACE INTO ... on a
replication slave failed for an InnoDB
table having a unique index in addition to the primary key.
(Bug #11401)
MySQL would not compile correctly on QNX due to missing
rint() function. (Bug #11544)
Incorrect results when searching using IN()
where search items included NULL and
0. (Bug #9393)
NDB Cluster: When trying to open a table that could not be
discovered or unpacked, cluster would return error codes which
the MySQL server falsely interpreted as operating system
errors. (Bug #103651)
Manually inserting a row with host='' into
mysql.tables_priv and performing a
FLUSH PRIVILEGES would cause the server to
crash. (Bug #11330)
MySQL sometimes reported erroneously that certain character
values had crashed a table when trying to convert other
character sets to UTF-8. (Bug #9557)
Using CONCAT_WS() on a column set
NOT NULL caused incorrect results when used
in a LEFT JOIN. (Bug #11469)
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)
For MEMORY tables, it was possible for for
updates to be performed using outdated key statistics when the
updates involved only very small changes in a very few rows.
This resulted in the random failures of queries such as
UPDATE t SET col = col + 1 WHERE col_key =
2; where the same query with no
WHERE clause would succeed. (Bug #10178)
The NULLIF() function could produce
incorrect results if the first argument was
NULL. (Bug #11142)
Optimizer performed range check when comparing unsigned
integers to negative constants, could cause errors. (Bug
#11185)
Cluster failed to build with gcc 4.0. (Bug
#11377)
Server crashed when using GROUP BY on the
result of a DIV operation on a
DATETIME value. (Bug #11385)
Possible NULL values in
BLOB columns could crash server when
BLOB used in GROUP BY.
(Bug #11295)
Fixed 64 bit compiler warning for packet length in
replication. (Bug #11064)
CASE function returns incorrect result when
its arguments are not constants and its return value is put
into a regular or temporary table (temporary == created by SQL
engine for UNION/non-indexed GROUP
BY and such operations). (Bug #10151)
A problem with the my_global.h file
caused compilation of MySQL to fail on single-processor Linux
systems running 2.6 kernels. (Bug #10364)
Queries against a table using a compound index based on the
length of a UTF-8 text column produced incorrect results. For
example, given a table with an index defined as shown:
CREATE TABLE t (
id INT NOT NULL,
city VARCHAR(20) NOT NULL,
KEY (city(7),id)
) TYPE=MYISAM CHARACTER SET=utf8;
Assuming that suitable data has been inserted into the table,
then a query such as SELECT * FROM t WHERE city =
'Durban'; would fail. (Bug #10253)
The mysqlhotcopy script was not parsing the
output of SHOW SLAVE STATUS correctly when
called with the --record_log_pos option. (Bug
#7967)
An UPDATE query containing a subselect
caused replication to fail. (Bug #9361)
Last insert expected from a query of the form INSERT
... SELECT ... ON DUPLICATE KEY UPDATE would fail.
(Bug #9728)
INSERT ... SELECT ... ON DUPLICATE KEY
UPDATE produced inaccurate results. (Bug #10886)
SELECT DISTINCT ... GROUP BY
constant returned
multiple rows (it should return a single row). (Bug #8614)