Table of Contents
This appendix lists the changes from version to version in the MySQL 5.0 source code through MySQL 5.0.26. For changes made to versions following 5.0.26, see Appendix聽C, MySQL Enterprise Release Notes, and Appendix聽D, MySQL Community Server Enhancements and Release Notes.
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.0 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.
The following changelog shows what has been done in the 5.0 tree:
Basic support for read-only server side cursors. For information
about using cursors within stored routines, see
Section聽17.2.9, 鈥淐ursors鈥. For information about using cursors
from within the C API, see
Section聽22.2.7.3, 鈥mysql_stmt_attr_set()鈥.
Basic support for (updatable) views. See, for example,
Section聽19.2, 鈥CREATE VIEW Syntax鈥.
Basic support for stored procedures and functions (SQL:2003 style). See Chapter聽17, Stored Procedures and Functions.
Initial support for rudimentary triggers.
Added SELECT INTO
, which can be
of mixed (that is, global and local) types. See
Section聽17.2.7.3, 鈥list_of_varsSELECT ... INTO Statement鈥.
Removed the update log. It is fully replaced by the binary log.
If the MySQL server is started with
--log-update, it is translated to
--log-bin (or ignored if the server is
explicitly started with --log-bin), and a
warning message is written to the error log. Setting
SQL_LOG_UPDATE silently sets
SQL_LOG_BIN instead (or do nothing if the
server is explicitly started with --log-bin).
Support for the ISAM storage engine has been
removed. If you have ISAM tables, you should
convert them before upgrading. See
Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
Support for RAID options in
MyISAM tables has been removed. If you have
tables that use these options, you should convert them before
upgrading. See Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
User variable names are now case insensitive: If you do
SET @a=10; then SELECT @A;
now returns 10. Case sensitivity of a
variable's value depends on the collation of the value.
Strict mode, which in essence means that you get an error instead of a warning when inserting an incorrect value into a column. See Section聽5.2.6, 鈥淪QL Modes鈥.
VARCHAR and VARBINARY
columns remember end space. A VARCHAR() or
VARBINARY column can contain up to 65,535
characters or bytes, respectively.
MEMORY (HEAP) tables can
have VARCHAR columns.
When using a constant string or a function that generates a
string result in CREATE ... SELECT, MySQL
creates the result column based on the maximum length of the
string or expression:
| Maximum Length | Data type |
| = 0 | CHAR(0) |
| < 512 | VARCHAR( |
| >= 512 | TEXT |
A fixed-point math library is introduced that supports precision
math, resulting in more accurate results when working with the
DECIMAL and NUMERIC data
types. For details, see Chapter聽21, Precision Math.
For a full list of changes, please refer to the changelog sections for each individual 5.0.x release.
Beginning with MySQL 5.0.27, change notes are listed separately for MySQL Enterprise and MySQL Community Server. See Appendix聽C, MySQL Enterprise Release Notes, and Appendix聽D, MySQL Community Server Enhancements and Release Notes.
This is a bugfix release for the current production release family.
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:
The output generated by the server when using the
--xml option has changed with regard to null
values. It now matches the output from mysqldump
--xml. That is, a column containing
a NULL value is now reported as
<field name="column_name" xsi:nil="true" />
whereas a column containing the string value
'NULL' is reported as
<field name="column_name">NULL</field>
and a column containing an empty string is reported as
<field name="column_name">>/field>
The source distribution has been updated so that the UDF example can be compiled under Windows with CMake. See Section聽24.2.4.5, 鈥淐ompiling and Installing User-Defined Functions鈥. (Bug#19121)
The LOAD DATA FROM MASTER and LOAD
TABLE FROM MASTER statements are deprecated. See
Section聽13.6.2.2, 鈥LOAD DATA FROM MASTER Syntax鈥, for recommended
alternatives. (Bug#18822, Bug#9125, Bug#12187, Bug#14399,
Bug#15025, Bug#20596)
LOAD DATA INFILE no longer causes an
implicit commit for all storage engines. It now causes an
implicit commit only for tables using the
NDB storage engine. (Bug#11151)
mysqldump now has a
--flush-privileges option. It causes
mysqldump to emit a FLUSH
PRIVILEGES statement after dumping the
mysql database. This option should be used
any time the dump contains the mysql
database and any other database that depends on the data in
the mysql database for proper restoration.
(Bug#21424)
The number of InnoDB threads is no longer
limited to 1,000 on Windows. (Bug#22268)
Bugs fixed:
Deleting entries from a large MyISAM index
could cause index corruption when it needed to shrink. Deletes
from an index can happen when a record is deleted, when a key
changes and must be moved, and when a key must be un-inserted
because of a duplicate key. This can also happen in
REPAIR TABLE when a duplicate key is found
and in myisamchk when sorting the records
by an index. (Bug#22384)
mysql_config --libmysqld-libs did not
produce any SSL options necessary for linking
libmysqld with SSL support enabled. (Bug#21239)
The parser rejected queries that selected from a table twice
using a UNION within a subquery. The parser
now supports arbitrary subquery, join, and parenthesis
operations within EXISTS subqueries. A
limitation still exists for scalar subqueries: If the subquery
contains UNION, the first
SELECT of the UNION
cannot be within parentheses. For example, SELECT
(SELECT a FROM t1 UNION SELECT b FROM t2) will work,
but SELECT ((SELECT a FROM t1) UNION (SELECT b FROM
t2)) will not. (Bug#14654)
Subqueries with aggregate functions but no
FROM clause could return incorrect results.
(Bug#21540)
The presence of a subquery in the ON clause
of a join in a view definition prevented the
MERGE algorithm from being used for the
view in cases where it should be allowed. (Bug#21646)
Conversion of values inserted into a BIT
column could affect adjacent columns. (Bug#22271)
The URL into the online manual that is printed in the stack trace message by the server was out of date. (Bug#21449)
PROCEDURE ANALYSE() returned incorrect
values of M
FLOAT( and
M,
D)DOUBLE(. (Bug#20305)
M,
D)
Join conditions using index prefixes on
utf8 columns of InnoDB
tables incorrectly ignored rows where the length of the actual
value was greater than the length of the index prefix. (Bug#19960)
On an INSERT into an updatable but
non-insertable view, an error message was issued stating that
the view was not updatable. Now the message says the view is
not insertable-into. (Bug#5505)
INSERT DELAYED did not honor SET
INSERT_ID or the auto_increment_*
system variables. (Bug#20627, Bug # 20830)
For character sets having a mbmaxlen value
of 2, any ALTER TABLE statement changed
TEXT columns to
MEDIUMTEXT. (Bug#21620)
A query that used GROUP BY and an
ALL or ANY quantified
subquery in a HAVING clause could trigger
an assertion failure. (Bug#21853)
For an ENUM column that used the
ucs2 character set, using ALTER
TABLE to modify the column definition caused the
default value to be lost. (Bug#20108)
mysql_com.h unnecessarily referred to the
ulong type. (Bug#22227)
Incorporated some portability fixes into the definition of
__attribute__ in
my_global.h. (Bug#2717)
Linking the pthreads library to
single-threaded MySQL libraries caused
dlopen() to fail at runtime on HP-UX. (Bug#18267)
In the package of pre-built time zone tables that is available
for download at
http://dev.mysql.com/downloads/timezones.html, the tables
now explicitly use the utf8 character set
so that they work the same way regardless of the system
character set value. (Bug#21208)
The build process incorrectly tried to overwrite
sql/lex_hash.h. This caused the build to
fail when using a shadow link tree pointing to original
sources that were owned by another account. (Bug#18888)
mysql_ftdump produced bad counts for common words. (Bug#22326)
yaSSL had a conflicting definition for
socklen_t on hurd-i386 systems. (Bug#22326)
When records are merged from the insert buffer and the page
needs to be reorganized, InnoDB used
incorrect column length information when interpreting the
records of the page. This caused a server crash due to
apparent corruption of secondary indexes in
ROW_FORMAT=COMPACT that contain prefix
indexes of fixed-length columns. Data files should not be
corrupted, but the crash was likely to repeat every time the
server was restarted. (Bug#21638)
Using GROUP_CONCAT() on the result of a
subquery in the FROM clause that itself
used GROUP_CONCAT() could cause a server
crash. (Bug#22015)
Execution of a prepared statement that uses an
IN subquery with aggregate functions in the
HAVING clause could cause a server crash.
(Bug#22085)
The value of LAST_INSERT_ID() was not
always updated correctly within stored routines. (Bug#21726)
If mysqld was linked against a
system-installed zlib library compiled
without large-file support, it would likely exit with a
SIGXFSZ (file size exceeded) signal if an
ARCHIVE table reached 2GB. The server now
checks for space before writing. (Bug#21675)
Selecting from a MERGE table could result
in a server crash if the underlying tables had fewer indexes
than the MERGE table itself. (Bug#21617,
Bug#22937)
make install tried to build files that should already have been built by make all, causing a failure if installation was performed using a different account than the one used for the initial build. (Bug#19738)
The source distribution would not build on Windows due to a
spurious dependency on ib_config.h. (Bug#22224)
The server returns a more informative error message when it
attempts to open a MERGE table that has
been defined to use non-MyISAM tables. (Bug#10974)
Within stored routines, some error messages were printed incorrectly. A non-null-terminated string was passed to a message-printing routine that expected a null-terminated string. (Bug#20778)
SUBSTR() results sometimes were stored
improperly into a temporary table when multi-byte character
sets were used. (Bug#20204)
On Windows, inserting into a MERGE table
after renaming an underlying MyISAM table
caused a server crash. (Bug#20789)
On Mac OS X, zero-byte read() or
write() calls to an SMB-mounted filesystem
could return a non-standard return value, leading to data
corruption. Now such calls are avoided. (Bug#12620)
With TRADITIONAL SQL mode, assignment of
out-of-bound values and rounding of assigned values was done
correctly, but assignment of the same numbers represented as
strings sometimes was handled differently. (Bug#6147)
The source distribution failed to compile when configured with
the --without-geometry option. (Bug#12991)
The source distribution failed to compile when configured with
the --with-libwrap option. (Bug#18246)
For INSERT ... ON DUPLICATE KEY UPDATE, use
of
VALUES(
within the col_name)UPDATE clause sometimes was
handled incorrectly. (Bug#21555)
Row equalities (such as WHERE (a,b) = (c,d)
were not taken into account by the optimizer, resulting in
slow query execution. Now they are treated as conjunctions of
equalities between row elements. (Bug#16081)
Column names supplied for a view created on a master server could be lost on a slave server. (Bug#19419)
For a MyISAM table locked with
LOCK TABLES ...WRITE, queries optimized
using the index_merge method did not show
rows inserted with the lock in place. (Bug#20256)
Table aliases in multiple-table DELETE
statements sometimes were not resolved. (Bug#21392)
A function result in a comparison was replaced with a constant by the optimizer under some circumstances when this optimization was invalid. (Bug#21698)
A subquery that uses an index for both the
WHERE and ORDER BY
clauses produced an empty result. (Bug#21180)
If the auto_increment_offset setting causes
MySQL to generate a value larger than the column's maximum
possible value, the INSERT statement is
accepted in strict SQL mode, whereas but should fail with an
error. (Bug#20573)
Queries containing a subquery that used aggregate functions could return incorrect results. (Bug#16792)
EXPLAIN sometimes returned an incorrect
select_type for a SELECT
from a view, compared to the select_type
for the equivalent SELECT from the base
table. (Bug#5500)
For a MyISAM table with a
FULLTEXT index, compression with
myisampack or a check with
myisamchk after compression resulted in
table corruption. (Bug#19702)
BIN(), OCT(), and
CONV() did not work with BIT values. (Bug#15583)
The server could crash for the second execution of a function
containing a SELECT statement that uses an
aggregating IN subquery. (Bug#21493)
UPGRADE was treated as a reserved word,
although it is not. (Bug#21772)
mysql_upgrade produced a malformed
upgrade_defaults file by overwriting the
[client] group header with a
password option. This prevented
mysqlcheck from running successfully when
invoked by mysql_upgrade. (Bug#21011)
Usernames have a maximum length of 16 characters (even if they contain multi-byte characters), but were being truncated to 16 bytes. (Bug#20393)
mysql displayed an empty string for
NULL values. (Bug#21618)
This is a bugfix release for the current production release family. This version was released as MySQL Classic 5.0.25 to commercial customers only.
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:
For the mysql client, typing Control-C causes mysql to attempt to kill the current statement. If this cannot be done, or Control-C is typed again before the statement is killed, mysql exits. Previously, Control-C caused mysql to exit in all cases. (Bug#17926; see also Bug#1989)
For mysqlshow, if a database name argument
contains wildcard characters (such as
鈥_鈥) but matches a single
database name exactly, treat the name as a literal name. This
allows a command such as mysqlshow
information_schema work without having to escape the
wildcard character. (Bug#19147)
If a DROP VIEW statement named multiple
views, it stopped with an error if a non-existent view was
named and did not drop the remaining views. Now it continues
on and reports an error at the end, similar to DROP
TABLE. (Bug#16614)
Table comments longer than 60 characters and column comments longer than 255 characters were truncated silently. Now a warning is issued, or an error in strict mode. (Bug#13934)
The bundled yaSSL library was upgraded to version 1.3.7.
The bundled yaSSL library licensing has added a FLOSS
exception similar to MySQL to resolve licensing
incompatibilities with MySQL. (See the
extra/yassl/FLOSS-EXCEPTIONS file in a
MySQL source distribution for details.) (Bug#16755)
The server now issues a warning if it removes leading spaces from an alias. (Bug#10977)
The VIEW_DEFINITION column of the
INFORMATION_SCHEMA VIEWS
table now contains information about the view algorithm. (Bug#16832)
For a successful dump, mysqldump now writes a SQL comment to the end of the dump file in the following format:
-- Dump completed on YYYY-MM-DD hh:mm:ss
The mysqld and mysqlmanager manpages have been reclassified from volume 1 to volume 8. (Bug#21220)
configure now defines the symbol
DBUG_ON in config.h to
indicate whether the source tree is configured to be compiled
with debugging support. (Bug#19517)
The MySQL distribution now compiles on UnixWare 7.13. (Bug#20190)
The mysql client used the default character
set if it automatically reconnected to the server, which is
incorrect if the character set had been changed. To enable the
character set to remain synchronized on the client and server,
the mysql command
charset (or \C) that
changes the default character set and now also issues a
SET NAMES statement. The changed character
set is used for reconnects. (Bug#11972)
mysql_upgrade no longer reads the
[client] option file group because it is
not a client and did not understand client options such as
host. Now it reads only the
[mysql_upgrade] group. (Bug#19452)
MySQL now can do stack dumps on x86_64 and
i386/NPTL systems. (Bug#21250)
TIMESTAMP columns that are NOT
NULL now are reported that way by SHOW
COLUMNS and INFORMATION_SCHEMA.
(Bug#20910)
Using --with-debug to configure MySQL with
debugging support enables you to use the
--debug="d,parser_debug" option when you
start the server. This causes the Bison parser that is used to
process SQL statements to dump a parser trace to the server's
standard error output. Typically, this output is written to
the error log.
A new system variable, lc_time_names,
specifies the locale that controls the language used to
display day and month names and abbreviations. This variable
affects the output from the DATE_FORMAT(),
DAYNAME() and
MONTHNAME() functions. See
Section聽5.10.9, 鈥淢ySQL Server Locale Support鈥.
Bugs fixed:
Security fix: On Linux, and possibly other platforms using case-sensitive filesystems, it was possible for a user granted rights on a database to create or access a database whose name differed only from that of the first by the case of one or more letters. (CVE-2006-4226, Bug#17647)
Security fix: A stored
routine created by one user and then made accessible to a
different user using GRANT EXECUTE could be
executed by that user with the privileges of the routine's
definer.
(CVE-2006-4227,
Bug#18630)
Setting myisam_repair_threads caused any
repair operation on a MyISAM table to fail
to update the cardinality of indexes, instead making them
always equal to 1. (Bug#18874)
The optimizer did not take advantage of indexes on columns
used for the second or third arguments of
BETWEEN. (Bug#18165)
Successive invocations of a COUNT(*) query
containing a join on two MyISAM tables and
a WHERE clause of the form WHERE
( yielded different results. (Bug#21019)
table1.column1
=
table2.column2)
OR
table2.column2
IS NULL
CREATE TABLE ... SELECT statements that
selected GEOMETRY values resulted in a
table that contained BLOB columns, not
GEOMETRY columns. (Bug#14807)
A DATE can be represented as an integer
(such as 20060101) or as a string (such as
'2006.01.01'). When a
DATE (or TIME) column is
compared in one SELECT against both
representations, constant propagation by the optimizer led to
comparison of DATE as a string against
DATE as an integer. This could result in
integer comparisons such as 2006 against
20060101, erroneously producing a false
result. (Bug#21475)
A query result could be sorted improperly when using
ORDER BY for the second table in a join.
(Bug#21302)
EXPORT_SET() did not accept arguments with
coercible character sets. (Bug#21531)
The --collation-server server option was
being ignored. With the fix for this problem, if you choose a
non-default character set with
--character-set-server, you should also use
--collation-server to specify the collation.
(Bug#15276)
The
index_merge/Intersection
optimizer could have a memory overrrun when the number of
table columns covered by an index is sufficiently large,
possibly resulting in a server crash. (Bug#16201)
With max_sp_recursion set to 0, a stored
procedure that executed a SHOW CREATE
PROCEDURE statement for itself triggered a recursion
limit exceeded error, though the statement involves no
recursion. (Bug#21416)
The optimizer could produce an incorrect result after
AND with collations such as
latin1_german2_ci,
utf8_czech_ci, and
utf8_lithianian_ci. (Bug#9509)
Database and table names have a maximum length of 64 characters (even if they contain multi-byte characters), but were being truncated to 64 bytes. (Bug#21432) This patch was reverted in MySQL 5.0.26.
character_set_results can be
NULL to signify 鈥no
conversion,鈥 but some code did not check for
NULL, resulting in a server crash. (Bug#21913)
InnoDB was slow with more than 100,000
.idb files. (Bug#21112)
SHOW INNODB STATUS contained some duplicate
output. (Bug#21113)
Using cursors with READ COMMITTED isolation
level could cause InnoDB to crash. (Bug#19834)
The ndb_mgm program was included in both
the MySQL-ndb-tools and
MySQL-ndb-management RPM packages,
resulting in a conflict if both were installed. Now
ndb_mgm is included only in
MySQL-ndb-tools. (Bug#21058)
A query could produce different results with and without and
index, if the WHERE clause contained a
range condition that used an invalid
DATETIME constant. (Bug#16249)
libmysqld produced some warnings to
stderr which could not be silenced. These
warnings now are suppressed. (Bug#13717)
If a query had a condition of the form
,
which participated in equality propagation and also was used
for tableX.key
=
tableY.keyref access, then early
ref-access NULL
filtering was not peformed for the condition. This could make
query execution slower. (Bug#19649)
The optimizer sometimes produced an incorrect row-count
estimate after elimination of const tables.
This resulted in choosing extremely inefficient execution
plans in same cases when distribution of data in joins were
skewed. (Bug#21390)
Query results could be incorrect if the
WHERE clause contained
t., where
key_part NOT IN
(val_list)val_list is a list of more than
1000 constants. (Bug#21282)
STR_TO_DATE() sometimes would return
NULL if the %D format
specifier was not the last specifier in the format string.
(Bug#20987)
The myisam_stats_method variable was
mishandled when set from an option file or on the command
line. (Bug#21054)
The optimizer assumed that if (a=x AND b=x)
is true, (a=x AND b=x) AND a=b is also
true. But that is not always so if a and
b have different data types. (Bug#21159)
InnoDB did not honor IGNORE
INDEX, which prevented using IGNORE
INDEX in cases where an index sort would be slower
than a filesort. (Bug#21174) This patch was reverted in MySQL
5.0.26. Hint operation was revised further in MySQL 5.0.40.
If a column definition contained a character set declaration,
but a DEFAULT value began with an
introducer, the introducer character set was used as the
column character set. (Bug#20695)
The MD5(), SHA1(), and
ENCRYPT() functions should return a binary
string, but the result sometimes was converted to the
character set of the argument. MAKE_SET()
and EXPORT_SET() now use the correct
character set for their default separators, resulting in
consistent result strings which can be coerced according to
normal character set rules. (Bug#20536)
For connections that required a SUBJECT
value, a check was performed to verify that the value was
correct, but the connection was not refused if not. (Bug#20411)
Some Linux-x86_64-icc packages (of previous releases) mistakenly contained 32-bit binaries. Only ICC builds are affected, not gcc builds. Solaris and FreeBSD x86_64 builds are not affected. (Bug#22238)
INSERT ... SELECT sometimes generated a
spurious Column count doesn't match value
count error. (Bug#21774)
For TIME_FORMAT(), the
%H and %k format
specifiers can return values larger than two digits (if the
hour is greater than 99), but for some query results that
contained three-character hours, column values were truncated.
(Bug#19844)
For table-format output, mysql did not always calculate columns widths correctly for columns containing multi-byte characters in the column name or contents. (Bug#17939)
Views could not be updated within a stored function or trigger. (Bug#17591)
Some user-level errors were being written to the server's error log, which is for server errors. (Bug#20402)
When using tables created under MySQL 4.1 with a 5.0 server,
if the tables contained VARCHAR columns,
for some queries the metadata sent to the client could have an
empty column name. (Bug#14897)
On 64-bit systems, use of the cp1250
character set with a primary key column in a
LIKE clause caused a server crash for
patterns having letters in the range 128..255. (Bug#19741)
N'xxx' and _utf8'xxx'
were not treated as equivalent because
N'xxx' failed to unescape backslashes
(\) and doubled apostrophe/single quote
characters (''). (Bug#17313)
ORDER BY RAND() LIMIT 1 always set a user
variable to the last possible value from the table. (Bug#16861)
A subquery in the WHERE clause of the outer
query and using IN and GROUP
BY returned an incorrect result. (Bug#16255)
When NOW() was used in a
BETWEEN clause of the definition for a
view, it was replaced with a constant in the view. (Bug#15950)
A stored procedure with a CONTINUE handler
that encountered an error continued to execute a statement
that caused an error, rather with the next statement following
the one that caused the error. (Bug#8153)
libmysqlclient defined a symbol
BN_bin2bn which belongs to OpenSSL. This
could break applications that also linked against OpenSSL's
libcrypto library. The fix required
correcting an error in a build script that was failing to add
rename macros for some functions. (Bug#21930)
COUNT(*) queries with ORDER
BY and LIMIT could return the
wrong result. (Bug#21787)
Note: This problem was
introduced by the fix for Bug#9676, which limited the rows
stored in a temporary table to the LIMIT
clause. This optimization is not applicable to non-group
queries with aggregate functions. The current fix disables the
optimization in such cases.
Memory overruns could occur for certain kinds of subqueries. (Bug#21477)
The SELECT privilege was required for an
insert on a view, instead of the INSERT
privilege. (Bug#21261)
Note: This fixes a regression that was introduced by the fix for Bug#20989.
Running SHOW MASTER LOGS at the same time
as binary log files were being switched would cause
mysqld to hang. (Bug#21965)
A server or network failure with an open client connection would cause the client to hang even though the server was no longer available. (Bug#9678)
Inserts into BIT columns of
FEDERATED tables did not work. (Bug#14532)
The yaSSL library bundled with
libmysqlclient had some conflicts with
OpenSSL. Now macros are used to rename the conflicting symbols
to have a prefix of ya. (Bug#19810)
It is possible to create MERGE tables into
which data cannot be inserted (by not specifying a
UNION clause. However, when an insert was
attempted, the error message was confusing. Now an error
occurs indicating that the table is read-only. (Bug#17766)
A NUL byte within a prepared statement
string caused the rest of the string not to be written to the
query log, allowing logging to be bypassed. (Bug#21813)
mysql_upgrade created temporary files in a possibly insecure way. (Bug#21224)
Some prepared statements caused a server crash when executed a second time. (Bug#21166)
With query_cache_type set to 0,
RESET QUERY CACHE was very slow and other
threads were blocked during the operation. Now a cache reset
is faster and non-blocking. (Bug#21051)
NDB Cluster: Setting
TransactionDeadlockDetectionTimeout to a
value greater than 12000 would cause scans to deadlock, time
out, fail to release scan records, until the cluster ran out
of scan records and stopped processing. (Bug#21800)
NDB Cluster: The server provided a
non-descriptive error message when encountering a fatally
corrupted REDO log. (Bug#21615)
NDB Cluster: A partial rollback could lead
to node restart failures. (Bug#21536)
NDB Cluster: The failure of a unique index
read due to an invalid schema version could be handled
incorrectly in some cases, leading to unpredictable results.
(Bug#21384)
NDB Cluster: In a cluster with more than 2
replicas, a manual restart of one of the data nodes could fail
and cause the other nodes in its nodegroup to shut down. (Bug#21213)
NDB Cluster: When the redo buffer ran out
of space, a Pointer too large error was
raised and the cluster could become unusable until restarted
with --initial. (Bug#20892)
NDB Cluster: In some situations with a high
disk-load, writing of the redo log could hang, causing a crash
with the error message GCP STOP
detected. (Bug#20904)
NDB Cluster: A vague error message was
returned when reading of both schema files occurred during a
restart of the cluster. (Bug#20860)
NDB Cluster: The server did not honor the
value set for ndb_cache_check_time in the
my.cnf file. (Bug#20708)
NDB Cluster: The server failed with a
non-descriptive error message when out of data memory. (Bug#18475)
NDB Cluster: ndb_size.pl
and ndb_error_reporter were missing from
RPM packages. (Bug#20426)
When DROP DATABASE or SHOW OPEN
TABLES was issued while concurrently issuing
DROP TABLE (or RENAME
TABLE, CREATE TABLE LIKE or any
other statement that required a name lock) in another
connection, the server crashed. (Bug#21216)
Use of zero-length variable names caused a server crash. (Bug#20908)
Prepared statements caused general log and server memory corruption. (Bug#14346)
mysqldump incorrectly tried to use
LOCK TABLES for tables in the
INFORMATION_SCHEMA database. (Bug#21527)
Adding ORDER BY to a SELECT
DISTINCT( query
could produce incorrect results. (Bug#21456)
expr)
For InnoDB tables, the server could crash
when executing NOT IN () subqueries. (Bug#21077)
Use of the --prompt option or
prompt command caused
mysql to be unable to connect to the
Instance Manager. (Bug#17485)
The server crashed if it tried to access a
CSV table for which the data file had been
removed. (Bug#15205)
CREATE USER did not respect the
16-character username limit. (Bug#10668)
On Windows, a definition for
mysql_set_server_option() was missing from
the C client library. (Bug#16513)
For the CSV storage engine, memory-mapped
pages of the data file were not invalidated when new data was
appended to the file via traditional (file descriptor-based)
I/O primitives. (Bug#15669)
In debugging mode, mysqld printed
server_init rather than
network_init during network initialization.
(Bug#20968)
For user-defined functions created with CREATE
FUNCTION, the DEFINER clause is
not legal, but no error was generated. (Bug#21269)
mysqld --flush failed to flush
MyISAM table changes to disk following an
UPDATE statement for which no updated
column had an index. (Bug#20060)
When not running in strict mode, the server failed to convert
the invalid years portion of a DATE or
DATETIME value to '0000'
when inserting it into a table. (Bug#19370)
This patch was reverted in MySQL 5.0.42.
The --with-collation option was not honored
for client connections. (Bug#7192)
Users who had the SHOW VIEW privilege for a
view and privileges on one of the view's base table could not
see records in INFORMATION_SCHEMA tables
relating to the base table. (Bug#20543)
An issue with yaSSL prevented Connector/J clients from connecting to the server using a certificate. (Bug#19705)
Some server errors were not reported to the client, causing both to try to read from the connection until a hang or crash resulted. (Bug#16581)
When setting a column to its implicit default value as the
result of inserting a NULL into a
NOT NULL column as part of a multi-row
insert or LOAD DATA operation, the server
returned a misleading warning message. (Bug#14770)
DECIMAL columns were handled incorrectly in
two respects (Bug#16172):
When the precision of the column was too small for the value. In this case, the original value was returned instead of an error.
When the scale of the column was set to 0. In this case, the value. In this case, the value was treated as though the scale had been defined as 2.
Tables created with the FEDERATED storage
engine did not permit indexes using NULL
columns. (Bug#15133)
The Instance Manager allowed STOP INSTANCE
to be used on a server instance that was not running. (Bug#12673)
On Windows, mysql_upgrade.exe could not find mysqlcheck.exe. (Bug#20950)
FEDERATED tables raised invalid duplicate
key errors when attempting on one server to insert rows having
the same primary key values as rows that had been deleted from
the linked table on the other server. (Bug#18764)
The C API failed to return a status message when invoking a stored procedure. (Bug#15752)
A stored procedure that created and invoked a prepared statement was not executed when called in a mysqld init-file. (Bug#17843)
Stored procedures did not use the character set defined for the database in which they were created. (Bug#16676)
CREATE PROCEDURE, CREATE
FUNTION, CREATE TRIGGER, and
CREATE VIEW statements containing
multi-line comments (/* ... */) could not
be replicated. (Bug#20438)
The final parenthesis of a CREATE INDEX
statement occurring in a stored procedure was omitted from the
binary log when the stored procedure was called. (Bug#19207)
Attempting to insert a string of greater than 4096 bytes into
a FEDERATED table resulted in the error
ERROR 1296 (HY000) at line 2: Got error 10000
'Error on remote system: 1054: Unknown column
'string-value' from
FEDERATED. This error was raised regardless of the
type of column involved (VARCHAR,
TEXT, and so on.) (Bug#17608)
Performance during an import on a table with a trigger that called a stored procedure was severely degraded. This issue first arose in MySQL 5.0.18. (Bug#21013)
Repeated DROP TABLE statements in a stored
procedure could sometimes cause the server to crash. (Bug#19399)
The value returned by a stored function returning a string value was not of the declared character set. (Bug#16211)
For mysql, escaping with backslash sometimes did not work. (Bug#20103)
Under certain circumstances,
AVG(
returned a value but
key_val)MAX(
returned an empty set due to incorrect application of
key_val)MIN()/MAX() optimization. (Bug#20954)
Using aggregate functions in subqueries yielded incorrect
results under certain circumstances due to incorrect
application of MIN()/MAX() optimization.
(Bug#20792)
A query using WHERE did not
return consistent results on successive invocations. The
column
= constant OR
column IS NULLcolumn in each part of the
WHERE clause could be either the same
column, or two different columns, for the effect to be
observed. (Bug#21019)
The PASSWORD() function returned invalid
results when used in some UNION queries.
(Bug#16881)
USE did not refresh database privileges
when employed to re-select the current database. (Bug#10979)
A query using WHERE NOT
( yielded a
different result from the same query using the same
column < ANY
(subquery))column and
subquery with WHERE
(. (Bug#20975)
column > ANY
(subquery))
A user variable set to a value selected from an unsigned column was stored as a signed value. (Bug#7498)
SELECT statements using GROUP
BY against a view could have missing columns in the
output when there was a trigger defined on one of the base
tables for the view. (Bug#20466)
A SELECT with a subquery that was bound to
the outer query over multiple columns returned different
results when a constant was used instead of one of the
dependant columns. (Bug#18925)
When performing a GROUP_CONCAT(), the
server transformed BLOB columns
VARCHAR columns, which could cause
erroneous results when using Connector/J and possibly other
MySQL APIs. (Bug#16712)
The type of the value returned by the
VARIANCE() function varied according to the
type of the input value. The function should always return a
DOUBLE value. (Bug#10966)
Performing an INSERT on a view that was
defined using a SELECT that specified a
collation and a column alias caused the server to crash (Bug#21086).
A query of the form shown here caused the server to crash:
SELECT * FROM t1 NATURAL JOIN (
t2 JOIN (
t3 NATURAL JOIN t4,
t5 NATURAL JOIN t6
)
ON (t3.id3 = t2.id3 AND t5.id5 = t2.id5)
);
NDB Cluster (Direct APIs): Invoking the MGM
API function ndb_mgm_listen_event() caused
a memory leak. (Bug#21671)
NDB Cluster (Direct APIs): The MGM API
function ndb_logevent_get_fd() was not
actually implemented. (Bug#21129)
A memory leak was found when running
ndb_mgm -e "SHOW". (Bug#21670)
NDB Cluster: Restarting a data node while
DDL operations were in progress on the cluster could cause
other data nodes to fail. This could also lead to
mysqld hanging or crashing under some
circumstances. (Bug#21017, Bug#21050)
NDB Cluster: An issue that arose from a
patch for Bug#19852 made in MySQL 5.0.23 was corrected. (See
Section聽E.1.6, 鈥淐hanges in release 5.0.23 (Not released)鈥.)
NDB Cluster: The management client
ALL STATUS command could sometimes report
the status of some data nodes incorrectly. (Bug#13985)
NDB Cluster: Some queries involving joins
on very large NDB tables could crash the
MySQL server. (Bug#21059)
NDB Cluster: SELECT ... FOR
UPDATE failed to lock the selected rows. (Bug#18184)
NDB Cluster: A Cluster whose storage nodes
were installed from the
MySQL-ndb-storage-
RPMs could not perform *CREATE or
ALTER operations that made use of
non-default character sets or collations. (Bug#14918)
NDB Cluster: REPLACE
statements did not work correctly on an NDB
table having both a primary key and a unique key. In such
cases, proper values were not set for columns which were not
explicitly referenced in the statement. (Bug#20728)
NDB Cluster: Trying to create or drop a
table while a node was restarting caused the node to crash.
This is now handled by raising an error. (Bug#18781)
NDB Cluster: Running
ndbd
--nowait-nodes=
where idid was the node ID of a node
that was already running would fail with an invalid error
message. (Bug#20419)
NDB Cluster: Incorrect values were inserted
into AUTO_INCREMENT columns of tables
restored from a cluster backup. (Bug#20820)
NDB Cluster: When attempting to restart the
cluster following a data import, the cluster would fail during
Phase 4 of the restart with Error 2334: Job buffer
congestion. (Bug#20774)
NDB Cluster: A node failure during a scan
could sometime cause the node to crash when restarting too
quickly following the failure. (Bug#20197)
NDB Cluster: It was possible to use port
numbers greater than 65535 for ServerPort
in the config.ini file. (Bug#19164)
NDB Cluster: Under certain circumstances, a
node that was shut down then restarted could hang during the
restart. (Bug#18863)
NDB Cluster (Replication): In some cases, a
large number of MySQL servers sending requests to the cluster
simultaneously could cause the cluster to crash. This could
also be triggered by many NDB API clients making simultaneous
event subscriptions or unsubscriptions. (Bug#20683)
NDB Cluster (Direct APIs):
NdbScanOperation::readTuples() and
NdbIndexScanOperation::readTuples() ignored
the batch parameter. (Bug#20252)
The implementation for UNCOMPRESS() did not
indicate that it could return NULL, causing
the optimizer to do the wrong thing. (Bug#18539)
TIMESTAMPDIFF() examined only the date and
ignored the time when the requested difference unit was months
or quarters. (Bug#16226)
perror did not properly report NDB error codes. (Bug#16561)
mysqlimport sends a set
@@character_set_database=binary statement to the
server, but this is not understood by pre-4.1 servers. Now
mysqlimport encloses the statement within a
/*!40101 ... */ comment so that old servers
will ignore it. (Bug#15690)
The character set was not being properly initialized for
CAST() with a type like CHAR(2)
BINARY, which resulted in incorrect results or even
a server crash. (Bug#17903)
For ODBC compatibility, MySQL supports use of WHERE
for
col_name IS NULLDATE or DATETIME columns
that are NOT NULL, to allow column values
of '0000-00-00' or '0000-00-00
00:00:00' to be selected. However, this was not
working for WHERE clauses in
DELETE statements. (Bug#8143)
The --master-data option for
mysqldump requires certain privileges, but
mysqldump generated a truncated dump file
without producing an appropriate error message or exit status
if the invoking user did not have those privileges. (Bug#21215)
ALTER VIEW did not retain existing values
of attributes that had been originally specified but were not
changed in the ALTER VIEW statement. (Bug#21080)
mysql crashed for very long arguments to
the connect command. (Bug#21042)
perror crashed on Solaris due to
NULL return value of
strerror() system call. (Bug#20145)
The query command for
mysqltest did not work. (Bug#19890)
For certain queries, the server incorrectly resolved a reference to an aggregate function and crashed. (Bug#20868)
When executing a SELECT with ORDER
BY on a view that is constructed from a
SELECT statement containing a stored
function, the stored function was evaluated too many times.
(Bug#19862)
Subqueries on INFORMATION_SCHEMA tables
could erroneously return an empty result. (Bug#21231)
On 64-bit Windows, a missing table generated error 1017, not the correct value of 1146. (Bug#21396)
The same trigger error message was produced under two conditions: The trigger duplicated an existing trigger name, or the trigger duplicated an existing combination of action and event. Now different messages are produced for the two conditions so as to be more informative. (Bug#10946)
Multiplication of DECIMAL values could
produce incorrect fractional part and trailing garbage caused
by signed overflow. (Bug#20569)
A subquery that contained LIMIT
could return more
than one row. (Bug#20519)
N,1
DESCRIBE returned the type
BIGINT for a column of a view if the column
was specified by an expression over values of the type
INT. (Bug#19714)
Multiple invocations of the REVERSE()
function could return different results. (Bug#18243)
Using > ALL with subqueries that return
no rows yielded incorrect results under certain circumstances
due to incorrect application of MIN()/MAX()
optimization. (Bug#18503)
Using ANY with 鈥non-table鈥
subqueries such as SELECT 1 yielded
incorrect results under certain circumstances due to incorrect
application of MIN()/MAX() optimization.
(Bug#16302)
When a row was inserted through a view but did not specify a value for a column that had no default value in the base table, no warning or error occurred. Now a warning occurs, or an error in strict SQL mode. (Bug#16110)
The use of WHERE in col_name
IS NULLSELECT statements
reset the value of LAST_INSERT_ID() to
zero. (Bug#14553)
The server crashed when using the range access method to
execut a subquery with a ORDER BY DESC
clause. (Bug#20869)
Use of the join cache in favor of an index for ORDER
BY operations could cause incorrect result sorting.
(Bug#17212)
A user-defined function that is called on each row of a
returned result set, could receive an
in_null state that is set, if it was set
previously. Now, the is_null state is reset
to false before each invocation of a UDF. (Bug#19904)
Referring to a stored function qualified with the name of one database and tables in another database caused a 鈥table doesn't exist鈥 error. (Bug#18444)
For NDB and possibly
InnoDB tables, a BEFORE
UPDATE trigger could insert incorrect values. (Bug#18437)
Triggers on tables in the mysql database
caused a server crash. Triggers for tables in this database
now are disallowed. (Bug#18361)
The length of the pattern string prefix for
LIKE operations was calculated incorrectly
for multi-byte character sets. As a result, the scanned range
was wider than necessary if the prefix contained any
multi-byte characters, and rows could be missing from the
result set. (Bug#16674, Bug#18359)
For very complex SELECT statements could
create temporary tables that were too big, but for which the
temporary files did not get removed, causing subsequent
queries to fail. (Bug#11824)
For spatial data types, the server formerly returned these as
VARSTRING values with a binary collation.
Now the server returns spatial values as
BLOB values. (Bug#10166)
Using SELECT and a table join while running
a concurrent INSERT operation would join
incorrect rows. (Bug#14400)
Using SELECT on a corrupt
MyISAM table using the dynamic record
format could cause a server crash. (Bug#19835)
Using tables from MySQL 4.x in MySQL 5.x, in particular those
with VARCHAR fields and using
INSERT DELAYED to update data in the table
would result in either data corruption or a server crash. (Bug#16611, Bug#16218, Bug#17294)
Checking a MyISAM table (using
CHECK TABLE) having a spatial index and
only one row would wrongly indicate that the table was
corrupted. (Bug#17877)
SHOW GRANTS FOR CURRENT_USER did not return
definer grants when executed in DEFINER
context (such as within a stored prodedure defined with
SQL SECURITY DEFINER), it returned the
invoker grants. (Bug#15298)
For SELECT ... FOR UPDATE statements that
used DISTINCT or GROUP
BY over all key parts of a unique index (or primary
key), the optimizer unnecessarily created a temporary table,
thus losing the linkage to the underlying unique index values.
This caused a Result set not updatable
error. (The temporary table is unnecessary because under these
circumstances the distinct or grouped columns must also be
unique.) (Bug#16458)
The first time a user who had been granted the CREATE
ROUTINE privilege used that privilege to create a
stored function or procedure, the Password
column in that user's row in the mysql.user
table was set to NULL. (Bug#19857)
Creation of a view as a join of views or tables could fail if the views or tables are in different databases. (Bug#20482)
Use of MIN() or MAX()
with GROUP BY on a ucs2
column could cause a server crash. (Bug#20076)
INSERT INTO ... SELECT ... LIMIT 1 could be
slow because the LIMIT was ignored when
selecting candidate rows. (Bug#9676)
Certain queries having a WHERE clause that
included conditions on multi-part keys with more than 2 key
parts could produce incorrect results and send
[Note] Use_count: Wrong count for key
at... messages to STDERR. (Bug#16168)
The mysql_list_fields() C API function
returned the incorrect table name for views. (Bug#19671)
A cast problem caused incorrect results for prepared statements that returned float values when MySQL was compiled with gcc 4.0. (Bug#19694)
Updating a column of a FEDERATED table to
NULL sometimes failed. (Bug#16494)
This is a bugfix release for the current production release family. It replaces MySQL 5.0.24.
Changes from 5.0.24 to 5.0.24a:
MySQL 5.0.24 introduced an ABI incompatibility, which this release reverts. Programs compiled against 5.0.24 are not compatible with any other version and must be recompiled. (Bug#21543)
Closing of temporary tables failed if binary logging was not enabled. (Bug#20919)
For statements that have a DEFINER clause
such as CREATE TRIGGER or CREATE
VIEW, long usernames or hostnames could cause a
buffer overflow. (Bug#16899)
Pathname separator and device characters were not correctly parameterized for NetWare, causing mysqld startup errors. (Bug#21537)
mysqld could crash when closing temporary tables. (Bug#21582)
In addition, the following problem affected the initial build of 5.0.24a, but has been corrected in the RPM files now available:
The shared compatibility RPM files were missing some files. (Bug#22251)
This is a bugfix release for the current production release family.
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:
The LEFT() and RIGHT()
functions return NULL if any argument is
NULL. (Bug#11728)
In the INFORMATION_SCHEMA.ROUTINES table
the ROUTINE_DEFINITION column now is
defined as NULL rather than NOT
NULL. Also, NULL rather than the
empty string is returned as the column value if the user does
not have sufficient privileges to see the routine definition.
(Bug#20230)
Bugs fixed:
Security fix: If a user has
access to MyISAM table
t, that user can create a
MERGE table m
that accesses t. However, if the
user's privileges on t are
subsequently revoked, the user can continue to access
t by doing so through
m. If this behavior is undesirable,
you can start the server with the new
--skip-merge option to disable the
MERGE storage engine. (Bug#15195)
Using the extended syntax for TRIM()
鈥 that is, TRIM(... FROM ...) 鈥
in a SELECT statement defining a view
caused an invalid syntax error when selecting from the view.
(Bug#17526)
Assignments of values to variables of type
TEXT were handled incorrectly in stored
routines. (Bug#17225)
NDB Cluster: The repeated creating and
dropping of a table would eventually lead to
NDB Error 826, Too many tables
and attributes ... Insufficient space. (Bug#20847)
Issuing a SHOW CREATE FUNCTION or
SHOW CREATE PROCEDURE statement without
sufficient privileges could crash the mysql
client. (Bug#20664)
In a view defined with SQL SECURITY
DEFINER, the CURRENT_USER()
function returned the invoker, not the definer. (Bug#20570)
DATE_ADD() and
DATE_SUB() returned NULL
when the result date was on the day
'9999-12-31'. (Bug#12356)
For a DATE parameter sent via a
MYSQL_TIME data structure,
mysql_stmt_execute() zeroed the hour,
minute, and second members of the structure rather than
treating them as read-only. (Bug#20152)
The DATA DIRECTORY table option did not
work for TEMPORARY tables. (Bug#8706)
With the auto_increment_increment system
variable set larger than 1, if the next generated
AUTO_INCREMENT value would be larger than
the column's maximum value, the value would be clipped down to
that maximum value and inserted, even if the resulting value
would not be in the generated sequence. This could cause
problems for master-master replication. Now the server clips
the value down to the previous value in the sequence, which
correctly produces a duplicate-key error if that value already
exists in the column. (Bug#20524)
If a table on a slave server had a higher
AUTO_INCREMENT counter than the
corresponding master table (even though all rows of the two
tables were identical), in some cases
REPLACE or INSERT ... ON DUPLICATE
KEY UPDATE would not replicate properly using
statement-based logging. (Different values would be inserted
on the master and slave.) (Bug#20188)
Under heavy load (executing more than 1024 simultaneous complex queries), a problem in the code that handles internal temporary tables could lead to writing beyond allocated space and memory corruption. Use of more than 1024 simultaneous cursors server wide also could lead to memory corruption. (This applies both to stored procedure and C API cursors.) (Bug#21206)
A race condition during slave server shutdown caused an assert failure. (Bug#20850)
mysqldump produced a malformed dump file when dumping multiple databases that contained views. (Bug#20221)
SELECT @@INSERT_ID displayed a value
unrelated to a preceding SET INSERT_ID. (It
was returning LAST_INSERT_ID instead.) (Bug#20392)
Performing INSERT ... SELECT ... JOIN ...
USING without qualifying the column names caused
ERROR 1052 "column 'x' in field list is
ambiguous" even in cases where the column references
were unambiguous. (Bug#18080)
Bug#10952 may cause inadvertent data loss. A fix for this bug was included in MySQL 5.0.23, but the approach used caused a loss of intended functionality. Because of this, that fix has been reverted in MySQL 5.0.24. As a consequence, the risk of inadvertent data loss still exists (see Bug#10952).
A SELECT that used a subquery in the
FROM clause that did not select from a
table failed when the subquery was used in a join. (Bug#21002)
REPLACE ... SELECT for a view required the
INSERT privilege for tables other than the
table being modified. (Bug#20989)
The mysql client did not understand
help commands that had spaces at the end.
(Bug#20328)
Failure to account for a NULL table pointer
on big-endian machines could cause a server crash during type
conversion. (Bug#21135)
mysqldump sometimes did not select the correct database before trying to dump views from it, resulting in an empty result set that caused mysqldump to die with a segmentation fault. (Bug#21014)
MySQL 5.0.23 was never officially released.
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:
NDB Cluster: The limit of 2048 ordered
indexes per cluster has been lifted. There is now no upper
limit on the number of ordered indexes (including
AUTO_INCREMENT columns) that may be used.
(Bug#14509)
NDB Cluster: The status variables
Ndb_connected_host and
Ndb_connected_port were renamed to
Ndb_config_from_host and
Ndb_config_from_port, respectively.
The mysql_upgrade command has been converted from a shell script to a C program, so it is available on non-Unix systems such as Windows. This program should be run for each MySQL upgrade. See Section聽5.5.8, 鈥mysql_upgrade 鈥 Check Tables for MySQL Upgrade鈥.
Binary distributions that include SSL support now are built using yaSSL when possible.
Added the --ssl-verify-server-cert option to
MySQL client programs. This option causes the server's Common
Name value in its certificate to be verified against the
hostname used when connecting to the server, and the
connection is rejected if there is a mismatch. Added
MYSQL_OPT_SSL_VERIFY_SERVER_CERT option for
the mysql_options() C API function to
enable this verification. This feature can be used to prevent
man-in-the-middle attacks. Verification is disabled by
default. (Bug#17208)
Added the ssl_ca,
ssl_capath, ssl_cert,
ssl_cipher, and ssl_key
system variables, which display the values given via the
corresponding command options. See
Section聽5.8.7.3, 鈥淪SL Command Options鈥. (Bug#19606)
Added the log_queries_not_using_indexes
system variable. (Bug#19616)
Added the --angel-pid-file option to
mysqlmanager for specifying the file in
which the angel process records its process ID when
mysqlmanager runs in daemon mode. (Bug#14106)
The ONLY_FULL_GROUP_BY SQL mode now also
applies to the HAVING clause. That is,
columns not named in the GROUP BY clause
cannot be used in the HAVING clause if not
used in an aggregate function. (Bug#18739)
SQL syntax for prepared statements now supports
ANALYZE TABLE, OPTIMIZE
TABLE, and REPAIR TABLE. (Bug#19308)
The bundled yaSSL library was upgraded to version 1.3.5. This improves handling of certain problems with SSL-related command options. (Bug#17737)
Added the --set-charset option to
mysqlbinlog to allow the character set to
be specified for processing binary log files. (Bug#18351)
For a table with an AUTO_INCREMENT column,
SHOW CREATE TABLE now shows the next
AUTO_INCREMENT value to be generated. (Bug#19025)
It is now possible to use
NEW.
values within triggers as var_nameINOUT parameters
to stored procedures. (Bug#14635)
The mysqldumpslow script has been moved from client RPM packages to server RPM packages. This corrects a problem where mysqldumpslow could not be used with a client-only RPM install, because it depends on my_print_defaults which is in the server RPM. (Bug#20216)
The mysql_get_ssl_cipher() C API function
was added.
Bugs fixed:
An invalid GRANT statement for which
Ok was returned on a replication master
caused an error on the slave and replication to fail. (Bug#6774)
Use of the --no-pager option caused
mysql to crash. (Bug#19363)
mysqlcheck tried to check views instead of ignoring them. (Bug#16502)
Long multiple-row INSERT statements could
take a very long time for some multi-byte character sets. (Bug#15811)
Re-executing a stored procedure with a complex stored procedure cursor query could lead to a server crash. (Bug#15217)
Views created from prepared statements inside of stored
procedures were created with a definition that included both
SQL_CACHE and
SQL_NO_CACHE. (Bug#17203)
mysqldump did not dump the table name
correctly for some table identifiers that contained unusual
characters such as 鈥:鈥. (Bug#19479)
mysqldump would not dump views that had
become invalid because a table named in the view definition
had been dropped. Instead, it quit with an error message. Now
you can specify the --force option to cause
mysqldump to keep going and write a SQL
comment containing the view definition to the dump output.
(Bug#17371)
The WITH CHECK OPTION was not enforced when
a REPLACE statement was executed against a
view. (Bug#19789)
The use of MIN() and
MAX() on columns with an index prefix
produced incorrect results in some queries. (Bug#18206)
Concatenating the results of multiple constant subselects produced incorrect results. (Bug#16716)
A Table ... doesn't exist error could occur for statements that called a function defined in another database. (Bug#17199)
A buffer overwrite error in Instance Manager caused a crash. (Bug#20622)
Re-execution of a prepared multiple-table
DELETE statement that involves a trigger or
stored function can result in a server crash. (Bug#19634)
On Windows, corrected a crash stemming from differences in Visual C runtime library routines from POSIX behavior regarding invalid file descriptors. (Bug#18275)
Multiple-table updates with FEDERATED
tables could cause a server crash. (Bug#19773)
On Windows, terminating mysqld with Control-C could result in a crash during shutdown. (Bug#18235)
On Windows, removal of binary log files would fail if the files were already open. (Bug#19208)
mysqldump produced garbled output for view definitions. (Bug#18462)
The omission of leading zeros in dates could lead to erroneous results when these were compared with the output of certain date and time functions. (Bug#16377)
An invalid comparison between keys with index prefixes over
multi-byte character fields could lead to incorrect result
sets if the selected query execution plan used a range scan by
an index prefix over a UTF8 character
field. This also caused incorrect results under similar
circumstances with many other character sets. (Bug#14896)
NDB Cluster: Cluster system status
variables were not updated. (Bug#11459)
NDB Cluster: The cluster's data nodes would
fail while trying to load data when
NoOfFrangmentLogFiles was equal to 1. (Bug#19894)
NDB Cluster: A problem with error handling
when ndb_use_exact_count was enabled could
lead to incorrect values returned from queries using
COUNT(). A warning is now returned in such
cases. (Bug#19202)
NDB Cluster: Restoring a backup made using
ndb_restore failed when the backup had been
taken from a cluster whose data memory was full. (Bug#19852)
NDB Cluster: TEXT
columns in Cluster tables having both an explicit primary key
and a unique key were not correctly updated by
REPLACE statements. (Bug#19906)
NDB Cluster: An internal formatting error
caused some management client error messages to be unreadable.
(Bug#20016)
NDB Cluster: Running management client
commands while mgmd was in the process of
disconnecting could cause the management server to fail. (Bug#19932)
NDB Cluster (NDBAPI): Update operations on
blobs were not checked for illegal operations.
Note: Read locks with blob update operations are now upgraded from read committed to read shared.
NDB Cluster: The management client
ALL STOP command shut down
mgmd processes (as well as
ndbd processes). (Bug#18966)
NDB Cluster: LOAD DATA
LOCAL failed to ignore duplicate keys in Cluster
tables. (Bug#19496)
NDB Cluster: Repeated
CREATE - INSERT -
DROP operations tables could in some
circumstances cause the MySQL table definition cache to become
corrupt, so that some mysqld processes
could access table information but others could not. (Bug#18595)
NDB Cluster: The mgm
client command ALL CLUSTERLOG
STATISTICS=15; had no effect. (Bug#20336)
NDB Cluster: TRUNCATE
TABLE failed to reset the
AUTO_INCREMENT counter. (Bug#18864)
NDB Cluster: The failure of a data node
when preparing to commit a transaction (that is, while the
node's status was CS_PREPARE_TO_COMMIT)
could cause the failure of other cluster data nodes. (Bug#20185)
NDB Cluster: Renaming a table in such a way
as to move it to a different database failed to move the
table's indexes. (Bug#19967)
NDB Cluster: Resources for unique indexes
on Cluster table columns were incorrectly allocated, so that
only one-fourth as many unique indexes as indicated by the
value of UniqueHashIndexes could be
created. (Bug#19623)
NDB Cluster: Running ALL
START in the NDB management
client or restarting multiple nodes simultaneously could under
some circumstances cause the cluster to crash. (Bug#19930)
NDB Cluster (NDBAPI): On big-endian
platforms, NdbOperation::write_attr() did
not update 32-bit fields correctly. (Bug#19537)
NDB Cluster: Some queries having a
WHERE clause of the form c1=val1
OR c2 LIKE 'val2' were not evaluated correctly. (Bug
# 17421)
NDB Cluster: Using 鈥stale鈥
mysqld .FRM files
could cause a newly-restored cluster to fail. This situation
could arise when restarting a MySQL Cluster using the
--intial option while leaving connected
mysqld processes running. (Bug#16875)
NDB Cluster: Repeated use of the
SHOW and ALL STATUS
commands in the ndb_mgm client could cause
the mgmd process to crash. (Bug#18591)
NDB Cluster: An issue with
ndb_mgmd prevented more than 27
mysqld processes from connecting to a
single cluster at one time. (Bug#17150)
NDB Cluster: Data node failures could cause
excessive CPU usage by ndb_mgmd. (Bug#13987)
NDB Cluster: TRUNCATE
failed on tables having BLOB or
TEXT columns with the error Lock
wait timeout exceeded. (Bug#19201)
NDB Cluster: Stopping multiple nodes could
cause node failure handling not to be completed. (Bug#19039)
NDB Cluster: ndbd could
sometimes fail to start with the error Node failure
handling not completed following a graceful
restart. (Bug#18550)
NDB Cluster: Backups could fail for large
clusters with many tables, where the number of tables
approached MaxNoOfTables. (Bug#17607)
On Windows, temporary tables containing
鈥:鈥 in the name could not be
created. (Bug#20616)
The --core-file-size option for
mysqld_safe was effective only for
root. (Bug#17353)
Some queries that used ORDER BY and
LIMIT performed quickly in MySQL 3.23, but
slowly in MySQL 4.x/5.x due to an optimizer problem. (Bug#4981)
mysql_upgrade was missing from binary MySQL distributions. (Bug#18516, Bug#20403)
Queries using an indexed column as the argument for the
MIN() and MAX()
functions following an ALTER TABLE .. DISABLE
KEYS statement returned Got error 124
from storage engine until ALTER TABLE ...
ENABLE KEYS was run on the table. (Bug#20357)
A number of dependency issues in the RPM
bench and test packages
caused installation of these packages to fail. (Bug#20078)
Nested natural joins worked executed correctly when executed
as a non-prepared statement could fail with an
Unknown column ' error when executed as a prepared
statement, due to a name resolution problem. (Bug#15355)
col_name'
in 'field list'
GROUP BY on an expression that contained a
cast to DECIMAL produced an incorrect
result. (Bug#19667)
The max_length metadata value for columns
created from CONCAT() could be incorrect
when the collation of an argument differed from the collation
of the CONCAT() itself. In some contexts
such as UNION, this could lead to
truncation of the column contents. (Bug#15962)
The MD5() and SHA() functions treat their arguments as case-sensitive strings. But when they are compared, their arguments were compared as case-insensitive strings, which leads to two function calls with different arguments (and thus different results) compared as being identical. This can lead to a wrong decision made in the range optimizer and thus to an incorrect result set. (Bug#15351)
For BOOLEAN mode full-text searches on
non-indexed columns, NULL rows generated by
a LEFT JOIN caused incorrect query results.
(Bug#14708)
BIT columns in a table could cause joins
that use the table to fail. (Bug#18895)
A UNION over more than 128
SELECT statements that use an aggregate
function failed. (Bug#18175)
InnoDB unlocked its data directory before
committing a transaction, potentially resulting in
non-recoverable tables if a server crash occurred before the
commit. (Bug#19727)
Multiple-table DELETE statements containing
a subquery that selected from one of the tables being modified
caused a server crash. (Bug#19225)
With settings of read_buffer_size >= 2G
and read_rnd_buffer_size >=2G,
LOAD DATA INFILE failed with no error
message or caused a server crash for files larger than 2GB.
(Bug#12982)
REPLACE statements caused activation of
UPDATE triggers, not
DELETE and INSERT
triggers. (Bug#13479)
The thread for INSERT DELAYED rows was
maintaining a separate AUTO_INCREMENT
counter, resulting in incorrect values being assigned if
DELAYED and non-DELAYED
inserts were mixed. (Bug#20195)
mysqldump wrote an extra pair of
DROP DATABASE and CREATE
DATABASE statements if run with the
--add-drop-database option and the database
contained views. (Bug#17201)
On 64-bit Windows systems, REGEXP for
regular expressions with exactly 31 characters did not work.
(Bug#19407)
For mysqld, Valgrind revealed problems that were corrected: A dangling stack pointer being overwritten (Bug#20769); possible uninitialized data in a string comparison (Bug#20783); memory corruption in replication slaves when switching databases (Bug#19022); syscall write parameter pointing to uninitialized byte (Bug#20579).
For ndb_mgmd, Valgrind revealed problems that were corrected: A memory leak (Bug#19318); a dependency on an uninitialized variable (Bug#20333).
An update that used a join of a table to itself and modified the table on both sides of the join reported the table as crashed. (Bug#18036)
SSL connections using yaSSL on OpenBSD could fail. (Bug#19191)
On Windows, multiple clients simultaneously attempting to
perform ALTER TABLE operations on an
InnoDB table could deadlock. (Bug#17264)
The fill_help_tables.sql file did not
load properly if the ANSI_QUOTES SQL mode
was enabled. (Bug#20542)
The fill_help_tables.sql file did not
contain a SET NAMES 'utf8' statement to
indicate its encoding. This caused problems for some settings
of the MySQL character set such as big5.
(Bug#20551)
The MySQL server startup script /etc/init.d/mysql (created from mysql.server) is now marked to ensure that the system services ypbind, nscd, ldap, and NTP are started first (if these are configured on the machine). (Bug#18810)
MERGE tables did not work reliably with
BIT columns. (Bug#19648)
For a reference to a non-existent index in FORCE
INDEX, the error message referred to a column, not
an index. (Bug#17873)
Some yaSSL public function names conflicted with those from
OpenSSL, causing conflicts for applications that linked
against both OpenSSL and a version of
libmysqlclient that was built with yaSSL
support. The yaSSL public functions now are renamed to avoid
this conflict. (Bug#19575)
CHECK TABLE on a MyISAM
table briefly cleared its AUTO_INCREMENT
value, while holding only a read lock. Concurrent inserts to
that table could use the wrong
AUTO_INCREMENT value. CHECK
TABLE no longer modifies the
AUTO_INCREMENT value. (Bug#19604)
If there is a global read lock, CREATE
DATABASE, RENAME DATABASE, and
DROP DATABASE could deadlock. (Bug#19815)
On Linux, libmysqlclient when compiled with
yaSSL using the icc compiler had a spurious
dependency on C++ libraries. (Bug#20119)
Using CONCAT(@, where
user_var,
col_name)col_name is a column in an
INFORMATION_SCHEMA table, could cause
erroneous duplication of data in the query result. (Bug#19599)
Results from INFORMATION_SCHEMA.SCHEMATA
could contain uppercase information when
lower_case_table_names was not 0. (Bug#17661)
Grant table modifications sometimes did not refresh the
in-memory tables if the hostname was '' or
not specified. (Bug#16297)
Invalid escape sequences in option files caused MySQL programs that read them to abort. (Bug#15328)
InnoDB did not increment the
handler_read_prev counter. (Bug#19542)
Race conditions on certain platforms could cause the Instance Manager to fail to initialize. (Bug#19391)
ALTER TABLE on a table created prior to
5.0.3 would cause table corruption if the ALTER
TABLE did one of the following:
Change the default value of a column.
Change the table comment.
Change the table password.
An ALTER TABLE operation that does not need
to copy data, when executed on a table created prior to MySQL
4.0.25, could result in a server crash for subsequent accesses
to the table. (Bug#19192)
The binary log lacked character set information for table name when dropping temporary tables. (Bug#14157)
A B-TREE index on a
MEMORY table erroneously reported duplicate
entry error for multiple NULL values. (Bug#12873)
Race conditions on certain platforms could cause the Instance Manager to try to restart the same instance multiple times. (Bug#18023)
A CREATE TABLE statement that created a
table from a materialized view did not inherit default values
from the underlying table. (Bug#19089)
The COM_STATISTICS command was changed in
5.0.3 to display session status variable values rather than
global values. This causes mysqladmin
status information not to be useful for the
Slow queries and Opens
values. Now COM_STATISTICS displays the
global values for Slow queries and
Opens. (Bug#18669)
INFORMATION_SCHEMA.TABLES provided
inconsistent info about invalid views. This could cause server
crashes or result in incorrect data being returned for queries
that attempt to obtain information from
INFORMATION_SCHEMA tables about views using
stored functions. (Bug#18282)
Multiple calls to a stored procedure that selects from
INFORMATION_SCHEMA could cause a server
crash. (Bug#17204)
Premature optimization of nested subqueries in the
FROM clause that refer to aggregate
functions could lead to incorrect results. (Bug#19077)
A view definition that referred to an alias in the
HAVING clause could be saved in the
.frm file with the alias replaced by the
expression that it referred to, causing failure of subsequent
SELECT * FROM
statements.
(Bug#19573)
view_name
Several aspects of view privileges were being checked incorrectly. (Bug#18681, Bug#20363)
A view with a non-existent account in the
DEFINER clause caused SHOW CREATE
VIEW to fail. Now SHOW CREATE
VIEW issues a warning instead. (Bug#14875)
A compatibility issue with NPTL (Native POSIX Thread Library)
on Linux could result in a deadlock with FLUSH TABLES
WITH READ LOCK under some conditions. (Bug#20048)
MyISAM table deadlock was possible if one
thread issued a LOCK TABLES request for
write locks and then an administrative statement such as
OPTIMIZE TABLE, if between the two
statements another client meanwhile issued a multiple-table
SELECT for some of the locked tables. (Bug#16986)
Subqueries that produced a BIGINT UNSIGNED
value were being treated as returning a signed value. (Bug#19700)
The patch for Bug#17164 introduced the problem that some outer joins were incorrectly converted to inner joins. (Bug#19816)
BLOB or TEXT arguments
to or values returned from stored functions were not copied
properly if too long and could become garbled. (Bug#18587)
Selecting data from a MEMORY table with a
VARCHAR column and a
HASH index over it returned only the first
row matched. (Bug#18233)
CREATE TABLE ... SELECT did not always
produce the proper column default value in
TRADITIONAL SQL mode. (Bug#17626)
Privilege checking on the contents of the
INFORMATION_SCHEMA.VIEWS table was
insufficiently restrictive. (Bug#16681)
The result from CONV() is a string, but was
not always treated the same way as a string when converted to
a real value for an arithmetic operation. (Bug#13975)
CREATE TABLE ... SELECT ... statements that
used a stored function explicitly or implicitly (through a
view) resulted in a Table not locked error.
(Bug#12472, Bug#15137)
Within a trigger, SET used the SQL mode of
the invoking statement, not the mode in effect at trigger
creation time. (Bug#6951)
The server no longer uses a signal handler for signal 0 because it could cause a crash on some platforms. (Bug#15869)
Revised memory allocation for local objects within stored functions and triggers to avoid memory leak for repeated function or trigger invocation. (Bug#17260)
EXPLAIN ... SELECT INTO caused the client
to hang. (Bug#15463)
Symlinking .mysql_history to
/dev/null to suppress statement history
saving by mysql did not work.
(mysql deleted the symlink and recreated
.mysql_history as a regular file, and
then wrote history to it.) (Bug#16803)
The basedir and tmpdir
system variables could not be accessed via
@@
syntax. (Bug#1039)
var_name
For certain CREATE VIEW statements, the
server did not detect invalid subqueries within the
SELECT part. (Bug#7549)
The range operator failed and caused a server crash for
clauses of the form
. (Bug#19618)
tbl_name.unsigned_keypart
NOT IN (negative_const,
...)
Returning the value of a system variable from a stored function caused a server crash. (Bug#18037)
Updates to a MEMORY table caused the size
of BTREE indexes for the table to increase.
(Bug#18160)
REPAIR TABLE did not restore the length for
packed keys in tables created under MySQL 4.x, which caused
them to appear corrupt to CHECK TABLE but
not to REPAIR TABLE. (Bug#17810)
Selecting from a view that used GROUP BY on
a non-constant temporal interval (such as
DATE(
could cause a server crash. (Bug#19490)
col) + INTERVAL
TIME_TO_SEC(col) SECOND
An outer join of two views that was written using {
OJ ... } syntax could cause a server crash. (Bug#19396)
LOAD_FILE() returned an error if the file
did not exist, rather than NULL as it
should according to the manual. (Bug#10418)
For certain CREATE TABLE ... SELECT
statements, the selected values were truncated when inserted
into the new table. (Bug#17048)
Use of uninitialized user variables in a subquery in the
FROM clause results in bad entries in the
binary log. (Bug#19136)
In the INFORMATION_SCHEMA.COLUMNS table,
the values for the CHARACTER_MAXIMUM_LENGTH
and CHARACTER_OCTET_LENGTH columns were
incorrect for multi-byte character sets. (Bug#19236)
An entry in the mysql.proc table with an
empty routine name caused access to the
INFORMATION_SCHEMA.ROUTINES table to crash
the server. (Bug#18177)
A range access optimizer heuristic was invalid, causing some queries to be much slower in MySQL 5.0 than in 4.0. (Bug#17379, Bug#18940)
IS_USED_LOCK() could return an incorrect
connection identifier. (Bug#16501)
mysql displayed NULL for
strings that are empty or contain only spaces. (Bug#19564)
Concurrent reading and writing of privilege structures could crash the server. (Bug#16372)
A NUL byte within a comment in a statement
string caused the rest of the string not to be written to the
query log, allowing logging to be bypassed.
(CVE-2006-0903,
Bug#17667)
mysql-test-run.pl started
NDB even for test cases that didn't need
it. (Bug#19083)
SELECT DISTINCT queries sometimes returned
only the last row. (Bug#18068)
Use of CONVERT_TZ() in a stored function or
trigger (or in a stored procedure called from a stored
function or trigger) caused an error. (Bug#11081)
Some queries were slower in 5.0 than in 4.1 because some 4.1 cost-evaluation code had not been merged into 5.0. (Bug#14292)
Index prefixes for utf8
VARCHAR columns did not work for
UPDATE statements. (Bug#19080)
InnoDB does not support
SPATIAL indexes, but did not prevent
creation of such an index. (Bug#15860)
The configuration information for building the embedded server on Windows was missing a file. (Bug#18455)
The parser leaked memory when its stack needed to be extended. (Bug#18930)
When myisamchk needed to rebuild a table,
AUTO_INCREMENT information was lost. (Bug#10405)
LOAD DATA FROM MASTER would fail when
trying to load the INFORMATION_SCHEMA
database from the master, because the
INFORMATION_SCHEMA system database would
already exist on the slave. (Bug#18607)
The binary log would create an incorrect
DROP query when creating temporary tables
during replication. (Bug#17263)
The IN-to-EXISTS
transformation was making a reference to a parse tree fragment
that was left out of the parse tree. This caused problems with
prepared statements. (Bug#18492)
In mysqltest, --sleep=0
had no effect. Now it correctly causes
sleep commands in test case files to sleep
for 0 seconds. (Bug#18312)
Attempting to set the default value of an
ENUM or SET column to
NULL caused a server crash. (Bug#19145)
The sql_notes and
sql_warnings system variables were not
always displayed correctly by SHOW
VARIABLES (for example, they were displayed as
ON after being set to
OFF). (Bug#16195)
The sql_big_selects system variable was not
displayed by SHOW VARIABLES. (Bug#17849)
The system_time_zone and
version_* system variables could not be
accessed via SELECT
@@ syntax. (Bug#12792, Bug#15684)
var_name
Flushing the compression buffer (via FLUSH
TABLE) no longer increases the size of an unmodified
ARCHIVE table. (Bug#19204)
RPM packages had spurious dependencies on Perl modules and other programs. (Bug#13634)
SHOW CREATE TABLE did not display the
AUTO_INCREMENT column attribute if the SQL
mode was MYSQL323 or
MYSQL40. This also affected
mysqldump, which uses SHOW CREATE
TABLE to get table definitions. (Bug#14515)
This is a security fix release for the previous production release family.
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.
Bugs fixed:
Security fix: An
SQL-injection security hole has been found in multi-byte
encoding processing. The bug was in the server, incorrectly
parsing the string escaped with the
mysql_real_escape_string() C API function.
(CVE-2006-2753,
Bug#8378)
This vulnerability was discovered and reported by Josh Berkus
<josh@postgresql.org> and Tom Lane
<tgl@sss.pgh.pa.us> as part of the inter-project
security collaboration of the OSDB consortium. For more
information about SQL injection, please see the following
text.
Discussion: An SQL-injection
security hole has been found in multi-byte encoding
processing. An SQL-injection security hole can include a
situation whereby when a user supplied data to be inserted
into a database, the user might inject SQL statements into the
data that the server will execute. With regards to this
vulnerability, when character set unaware-escaping is used
(for example, addslashes() in PHP), it is
possible to bypass the escaping in some multi-byte character
sets (for example, SJIS, BIG5 and GBK). As a result, a
function such as addslashes() is not able
to prevent SQL-injection attacks. It is impossible to fix this
on the server side. The best solution is for applications to
use character set-aware escaping offered by a function such
mysql_real_escape_string().
However, a bug was detected in how the MySQL server parses the
output of mysql_real_escape_string(). As a
result, even when the character set-aware function
mysql_real_escape_string() was used, SQL
injection was possible. This bug has been fixed.
Workarounds: If you are
unable to upgrade MySQL to a version that includes the fix for
the bug in mysql_real_escape_string()
parsing, but run MySQL 5.0.1 or higher, you can use the
NO_BACKSLASH_ESCAPES SQL mode as a
workaround. (This mode was introduced in MySQL 5.0.1.)
NO_BACKSLASH_ESCAPES enables an SQL
standard compatibility mode, where backslash is not considered
a special character. The result will be that queries will
fail.
To set this mode for the current connection, enter the following SQL statement:
SET sql_mode='NO_BACKSLASH_ESCAPES';
You can also set the mode globally for all clients:
SET GLOBAL sql_mode='NO_BACKSLASH_ESCAPES';
This SQL mode also can be enabled automatically when the
server starts by using the command-line option
--sql-mode=NO_BACKSLASH_ESCAPES or by setting
sql-mode=NO_BACKSLASH_ESCAPES in the server
option file (for example, my.cnf or
my.ini, depending on your system).
The dropping of a temporary table whose name contained a
backtick ('`') character was not correctly
written to the binary log, which also caused it not to be
replicated correctly. (Bug#19188)
The patch for Bug#8303 broke the fix for Bug#8378 and was
undone. (In string literals with an escape character
(\) followed by a multi-byte character that
has a second byte of (\), the literal was
not interpreted correctly. The next byte now is escaped, not
the entire multi-byte character. This means it a strict
reverse of the mysql_real_escape_string()
function.)
The client libraries had not been compiled for position-indpendent code on Solaris-SPARC and AMD x86_64 platforms. (Bug#13159, Bug#14202, Bug#18091)
Running myisampack followed by
myisamchk with the
--unpack option would corrupt the
auto_increment key. (Bug#12633)
This is a bugfix release for the current production release family.
This MySQL 5.0.21 release includes the patches for recently
reported security vulnerabilites in the MySQL client-server
protocol. We would like to thank Stefano Di Paola
<stefano.dipaola@wisec.it> for finding and reporting
these to us.
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:
Security enhancement: Added
the global max_prepared_stmt_count system
variable to limit the total number of prepared statements in
the server. This limits the potential for denial-of-service
attacks based on running the server out of memory by preparing
huge numbers of statements. The current number of prepared
statements is available through the
prepared_stmt_count system variable. (Bug#16365)
The
MySQL-shared-compat-5.0.
shared compatibility RPMs no longer contain libraries for
MySQL 5.1. This avoids a conflict because the 5.0 and 5.1
libraries share the same soname number. It contains libraries
for 3.23, 4.0, 4.1, and 5.0. (Bug#19288)
X-.i386.rpm
Creating a table in an InnoDB database with a column name that
matched the name of an internal InnoDB column (including
DB_ROW_ID, DB_TRX_ID,
DB_ROLL_PTR and
DB_MIX_ID) would cause a crash. MySQL now
returns error 1005 (cannot create table) with
errno set to -1. (Bug#18934)
NDB Cluster: It is now possible to perform
a partial start of a cluster. That is, it is now possible to
bring up the cluster without running ndbd --initial on
all configured data nodes first. (Bug#18606)
NDB Cluster: A new
--nowait-nodes startup option for
ndbd makes it possible to
鈥skip鈥 specific nodes without waiting for them to
start when starting the cluster. See
Section聽15.6.5.2, 鈥淐ommand Options for ndbd鈥.
NDB Cluster: It is now possible to install
MySQL with Cluster support to a non-default location and
change the search path for font description files using either
the --basedir or
--character-sets-dir options. (Previously in
MySQL 5.0, ndbd searched only the default
path for character sets.)
In result set metadata, the
MYSQL_FIELD.length value for
BIT columns now is reported in number of
bits. For example, the value for a BIT(9)
column is 9. (Formerly, the value was related to number of
bytes.) (Bug#13601)
The default for the
innodb_thread_concurrency system variable
was changed to 8. (Bug#15868)
Bugs fixed:
Security fix: A malicious
client, using specially crafted invalid login or
COM_TABLE_DUMP packets was able to read
uninitialized memory, which potentially, though unlikely in
MySQL, could have led to an information disclosure.
(CVE-2006-1516,
CVE-2006-1517)
Thanks to Stefano Di Paola
<stefano.dipaola@wisec.it> for finding and
reporting this bug.
Security fix: A malicious
client, using specially crafted invalid
COM_TABLE_DUMP packets was able to trigger
an exploitable buffer overflow on the server.
(CVE-2006-1518)
Thanks to Stefano Di Paola
<stefano.dipaola@wisec.it> for finding and
reporting this bug.
Security fix: Invalid
arguments to DATE_FORMAT() caused a server
crash.
(CVE-2006-3469,
Bug#20729) Thanks to Jean-David Maillefer for discovering and
reporting this problem to the Debian project and to Christian
Hammers from the Debian Team for notifying us of it.
NDB Cluster: A simultaneous DROP
TABLE and table update operation utilising a table
scan could trigger a node failure. (Bug#18597)
mysql-test-run could not be run as
root. (Bug#17002)
MySQL-shared-compat-5.0.13-0.i386.rpm,
MySQL-shared-compat-5.0.15-0.i386.rpm,
MySQL-shared-compat-5.0.18-0.i386.rpm,
MySQL-shared-compat-5.0.19-0.i386.rpm,
MySQL-shared-compat-5.0.20-0.i386.rpm, and
MySQL-shared-compat-5.0.20a-0.i386.rpm
incorrectly depended on glibc 2.3 and could
not be installed on a glibc 2.2 system.
(Bug#16539)
IA-64 RPM packages for Red Hat and SuSE Linux that were built with the icc compiler incorrectly depended on icc runtime libraries. (Bug#16662)
After calling FLUSH STATUS, the
max_used_connections variable did not
increment for existing connections and connections which use
the thread cache. (Bug#15933)
MySQL would not compile on Linux distributions that use the tinfo library. (Bug#18912)
Within a trigger, CONNECTION_ID() did not
return the connection ID of the thread that caused the trigger
to be activated. (Bug#16461)
The yaSSL library returned a cipher list in a manner incompatible with OpenSSL. (Bug#18399)
For single-SELECT union constructs of the
form (SELECT ... ORDER BY
order_list1 [LIMIT
n]) ORDER BY
order_list2, the ORDER
BY lists were concatenated and the
LIMIT clause was ignored. (Bug#18767)
CREATE VIEW statements would not be
replicated to the slave if the
--replicate-wild-ignore-table rule was
enabled. (Bug#18715)
Index corruption could occur in cases when
key_cache_block_size was not a multiple of
myisam_block_size (for example, with
key_cache_block_size=1536 and
myisam_block_size=1024). (Bug#19079)
LAST_INSERT_ID() in a stored function or
trigger returned zero. . (Bug#15728)
Use of CONVERT_TZ() in a view definition
could result in spurious syntax or access errors. (Bug#15153)
UNCOMPRESS(NULL) could cause subsequent
UNCOMPRESS() calls to return
NULL for legal non-NULL
arguments. (Bug#18643)
Conversion of a number to a CHAR UNICODE
string returned an invalid result. (Bug#18691)
DELETE and UPDATE
statements that used large NOT IN
( clauses
could use large amounts of memory. (Bug#15872)
value_list)
Prevent recursive views caused by using RENAME
TABLE on a view after creating it. (Bug#14308)
A LOCK TABLES statement that failed could
cause MyISAM not to update table statistics
properly, causing a subsequent CHECK TABLE
to report table corruption. (Bug#18544)
For a reference to a non-existent stored function in a stored
routine that had a CONTINUE handler, the
server continued as though a useful result had been returned,
possibly resulting in a server crash. (Bug#18787)
InnoDB did not use a consistent read for
CREATE ... SELECT when
innodb_locks_unsafe_for_binlog was set.
(Bug#18350)
InnoDB could read a delete mark from its
system tables incorrectly. (Bug#19217)
Corrected a syntax error in mysql-test-run.sh. (Bug#19190)
A missing DBUG_RETURN() caused the server
to emit a spurious error message: missing DBUG_RETURN
or DBUG_VOID_RETURN macro in function "open_table".
(Bug#18964)
DROP DATABASE did not drop stored routines
associated with the database if the database name was longer
than 21 characters. (Bug#18344)
Avoid trying to include
<asm/atomic.h> when it doesn't work
in C++ code. (Bug#13621)
Executing SELECT on a large table that had
been compressed within myisampack could
cause a crash. (Bug#17917)
NDB Cluster: When attempting to create an
index on a BIT or BLOB
column, Error 743: Unsupported character set in
table or index was returned instead of
Error 906: Unsupported attribute type in
index.
Within stored routines, usernames were parsed incorrectly if they were enclosed within quotes. (Bug#13310)
Casting a string to DECIMAL worked, but
casting a trimmed string (using LTRIM() or
RTRIM()) resulted in loss of decimal
digits. (Bug#17043)
NDB Cluster: On slow networks or CPUs, the
management client SHOW command could
sometimes erroneously show all data nodes as being master
nodes belonging to nodegroup 0. (Bug#15530)
If the second or third argument to BETWEEN
was a constant expression such as '2005-09-01 -
INTERVAL 6 MONTH and the other two arguments were
columns, BETWEEN was evaluated incorrectly.
(Bug#18618)
If the first argument to BETWEEN was a
DATE or TIME column of a
view and the other arguments were constants,
BETWEEN did not perform conversion of the
constants to the appropriate temporary type, resulting in
incorrect evaluation. (Bug#16069)
Server and clients ignored the --sysconfdir
option that was passed to configure. (Bug#15069)
NDB Cluster: In a 2-node cluster with a
node failure, restarting the node with a low value for
StartPartialTimeout could cause the cluster
to come up partitioned (鈥split-brain鈥 issue).
(Bug#16447)
A similar issue could occur when the cluster was first started with a sufficiently low value for this parameter. (Bug#18612)
NDB Cluster: On systems with multiple
network interfaces, data nodes would get 鈥stuck鈥
in startup phase 2 if the interface connecting them to the
management server was working on node startup while the
interface interconnecting the data nodes experienced a
temporary outage. (Bug#15695)
NDB Cluster: Unused open handlers for
tables in which the metadata had changed were not properly
closed. This could result in stale results from Cluster tables
following an ALTER TABLE. (Bug#13228)
NDB Cluster: Uninitialized internal
variables could lead to unexpected results. (Bug#11033, Bug#11034)
For InnoDB tables, an expression of the
form when used in a join
returned incorrect results. (Bug#14360)
col_name BETWEEN
col_name2 - INTERVAL
x DAY AND
col_name2 + INTERVAL
x DAY
INSERT DELAYED into a view caused an
infinite loop. (Bug#13683)
Lettercase in database name qualifiers was not consistently
handled properly in queries when
lower_case_table_names was set to 1. (Bug#15917)
The optimizer could cause a server crash or use a non-optimal
subset of indexes when evaluating whether to use
Index Merge/Intersection variant of
index_merge optimization. (Bug#19021)
The presence of multiple equalities in a condition after reading a constant table could cause the optimizer not to use an index. This resulted in certain queries being much slower than in MySQL 4.1. (Bug#16504)
A recent change caused the mysql client not
to display NULL values correctly and to
display numeric columns left-justified rather than
right-justified. The problems have been corrected. (Bug#18265)
mysql_reconnect() sent a SET
NAMES statement to the server, even for pre-4.1
servers that do not understand the statement. (Bug#18830)
COUNT(*) on a MyISAM
table could return different results for the base table and a
view on the base table. (Bug#18237)
DELETE with LEFT JOIN
for InnoDB tables could crash the server if
innodb_locks_unsafe_for_binlog was enabled.
(Bug#15650)
InnoDB failure to release an adaptive hash
index latch could cause a server crash if the query cache was
enabled. (Bug#15758)
For mysql.server, if the
basedir option was specified after
datadir in an option file, the setting for
datadir was ignored and assumed to be
located under basedir. (Bug#16240)
The euro sign (鈧) was not stored
correctly in columns using the
latin1_german1_ci or
latin1_general_ci collation. (Bug#18321)
EXTRACT(QUARTER FROM
returned unexpected
results. (Bug#18100)
date)
TRUNCATE did not reset the
AUTO_INCREMENT counter for
MyISAM tables when issued inside a stored
procedure. (Bug#14945)
Note: This bug did not affect
InnoDB tables. Also,
TRUNCATE does not reset the
AUTO_INCREMENT counter for
NDBCluster tables regardless of when it is
called (see Bug#18864).
The server was always built as though
--with-extra-charsets=complex had been
specified. (Bug#12076)
A query using WHERE (column_1,
column_2) IN
((value_1,
value_2)[, (..., ...), ...]) would
return incorrect results. (Bug#16248)
Queries of the form SELECT DISTINCT
did not return
all matching rows. (Bug#16710)
timestamp_column WHERE
date_function(timestamp_col)
= constant
When running a query that contained a GROUP_CONCAT(
SELECT GROUP_CONCAT(...) ), the result was
NULL except in the
ROLLUP part of the result, if there was
one. (Bug#15560)
For tables created in a MySQL 4.1 installation upgraded to MySQL 5.0 and up, multiple-table updates could update only the first matching row. (Bug#16281)
NDB Cluster: When multiple node restarts
were attempted without allowing each restart to complete, the
error message returned was Array index out of
bounds rather than Too many crashed
replicas. (Bug#18349)
CAST( for large double AS SIGNED
INT)double
values outside the signed integer range truncates the result
to be within range, but the result sometimes had the wrong
sign, and no warning was generated. (Bug#15098)
Updating a field value when also requesting a lock with
GET_LOCK() would cause slave servers in a
replication environment to terminate. (Bug#17284)
This is a bugfix release for the current production release family. It replaces MySQL 5.0.20.
Changes from 5.0.20 to 5.0.20a:
The fix for 鈥Command line options are ignored for mysql client鈥 (Bug#16855) has been revoked because it introduced an incompatible change in the way the mysql command-line client selects the server to connect to. In the worst case, this might have led to a client issuing commands to a server for which they were not intended, and this must not happen. To help all users in understanding this subject, Section聽4.2, 鈥淚nvoking MySQL Programs鈥 now includes additional explanation of how command options with regard to host selection.
The code of the yaSSL library has been
improved to avoid the dependency on a C++ runtime library, so
a link with pure C applications is now possible on additional
(but not yet all) platforms. We are working on fixing the
remaining issues.
Additional information about SSL support:
With version 5.0.20a, SSL support is contained in all binaries
for all Unix (including Linux) and Windows platforms except
AIX, HP-UX, OpenServer 6, and the RPMs specific for
RHAS3/RHAS4/SLES9 on Itanium CPUs (ia64);
It is also not contained in those for Novell Netware. We are
trying to add these platforms in future versions.
Please note that the original 5.0.20 announcement included
inexact wording: SSL support is 鈥included鈥 in
both server and client, but by default not
鈥enabled鈥. SSL can be enabled by passing the
SSL-related options (--ssl,
--ssl-key=...,
--ssl-cert=...,
--ssl-ca=...) when starting the server and
the client or by specifying these options in an option file.
For more information, see
Section聽5.8.7, 鈥淯sing Secure Connections鈥.
Functionality added or changed:
Added the --sysdate-is-now option to
mysqld to enable
SYSDATE() to be treated as an alias for
NOW(). See
Section聽12.6, 鈥淒ate and Time Functions鈥. (Bug#15101)
InnoDB: The InnoDB
storage engine now provides a descriptive error message if
ibdata file information is omitted from
my.cnf. (Bug#16827)
The NDBCluster storage engine now supports
INSERT IGNORE and
REPLACE statements. Previously, these
statements failed with an error. (Bug#17431)
Builds for Windows, Linux, and Unix (except AIX) platforms now have SSL support enabled, in the server as well as in the client libraries. Because part of the SSL code is written in C++, this does introduce dependencies on the system's C++ runtime libraries in several cases, depending on compiler specifics. (Bug#18195)
The syntax for CREATE PROCEDURE and
CREATE FUNCTION statements now includes a
DEFINER clause. The
DEFINER value specifies the security
context to be used when checking access privileges at routine
invocation time if the routine has the SQL SECURITY
DEFINER characteristic. See
Section聽17.2.1, 鈥CREATE PROCEDURE and CREATE
FUNCTION Syntax鈥, for more information.
When mysqldump is invoked with the
--routines option, it now dumps the
DEFINER value for stored routines.
Large file support added to build for QNX
platform. (Bug#17336)
Large file support was re-enabled for the MySQL server binary for the AIX 5.2 platform. (Bug#13571)
Bugs fixed:
If the WHERE condition of a query contained
an OR-ed FALSE term, the
set of tables whose rows cannot serve for null-complements in
outer joins was determined incorrectly. This resulted in
blocking possible conversions of outer joins into joins by the
optimizer for such queries. (Bug#17164)
mysql_config returned incorrect libraries
on x86_64 systems. (Bug#13158)
Stored routine names longer than 64 characters were silently truncated. Now the limit is properly enforced and an error occurs. (Bug#17015)
During conversion from one character set to
ucs2, multi-byte characters with no
ucs2 equivalent were converted to multiple
characters, rather than to 0x003F QUESTION
MARK. (Bug#15375)
The mysql_close() C API function leaked
handles for shared-memory connections on Windows. (Bug#15846)
Checks for permissions on database operations could be
performed in a case-insensitive manner (a user with
permissions on database MYDATABASE could by
accident get permissions on database
myDataBase), if the privilege data were
still cached from a previous check. (Bug#17279)
If InnoDB ran out of buffer space for row
locks and adaptive hashes, the server would crash. Now
InnoDB rolls back the transaction. (Bug#18238)
InnoDB tables with an adaptive hash blocked
other queries during CHECK TABLE statements
while the entire hash was checked. This could be a long time
for a large hash. (Bug#17126)
For InnoDB tables created in MySQL 4.1 or
earlier, or created in 5.0 or later with compact format,
updating a row so that a long column is updated or the length
of some column changes, InnoDB later would
fail to reclaim the BLOB storage space if
the row was deleted. (Bug#18252)
InnoDB had a memory leak for duplicate-key
errors with tables having 90 columns or more. (Bug#18384)
InnoDB: The LATEST FOREIGN KEY
ERROR section in the output of SHOW INNODB
STATUS was sometimes formatted incorrectly, causing
problems with scripts that parsed the output of this
statement. (Bug#16814)
When using ORDER BY with a non-string
column inside GROUP_CONCAT() the result's
character set was converted to binary. (Bug#18281)
See also Bug#14169.
SELECT ... WHERE , when column
LIKE 'A%'column
had a key and used the latin2_czech_cs
collation, caused the wrong number of rows to be returned.
(Bug#17374)
Complex queries with nested joins could cause a server crash. (Bug#18279)
The server could deadlock under heavy load while writing to the binary log. (Bug#18116)
A SELECT ... ORDER BY ... from a view
defined using a function could crash the server. An example of
such a view might be CREATE VIEW AS SELECT SQRT(c1)
FROM t1. (Bug#18386)
A DELETE using a subquery could crash the
server. (Bug#18306)
REPAIR TABLE, OPTIMIZE
TABLE, and ALTER TABLE operations
on transactional tables (or on tables of any type on Windows)
could corrupt triggers associated with those tables. (Bug#18153)
MyISAM: Performing a bulk insert on a table
referenced by a trigger would crash the table. (Bug#17764)
MyISAM: Keys for which the first part of
the key was a CHAR or
VARCHAR column using the UTF-8 character
set and longer than 254 bytes could become corrupted. (Bug#17705)
Using ORDER BY
within a stored
procedure (where intvarintvar is an
integer variable or expression) would crash the server. (Bug#16474)
Note: The use of an integer
i in an ORDER BY
clause for sorting the
result by the
iith
column is deprecated (and non-standard). It should
not be used in new applications. See
Section聽13.2.7, 鈥SELECT Syntax鈥.
Triggers created in MySQL 5.0.16 and earlier could not be dropped after upgrading the server to 5.0.17 or later. (Bug#15921)
A SELECT using a function against a nested
view would crash the server. (Bug#15683)
NDB Cluster: Certain queries using
ORDER BY ... ASC in the
WHERE clause could return incorrect
results. (Bug#17729)
NDB Cluster: A timeout in the handling of
an ABORT condition with more that 32
operations could yield a node failure. (Bug#18414)
NDB Cluster: A node restart immediately
following a CREATE TABLE would fail.
Important: This fix supports
2-node Clusters only. (Bug#18385)
NDB Cluster: In event of a node failure
during a rollback, a 鈥false鈥 lock could be
established on the backup for that node, which lock could not
be removed without restarting the node. (Bug#18352)
NDB Cluster: The cluster created a crashed
replica of a table having an ordered index 鈥 or when
logging was not enabled, of a table having a table or unique
index 鈥 leading to a crash of the cluster following 8
successibe restarts. (Bug#18298)
NDB Cluster: When replacing a failed master
node, the replacement node could cause the cluster to crash
from a buffer overflow if it had an excessively large amount
of data to write to the cluster log. (Bug#18118)
NDB Cluster: If a mysql
or other client could not parse the result set returned from a
mysqld process acting as an SQL node in a
cluster, the client would crash instead of returning the
appropriate error. For example, this could happen when the
client attempted to use a character set was not available to
the mysqld. (Bug#17380)
NDB Cluster: Restarting nodes were allowed
to start and join the cluster too early. (Bug#16772)
If a row was inserted inside a stored procedure using the parameters passed to the procedure in the INSERT statement, the resulting binlog entry was not escaped properly. (Bug#18293)
If InnoDB encountered a
HA_ERR_LOCK_TABLE_FULL error and
rolled-back a transaction, the transaction was still written
to the binary log. (Bug#18283)
Stored procedures that call UDFs and pass local string variables caused server crashes. (Bug#17261)
Connecting to a server with a UCS2 default character set with a client using a non-UCS2 character set crashed the server. (Bug#18004)
Loading of UDFs in a statically linked MySQL caused a server crash. UDF loading is now blocked if the MySQL server is statically linked. (Bug#11835)
Views that incorporated tables from the
INFORMATION_SCHEMA database resulted in a
server crash when queried. (Bug#18224)
A SELECT * query on an
INFORMATION_SCHEMA table by a user with
limited privileges resulted in a server crash. (Bug#18113)
Attempting to access an InnoDB table after
starting the server with --skip-innodb caused
a server crash. (Bug#14575)
Replication slaves could not replicate triggers from older
servers that included no DEFINER clause in
the trigger definition. Now the trigger executes with the
privileges of the invoker (which on the slave is the slave SQL
thread). (Bug#16266)
Character set conversion of string constants for
UNION of constant and table column was not
done when it was safe to do so. (Bug#15949)
The DEFINER value for stored routines was
not replicated. (Bug#15963)
Use of stored functions with DISTINCT or
GROUP BY can produce incorrect results when
ORDER BY is also used. (Bug#13575)
Use of TRUNCATE TABLE for a
TEMPORARY table on a master server was
propagated to slaves properly, but slaves did not decrement
the Slave_open_temp_tables counter
properly. (Bug#17137)
SELECT COUNT(*) for a
MyISAM table could return different results
depending on whether an index was used. (Bug#14980)
A LEFT JOIN with a UNION
that selects literal values could crash the server. (Bug#17366)
Large file support did not work in AIX server binaries. (Bug#10776)
Updating a view that filters certain rows to set a filtered
out row to be included in the table caused infinite loop. For
example, if the view has a WHERE clause of salary >
100 then issuing an UPDATE statement of SET
salary = 200 WHERE id = 10, caused an infinite loop.
(Bug#17726)
Certain combinations of joins with mixed ON
and USING clauses caused unknown column
errors. (Bug#15229)
NDB Cluster: Inserting and deleting
BLOB column values while a backup was in
process could cause the loss of an ndbd
node. (Bug#14028)
If the server was started with the
--skip-grant-tables option, it was impossible
to create a trigger or a view without explicitly specifying a
DEFINER clause. (Bug#16777)
COUNT(DISTINCT and
col1,
col2)COUNT(DISTINCT
CONCAT( operations
produced different results if one of the columns was an
indexed col1,
col2))DECIMAL column. (Bug#15745)
The server displayed garbage in the error message warning
about bad assignments to DECIMAL columns or
routine variables. (Bug#15480)
The server would execute stored routines that had a non-existent definer. (Bug#13198)
For FEDERATED tables, a
SELECT statement with an ORDER
BY clause did not return rows in the proper order.
(Bug#17377)
The FORMAT() function returned an incorrect
result when the client's
character_set_connection value was
utf8. (Bug#16678)
NDB Cluster: Some query cache statistics
were not always correctly reported for Cluster tables. (Bug#16795)
Updating the value of a Unicode VARCHAR
column with the result returned by a stored function would
cause the insertion of ASCII characters into the column
instead of Unicode, even where the function's return type was
also declared as Unicode. (Bug#17615)
Functionality added or changed:
Incompatible change: The
InnoDB storage engine no longer ignores
trailing spaces when comparing BINARY or
VARBINARY column values. This means that
(for example) the binary values 'a' and
'a ' are now regarded as
unequal any time they are compared, as
they are in MyISAM tables. (Bug#14189)
See Section聽11.4.2, 鈥淭he BINARY and VARBINARY Types鈥 for more information
about the BINARY and
VARBINARY types.
Several changes were made to make upgrades easier:
Added the mysql_upgrade program that checks all tables for incompatibilities with the current version of MySQL Server and repairs them if necessary. This program should be run for each MySQL upgrade (rather than mysql_fix_privilege_tables). See Section聽5.5.8, 鈥mysql_upgrade 鈥 Check Tables for MySQL Upgrade鈥.
Added the FOR UPGRADE option for the
CHECK TABLE statement. This option
checks whether tables are incompatible with the current
version of MySQL Server.
Added the --check-upgrade to
mysqlcheck that invokes CHECK
TABLE with the FOR UPGRADE
option.
NDB Cluster: The ndb_mgm
client commands and
node_id
START now
work with management nodes as well as data nodes. (However,
using node_id STOPALL for the
node_id continues to affect all
data nodes only.)
When using the GROUP_CONCAT() function
where the group_concat_max_len system
variable was greater than 512, the type of the result was
BLOB only if the query included an
ORDER BY clause; otherwise the result was a
VARCHAR.
The result type of the GROUP_CONCAT()
function is now VARCHAR only if the value
of the group_concat_max_len system variable
is less than or equal to 512. Otherwise, this function returns
a BLOB. (Bug#14169)
mysql no longer terminates data value display when it encounters a NUL byte. Instead, it displays NUL bytes as spaces. (Bug#16859)
Added the --wait-timeout option to
mysqlmanager to allow configuration of the
timeout for dropping an inactive connection, and increased the
default timeout from 30 seconds to 28,800 seconds (8 hours).
(Bug#12674, Bug#15980)
A number of performance issues were resolved that had
previously been encountered when using statements that
repeatedly invoked stored functions. For example, calling
BENCHMARK() using a stored function
executed much more slowly than when invoking it with inline
code that accomplished the same task. In most cases the two
should now execute with approximately the same speed. (Bug#15014, Bug#14946)
libmysqlclient now uses versioned symbols
with GNU ld. (Bug#3074)
NDB Cluster: More descriptive warnings are
now issued when inappropriate logging parameters are set in
config.ini. (Formerly, the warning issued
was simply Could not add logfile
destination.) (Bug#11331)
Added the --port-open-timeout option to
mysqld to control how many seconds the
server should wait for the TCP/IP port to become free if it
cannot be opened. (Bug#15591)
Repeated invocation of my_init() and
my_end() caused corruption of character set
data and connection failure. (Bug#6536)
Two new Hungarian collations are included:
utf8_hungarian_ci and
ucs2_hungarian_ci. These support the
correct sort order for Hungarian vowels. However, they do not
support the correct order for sorting Hungarian consonant
contractions; this issue will be fixed in a future release.
Wording of error 1329 changed to No data - zero rows fetched, selected, or processed. (Bug#15206)
The INFORMATION_SCHEMA now skips data
contained in unlistable/unreadable directories rather than
returning an error. (Bug#15851)
InnoDB now caches a list of unflushed files instead of
scanning for unflushed files during a table flush operation.
This improves performance when
--innodb-file-per-table is set on a system
with a large number of InnoDB tables. (Bug#15653)
The message for error 1109 changed from Unknown table ... in order clause to Unknown table ... in field list. (Bug#15091)
The mysqltest utility now converts all
CR/LF combinations to LF
to allow test cases intended for Windows to work properly on
UNIX-like systems. (Bug#13809)
The mysql_ping function will now retry if
the reconnect flag is set and error
CR_SERVER_LOST is encountered during the
first attempt to ping the server. (Bug#14057)
mysqldump now surrounds the
DEFINER, SQL SECURITY
DEFINER and WITH CHECK OPTION
clauses of a CREATE VIEW statement with
"not in version" comments to prevent errors in earlier
versions of MySQL. (Bug#14871)
New charset command added to
mysql command-line client. By typing
charset or
name\C (such as
name\C UTF8), the client character set can be
changed without reconnecting. (Bug#16217)
Client API will now attempt reconnect on TCP/IP if the
reconnect flag is set, as is the case with
sockets. (Bug#2845)
Bugs fixed:
Generating an AUTO_INCREMENT value through
a FEDERATED table did not set the value
returned by LAST_INSERT_ID(). (Bug#14768)
Cursors in stored routines could cause a server crash. (Bug#16887)
Setting the myisam_repair_threads system
variable to a value larger than 1 could cause corruption of
large MyISAM tables. (Bug#11527)
The length of a VARCHAR() column that used
the utf8 character set would increase each
time the table was re-created in a stored procedure or
prepared statement, eventually causing the CREATE
TABLE statement to fail. (Bug#13134)
type_decimal failed with the prepared
statement protocol. (Bug#17826)
The MySQL server could crash with out of memory errors when
performing aggregate functions on a DECIMAL
column. (Bug#17602)
A stored procedure failed to return data the first time it was called per connection. (Bug#17476)
Using DROP FUNCTION IF EXISTS
to drop a
user-defined function caused a server crash if the server was
running with the func_name--skip-grant-tables option.
(Bug#17595)
Using ALTER TABLE to increase the length of
a BINARY(
column caused column values to be padded with spaces rather
than M)0x00 bytes. (Bug#16857)
A large BIGINT value specified in a
WHERE clause could be treated differently
depending on whether it is specified as a quoted string. (For
example, WHERE bigint_col =
17666000000000000000 versus WHERE
bigint_col = '17666000000000000000'). (Bug#9088)
A natural join between INFORMATION_SCHEMA
tables failed. (Bug#17523)
A memory leak caused warnings on slaves for certain statements that executed without warning on the master. (Bug#16175)
The embedded server did not allow binding of columns to the
MYSQL_TYPE_VAR_STRING data type in prepared
statements. (Bug#12070)
The embedded server failed various tests in the automated test suite. (Bug#9630, Bug#9631, Bug#9633, Bug#10801, Bug#10911, Bug#10924, Bug#10925, Bug#10926, Bug#10930, Bug#15433)
Instance Manager erroneously accepted a list of instance
identifiers for the START INSTANCE and
STOP INSTANCE commands (should accept only
a single identifier). (Bug#12813)
For a transaction that used MyISAM and
InnoDB tables, interruption of the
transaction due to a dropped connection on a master server
caused slaves to lose synchrony. (Bug#16559)
SELECT with GROUP BY on
a view can cause a server crash. (Bug#16382)
If the query optimizer transformed a GROUP
BY clause in a subquery, it did not also transform
the HAVING clause if there was one,
producing incorrect results. (Bug#16603)
SUBSTRING_INDEX() could yield inconsistent
results when applied with the same arguments to consecutive
rows in a query. (Bug#14676)
The parser allowed CREATE AGGREGATE
FUNCTION for creating stored functions, even though
AGGREGATE does not apply. (It is used only
for CREATE FUNCTION only when creating
user-defined functions.) (Bug#16896)
Data truncations on non-UNIQUE indexes could crash InnoDB when using multi-byte character sets. (Bug#17530)
Triggers created without BEGIN and
END clauses resulted in 鈥You have an
error in your SQL syntax鈥 errors when dumping and
replaying a binary log. (Bug#16878)
The RENAME TABLE statement did not move
triggers to the new table. (Bug#13525)
Clients compiled from source with the
--without-readline did not save command
history from session to session. (Bug#16557)
Stored routines that contained only a single statement were
not written properly to the dumpfile when using
mysqldump. (Bug#14857)
For certain MERGE tables, the optimizer
wrongly assumed that using
index_merge/intersection was too expensive.
(Bug#17314)
Executing a SHOW CREATE VIEW query of an
invalid view caused the mysql_next_result
function of libMySQL.dll to hang. (Bug#15943)
BIT fields were not properly handled when
using row-based replication. (Bug#13418)
Issuing GRANT EXECUTE on a procedure would
display any warnings related to the creation of the procedure.
(Bug#7787)
NDB Cluster:
ndb_delete_all would run out of memory on
tables containing BLOB columns. (Bug#16693)
NDB Cluster: UNIQUE keys
in Cluster tables were limited to 225 bytes in length. (Bug#15918)
In a highly concurrent environment, a server crash or deadlock could result from execution of a statement that used stored functions or activated triggers coincident with alteration of the tables used by these functions or triggers. (Bug#16593)
Previously, a stored function invocation was written to the
binary log as DO
if the
invocation changes data and occurs within a non-logged
statement, or if the function invokes a stored procedure that
produces an error. These invocations now are logged as
func_name()SELECT
instead for
better control over error code checking (slave servers could
stop due to detecting a different error than occurred on the
master). (Bug#14769)
func_name()
CHECKSUM TABLE returned different values on
MyISAM table depending on whether the QUICK
or EXTENDED options were used. (Bug#8841)
MySQL server dropped client connection for certain SELECT
statements against views defined that used
MERGE algorithm. (Bug#16260)
A call to the IF() function using decimal
arguments could return incorrect results. (Bug#16272)
A statement containing GROUP BY and
HAVING clauses could return incorrect
results when the HAVING clause contained
logic that returned FALSE for every row.
(Bug#14927)
Using GROUP BY on column used in
WHERE clause could cause empty set to be
returned. (Bug#16203)
For a MySQL 5.0 server, using MySQL 4.1 tables in queries with
a GROUP BY clause could result in buffer
overrun or a server crash. (Bug#16752)
SET sql_mode =
, where
NN > 31, did not work properly.
(Bug#13897)
NDB Cluster: Cluster log file paths were
truncated to 128 characters. They may now be as long as
MAX_PATH (the maximum path length permitted
by the operating system). (Bug#17411)
The mysql_stmt_store_result() C API
function could not be used for a prepared statement if a
cursor had been opened for the statement. (Bug#14013)
The mysql_stmt_sqlstate() C API function
incorrectly returned an empty string rather than
'00000' when no error occurred. (Bug#16143)
Using the TRUNCATE() function with a
negative number for the second argument on a
BIGINT column returned incorrect results.
(Bug#8461)
Instance Manager searched wrong location for password file on some platforms. (Bug#16499)
NDB Cluster: Following multiple forced
shutdowns and restarts of data nodes, DROP
DATABASE could fail. (Bug#17325)
NDB Cluster: An UPDATE
with an inner join failed to match any records if both tables
in the join did not have a primary key. (Bug#17257)
NDB Cluster: A DELETE
with a join in the WHERE clause failed to
retrieve any records if both tables in the join did not have a
primary key. (Bug#17249)
The error message returned by perror
was prefixed with
OS error code: instead of
NDB error code:. (Bug#17235)
--ndb
NDB Cluster: In some cases, LOAD
DATA INFILE did not load all data into
NDB tables. (Bug#17081)
NDB Cluster: The REDO
log would become corrupted (and thus unreadable) in some
circumstances, due to a failure in the query handler. (Bug#17295)
NDB Cluster: No error message was generated
for setting NoOfFragmentLogFiles too low.
(Bug#13966)
NDB Cluster: No error message was generated
for setting MaxNoOfAttributes too low. (Bug#13965)
Binary distributions for Solaris contained files with group
ownership set to the non-existing wheel
group. Now the bin group is used. (Bug#15562)
The DECIMAL data type was not being handled
correctly with prepared statements. (Bug#16511)
The SELECT privilege was required for
triggers that performed no selects. (Bug#15196)
The UPDATE privilege was required for
triggers that performed no updates. (Bug#15166)
CAST(... AS TIME) operations returned
different results when using versus not using
prepared-statement protocol. (Bug#15805)
Improper memory handling for stored routine variables could cause memory overruns and binary log corruption. (Bug#15588)
Killing a long-running query containing a subquery could cause a server crash. (Bug#14851)
A FULLTEXT query in a prepared statement
could result in unexpected behavior. (Bug#14496)
A RETURN statement within a trigger caused
a server crash. RETURN now is disallowed
within triggers. To exit immediately, use
LEAVE. (Bug#16829)
STR_TO_DATE(1,NULL) caused a server crash.
(CVE-2006-3081,
Bug#15828)
An invalid stored routine could not be dropped. (Bug#16303)
When evaluation of the test in a CASE
failed in a stored procedure that contained a
CONTINUE handler, execution resumed at the
beginning of the CASE statement instead of at the end. (Bug#16568)
An INSERT statement in a stored procedure
corrupted the binary log. (Bug#16621)
When MyODBC or any other client called
my_init()/my_end()
several times, it caused corruption of charset data stored in
once_mem_pool. (Bug#11892)
When multiple handlers are created for the same MySQL error number within nested blocks, the outermost handler took precedence. (Bug#15011)
Certain LEAVE statements in stored
procedures were not properly optimized. (Bug#15737)
Setting InnoDB path settings to an empty string caused InnoDB storage engine to crash upon server startup. (Bug#16157)
InnoDB used full explicit table locks in trigger processing. (Bug#16229)
Server crash when dropping InnoDB constraints named
.
(Bug#16387)
TABLENAME_ibfk_0
Corrected race condition when dropping the adaptive hash index for a B-tree page in InnoDB. (Bug#16582)
The mysql_real_connect() C API function
incorrectly reset the MYSQL_OPT_RECONNECT
option to its default value. (Bug#15719)
InnoDB: After upgrading an
InnoDB table having a VARCHAR
BINARY column created in MySQL 4.0 to MySQL 5.0,
update operations on the table would cause the server to
crash. (Bug#16298)
Trying to compile the server on Windows generated a stack
overflow warning due to a recursive definition of the internal
Field_date::store() method. (Bug#15634)
The use of LOAD INDEX within a stored
routine was permitted and caused the server to crash.
Note: LOAD
INDEX statements within stored routines
are not supported, and now yield an error
if attempted. This behavior is intended. (Bug#14270)
The mysqlbinlog utility did not output
DELIMITER statements, causing syntax errors
for stored routine creation statements. (Bug#11312)
NDB Cluster returned incorrect Can't find
file error for OS error 24, changed to Too
many open files. (Bug#15020)
Performing a RENAME TABLE on an InnoDB
table when the server is started with the
--innodb-file-per-table option and the data
directory is a symlink caused a server crash. (Bug#15991)
Multi-byte path names for LOAD DATA and
SELECT ... INTO OUTFILE caused errors.
Added the character_set_filesystem system
variable, which controls the interpretation of string literals
that refer to filenames. (Bug#12448)
Certain subqueries where the inner query is the result of a aggregate function would return different results on MySQL 5.0 than on MySQL 4.1. (Bug#15347)
Attempts to create FULLTEXT indexes on VARCHAR columns larger than 1000 bytes resulted in error. (Bug#13835)
Characters in the gb2312 and
euckr character sets which did not have
Unicode mappings were truncated. (Bug#15377)
Certain nested LEFT JOIN operations were not properly optimized. (Bug#16393)
GRANT statements specifying schema names
that included underscore characters (i.e.
my_schema) did not match if the underscore
was escaped in the GRANT statement (i.e.
GRANT ALL ON `my\_schema` ...). (Bug#14834)
Running out of diskspace in the location specified by the
tmpdir option resulted in incorrect error
message. (Bug#14634)
Test suite sp test left behind tables when
the test failed that could cause future tests to fail. (Bug#15866)
UPDATE statement crashed multi-byte
character set FULLTEXT index if update
value was almost identical to initial value only differing in
some spaces being changed to . (Bug#16489)
A SELECT query which contained a
GROUP_CONCAT() and an ORDER
BY clause against the
INFORMATION_SCHEMA resulted in an empty
result set. (Bug#15307)
The --replicate-do and
--replicate-ignore options were not being
enforced on multiple-table statements. (Bug#15699, Bug#16487)
A prepared statement created from a SELECT ...
LIKE query (such as PREPARE stmt1 FROM
'SELECT col_1 FROM tedd_test WHERE col_1 LIKE ?';)
would begin to produce erratic results after being executed
repeatedly numerous (thousands) of times. (Bug#12734)
The server would crash when the size of an
ARCHIVE table grew beyond 2GB. (Bug#15787)
Created a user function with an empty string (that is,
CREATE FUNCTION ''()), was accepted by the
server. Following this, calling SHOW FUNCTION
STATUS would cause the server to crash. (Bug#15658)
In some cases the query optimizer did not properly perform multiple joins where inner joins followed left joins, resulting in corrupted result sets. (Bug#15633)
The absence of a table in the left part of a left or right join was not checked prior to name resolution, which resulted in a server crash. (Bug#15538)
NDBCluster: A bitfield whose offset and
length totaled 32 would crash the cluster. (Bug#16125)
NDBCluster: Upon the completion of a scan
where a key request remained outstanding on the primary
replica and a starting node died, the scan did not terminate.
This caused incompleted error handling of the failed node.
(Bug#15908)
NDBCluster: The
ndb_autodiscover test failed sporadically
due to a node not being permitted to connect to the cluster.
(Bug#15619)
NDBCluster: When running more than one
management process in a cluster:
ndb_mgm -c
host:port
-e "node_id stop"
would stop a management process running only on the same
system on which the command was issued.
ndb_mgm -e "shutdown" failed to shut down any management processes at all.
The contents of fill_help_tables.sql
could not be loaded in strict SQL mode. (Bug#15760)
fill_help_tables.sql was not included in
binary distributions for several platforms. (Bug#15759)
An INSERT ... SELECT statement between
tables in a MERGE set can return errors
when statement involves insert into child table from merge
table or vice-versa. (Bug#5390)
Certain permission management statements could create a
NULL hostname for a user, resulting in a
server crash. (Bug#15598)
A COMMIT statement followed by a
ALTER TABLE statement on a BDB table caused
server crash. (Bug#14212)
A DELETE statement involving a
LEFT JOIN and an IS NULL
test on the right-hand table of the join crashed the server
when the innodb_locks_unsafe_for_binlog
option was enabled. (Bug#15650)
Performing an ORDER BY on an indexed
ENUM column returned error. (Bug#15308)
The NOT FOUND condition handler for stored
procedures did not distinguish between a NOT
FOUND condition and an exception or warning. (Bug#15231)
A stored procedure with an undefined variable and an exception handler would hang the client when called. (Bug#14498)
Subselect could return wrong results when records cache and grouping was involved. (Bug#15347)
Temporary table aliasing did not work inside stored functions. (Bug#12198)
MIN() and MAX()
operations were not optimized for views. (Bug#16016)
Using an aggregate function as the argument for a HAVING
clause would result in the aggregate function always returning
FALSE. (Bug#14274)
Parallel builds occasionally failed on Solaris. (Bug#16282)
The FORCE INDEX keyword in a query would
prevent an index merge from being used where an index merge
would normally be chosen by the optimizer. (Bug#16166)
The COALESCE() function truncated data in a
TINYTEXT column. (Bug#15581)
InnoDB: Comparison of indexed
VARCHAR CHARACTER SET ucs2 COLLATE ucs2_bin
columns using LIKE could fail. (Bug#14583)
An attempt to open a table that requires a disabled storage engine could cause a server crash. (Bug#15185)
Issuing a DROP USER command could cause
some users to encounter a
error. (Bug#15775)
hostname is not allowed to
connect to this MySQL server
Setting innodb_log_file_size to a value
greater than 4G crashed the server. (Bug#15108)
A SELECT of a stored function that
references the INFORMATION_SCHEMA could
crash the server. (Bug#15533)
Tarball install package was missing a proper
fill_help_tables.sql file. (Bug#15151)
Functionality added or changed:
It is now possible to build the server such that
MyISAM tables can support up to 128 keys
rather than the standard 64. This can be done by configuring
the build using the option
--with-max-indexes=,
where NN鈮128 is the maximum
number of indexes to permit per table. (Bug#10932)
The server treats stored routine parameters and local
variables (and stored function return values) according to
standard SQL. Previously, parameters, variables, and return
values were treated as items in expressions and were subject
to automatic (silent) conversion and truncation. Now the data
type is observed. Data type conversion and overflow problems
that occur in assignments result in warnings, or errors in
strict mode. The CHARACTER SET clause for
character data type declarations is used. Parameters,
variables, and return values must be scalars; it is no longer
possible to assign a row value. Also, stored functions execute
using the sql_mode value in force at
function creation time rather than ignoring it. For more
information, see Section聽17.2.1, 鈥CREATE PROCEDURE and CREATE
FUNCTION Syntax鈥. (Bug#8702, Bug#8768, Bug#8769, Bug#9078, Bug#9572, Bug#12903,
Bug#13705, Bug#13808, Bug#13909, Bug#14161, Bug#15148)
Bugs fixed:
API function
mysql_stmt_prepare returned wrong field
length for TEXT columns. (Bug#15613)
The output of mysqldump --triggers did not
contain the DEFINER clause in dumped
trigger definitions. (Bug#15110)
The output of SHOW TRIGGERS contained
extraneous whitespace. (Bug#15103)
Creating a trigger caused a server crash if the table or trigger database was not known because no default database had been selected. (Bug#14863)
SHOW [FULL] COLUMNS and SHOW INDEX
FROM did not function with temporary tables. (Bug#14271, Bug#14387, Bug#15224)
The INFORMATION_SCHEMA.COLUMNS table did not report the size of BINARY or VARBINARY columns. (Bug#14271)
The server would not compile under Cygwin. (Bug#13640)
DESCRIBE did not function with temporary
tables. (Bug#12770)
Reversing the order of operands in a WHERE
clause testing a simple equality (such as WHERE
t1.col1 = t2.col2) would produce different output
from EXPLAIN. (Bug#15106)
Column aliases were displayed incorrectly in a
SELECT from a view following an update to a
base table of the view. (Bug#14861)
Set functions could not be aggregated in outer subqueries. (Bug#12762)
When a connection using yaSSL was aborted, the server would
continue to try to read the closed socket, and the thread
continued to appear in the output of SHOW
PROCESSLIST. Note that this issue did not affect
secure connection attempts using OpenSSL. (Bug#15772)
InnoDB: Having two tables in a parent-child
relationship enforced by a foreign key where one table used
ROW_FORMAT=COMPACT and the other used
ROW_FORMAT=REDUNDANT could result in a
MySQL server crash. Note that this problem did not exist prior
to MySQL 5.0.3, when the compact row format for
InnoDB was introduced. (Bug#15550)
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)
A left join on a column that having a NULL
value could cause the server to crash. (Bug#15268)
A replication slave server could sometimes crash on a
BEFORE UPDATE trigger if the
UPDATE query was not executed in the same
database as the table with the trigger. (Bug#14614)
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: 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
Coordinator timed out, the abort condition was incorrectly
handled, causing the transaction record to be released
prematurely. (Bug#15685)
NDB Cluster: The
ndb_read_multi_range.test script failed to
drop a table, causing the test to fail. (Bug#15675) (See also
Bug#15401.)
NDB Cluster: A node which failed during
cluster startup was sometimes not removed from the internal
list of active nodes. (Bug#15587)
Resolution of the argument to the VALUES()
function to a variable inside a stored routine caused a server
crash. The argument must be a table column. (Bug#15441)
Functionality added or changed:
The original Linux RPM packages (5.0.17-0) had an issue with a
zlib dependency that would result in an
error during an install or upgrade. They were replaced by new
binaries, 5.0.17-1. (Bug#15223) Here is a list of the new RPM
binaries:
MySQL-{Max,client,devel,server,shared,ndb*}-5.0.17-1.i386.rpm
MySQL-*-standard-5.0.17-1.rhel3.i386.rpm, MySQL-*-standard-5.0.17-1.rhel3.ia64.rpm, MySQL-*-standard-5.0.17-1.rhel3.x86_64.rpm
MySQL-*-pro-5.0.17-1.rhel3.i386.rpm, MySQL-*-pro-5.0.17-1.rhel3.ia64.rpm, MySQL-*-pro-5.0.17-1.rhel3.x86_64.rpm
MySQL-*-pro-gpl-5.0.17-1.rhel3.i386.rpm, MySQL-*-pro-gpl-5.0.17-1.rhel3.ia64.rpm, MySQL-*-pro-gpl-5.0.17-1.rhel3.x86_64.rpm
The syntax for CREATE TRIGGER now includes
a DEFINER clause for specifying which
access privileges to check at trigger invocation time. See
Section聽18.1, 鈥CREATE TRIGGER Syntax鈥, for more information.
Known issue: If you attempt
to replicate from a master server older than MySQL 5.0.17 to a
slave running MySQL 5.0.17 through 5.0.19, replication of
CREATE TRIGGER statements fails on the
slave with a Definer not fully qualified
error. A workaround is to create triggers on the master using
a version-specific comment embedded in each CREATE
TRIGGER statement:
CREATE /*!50017 DEFINER = 'root'@'localhost' */ TRIGGER ... ;
CREATE TRIGGER statements written this way
will replicate to newer slaves, which pick up the
DEFINER clause from the comment and execute
successfully. (Bug#16266)
Added a DEFINER column to the
INFORMATION_SCHEMA.TRIGGERS table.
Invoking a stored function or trigger creates a new savepoint level. When the function or trigger finishes, the previous savepoint level is restored. (See Bug#13825 for more information.)
Recursion is allowed in stored procedures. Recursive stored functions and triggers still are disallowed. (Bug#10100)
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)
Support files for compiling with Visual Studio 6 have been removed. (Bug#15094)
Added the SHOW FUNCTION CODE and
SHOW PROCEDURE CODE statements (available
only for servers that have been built with debugging support).
See Section聽13.5.4.19, 鈥SHOW PROCEDURE CODE and SHOW FUNCTION
CODE Syntax鈥.
Bugs fixed:
RPM packages had an incorrect zlib
dependency. (Bug#15223)
NDB Cluster: REPLACE
failed when attempting to update a primary key value in a
Cluster table. (Bug#14007)
make failed when attempting to build MySQL in different directory than source. (Bug#11827)
Corrected an error-handling problem within stored routines on 64-bit platforms. (Bug#15630)
Slave SQL thread cleanup was not handled properly on Mac OS X when a statement was killed, resulting in a slave crash. (Bug#15623, Bug#15668)
Symbolic links did not function properly on Windows platforms. (Bug#14960, Bug#14310)
mysqld would not start on Windows 9X operating systems including Windows Me. (Bug#15209)
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)
A bug in mysql-test/t/mysqltest.test
caused that test to fail. (Bug#15605)
The CREATE test case in
mysql-test-run.pl failed on AIX and SCO.
(Bug#15607)
NDB Cluster: Creating a table with packed
keys failed silently. NDB now supports the
PACK_KEYS option to CREATE
TABLE correctly. (Bug#14514)
NDB Cluster: Using ORDER BY
when
selecting from a table having the primary key on a
primary_key_columnVARCHAR column caused a forced shutdown of
the cluster. (Bug#14828, Bug#15240, Bug#15682, Bug#15517)
NDB Cluster: Under certain circumstances,
when mysqld connects to a cluster
management server, the connection would fail before a node ID
could be allocated. (Bug#15215)
NDB Cluster: There was a small window for a
node failure to occur during a backup without an error being
reported. (Bug#15425)
mysql --help was missing a newline after
the version string when the bundled
readline library was not used. (Bug#15097)
Implicit versus explicit conversion of float to integer (such
as inserting a float value into an integer column versus using
CAST(... AS UNSIGNED before inserting the
value) could produce different results. Implicit and explicit
typecasts now are done the same way, with a value equal to the
nearest integer according to the prevailing rounding mode.
(Bug#12956)
GROUP BY on a view column did not correctly
account for the possibility that the column could contain
NULL values. (Bug#14850)
ANALYZE TABLE did not properly update table
statistics for a MyISAM table with a
FULLTEXT index containing stopwords, so a
subsequent ANALYZE TABLE would not
recognize the table as having already been analyzed. (Bug#14902)
The maximum value of MAX_ROWS was handled
incorrectly on 64-bit systems. (Bug#14155)
NDB Cluster: A forced cluster shutdown
occurred when the management daemon was restarted with a
changed config.ini file that added an
API/SQL node. (Bug#15512)
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)
A statement that produced a warning, when fetched via
mysql_stmt_fetch(), did not produce a
warning count according to
mysql_warning_count(). (Bug#15510)
Manual manipulation of the mysql.proc table
could cause a server crash. This should not happen, but it is
also not supported that the server will notice such changes.
(Bug#14233)
Revised table locking to allow proper assessment of view security. (Bug#11555)
Within a stored procedure, inserting with INSERT ...
SELECT into a table with an
AUTO_INCREMENT column did not generate the
correct sequence number. (Bug#14304)
SELECT queries that began with an opening
parenthesis were not being placed in the query cache. (Bug#14652)
Space truncation was being ignored when inserting into
BINARY or VARBINARY
columns. Now space truncation results in a warning, or an
error in strict mode. (Bug#14299)
The database-changing code for stored routine handling caused an error-handling problem resulting in a server crash. (Bug#15392)
Selecting from a view processed with the temptable algorithm caused a server crash if the query cache was enabled. (Bug#15119)
REPAIR TABLES, BACKUP
TABLES, RESTORE TABLES within a
stored procedure caused a server crash. (Bug#13012)
Creating a view that referenced a stored function that selected from a view caused a crash upon selection from the view. (Bug#15096)
ALTER TABLE ... SET DEFAULT had no effect.
(Bug#14693)
Creating a view within a stored procedure could result in an out of memory error or a server crash. (Bug#14885)
InnoDB: A race condition allowed two
threads to drop a hash index simultaneously. (Bug#14747)
mysqlhotcopy tried to copy
INFORMATION_SCHEMA tables. (Bug#14610)
CHAR(... USING ...) and
CONVERT(CHAR(...) USING ...), though
logically equivalent, could produce different results. (Bug#14146)
The value of
INFORMATION_SCHEMA.TABLES.TABLE_TYPE
sometimes was reported as empty. (Bug#14476)
InnoDB: Activity on an
InnoDB table caused execution time for
SHOW CREATE TABLE for the table to
increase. (Bug#13762)
DELETE from CSV tables
reported an incorrect rows-affected value. (Bug#13406)
The server crashed if compiled without any transactional storage engines. (Bug#15047)
Declaring a stored routine variable to have a
DEFAULT value that referred to a variable
of the same name caused a server crash. (For example:
DECLARE x INT DEFAULT x) Now the
DEFAULT variable is interpreted as
referring to a variable in an outer scope, if there is one.
(Bug#14376)
Perform character set conversion of constant values whenever possible without data loss. (Bug#10446)
mysql ignored the
MYSQL_TCP_PORT environment variable. (Bug#5792)
ROW_COUNT() returned an incorrect result
after EXECUTE of a prepared statement. (Bug#14956)
A UNION of DECIMAL
columns could produce incorrect results. (Bug#14216)
Queries that select records based on comparisons to a set of column could crash the server if there was one index covering the columns, and a set of other non-covering indexes that taken together cover the columns. (Bug#15204)
When using an aggregate function to select from a table that
has a multiple-column primary key, adding ORDER
BY to the query could produce an incorrect result.
(Bug#14920)
SHOW CREATE TABLE for a view could fail if
the client had locked the view. (Bug#14726)
For binary string data types, mysqldump
--hex-blob produced an illegal output value of
0x rather than ''. (Bug#13318)
Some comparisons for the IN() operator were
inconsistent with equivalent comparisons for the
= operator. (Bug#12612)
In a stored procedure, continuing (via a condition handler) after a failed variable initialization caused a server crash. (Bug#14643)
Within a stored procedure, exception handling for
UPDATE statements that caused a
duplicate-key error caused a Packets out of
order error for the following statement. (Bug#13729)
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)
Selecting from a view used filesort
retrieval when faster retrieval was possible. (Bug#14816)
Warnings from a previous command were not being reset when fetching from a cursor. (Bug#13524)
RESET MASTER failed to delete log files on
Windows. (Bug#13377)
Using ORDER BY on a column from a view,
when also selecting the column normally, and via an alias,
caused a mistaken Column 'x' in order clause is
ambiguous error. (Bug#14662)
Invoking a stored procedure within another stored procedure caused the server to crash. (Bug#13549)
Stored functions making use of cursors were not replicated. (Bug#14077)
CAST() did not pad
with 0x00 to a length of expr AS
BINARY(N)N bytes.
(Bug#14255)
Casting a FLOAT or
DOUBLE whose value was less than
1.0E-06 to DECIMAL would
yield an inappropriate value. (Bug#14268)
In some cases, a left outer join could yield an invalid result
or cause the server to crash, due to a
MYSQL_DATA_TRUNCATED error. (Bug#13488)
For a invalid view definition, selecting from the
INFORMATION_SCHEMA.VIEWS table or using
SHOW CREATE VIEW failed, making it
difficult to determine what part of the definition was
invalid. Now the server returns the definition and issues a
warning. (Bug#13818)
The server could misinterpret old trigger definition files created before MySQL 5.0.17. Now they are interpreted correctly, but this takes more time and the server issues a warning that the trigger should be re-created. (Bug#14090)
mysqldump --triggers did not account for
the SQL mode and could dump trigger definitions with missing
whitespace if the IGNORE_SPACE mode was
enabled. (Bug#14554)
Within a trigger definition the
CURRENT_USER() function evaluated to the
user whose actions caused the trigger to be activated. Now
that triggers have a DEFINER value,
CURRENT_USER() evaluates to the trigger
definer. (Bug#5861)
CREATE TABLE could crash the server and write
invalid data into the tbl_name
(...) SELECT ....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)
A newline character in a column alias in a view definition caused an error when selecting from the view later. (Bug#13622)
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)
The grammar for supporting the DEFINER =
CURRENT_USER clause in CREATE
VIEW and ALTER VIEW was
incorrect. (Bug#14719)
Queries on ARCHIVE tables that used the
filesort sorting method could result in a
server crash. (Bug#14433)
The mysql_stmt_fetch() C APP function could
return MYSQL_NO_DATA for a SELECT
COUNT(*) FROM statement, which should return 1 row. (Bug#14845)
tbl_name WHERE 1 =
0
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)
A server crash resulted from the following sequence of events:
1) With no default database selected, create a stored
procedure with the procedure name explicitly qualified with a
database name (CREATE PROCEDURE
). 2) Create another stored procedure with no
database name qualifier. 3) Execute db_name.proc_name
...SHOW PROCEDURE
STATUS. (Bug#14569)
Complex subqueries could cause improper internal query execution environment initialization and crash the server. (Bug#14342)
For a table that had been opened with HANDLER
OPEN, issuing OPTIMIZE TABLE,
ALTER TABLE, or REPAIR
TABLE caused a server crash. (Bug#14397)
A server crash could occur if a prepared statement invoked a stored procedure that existed when the statement was prepared but had been dropped and re-created prior to statement execution. (Bug#12329)
A server crash could occur if a prepared statement updated a table for which a trigger existed when the statement was prepared but had been dropped prior to statement execution. (Bug#13399)
Statements that implicitly commit a transaction are prohibited in stored functions and triggers. An attempt to create a function or trigger containing such a statement produces an error. (Bug#13627) (The originally reported symptom was that a trigger that dropped another trigger could cause a server crash. That problem was fixed by the patch for Bug#13343.)
Functionality added or changed:
When trying to run the server with yaSSL enabled, MySQL now
tries to open /dev/random automatically
if /dev/urandom is not available. (Bug#13164)
The read_only system variable no longer
applies to TEMPORARY tables. (Bug#4544)
Due to changes in binary logging, the restrictions on which
stored routine creators can be trusted not to create unsafe
routines have been lifted for stored procedures (but not
stored functions). Consequently, the
log_bin_trust_routine_creators system
variable and the corresponding
--log-bin-trust-routine-creators server
option were renamed to
log_bin_trust_function_creators and
--log-bin-trust-function-creators. For
backward compatibility, the old names are recognized but
result in a warning. See
Section聽17.4, 鈥淏inary Logging of Stored Routines and Triggers鈥.
Added the Compression status variable,
which indicates whether the client connection uses compression
in the client/server protocol.
In MySQL 5.0.13, syntax for DEFINER and
SQL SECURITY clauses was added to the
CREATE VIEW and ALTER
VIEW statements, but the clauses had no effect. They
now are enabled. They specify the security context to be used
when checking access privileges at view invocation time. See
Section聽19.2, 鈥CREATE VIEW Syntax鈥, for more information.
The InnoDB, NDB,
BDB, and ARCHIVE storage
engines now support spatial columns. See
Chapter聽16, Spatial Extensions.
The CHECK TABLE statement now works for
ARCHIVE tables.
You must now declare a prefix for an index on any column of
any Geometry class, the only exception
being when the column is a POINT. (Bug#12267)
Added a --hexdump option to
mysqlbinlog that displays a hex dump of the
log in comments. This output can be helpful for replication
debugging.
MySQL 5.0 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)
When a date column is set NOT NULL and
contains 0000-00-00, it will be updated for
UPDATE statements that contains
in the WHERE clause. (Bug#14186)
columnname IS
NULL
Bugs fixed:
When the DATE_FORMAT() function appeared
in both the SELECT and ORDER
BY clauses of a query but with arguments that differ
by case (i.e. %m and %M), incorrect sorting may have occurred.
(Bug#14016)
For InnoDB tables, using a column prefix
for a utf8 column in a primary key caused
Cannot find record errors when attempting
to locate records. (Bug#14056)
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)
InnoDB: Large
innobase_buffer_pool_size and
innobase_log_file_size values were
displayed incorrectly on 64-bit systems. (Bug#12701)
InnoDB: When dropping and adding a
PRIMARY KEY, if a loose index scan using
only the second part of multiple-part index was chosen,
incorrect keys were created and an endless loop resulted. (Bug#13293)
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)
Selecting from a table in both an outer query and a subquery could cause a server crash. (Bug#14482)
SHOW CREATE TABLE did not display the
CONNECTION string for
FEDERATED tables. (Bug#13724)
For some stored functions dumped by mysqldump --routines, the function definition could not be reloaded later due to a parsing error. (Bug#14723)
For a MyISAM table originally created in
MySQL 4.1, INSERT DELAYED could cause a
server crash. (Bug#13707)
The --exit-info=65536 option conflicted with
--temp-pool and caused problems with the
server's use of temporary files. Now
--temp-pool is ignored if
--exit-info=65536 is specified. (Bug#9551)
ORDER BY DESC within the
GROUP_CONCAT() function was not honored
when used in a view. (Bug#14466)
A comparison with an invalid date (such as WHERE
) caused any index on
col_name >
'2005-09-31'col_name not to be used and a
string comparison for each row, resulting in slow performance.
(Bug#14093)
Within stored routines, REPLACE() could
return an empty string (rather than the original string) when
no replacement was done, and IFNULL() could
return garbage results. (Bug#13941)
Inserts of too-large DECIMAL values were
handled inconsistently (sometimes set to the maximum
DECIMAL value, sometimes set to 0). (Bug#13573)
Executing REPAIR TABLE, ANALYZE
TABLE, or OPTIMIZE TABLE on a
view for which an underlying table had been dropped caused a
server crash. (Bug#14540)
A prepared statement that selected from a view processed using the merge algorithm could crash on the second execution. (Bug#14026)
Deletes from a CSV table could cause table
corruption. (Bug#14672)
An update of a CSV table could cause a
server crash. (Bug#13894)
For queries with nested outer joins, the optimizer could choose join orders that query execution could not handle. The fix is that now the optimizer avoids choosing such join orders. (Bug#13126)
Starting mysqld with the
--skip-innodb and
--default-storage-engine=innodb (or
--default-table-type=innodb caused a server
crash. (Bug#9815, re-fix of bug from 5.0.5)
mysqlmanager did not start up correctly on Windows 2003. (Bug#14537)
The parser did not correctly recognize wildcards in the host
part of the DEFINER user in CREATE
VIEW statements. (Bug#14256)
Memory corruption and a server crash could be caused by
statements that used a cursor and generated a result set
larger than max_heap_table_size. (Bug#14210)
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 mysql parser did not properly strip the
delimiter from input lines less than nine characters long. For
example, this could cause USE abc; to
result in an Unknown database: abc; error.
(Bug#14358)
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)
Some updatable views could not be updated. (Bug#14027)
Running OPTIMIZE TABLE and other
data-updating statements concurrently on an
InnoDB table could cause a crash or the
following warnings in the error log: Warning: Found
locks from different threads in write: enter
write_lock, Warning: Found locks from
different threads in write: start of release lock.
(Bug#11704)
Indexes for BDB tables were being limited
incorrectly to 255 bytes. (Bug#14381)
Use of in the
col_name =
VALUES(col_name)ON DUPLICATE KEY UPDATE clause of an
INSERT statement failed with an
Column ' error. (Bug#13392)
col_name' in field
list is ambiguous
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)
mysqldump could not dump views if the
-x option was given. (Bug#12838)
mysqlimport now issues a SET
@@character_set_database = binary statement before
loading data so that a file containing mixed character sets
(columns with different character sets) can be loaded
properly. (Bug#12123)
Use of the deprecated --sql-bin-update-same
option caused a server crash. (Bug#12974)
Maximum values were handled incorrectly for command-line
options of type GET_LL. (Bug#12925)
For a user that has the SELECT privilege on
a view, the server erroneously was also requiring the user to
have the EXECUTE privilege at view
execution time for stored functions used in the view
definition. (Bug#9505)
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)
Using ALTER TABLE to add an index could
fail if the operation ran out of temporary file space. Now it
automatically makes a second attempt that uses a slower method
but no temporary file. In this case, problems that occurred
during the first attempt can be displayed with SHOW
WARNINGS. (Bug#12166)
The input polling loop for Instance Manager did not sleep properly. Instance Manager used up too much CPU as a result. (Bug#14388)
Trying to take the logarithm of a negative value is now
handled in the same fashion as division by zero. That is, it
produces a warning when
ERROR_FOR_DIVISION_BY_ZERO is set, and an
error in strict mode. (Bug#13820)
LOAD DATA INFILE would not accept the same
character for both the ESCAPED BY and the
ENCLOSED BY clauses. (Bug#11203)
The value of Last_query_cost was not
updated for queries served from the query cache. (Bug#10303)
TIMESTAMPDIFF() returned an incorrect
result if one argument but not the other was a leap year and a
date was from March or later. (Bug#13534)
The server incorrectly accepted column definitions of the form
DECIMAL(0, for
D)D less than 11. (Bug#13667)
The displayed value for the
CHARACTER_MAXIMUM_LENGTH column in the
INFORMATION_SCHEMA.COLUMNS table was not
adjusted for multi-byte character sets. (Bug#14290)
A bugfix in MySQL 5.0.15 caused the displayed values for the
CHARACTER_MAXIMUM_LENGTH and
CHARACTER_OCTET_LENGTH columns in the
INFORMATION_SCHEMA.COLUMNS table to be
reversed. (Bug#14207)
On Windows, the value of character_sets_dir
in SHOW VARIABLES output was displayed
inconsistently (using both 鈥/鈥
and 鈥\鈥 as pathname component
separators). (Bug#14137)
Subqueries in the FROM clause failed if the
current database was INFORMATION_SCHEMA.
(Bug#14089)
Corrected a parser precedence problem that resulted in an
Unknown column ... in 'on clause' error for
some joins. (Bug#13832)
For LIKE ... ESCAPE, an escape sequence
longer than one character was accepted as valid. Now the
sequence must be empty or one character long. If the
NO_BACKSLASH_ESCAPES SQL mode is enabled,
the sequence must be one character long. (Bug#12595)
SELECT DISTINCT
CHAR( returned
incorrect results after col_name)SET NAMES utf8.
(Bug#13233)
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)
Inserting a new row into an InnoDB table
could cause DATETIME values already stored
in the table to change. (Bug#13900)
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)
Inserting cp932 strings into a
VARCHAR column caused a server crash rather
than string truncation if the string was longer than the
column definition. (Bug#12547)
Two threads that were creating triggers on an
InnoDB table at the same time could
deadlock. (Bug#12739)
mysqladmin and mysqldump would hang on SCO OpenServer. (Bug#13238)
Where one stored procedure called another stored procedure: If
the second stored procedure generated an exception, the
exception was not caught by the calling stored procedure. For
example, if stored procedure A used an
EXIT statement to handle an exception,
subsequent statements in A would be
executed regardless when A was called by
another stored procedure B, even if an
exception that should have been handled by the
EXIT was generated in A.
(Bug#7049)
Trying to create a stored routine with no database selected would crash the server. (Bug#13514, Bug#13587)
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)
Trying to compile the server using the
--without-geometry option caused the build to
fail. (Bug#12991)
Functionality added or changed:
Warning: Incompatible change.
For BINARY columns, the pad value and how
it is handled has changed. The pad value for inserts now is
0x00 rather than space, and there is no
stripping of the pad value for selects. For details, see
Section聽11.4.2, 鈥淭he BINARY and VARBINARY Types鈥.
Warning: Incompatible change.
The CHAR() function now returns a binary
string rather than a string in the connection character set.
An optional USING
clause may be
used to produce a result in a specific character set instead.
Also, arguments larger than 256 produce multiple characters.
They are no longer interpreted modulo 256 to produce a single
character each. These changes may cause some
incompatibilities, as noted in
Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
charset
NDB Cluster: 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)
NDB Cluster: The ndb_mgm
client now reports node startup phases automatically. (Bug#16197)
When executing single-table UPDATE or
DELETE queries containing an ORDER
BY ... LIMIT clause,
but not having any NWHERE 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)
Added the --tz-utc option to
mysqldump. This option adds SET
TIME_ZONE='+00:00' to the dump file so that
TIMESTAMP columns can be dumped and
reloaded between servers in different time zones and protected
from changes due to daylight saving time. (Bug#13052)
When declaring a local variable (or parameter) named
password or name, and
setting it with SET (for example,
SET password = ''), the new error message
ERROR 42000: Variable 'nnn' must be quoted with
`...`, or renamed is returned (where 'nnn' is
'password' or 'names'). This means there is a syntax conflict
with special sentences like SET PASSWORD =
PASSWORD(...) (for setting a user's password) and
set names default (for setting charset and
collation).
This must be resolved either by quoting the variable name:
SET `password` = ..., which will set the
local variable `password`, or by renaming
the variable to something else (if setting the user's password
is the desired effect).
The following statements now cause an implicit
COMMIT:
CREATE VIEW
ALTER VIEW
DROP VIEW
CREATE TRIGGER
DROP TRIGGER
CREATE USER
RENAME USER
DROP USER
NDBCluster: A number of new or improved
error messages have been implemented in this release in order
to provide better and more accurate diagnostic information
regarding cluster configuration issues and problems. (Bug#11739, Bug#11749, Bug#12044, Bug#12786, Bug#13197)
NDBCluster: A new 鈥smart鈥 node
allocation algorithm means that it is no longer necessary to
use sequential IDs for cluster nodes, and that nodes not
explicitly assigned IDs should now have IDs allocated
automatically in most cases. In practical terms, this means
that it is now possible to assign a set of node IDs such as
1, 2,
4, 5 without an error
being generated due to the missing 3. (Bug#13009)
Bugs fixed:
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)
An expression in an ORDER BY clause failed
with Unknown column
' if the expression referred to a column
alias. (Bug#11694)
col_name' in 'order
clause'
mysqldump could not dump views. (Bug#14061)
Using an undefined variable in an IF or
SET clause inside a stored routine produced
an incorrect unknown column ... in 'order
clause' error message. (Bug#13037)
Trying to create a view dynamically using a prepared statement within a stored procedure failed with error 1295. (Bug#13095)
mysqldump --triggers did not quote
identifiers properly if the --compatible
option was given, so the dump output could not be reloaded.
(Bug#13146)
Character set conversion was not being done for
FIND_IN_SET(). (Bug#13751)
CAST(1E+300 TO SIGNED INT) produced an
incorrect result on little-endian machines. (Bug#13344)
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)
InnoDB: Queries that were executed using an
index_merge union or intersection could
produce incorrect results if the underlying table used the
InnoDB storage engine and had a primary key
containing VARCHAR members. (Bug#13484)
CREATE DEFINER=... VIEW ... caused the
server to crash when run with
--skip-grant-tables. (Bug#13504)
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)
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)
An UPDATE query using a join would be
executed incorrectly on a replication slave. (Bug#12618)
Server crashed during a SELECT statement,
writing a message like this to the error log:
InnoDB: Error: MySQL is trying to perform a SELECT InnoDB: but it has not locked any tables in ::external_lock()!
NDBCluster: ndb_mgmd
would allow a node to be stopped or restarted while another
node was still starting up, which could crash the cluster. It
should now not be possible to issue a node stop or restart
while a different node is still restarting, and the cluster
management client issues an error if an attempt is made to do
so. (Bug#13461)
NDBCluster: Placing multiple [TCP
DEFAULT] sections in the cluster
config.ini file crashed
ndb_mgmd. (The ndb_mgmd
process now exits gracefully with an appropriate error message
instead.) (Bug#13611)
NDBCluster: Trying to run
ndbd as system root when
connecting to a mysqld process running as
the mysql system user via SHM caused the
ndbd process to crash.
(ndbd should now exit gracefully with an
appropriate error message instead.) (Bug#9249)
Server may over-allocate memory when performing a
FULLTEXT search for stopwords only. (Bug#13582)
Queries that use indexes in normal SELECT
statements may cause range scans in VIEWs.
(Bug#13327)
When calling a stored procedure with the syntax CALL
and no default schema selected, schema.procedurenameERROR 1046
was displayed after the procedure returned. (Bug#13616)
With --log-slave-updates
Exec_master_log_pos of SQL thread lagged IO
(Bug#13023)
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)
A column in the ON condition of a join that
referenced a table in a nested join could not be resolved if
the nested join was a right join. (Bug#13597)
A qualified reference to a view column in the
HAVING clause could not be resolved. (Bug#13410)
comp_err did not detect when multiple error messages for a language were given for an error symbol. (Bug#13071)
For XA transaction IDs
(),
uniqueness is supposed to be assessed based on
gtrid.bqual.formatIDgtrid and
bqual. MySQL was also including
formatID in the uniqueness check.
(Bug#13143)
Local (non-XA) and XA transactions are supposed to be mutually exclusive within a given client connection, but this prohibition was not always enforced. (Bug#12935)
mysqlcheck --all-databases
--analyze
--optimize failed because it also
tried to analyze and optimize the
INFORMATION_SCHEMA tables which it can't.
(Bug#13783)
SELECT * INTO OUTFILE ... FROM
INFORMATION_SCHEMA.schemata failed with an
Access denied error. (Bug#13202)
A table or view named 脟 (C-cedilla) couldn't be dropped. (Bug#13145)
Tests containing SHOW TABLE STATUS or
INFORMATION_SCHEMA failed on opnsrv6c.
(Bug, #14064, Bug#14065)
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)
Re-enabled the --delayed-inserts option for
mysqldump, which now checks for each table
dumped whether its storage engine supports
DELAYED inserts. (Bug#7815)
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)
When an InnoDB foreign key constraint is
violated, the error message now indicates which table, column,
and constraint names are involved. (Bug#3443)
Configure-time checking for the availability of multi-byte
macros and functions in the bundled
readline library. This improves handling of
multi-byte character sets in the mysql
client. (Bug#3982)
The CHAR() function now takes into account
the character set and collation given by the
character_set_connection and
collation_connection system variables. For
an argument n to
CHAR(), the result is
n mod 256 for single-byte character
sets. For multi-byte character sets,
n must be a valid code point in the
character set. Also, the result string from
CHAR() is checked for well-formedness. For
invalid arguments, or a result that is not well-formed, MySQL
generates a warning (or, in strict SQL mode, an error). (Bug#10504)
RENAME TABLE now works for views as well,
as long as you do not try to rename a view into a different
database. (Bug#5508)
Multiple-table UPDATE and
DELETE statements that do not affect any
rows are now written to the binary log and will replicate.
(Bug#13348, Bug#12844)
Range scans can now be performed for queries on VIEWs such as
column IN (<constants>) and
column BETWEEN ConstantA AND ConstantB.
(Bug#13317)
Bugs fixed:
Certain joins using Range checked for each
record in the query execution plan could cause the
server to crash. (Bug#24776)
NDBCluster: A trigger updating the value of
an AUTO_INCREMENT column in a Cluster table
would insert an error code rather than the expected value into
the column. (Bug#13961)
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)
CHECKSUM TABLE locked
InnoDB tables and did not use a consistent
read. (Bug#12669)
The --skip-innodb-doublewrite option disables
use of the InnoDB doublewrite buffer.
However, having this option in effect when creating a new
MySQL installation prevented the buffer from even being
created, resulting in a server crash later. (Bug#13367)
MySQL programs in binary distributions for Solaris 8/9/10 x86 systems would not run on Pentium III machines. (Bug#6772)
When SELECT ... FOR UPDATE or
SELECT ... LOCK IN SHARE MODE for an
InnoDB table were executed from within a
stored function or a trigger, they were converted to a
non-locking consistent read. (Bug#11238)
NDB Cluster: If
ndb_restore could not find a free
mysqld process, it crashed. (Bug#13512)
NDB Cluster: Receipt of several
enter single user mode commands by multiple
ndb_mgmd processes within a short period of
time resulted in cluster shutdown. (Bug#13053)
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_mgmd output for SHOW
would display the same IP address for both processes, even
when they were on different hosts. (Bug#11595)
NDB Cluster: Queries on
NDB tables that are executed using
index_merge/union or
index_merge/intersection could produce
incorrect results. (Bug#13081)
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)
Nested handlers within stored procedures didn't work. (Bug#6127)
The optimizer chose a less efficient execution plan for
than for
col_name BETWEEN
const AND
const, even though the
two expressions are logically equivalent. Now the optimizer
can use the col_name =
constref access method for both
expressions. (Bug#13455)
Incorrect creation of DECIMAL local
variables in a stored procedure could cause a server crash.
(Bug#12589)
Queries against a MERGE table that has a
composite index could produce incorrect results. (Bug#9112)
The server was not rejecting
FLOAT(
or
M,D)DOUBLE(
columns specifications when M,D)M was
less than D. (Bug#12694)
After running configure with the
--without-server option, the distribution
failed to build. (Bug#11680, Bug#13550)
Joins nested under NATURAL or
USING joins were sometimes not initialized
properly, causing a server crash. (Bug#13545)
Locking a view with the query cache enabled and
query_cache_wlock_invalidate enabled could
cause a server crash. (Bug#13424)
A HAVING clause that references an
unqualified view column name could crash the server. (Bug#13411)
Comparisons involving row constructors containing constants could cause a server crash. (Bug#13356)
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)
Calling the FORMAT() function with a
DECIMAL column value caused a server crash
when the value was NULL. (Bug#13361)
Aggregate functions sometimes incorrectly were allowed in the
WHERE clause of UPDATE
and DELETE statements. (Bug#13180)
It was possible to create a view that executed a stored
function for which you did not have the
EXECUTE privilege. (Bug#12812)
BIT columns and following columns in
NDB tables were corrupt when dumped by
mysqldump. (Bug#13152)
NATURAL joins and joins with
USING against a view could return
NULL rather than the correct value. (Bug#13127)
Use of a user-defined function within the
HAVING clause of a query resulted in an
Unknown column error. (Bug#11553)
For queries for which the optimizer determined a join type of
鈥Range checked for each record鈥 (as shown by
EXPLAIN, the query sometimes could cause a
server crash, depending on the data distribution. (Bug#12291)
For queries with DISTINCT and WITH
ROLLUP, the DISTINCT should be
applied after the rollup operation, but was not always. (Bug#12887)
The server crashed when processing a view that invoked the
CONVERT_TZ() function. (Bug#11416)
Shared-memory connections were not working on Windows. (Bug#12723)
Functionality added or changed:
The syntax for CREATE VIEW and
ALTER VIEW statements now includes
DEFINER and SQL SECURITY
clauses for specifying the security context to be used when
checking access privileges at view invocation time. (The
syntax is present in 5.0.13, but these clauses have no effect
until 5.0.16.) See Section聽19.2, 鈥CREATE VIEW Syntax鈥, for more
information.
The --hex-dump option for
mysqldump now also applies to
BIT columns.
Added a --routines option for
mysqldump that enables dumping of stored
routines. (Bug#9056)
The connection string for FEDERATED tables
now is specified using a CONNECTION table
option rather than a COMMENT table option.
Better detection of connection timeout for replication servers
on Windows allows elimination of extraneous Lost
connection errors in the error log. (Bug#5588)
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 values before the
variables roll over and restart from 0. (Bug#12920)
The restriction on the use of PREPARE,
EXECUTE, and DEALLOCATE
PREPARE within stored procedures was lifted. The
restriction still applies to stored functions and triggers.
(Bug#10975, Bug#7115, Bug#10605)
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
OPTIMIZE TABLE and
HANDLER now are prohibited in stored
procedures and functions and in triggers. (Bug#12953, Bug#12995)
InnoDB: The TRUNCATE
TABLE statement for InnoDB tables
always resets the counter for an
AUTO_INCREMENT column now, regardless of
whether there is a foreign key constraint on the table.
(Beginning with 5.0.3, TRUNCATE TABLE reset
the counter, but only if there was no such constraint.) (Bug#11946)
The LEAST() and
GREATEST() functions used to return
NULL only if all arguments were
NULL. Now they return
NULL if any argument is
NULL, the same as Oracle. (Bug#12791)
Two new collations have been added for Esperanto:
utf8_esperanto_ci and
ucs2_esperanto_ci.
Reorder network startup to come after all other initialization, particularly storage engine startup which can take a long time. This also prevents MySQL from being run on a privileged port (any port under 1024) unless run as the root user. (Bug#11707)
The Windows binary packages are now compiled with the Microsoft Visual Studio 2003 compiler instead of Microsoft Visual C++ 6.0.
The binaries compiled with the Intel icc compiler are now built using icc 9.0 instead of icc 8.1. You will have to install new versions of the Intel icc runtime libraries, which are available from here: ( http://dev.mysql.com/downloads/os-linux.html)
RAND() no longer allows non-constant
initializers. (Prior to MySQL 5.0.13, the effect of
non-constant initializers is undefined.) (Bug#6172)
Bugs fixed:
Incompatible change: A lock
wait timeout caused InnoDB to roll back the
entire current transaction. Now it rolls back only the most
recent SQL statement. (Bug#12308)
The FEDERATED storage engine does not
support ALTER TABLE, but no appropriate
error message was issued. (Bug#13108)
mysqldump did not dump triggers properly. (Bug#12597)
NDBCluster: The average row size for
Cluster tables was being calculated incorrectly. This affected
the values shown for the Data_length and
Avg_row_length columns in the output
generated by SHOW TABLE STATUS as well as
the values for the data_length and
data_length/table_rows columns shown in the
TABLES table of the
INFORMATION_SCHEMA database with respect to
Cluster tables (tables using other storage engines were not
affected by this bug). (Bug#9896)
Within a stored procedure, fetching a large number of rows in
a loop using a cursor could result in a server crash or an out
of memory error. Also, values inserted within a stored
procedure using a cursor were interpreted as
latin1 even if character set variables had
been set to a different character set. (Bug#6513, Bug#9819)
For a server compiled with yaSSL, clients that used MySQL Connector/J were not able to establish SSH connections. (Bug#13029)
When used in view definitions,
DAYNAME(,
expr)DAYOFWEEK(,
expr)WEEKDAY(
were incorrectly treated as though the expression was
expr)TO_DAYS( or
expr)TO_DAYS(TO_DAYS(.
(Bug#13000)
expr))
Incorrect implicit nesting of joins caused the parser to fail
on queries of the form SELECT ... FROM t1 JOIN t2
JOIN t3 ON t1.t1col = t3.t3col with an
Unknown column 't1.t1col' in 'on clause'
error. (Bug#12943)
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)
A column that can be NULL was not handled
properly for WITH ROLLUP in a subquery or
view. (Bug#12885)
Within a transaction, the following statements now cause an
implicit commit: CREATE FUNCTION,
DROP FUNCTION, DROP
PROCEDURE, ALTER FUNCTION,
ALTER PROCEDURE, CREATE
PROCEDURE. This corrects a problem where these
statements followed by ROLLBACK might not
be replicated properly. (Bug#12870)
Simultaneous execution of DML statements and CREATE
TRIGGER or DROP TRIGGER
statements on the same table could cause server crashes or
errors. (Bug#12704)
If a stored function invoked from a SELECT
failed with an error, it could cause the client connection to
be dropped. Now such errors generate warnings instead so as
not to interrupt the SELECT. (Bug#12379)
A concurrency problem for CREATE ... SELECT
could cause a server crash. (Bug#12845)
The server incorrectly generated an Unknown
table error message when for attempts to drop tables
in the INFORMATION_SCHEMA database. Now it
issues an Access denied message. (Bug#9846)
The server allowed privileges to be granted explicitly for the
INFORMATION_SCHEMA database. Such
privileges are always implicit and should not be grantable.
(Bug#10734)
The server allowed TEMPORARY tables and
stored procedures to be created in the
INFORMATION_SCHEMA database. (Bug#9683,
Bug#10708)
The server failed to disallow SET
AUTOCOMMIT in stored functions and triggers. It is
allowed to change the value of AUTOCOMMIT
in stored procedures, but a runtime error might occur if the
procedure is invoked from a stored function or trigger. (Bug#12712)
Using an INOUT parameter with a
DECIMAL data type in a stored procedure
caused a server crash. (Bug#12979)
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 mysql.server script contained
incorrect path for the libexec directory.
(Bug#12550)
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)
Using AS to rename a column selected from a
view in a subquery made it not possible to refer to that
column in the outer query. (Bug#12993)
The character_set_system system variable
could not be selected with SELECT
@@character_set_system. (Bug#11775)
A view-creation statement of the form CREATE VIEW
failed with a
name AS SELECT ... FROM
tbl_name AS
nameNot unique table/alias:
' error. (Bug#6808)
name'
UNION [DISTINCT] was not removing all
duplicates for multi-byte character values. (Bug#12891)
Multiplying a DECIMAL value within a loop
in a stored routine could incorrectly result in a value of
NULL. (Bug#12938)
mysql and mysqldump were
ignoring the --defaults-extra-file option.
(Bug#12917)
Columns named in the USING() clause of
JOIN ... USING() were incorrectly resolved
in case-sensitive fashion. (Bug#13067)
Local variables in stored routines were not always initialized correctly. (Bug#13133)
SHOW FIELDS FROM
caused error 1046 when no default schema was set. (Bug#12905)
schemaname.viewname
The value of character_set_results could be
set to NULL, but returned the string
"NULL" when retrieved. (Bug#12363)
InnoDB: Limit recursion depth to 200 in
deadlock detection to avoid running out of stack space. (Bug#12588)
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(
condition, or an value_list)IF() condition. (Bug#12101, Bug#12102)
SHOW FIELDS truncated the
TYPE column to 40 characters. (Bug#7142)
Use of PREPARE and
EXECUTE with a statement that selected from
a view in a subquery could cause a server crash. (Bug#12651)
On HP-UX 11.x (PA-RISC), the -L option caused
mysqlimport to crash. (Bug#12958)
If the binary log is enabled, execution of a stored procedure that modifies table data and uses user variables could cause a server crash or incorrect information to be written to the binary log. (Bug#12637)
Queries with subqueries, where the inner subquery uses the
range or index_merge
access method, could return incorrect results. (Bug#12720)
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)
A bug introduced in MySQL 5.0.12 caused SHOW TABLE
STATUS to display an
Auto_increment value of 0 for
InnoDB tables. (Bug#12973)
Foreign keys were not properly enforced in
TEMPORARY tables. Foreign keys now are
disallowed in TEMPORARY tables. (Bug#12084)
Replication of LOAD DATA INFILE failed
between systems using different pathname syntax (such as
delimiter characters). (Bug#11815)
Within a stored procedure, a server crash was caused by
assigning to a VARCHAR INOUT parameter the
value of an expression that included the variable itself. (For
example, SET c = c.) (Bug#12849)
SELECT ... JOIN ... ON ... JOIN ... USING
caused a server crash. (Bug#12977)
Using GROUP BY when selecting from a view
in some cases could cause incorrect results to be returned.
(Bug#12922)
myisampack did not properly pack
BLOB values larger than
224 bytes. (Bug#4214)
Incorrect results could be returned from a view processed using a temporary table. (Bug#12941)
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)
InnoDB: A consistent read could return
inconsistent results due to a bug introduced in MySQL 5.0.5.
(Bug#12947)
Deadlock occurred when several account management statements
were run (particularly between FLUSH
PRIVILEGES/SET PASSWORD and
GRANT/REVOKE
statements). (Bug#12423)
The Windows installer made a change to one of the
mysql.proc table files, causing stored
routine functionality to be compromised. The Windows installer
now never overwrites files in the MySQL data directory. During
an upgrade from one version to another, a file in the data
directory will not be overwritten even if it has not been
modified since it was put there by an older installer.
If you have already lost access to stored routines because of this problem, you can get them back using the following procedure:
Stop the server.
In the mysql\data directory under
your MySQL installation directory, and replace the
proc.frm file with corresponding file
from the version of MySQL that you were using before you
upgraded.
Start the server
Start the mysql command-line client
(use the root account or another
account that has full database privileges) and execute the
mysql_fix_privilege_tables.sql script
that upgrades the grant tables to the current structure.
Instructions for doing this are given in
Section聽5.5.4, 鈥mysql_fix_privilege_tables 鈥 Upgrade MySQL System Tables鈥.
After this, all stored routine functionality should work. (Bug#12820)
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 allowed 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)
Use of the mysql client
HELP command from within a stored routine
caused a 鈥packets out of order鈥 error and a lost
connection. Now HELP is detected and
disallowed within stored routines. (Bug#12490)
Use of yaSSL for a secure client connection caused
LOAD DATA LOCAL INFILE to fail. (Bug#11286)
SHOW CREATE PROCEDURE and SHOW
CREATE FUNCTION no longer qualify the routine name
with the database name, for consistency with the behavior of
SHOW CREATE TABLE. (Bug#10362)
A UNION of long utf8
VARCHAR 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)
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)
ALTER TABLE ... DISCARD TABLESPACE for
non-InnoDB table caused the client to lose
the connection. (The server was not returning the error
properly.) (Bug#12207)
DO IFNULL(NULL, NULL) and SELECT
CAST(IFNULL(NULL, NULL) AS DECIMAL) caused a server
crash. (Bug#12841)
When using a cursor, a SELECT statement
that uses a GROUP BY clause could return
incorrect results. (Bug#11904)
The SYSDATE() function now returns the time
at which it was invoked. In particular, within a stored
routine or trigger, SYSDATE() returns the
time at which it executes, not the time at which the stored
routine or triggering statement began to execute. (Bug#12480)
CREATE VIEW inside a stored procedure
caused a server crash if the table underlying the view had
been deleted. (Bug#12468)
A memory leak resulting from repeated SELECT ...
INTO statements inside a stored procedure could
cause the server to crash. (Bug#11333)
Functionality added or changed:
Incompatible change:
Beginning with MySQL 5.0.12, natural joins and joins with
USING, including outer join variants, are
processed according to the SQL:2003 standard. The changes
include elimination of redundant output columns for
NATURAL joins and joins specified with a
USING clause and proper ordering of output
columns. (Bug#6136, Bug#6276, Bug#6489, Bug#6495, Bug#6558, Bug#9067, Bug#9978, Bug#10428, Bug#10646, Bug#10972.) The precedence of the comma operator also now is
lower compared to JOIN. (Bug#4789, Bug#12065, Bug#13551.)
These changes make MySQL more compliant with standard SQL.
However, they can result in different output columns for some
joins. Also, some queries that appeared to work correctly
prior to 5.0.12 must be rewritten to comply with the standard.
For details about the scope of the changes and examples that
show what query rewrites are necessary, see
Section聽13.2.7.1, 鈥JOIN Syntax鈥.
Recursive triggers are detected and disallowed. Also, within a stored function or trigger, it is not allowable to modify a table that is already being used (for reading or writing) by the statement that invoked the function or trigger. (Bug#11896, Bug#12644)
SHOW TABLE STATUS for a view now shows
VIEW in uppercase, consistent with
SHOW TABLES and
INFORMATION_SCHEMA. (Bug#5501)
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)
Calls to stored procedures were written to the binary log even within transactions that were rolled back, causing them to be executed on replication slaves. (Bug#12334)
Interleaved execution of stored procedures and functions could be written to the binary log incorrectly, causing replication slaves to get out of sync. (Bug#12335)
A query of the form SHOW TABLE STATUS FROM
would
crash the server. (Bug#12636)
db_name WHERE name IN
(select_query)
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)
Using DESCRIBE on a view after renaming a
column in one of the view's base tables caused the server to
crash. (Bug#12533)
SHOW OPEN TABLES now supports
FROM and LIKE clauses.
(Bug#12183)
SHOW TABLE STATUS FROM INFORMATION_SCHEMA
now sorts output by table name the same as it does for other
databases. (Bug#12315)
SHOW ENGINE INNODB STATUS now can display
longer query strings. (Bug#7819)
Added the SLEEP() function, which pauses
for the number of seconds given by its argument. (Bug#6760)
Trying to drop the default keycache by setting
@@global.key_buffer_size to zero now
returns a warning that the default keycache cannot be dropped.
(Bug#10473)
The stability of cursors when used with
InnoDB tables was greatly improved. (Bug#11832, Bug#12243, Bug#11309)
It is no longer possible to issue FLUSH
commands from within stored functions or triggers. See
Section聽F.1, 鈥淩estrictions on Stored Routines and Triggers鈥, for details. (Bug#12280, Bug#12307)
INFORMATION_SCHEMA objects are now reported
as a SYSTEM VIEW table type. (Bug#11711)
Bugs fixed:
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)
A data type of CHAR BINARY was not
recognized as valid for stored routine parameters. (Bug#9048)
SET GLOBAL TRANSACTION ISOLATION LEVEL was
not working. (Bug#11207)
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)
mysql_fix_privilege_tables.sql was
missing a comma, causing a syntax error when executed. (Bug#12705)
STRCMP() was not handled correctly in
views. (Bug#12489)
NDB Cluster: Bad values in
config.ini caused
ndb_mdmd to crash. (Bug#12043)
TRUNCATE TABLE did not work with
TEMPORARY InnoDB tables.
(Bug#11816)
Built-in commands for the mysql client,
such as delimiter and \d
are now always parsed within files that are read using the
\. and source commands.
(Bug#11523)
ALTER TABLE did not move the
table to default database unless the new name was qualified
with the database name. (Bug#11493)
db_name.t
RENAME t
It was not possible to create a stored function with a spatial return value data type. (Bug#10499)
The only valid values for the PACK_KEYS
table option are 0 and 1, but other values were being
accepted. (Bug#10056)
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 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)
Improper use of loose index scan in InnoDB
sometimes caused incorrect query results. (Bug#12672)
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)
Joins on VARCHAR columns of different
lengths could produce incorrect results. (Bug#11398)
A 鈥Duplicate column name鈥 error no longer occurs
when selecting from a view defined as SELECT
* from a join that uses a USING
clause on tables that have a common column name. (Bug#6558)
Invocations of the SLEEP() function
incorrectly could get optimized away for statements in which
it occurs. Statements containing SLEEP()
incorrectly could be stored in the query cache. (Bug#12689)
NDB Cluster: An ALTER
TABLE command caused loss of data stored prior to
the issuing of the command. (Bug#12118)
Query cache is switched off if a thread (connection) has tables locked. This prevents invalid results where the locking thread inserts values between a second thread connecting and selecting from the table. (Bug#12385)
NOW(), CURRENT_TIME and
values generated by timestamp columns are now constant for the
duration of a stored function or trigger. This prevents the
breaking of statements-based replication. (Bug#12480, Bug#12481)
Some statements executed on a master server caused the SQL thread on a slave to run out of memory. (Bug#12532)
A SELECT DISTINCT query with a constant
value for one of the columns would return only a single row.
(Bug#12625)
NDB Cluster: Cluster failed to take
character set data into account when recomputing hashes (and
thus could not locate records for updating or deletion)
following a configuration change and node restart. (Bug#12220)
NDB Cluster: Wrong error message displayed
when cluster management server closed port while
mysqld was connecting. (Bug#10950)
A view was allowed to depend on a function that referred to a temporary table. (Bug#10970)
Prepared statement parameters could cause errors in the binary
log if the character set was cp932. (Bug#11338)
The CREATE_OPTIONS column of
INFORMATION_SCHEMA.TABLES showed incorrect
options for tables in INFORMATION_SCHEMA.
(Bug#12397)
MEMORY tables using
B-Tree index on 64-bit platforms could
produce false table is full errors. (Bug#12460)
Issuing FLUSH INSTANCES followed by
STOP INSTANCE caused instance manager to
crash. (Bug#10957)
Duplicate instructions in stored procedures resulted in incorrect execution when the optimizer optimized the duplicate code away. (Bug#12168)
SHOW TABLES FROM returned wrong error
message if the schema specified did not exist. (Bug#12591)
The ROW() function returned an incorrect
result when comparison involved NULL
values. (Bug#12509)
Views with multiple UNION and
UNION ALL produced incorrect results. (Bug#10624)
Stored procedures with particularly long loops could crash server due to memory leak. (Bug#12297, Bug#11247)
Trigger and stored procedure execution could break replication. (Bug#12482)
A server crash could result from an update of a view defined as a join, even though the update updated only a single table. (Bug#12569)
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)
The NUMERIC_SCALE column of the
INFORMATION_SCHEMA.COLUMNS table should be
returned as 0 for integer columns. It was
being returned as NULL. (Bug#12301)
The COLUMN_DEFAULT column of the
INFORMATION_SCHEMA.COLUMNS table should be
returned as NULL if a column has no default
value. An empty string was being returned if the column was
defined as NOT NULL. (Bug#12518)
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)
Column names in subqueries must be unique, but were not being checked for uniqueness. (Bug#11864)
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 ( were being
handled incorrectly. (Bug#11867)
subquery)
Selecting from a view after INSERT
statements for the view's underlying table yielded different
results than subsequent selects. (Bug#12382)
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)
When restoring INFORMATION_SCHEMA as the
default database after failing to execute a stored procedure
in an inaccessible database, the server returned a spurious
ERROR 42000: Unknown database
'information_schema' message. (Bug#12318)
Renamed the rest() macro in
my_list.h to
list_rest() to avoid name clashes with user
code. (Bug#12327)
DATE_ADD() and
DATE_SUB() were converting invalid dates to
NULL in TRADITIONAL SQL
mode rather than rejecting them with an error. (Bug#10627)
A trigger that included a SELECT statement
could cause a server crash. (Bug#11587)
An incorrect conversion from double to
ulonglong caused indexes not to be used for
BDB tables on HP-UX. (Bug#10802)
myisampack failed to delete
.TMD temporary files when run with
-T option. (Bug#12235)
Added portability check for Intel compiler to address a
problem compiling InnoDB code. (Bug#11510)
XA allowed two active transactions to be
started with the same XID. (Bug#12162)
Concatenating USER() or
DATEBASE() with a column produced invalid
results. (Bug#12351)
Creating a view that included the
TIMESTAMPDIFF() function resulted in a
invalid view. (Bug#12298)
Comparison of InnoDB multi-part primary
keys that include VARCHAR columns can
result in incorrect results. (Bug#12340)
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)
Using cursors and nested queries for the same table, corrupted results were returned for the outer query. (Bug#11909)
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)
Selecting from a view defined as a join over many tables could
result in a server crash due to miscalculation of the number
of conditions in the WHERE clause. (Bug#12470)
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)
A race condition between server threads could cause a crash if one thread deleted a stored routine while another thread was executing a stored routine. (Bug#12228)
Mishandling of comparison for rows containing
NULL values against rows produced by an
IN subquery could cause a server crash.
(Bug#12392)
Inserting NULL into a
GEOMETRY column for a table that has a
trigger could result in a server crash if the table was
subsequently dropped. (Bug#12281)
A failure to obtain a lock for an IN SHARE
MODE query could result in a server crash. (Bug#12082)
SELECT ... INTO
within a trigger
could cause a server crash. (Bug#11973)
var_name
INSERT ... SELECT ... ON DUPLICATE KEY
UPDATE could fail with an erroneous 鈥Column
'col_name' specified twice鈥
error. (Bug#10109)
SHOW TABLE STATUS sometimes reported a
Row_format value of
Dynamic for MEMORY
tables, though such tables always have a format of
Fixed. (Bug#3094)
A query using a LEFT JOIN, an
IN subquery on the outer table, and an
ORDER BY clause, caused the server to crash
when cursors were enabled. (Bug#11901)
Using a stored procedure that referenced tables in the
INFORMATION_SCHEMA database would return an
empty result set. (Bug#10055, Bug#12278)
Columns defined as TINYINT(1) were
redefined as TINYINT(4) when incorporated
into a VIEW. (Bug#11335)
ISO-8601 formatted dates were not being
parsed correctly. (Bug#7308)
FLUSH TABLES WITH READ LOCK combined with
LOCK TABLE .. WRITE caused deadlock. (Bug#9459)
NULL column definitions read incorrectly
for inner tables of nested outer joins. (Bug#12154)
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)
Functionality added or changed:
Security improvement: Applied a patch that addresses a
potential zlib data vulnerability that
could result in an application crash.
(CVE-2005-1849)
This only affects the binaries for platforms that are linked
statically against the bundled zlib (most notably Microsoft
Windows and HP-UX).
SHOW CHARACTER SET and
INFORMATION_SCHEMA now properly report the
Latin1 character set as
cp1252. (Bug#11216)
mysqldump now dumps triggers for each
dumped table. This can be suppressed with the
--skip-triggers option. (Bug#10431)
Added new ER_STACK_OVERRUN_NEED_MORE error
message to indicate that, while the stack is not completely
full, more stack space is required. (Bug#11213)
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)
Maximum size of stored procedures increased from 64k to 4Gb. (Bug#11602)
Added error message for users who attempt CREATE
TABLE ... LIKE and specify a non-table in the
LIKE clause. (Bug#6859)
Bugs fixed:
DDL statements now are allowed in stored procedures if the
procedure is not invoked from a stored function or a trigger.
Also fixed problems where a TEMPORARY
statement created by one stored routine was inaccessible to
another routine invoked during the same connection. (Bug#11126)
Creation of the mysql group account failed
during the RPM installation. (Bug#12348)
big5 strings were not being stored in
FULLTEXT index. (Bug#12075)
When DROP DATABASE was called concurrently
with a DROP TABLE of any table, the MySQL
Server crashed. (Bug#12212)
max_connections_per_hour setting was being
capped by unrelated max_user_connections
setting. (Bug#9947)
SELECT @@local... returned
@@session... in the column header. (Bug#10724)
Multiplying ABS() output by a negative
number would return incorrect results. (Bug#11402)
Updated dependency list for RPM builds to include missing
dependencies such as useradd and
groupadd. (Bug#12233)
mysql_install_db used static
localhost value in GRANT
tables even when server hostname is not
localhost, such as
localhost.localdomain. This change is
applied to version 5.0.10b on Windows. (Bug#11822)
Multiple SELECT SQL_CACHE queries in a
stored procedure causes error and client hang. (Bug#6897)
Added checks to prevent error when allocating memory when there was insufficient memory available. (Bug#7003)
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)
When used in a SELECT query against a view,
the GROUP_CONCAT() function returned only a
single row. (Bug#11412)
Calling the C API function
mysql_stmt_fetch() after all rows of a
result set were exhausted would return an error instead of
MYSQL_NO_DATA. (Bug#11037)
Information about a trigger was not displayed in the output of
SELECT ... FROM INFORMATION_SCHEMA.TRIGGERS
when the selected database was
INFORMATION_SCHEMA, prior to the trigger's
first invocation. (Bug#12127)
Issuing successive FLUSH TABLES WITH READ
LOCK would cause the mysql client
to hang. (Bug#11934)
In stored procedures, a cursor that fetched an empty string
into a variable would set the variable to
NULL instead. (Bug#8692)
A trigger dependent on a feature of one
SQL_MODE setting would cause an error when
invoked after the SQL_MODE was changed.
(Bug#5891)
A delayed insert that would duplicate an existing record crashed the server instead. (Bug#12226)
ALTER TABLE when SQL_MODE =
'TRADITIONAL' gave rise to an invalid error message.
(Bug#11964)
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)
The MySQL Cluster backup log was invalid where the number of Cluster nodes was not equal to a power of 2. (Bug#11675)
GROUP_CONCAT() sometimes returned a result
with a different collation from that of its arguments. (Bug#10201)
The LPAD() and RPAD()
functions returned the wrong length to
mysql_fetch_fields(). (Bug#11311)
A UNIQUE VARCHAR column would be
mis-identified as MUL in table
descriptions. (Bug#11227)
Incorrect error message displayed if user attempted to create
a table in a non-existing database using CREATE
syntax. (Bug#10407)
database_name.table_name
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)
InnoDB: True VARCHAR:
Return NULL columns in the format expected
by MySQL. (Bug#12186)
Two threads could potentially initialize different characters sets and overwrite each other. (Bug#12109)
Unsigned LONG system variables may return
incorrect value when retrieved with a
SELECT for certain values. (Bug#10351)
Prepared statements were not being written to the Slow Query log. (Bug#9968)
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.
(CVE-2005-2096)
(Bug#11844)
Incompatible change: The
namespace for triggers has changed. Previously, trigger names
had to be unique per table. Now they must be unique within the
schema (database). An implication of this change is that
DROP TRIGGER syntax now uses a schema name
instead of a table name (schema name is optional and, if
omitted, the current schema will be used). (Bug#5892)
Note: When upgrading from a previous
version of MySQL 5 to MySQL 5.0.10 or newer, you must drop all
triggers and re-create them or DROP TRIGGER
will not work after the upgrade. A suggested procedure for
doing this is given in Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
The viewing of triggers and trigger metadata has been enhanced as follows:
An extension to the SHOW command has
been added: SHOW TRIGGERS can be used
to view a listing of triggers. See
Section聽13.5.4.26, 鈥SHOW TRIGGERS Syntax鈥, for details.
The INFORMATION_SCHEMA database now
includes a TRIGGERS table. See
Section聽20.16, 鈥淭he INFORMATION_SCHEMA TRIGGERS Table鈥, for details. (Bug#9586)
Triggers can now reference tables by name. See
Section聽18.1, 鈥CREATE TRIGGER Syntax鈥, for more information.
The output of perror --help now displays
the --ndb option. (Bug#11999)
On Windows, the search path used by MySQL applications for
my.ini now includes
..\my.ini (that is, the application's
parent directory, and hence, the installation directory). (Bug#10419)
Add the --defaults-group-suffix option. See
Section聽4.3.2, 鈥淯sing Option Files鈥.
Added mysql_get_character_set_info() C API
function for obtaining information about the default character
set of the current connection.
The bundled version of the readline library
was upgraded to version 5.0.
It is no longer necessary to issue an explicit LOCK
TABLES for any tables accessed by a trigger prior to
executing any statements that might invoke the trigger. (Bug#9581, Bug#8406)
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.
Add table_lock_wait_timeout global server
system variable.
Bugs fixed:
NDB: Trying to use a greater number of
tables then specified by the value of
MaxNoOfTables caused table corruption such
that data nodes could not be restarted. (Bug#9994)
NDB: Attempting to create or drop tables
during a backup would cause the cluster to shut down. (Bug#11942)
When attempting to drop a table with a broken unique index,
NDB failed to drop the table and
erroneously report that the table was unknown. (Bug#11355)
SELECT ... NOT IN() gave unexpected results
when only static value present between the
(). (Bug#11885)
Fixed compile error when using GCC4 on AMD64. (Bug#12040)
NDB ignored the Hostname
option in the NDBD DEFAULT section of the
Cluster configuration file. (Bug#12028)
SHOW PROCEDURE/FUNCTION STATUS didn't work
for users with limited access. (Bug#11577)
MySQL server would crash is a fetch was performed after a
ROLLBACK when cursors were involved. (Bug#10760)
The temporary tables created by an ALTER
TABLE on a cluster table were visible to all MySQL
servers. (Bug#12055)
NDB_MGMD was leaking file descriptors. (Bug#11898)
IP addresses not shown in ndb_mgm SHOW
command on second ndb_mgmd (or on ndb_mgmd restart). (Bug#11596)
Functions that evaluate to constants (such as
NOW() and CURRENT_USER()
were being evaluated in the definition of a
VIEW rather than included verbatim. (Bug#4663)
Execution of SHOW TABLES failed to
increment the Com_show_tables status
variable. (Bug#11685)
For execution of a stored procedure that refers to a view, changes to the view definition were not seen. The procedure continued to see the old contents of the view. (Bug#6120)
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)
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)
Aliasing the column names in a VIEW did not
work when executing a SELECT query on the
VIEW. (Bug#11399)
Performing an ORDER BY on a
SELECT from a VIEW
produced unexpected results when VIEW and
underlying table had the same column name on different
columns. Bug#11709)
The C API function mysql_statement_reset()
did not clear error information. (Bug#11183)
When used within a subquery, SUBSTRING()
returned an empty string. (Bug#10269)
Multiple-table UPDATE queries using
CONVERT_TZ() would fail with an error. (Bug#9979)
mysql_fetch_fields() returned incorrect
length information for MEDIUM and
LONG TEXT and
BLOB columns. (Bug#9735)
mysqlbinlog was failing the test suite on
Windows due to BOOL being incorrectly cast
to INT. (Bug#11567)
NDBCLuster: Server left core files
following shutdown if data nodes had failed. (Bug#11516)
Creating a trigger in one database that references a table in another database was being allowed without generating errors. (Bug#8751)
Duplicate trigger names were allowed within a single schema. (Bug#6182)
Server did not accept some fully-qualified trigger names. (Bug#8758)
The traditional SQL mode accepted invalid
dates if the date value provided was the result of an implicit
type conversion. (Bug#5906)
The MySQL server had issues with certain combinations of basedir and datadir. (Bug#7249)
INFORMATION_SCHEMA.COLUMNS had some
inaccurate values for some data types. (Bug#11057)
LIKE pattern matching using prefix index didn't return correct result. (Bug#11650)
For several character sets, MySQL incorrectly converted the
character code for the division sign to the
eucjpms character set. (Bug#11717)
When invoked within a view, SUBTIME()
returned incorrect values. (Bug#11760)
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 were being
written to the error log. Now connections are closed more
gracefully without generating error messages. (Bug#7403)
n
user: 'name'
Increased the version number of the
libmysqlclient shared library from 14 to 15
because it is binary incompatible with the MySQL 4.1 client
library. (Bug#11893)
A recent optimizer change caused DELETE ... WHERE ...
NOT LIKE and DELETE ... WHERE ... NOT
BETWEEN to not properly identify the rows to be
deleted. (Bug#11853)
Within a stored procedure that selects from a table, invoking another procedure that requires a write lock for the table caused that procedure to fail with a message that the table was read-locked. (Bug#9565)
Within a stored procedure, selecting from a table through a view caused subsequent updates to the table to fail with a message that the table was read-locked. (Bug#9597)
For a stored procedure defined with SQL SECURITY
DEFINER characteristic,
CURRENT_USER() incorrectly reported the use
invoking the procedure, not the user who defined it. (Bug#7291)
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)
With strict SQL mode enabled, ALTER TABLE
reported spurious 鈥Invalid default value鈥
messages for columns that had no DEFAULT
clause. (Bug#9881)
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)
Labels in stored routines did not work if the character set
was not latin1. (Bug#7088)
Invoking the DES_ENCRYPT() function could
cause a server crash if the server was started without the
--des-key-file option. (Bug#11643)
The server crashed upon execution of a statement that used a
stored function indirectly (via a view) if the function was
not yet in the connection-specific stored routine cache and
the statement would update a
Handler_
status variable. This fix allows the use of stored routines
under xxxLOCK TABLES without explicitly
locking the mysql.lock table. However, you
cannot use mysql.proc in statements that
will combine locking of it with modifications for other
tables. (Bug#11554)
The server crashed when dropping a trigger that invoked a stored procedure, if the procedure was not yet in the connection-specific stored routine cache. (Bug#11889)
Selecting the result of an aggregate function for an
ENUM or SET column
within a subquery could result in a server crash. (Bug#11821)
Incorrect column values could be retrieved from views defined
using statements of the form SELECT * FROM
. (Bug#11771)
tbl_name
The mysql.proc table was not being created
properly with the proper utf8 character set
and collation, causing server crashes for stored procedure
operations if the server was using a multi-byte character set.
To take advantage of the bug fix,
mysql_fix_privilege_tables should be run to
correct the structure of the mysql.proc
table. (Bug#11365)
Note that it is necessary to run
mysql_fix_privileges_tables when upgrading
from a previous installation that contains the
mysql.proc table (that is, from a previous
5.0 installation). Otherwise, creating stored procedures might
not work.
Execution of a prepared statement that invoked a non-existent or dropped stored routine would crash the server. (Bug#11834)
Executing a statement that invoked a trigger would cause
problems unless a LOCK TABLES was first
issued for any tables accessed by the trigger.
Note: The exact nature of the
problem depended upon the MySQL 5.0 release being used: prior
to 5.0.3, this resulted in a crash; from 5.0.3 to 5.0.7, MySQL
would issue a warning; in 5.0.9, the server would issue an
error. (Bug#8406)
The same issue caused LOCK TABLES to fail
following UNLOCK TABLES if triggers were
involved. (Bug#9581)
In a shared Windows environment, MySQL could not find its
configuration file unless the file was in the
C:\ directory. (Bug#5354)
Functionality added or changed:
An attempt to create a TIMESTAMP column
with a display width (for example,
TIMESTAMP(6)) now results in a warning.
Display widths have not been supported for
TIMESTAMP since MySQL 4.1. (Bug#10466)
InnoDB: When creating or extending an
InnoDB data file, at most one megabyte at a time is allocated
for initializing the file. Previously, InnoDB allocated and
initialized 1 or 8 megabytes of memory, even if only a few
16-kilobyte pages were to be written. This improves the
performance of CREATE TABLE in
innodb_file_per_table mode.
InnoDB: Various optimizations. Removed
unreachable debug code from non-debug builds. Added hints for
the branch predictor in gcc. Made
assertions occupy less space.
InnoDB: Make
innodb_thread_concurrency=20 by default.
Bypass the concurrency checking if the setting is greater than
or equal to 20.
InnoDB: Make CHECK TABLE
killable. (Bug#9730)
Recursion in stored routines is now disabled because it was crashing the server. We plan to modify stored routines to allow this to operate safely in a future release. (Bug#11394)
The handling of BIT columns has been
improved, and should now be much more reliable in a number of
cases. (Bug#10617, Bug#11091, Bug#11572)
mysql_real_escape_string() API function now
respects NO_BACKSLASH_ESCAPES SQL mode.
(Bug#10214)
Bugs fixed:
SHOW CREATE VIEW did not take the
ANSI MODE into account when quoting
identifiers. (Bug#6903)
The mysql_config script did not handle
symbolic linking properly. (Bug#10986)
Incorrect results when using GROUP BY ... WITH
ROLLUP on a VIEW. (Bug#11639)
Instances of the VAR_SAMP() function in
view definitions were converted to
VARIANCE(). This is incorrect because
VARIANCE() is the same as
VAR_POP(), not
VAR_SAMP(). (Bug#10651)
mysqldump failed when reloading a view if the view was defined in terms of a different view that had not yet been reloaded. mysqldump now creates a dummy table to handle this case. (Bug#10927)
mysqldump could crash for illegal or non-existent table names. (Bug#9358)
The --no-data option for
mysqldump was being ignored if table names
were given after the database name. (Bug#9558)
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)
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)
When used in joins, SUBSTRING() failed to
truncate to zero any string values that could not be converted
to numbers. (Bug#10124)
mysqldump --xml did not format
NULL column values correctly. (Bug#9657)
There was a compression algorithm issue with
myisampack for very large datasets (where
the total size of all records in a single column was on the
order of 3 GB or more) on 64-bit platforms. (A fix for other
platforms was made in MySQL 5.0.6.) (Bug#8321)
Temporary tables were created in the data directory instead of
tmpdir. (Bug#11440)
MySQL would not compile correctly on QNX due to missing
rint() function. (Bug#11544)
A SELECT DISTINCT
would work
correctly with a col_nameMyISAM table only when
there was an index on col_name.
(Bug#11484)
The server would lose table-level CREATE
VIEW and SHOW VIEW privileges
following a FLUSH PRIVILEGES or server
restart. (Bug#9795)
In strict mode, an INSERT into a view that
did not include a value for a NOT NULL
column but that did include a WHERE test on
the same column would succeed, This happened even though the
INSERT should have been prevented due to
the failure to supply a value for the NOT
NULL column. (Bug#6443)
Running a CHECK TABLES on multiple views
crashed the server. (Bug#11337)
When a table had a primary key containing a
BLOB column, creation of another index
failed with the error BLOB/TEXT column used in key
specification without keylength, even when the new
index did not contain a BLOB column. (Bug#11657)
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)
A cursor using a query with a filter on a
DATE or DATETIME column
would cause the server to crash server after the data was
fetched. (Bug#11172)
Closing a cursor that was already closed would cause MySQL to hang. (Bug#9814)
Using CONCAT_WS on a column set
NOT NULL caused incorrect results when used
in a LEFT JOIN. (Bug#11469)
Signed BIGINT would not accept
-9223372036854775808 as a
DEFAULT value. (Bug#11215)
Views did not use indexes on all appropriate queries. (Bug#10031)
For MEMORY tables, it was possible 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)
Optimizer performed range check when comparing unsigned integers to negative constants, could cause errors. (Bug#11185)
Wrong comparison method used in VIEW when
relaxed date syntax used (for example,
2005.06.10). (Bug#11325)
The ENCRYPT() and
SUBSTRING_INDEX() functions would cause
errors when used with a VIEW. (Bug#7024)
Clients would hang following some errors with stored procedures. (Bug#9503)
Combining cursors and subqueries could cause server crash or memory leaks. (Bug#10736)
If a prepared statement cursor is opened but not completely fetched, attempting to open a cursor for a second prepared statement will fail. (Bug#10794)
Note: Starting with version 5.0.8, changes for MySQL Cluster can be found in the combined Change History.
Functionality added or changed:
Warning: Incompatible change:
Previously, conversion of DATETIME values
to numeric form by adding zero produced a result in
YYYYMMDDHHMMSS format. The result of
DATETIME+0 is now in
YYYYMMDDHHMMSS.000000 format. (Bug#12268)
MEMORY tables now support indexes of up to
500 bytes. See Section聽14.4, 鈥淭he MEMORY (HEAP) Storage Engine鈥. (Bug#10566)
New SQL_MODE -
NO_ENGINE_SUBSTITUTION Prevents automatic
substitution of storage engine when the requested storage
engine is disabled or not compiled in. (Bug#6877)
The statements CREATE TABLE,
TRUNCATE TABLE, DROP
DATABASE, and CREATE DATABASE
cause an implicit commit. (Bug#6883)
Expanded on information provided in general log and slow query log for prepared statements. (Bug#8367, Bug#9334)
Where a GROUP BY query uses a grouping
column from the query's SELECT clause,
MySQL now issues a warning. This is done because the SQL
standard states that any grouping column must unambiguously
reference a column of the table resulting from the query's
FROM clause, and allowing columns from the
SELECT clause to be used as grouping
columns is a MySQL extension to the standard.
By way of example, consider the following table:
CREATE TABLE users ( userid INT NOT NULL PRIMARY KEY, username VARCHAR(25), usergroupid INT NOT NULL );
MySQL allows you to use the alias in this query:
SELECT usergroupid AS id, COUNT(userid) AS number_of_users FROM users GROUP BY id;
However, the SQL standard requires that the column name be used, as shown here:
SELECT usergroupid AS id, COUNT(userid) AS number_of_users FROM users GROUP BY usergroupid;
Queries such as the first of the two shown above will continue
to be supported in MySQL; however, beginning with MySQL 5.0.8,
using a column alias in this fashion will generate a warning.
Note that in the event of a collision between column names
and/or aliases used in joins, MySQL attempts to resolve the
conflict by giving preference to columns arising from tables
named in the query's FROM clause. (Bug#11211)
The granting or revocation of privileges on a stored routine
is no longer performed when running the server with
--skip-grant-tables even after the statement
SET @@global.automatic_sp_privileges=1; has
been executed. (Bug#9993)
Added support for B'10' syntax for bit
literal. (Bug#10650)
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.
Note: Although this bug was
thought to be fixed previously, it was later discovered to be
present in the MySQL 5.0.7-beta release for Windows. (Bug#9148,
CVE-2005-0799
A CREATE TABLE
statement would crash the server when no
database was selected. (Bug#11028)
db_name.tbl_name
LIKE ...
SELECT DISTINCT queries or GROUP
BY queries without MIN() or
MAX() could return inconsistent results for
indexed columns. (Bug#11044)
The SHOW INSTANCE OPTIONS command in MySQL
Instance Manager displayed option values incorrectly for
options for which no value had been given. (Bug#11200)
An outer join with an empty derived table (a result from a subquery) returned no result. (Bug#11284)
An outer join with an ON condition that
evaluated to false could return an incorrect result. (Bug#11285)
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)
CAST( ... AS DECIMAL) didn't work for strings. (Bug#11283)
NULLIF() function could produce incorrect
results if first argument is NULL. (Bug#11142)
Setting @@SQL_MODE = NULL caused an
erroneous error message. (Bug#10732)
Converting a VARCHAR column having an index
to a different type (such as TINYTEXT) gave
rise to an incorrect error message. (Bug#10543)
Note that this bugfix induces a slight change in the behavior
of indexes: If an index is defined to be the same length as a
field (or is left to default to that field's length), and the
length of the field is later changed, then the index will
adopt the new length of the field. Previously, the size of the
index did not change for some field types (such as
VARCHAR) when the field type was changed.
sql_data_access column of
routines table of
INFORMATION_SCHEMA was empty. (Bug#11055)
A CAST() value could not be included in a
VIEW. (Bug#11387)
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 the server when a
BLOB was used in a GROUP
BY query. (Bug#11295)
Fixed 64 bit compiler warning for packet length in replication. (Bug#11064)
Multiple range accesses in a subquery cause server crash. (Bug#11487)
An issue with index merging could cause suboptimal index merge
plans to be chosen when searching by indexes created on
DATE columns. The same issue caused the
InnoDB storage engine to issue the warning using a
partial-field key prefix in search. (Bug#8441)
The mysqlhotcopy script was not parsing the
output of SHOW SLAVE STATUS correctly when
called with the --record_log_pos option. (Bug#7967)
SELECT * FROM
returned incorrect
results when called from a stored procedure, where
tabletable had a primary key. (Bug#10136)
When used in defining a view, the
TIME_FORMAT() function failed with
calculated values, for example, when passed the value returned
by SEC_TO_TIME(). (Bug#7521)
SELECT DISTINCT ... GROUP BY
returned
multiple rows (it should return a single row). (Bug#8614)
constant
INSERT INTO SELECT FROM
produced incorrect
result when using viewORDER BY. (Bug#11298)
Fixed hang/crash with Boolean full-text search where a query contained more query terms that one-third of the query length (it could be achieved with truncation operator: 'a*b*c*d*'). (Bug#7858)
Fixed column name generation in VIEW
creation to ensure there are no duplicate column names. (Bug#7448)
An ORDER BY clause sometimes had no effect
on the ordering of a result when selecting specific columns
(as opposed to using SELECT *) from a view.
(Bug#7422)
Some data definition statements (CREATE
TABLE where the table was not a temporary table,
TRUNCATE TABLE, DROP
DATABASE, and CREATE DATABASE)
were not being written to the binary log after a
ROLLBACK. This also caused problems with
replication. (Bug#6883)
Calling a stored procedure that made use of an INSERT
... SELECT ... UNION SELECT ... query caused a
server crash. (Bug#11060)
Selecting from a view defined using SELECT
SUM(DISTINCT ...) caused an error; attempting to
execute a SELECT * FROM
INFORMATION_SCHEMA.TABLES query after defining such
a view crashed the server. (Bug#7015)
The mysql client would output a prompt twice following input of very long strings, because it incorrectly assumed that a call to the _cgets() function would clear the input buffer. (Bug#10840)
A three byte buffer overflow in the client functions caused improper exiting of the client when reading a command from the user. (Bug#10841)
Fixed a problem where a stored procedure caused a server crash if the query cache was enabled. (Bug#9715)
SHOW CREATE DATABASE INFORMATION_SCHEMA
returned an 鈥unknown database鈥 error. (Bug#9434)
Corrected a problem with IFNULL() returning
an incorrect result on 64-bit systems. (Bug#11235)
Fixed a problem resolving table names with
lower_case_table_names=2 when the table
name lettercase differed in the FROM and
WHERE clauses. (Bug#9500)
Fixed server crash due to some internal functions not taking
into account that for multi-byte character sets,
CHAR columns could exceed 255 bytes and
VARCHAR columns could exceed 65,535 bytes.
(Bug#11167)
Fixed locking problems for multiple-statement
DELETE statements performed within a stored
routine, such as incorrectly locking a to-be-modified table
with a read lock rather than a write lock. (Bug#11158)
Fixed a portability problem testing for
crypt() support that caused compilation
problems when using OpenSSL/yaSSL on HP-UX and Mac OS X. (Bug#10675, Bug#11150)
The hostname cache was not working. (Bug#10931)
On Windows, mysqlshow did not interpret
wildcard characters properly if they were given in the table
name argument. (Bug#10947)
The default hostname for MySQL server was always
mysql. (Bug#11174)
Using PREPARE to prepare a statement that
invoked a stored routine that deallocated the prepared
statement caused a server crash. This is prevented by
disabling dynamic SQL within stored routines. (Bug#10975)
(Note: This restriction was lifted in 5.0.13 for stored
procedures, but not stored functions or triggers.)
Using PREPARE to prepare a statement that
invoked a stored routine that executed the prepared statement
caused a Packets out of order error the
second time the routine was invoked. This is prevented by
disabling dynamic SQL within stored routines. (Bug#7115)
(Note: This restriction was lifted in 5.0.13 for stored
procedures, but not stored functions or triggers.)
Using prepared statements within a stored routine
(PREPARE, EXECUTE,
DEALLOCATE) could cause the client
connection to be dropped after the routine returned. This is
prevented by disabling dynamic SQL within stored routines.
(Bug#10605) (Note: This restriction was lifted in 5.0.13 for
stored procedures, but not stored functions or triggers.)
When using a cursor with a prepared statement, the first execution returned the correct result but was not cleaned up properly, causing subsequent executions to return incorrect results. (Bug#10729)
MySQL Cluster: Connections between data nodes and management
nodes were not being closed following shutdown of
ndb_mgmd. (Bug#11132)
MySQL Cluster: mysqld processes would not
reconnect to cluster following restart of
ndb_mgmd. (Bug#11221)
MySQL Cluster: Fixed problem whereby data nodes would fail to restart on 64-bit Solaris (Bug#9025)
MySQL Cluster: Calling ndb_select_count()
crashed the cluster when running on Red Hat Enterprise
4/64-bit/Opteron. (Bug#10058)
MySQL Cluster: Insert records were incorrectly applied by
ndb_restore, thus making restoration from
backup inconsistent if the binlog contained inserts. (Bug#11166)
MySQL Cluster: Cluster would time out and crash after first query on 64-bit Solaris 9. (Bug#8918)
MySQL Cluster: ndb_mgm client
show command displayed incorrect output
after master data node failure. (Bug#11050)
MySQL Cluster: A delete performed as part of a transaction caused an erroneous result. (Bug#11133)
MySQL Cluster: Not allowing sufficient parallelism in cluster
configuration (for example,
NoOfTransactions too small) caused
ndb_restore to fail without providing any
error messages. (Bug#10294)
MySQL Cluster: When using dynamically allocated ports on Linux, cluster would hang on initial startup. (Bug#10893)
MySQL Cluster: Setting TransactionInactiveTimeout= 0 did not result in an infinite timeout. (Bug#11290)
InnoDB: Enforce maximum
CHAR_LENGTH() of UTF-8 data in ON
UPDATE CASCADE. (Bug#10409)
InnoDB: Pad UTF-8
VARCHAR columns with
0x20. Pad UCS2 CHAR
columns with 0x0020. (Bug#10511)
Functionality added or changed:
Security improvement: Applied a patch to fix a UDF library-loading vulnerability that could result in a buffer overflow and code execution. (http://www.appsecinc.com/resources/alerts/mysql/2005-002.html)
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 behavior of the Last_query_cost system
variable has been changed. The default value is now 0 (rather
than -1) and it now has session-level scope (rather than being
global). See Section聽5.2.5, 鈥淪tatus Variables鈥, for
additional information.
All characters occurring on the same line following the
DELIMITER keyword will be set as delimiter.
For example, DELIMITER :; will set
:; as the delimiter. This behavior is now
consistent between MySQL 5.1 and MySQL 5.0. (Bug#9879)
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 (for
example, EXPLAIN SELECT 1). (Bug#9899)
Placeholders now can be used for LIMIT in
prepared statements. (Bug#7306)
SHOW BINARY LOGS now displays a
File_size column that indicates the size of
each file.
The --delayed-insert option for
mysqldump has been disabled to avoid
causing problems with storage engines that do not support
INSERT DELAYED. (Bug#7815)
Improved the optimizer to be able to use indexes for
expressions of the form
and
indexed_col NOT IN
(val1,
val2, ...).. (Bug#10561)
indexed_col NOT BETWEEN
val1 AND
val2
Removed mysqlshutdown.exe and
mysqlwatch.exe from the Windows 鈥No
Installer鈥 distribution (they had already been removed
from the 鈥With Installer鈥 distribution before).
Removed those programs from the source distribution.
Removed WinMySQLAdmin from the source
distribution and from the 鈥No Installer鈥 Windows
distribution (it had already been removed from the 鈥With
Installer鈥 distribution before).
InnoDB: In stored procedures and functions,
InnoDB no longer takes full explicit table
locks for every involved table. Only `intention' locks are
taken, similar to those in the execution of an ordinary SQL
statement. This greatly reduces the number of deadlocks.
Bugs fixed:
Security update: A user with
limited privileges could obtain information about the
privileges of other users by querying objects in the
INFORMATION_SCHEMA database for which that
user did not have the requisite privileges. (Bug#10964)
Triggers with dropped functions caused crashes. (Bug#5893)
Failure of a BEFORE trigger did not prevent
the triggering statement from performing its operation on the
row for which the trigger error occurred. Now the triggering
statement fails as described in
Section聽18.3, 鈥淯sing Triggers鈥. (Bug#10902)
Issuing a write lock for a table from one client prevented
other clients from accessing the table's metadata. For
example, if one client issued a LOCK TABLES
, then a second client attempting to execute a
mydb.mytable
WRITEUSE would
hang. (Bug#9998)
mydb;
The LAST_DAY() failed to return
NULL when supplied with an invalid
argument. See Section聽12.6, 鈥淒ate and Time Functions鈥. (Bug#10568)
The functions COALESCE(),
IF(), and IFNULL()
performed incorrect conversions of their arguments. (Bug#9939)
The TIME_FORMAT() function returned
incorrect results with some format specifiers. See
Section聽12.6, 鈥淒ate and Time Functions鈥. (Bug#10590)
Dropping stored routines when the MySQL server had been
started with --skip-grant-tables generated
extraneous warnings. (Bug#9993)
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)
The ucs2_turkish_ci collation failed with upper('i'). UPPER/LOWER now can return a string with different length. (Bug#8610)
OPTIMIZE of InnoDB table does not return 'Table is full' if out of tablespace. (Bug#8135)
GROUP BY queries with ROLLUP returned wrong results for expressions containing group by columns. (Bug#7894)
Fixed bug in FIELD() function where value
list contains NULL. (Bug#10944)
Corrected a problem where an incorrect data type was returned
in the result set metadata when using a prepared
SELECT DISTINCT statement to select from a
view. (Bug#11111)
Fixed bug in the MySQL Instance manager that caused the
version to always be unknown when
SHOW INSTANCE STATUS was issued. (Bug#10229)
Using ORDER BY to sort the results of an
IF() that contained a
FROM_UNIXTIME() expression returned
incorrect results due to integer overflow. (Bug#9669)
Fixed a server crash resulting from accessing
InnoDB tables within stored functions. This
is handled by prohibiting statements that do an implicit or
explicit commit or rollback within stored functions or
triggers. (Bug#10015)
Fixed a server crash resulting from the second invocation of a
stored procedure that selected from a view defined as a join
that used ON in the join conditions. (Bug#6866)
Using ALTER TABLE for a table that had a
trigger caused a crash when executing a statement that
activated the trigger, and also a crash later with
USE for
the database containing the table. (Bug#5894)
db_name
Fixed a server crash resulting from an attempt to allocate too
much memory when GROUP BY
and
blob_colCOUNT(DISTINCT) were used. (Bug#11088)
Fixed a portability problem for compiling on Windows with Visual Studio 6. (Bug#11153)
The incorrect sequence of statements HANDLER
without a
preceding tbl_name READ
index_name NEXTHANDLER for an
tbl_name
READ index_name =
(value_list)InnoDB table resulted in a server crash
rather than an error. (Bug#5373)
On Windows, with lower_case_table_names set
to 2, using ALTER TABLE to alter a
MEMORY or InnoDB table
that had a mixed-case name also improperly changed the name to
lowercase. (Bug#9660)
The server timed out SSL connections too quickly on Windows. (Bug#8572)
Executing LOAD INDEX INTO CACHE for a table
while other threads where selecting from the table caused a
deadlock. (Bug#10602)
Fixed a server crash resulting from CREATE TABLE ...
SELECT that selected from a table being altered by
ALTER TABLE. (Bug#10224)
The FEDERATED storage engine properly
handled outer joins, but not inner joins. (Bug#10848)
Consistently report INFORMATION_SCHEMA
table names in uppercase in SHOW TABLE
STATUS output. (Bug#10059)
Fixed a failure of WITH ROLLUP to sum
values properly. (Bug#10982)
Triggers were not being activated for multiple-table
UPDATE or DELETE
statements. (Bug#5860)
INSERT BEFORE triggers were not being
activated for INSERT ... SELECT statements.
(Bug#6812)
INSERT BEFORE triggers were not being
activated for implicit inserts (LOAD DATA).
(Bug#8755)
If a stored function contained a FLUSH
statement, the function crashed when invoked.
FLUSH now is disallowed within stored
functions. (Bug#8409)
Multiple-row REPLACE could fail on a
duplicate-key error when having one
AUTO_INCREMENT key and one unique key. (Bug#11080)
Fixed a server crash resulting from invalid string pointer
when inserting into the mysql.host table.
(Bug#10181)
Multiple-table DELETE did always delete on
the fly from the first table that was to be deleted from. In
some cases, when using many tables and it was necessary to
access the same row twice in the first table, we could miss
some rows-to-be-deleted from other tables. This is now fixed.
The mysql_next_result() function could hang
if you were executing many statements in a
mysql_real_query() call and one of those
statements raised an error. (Bug#9992)
The combination of COUNT(),
DISTINCT, and CONCAT()
sometimes triggered a memory deallocation bug on Windows
resulting in a server crash. (Bug#9593)
InnoDB: Do very fast shutdown only if
innodb_fast_shutdown=2, but wait for
threads to exit and release allocated memory if
innodb_fast_shutdown=1. Starting with
MySQL/InnoDB 5.0.5, InnoDB would do brutal shutdown also when
innodb_fast_shutdown=1. (Bug#9673)
InnoDB: Fixed InnoDB: Error:
stored_select_lock_type is 0 inside ::start_stmt()!
in a stored procedure call if
innodb_locks_unsafe_for_binlog was set in
my.cnf. (Bug#10746)
InnoDB: Fixed a duplicate key error that
occurred with REPLACE in a table with an
AUTO-INC column. (Bug#11005)
MySQL would pass an incorrect key length to storage engines
for MIN(). This could cause warnings
InnoDB: Warning: using a partial-field key prefix in
search. in the .err log. (Bug#11039, same as Bug#13218 in MySQL 4.1.15)
Fixed a server crash for INSERT or
UPDATE when the WHERE
clause contained a correlated subquery that referred to a
column of the table being modified. (Bug#6384)
Fixed a problem causing an incorrect result for columns that
include an aggregate function as part of an expression when
WITH ROLLUP is added to GROUP
BY. (Bug#7914)
Fixed a problem with returning an incorrect result from a view
that selected a COALESCE() expression from
the result of an outer join. (Bug#9938)
MySQL was adding a DEFAULT clause to
ENUM columns that included no explicit
DEFAULT and were defined as NOT
NULL. (This is supposed to happen only for columns
that are NULL.) (Bug#6267)
Corrected inappropriate error messages that were displayed
when attempting to set the read-only
warning_count and
error_count system variables. (Bug#10339)
Functionality added or changed:
Incompatible change:
MyISAM and InnoDB tables
created with DECIMAL columns in MySQL 5.0.3
to 5.0.5 will appear corrupt after an upgrade to MySQL 5.0.6.
Dump such tables with mysqldump before
upgrading, and then reload them after upgrading. (The same
incompatibility will occur for these tables created in MySQL
5.0.6 after a downgrade to MySQL 5.0.3 to 5.0.5.) (Bug#10465,
Bug#10625)
Incompatible change: The
behavior of LOAD DATA INFILE and
SELECT ... INTO OUTFILE has changed when
the FIELDS TERMINATED BY and
FIELDS ENCLOSED BY values both are empty.
Formerly, a column was read or written the display width of
the column. For example, INT(4) was read or
written using a field with a width of 4. Now columns are read
and written using a field width wide enough to hold all values
in the field. However, data files written before this change
was made might not be reloaded correctly with LOAD
DATA INFILE for MySQL 4.1.12 and up. This change
also affects data files read by mysqlimport
and written by mysqldump --tab, which use
LOAD DATA INFILE and SELECT ...
INTO OUTFILE. For more information, see
Section聽13.2.5, 鈥LOAD DATA INFILE Syntax鈥. (Bug#12564)
The precision of the DECIMAL data type has
been increased from 64 to 65 decimal digits.
Added the div_precision_increment system
variable, which indicates the number of digits of precision by
which to increase the result of division operations performed
with the / operator.
Added the log_bin_trust_routine_creators
system variable, which applies when binary logging is enabled.
It controls whether stored routine creators can be trusted not
to create stored routines that will cause unsafe events to be
written to the binary log.
Added the --log-bin-trust-routine-creators
server option for setting the
log_bin_trust_routine_creators system
variable from the command line.
Implemented the STMT_ATTR_PREFETCH_ROWS
option for the mysql_stmt_attr_set() C API
function. This sets how many rows to fetch at a time when
using cursors with prepared statements.
The GRANT and REVOKE
statements now support an
object_type clause to be used for
disambiguating whether the grant object is a table, a stored
function, or a stored procedure. Use of this clause requires
that you upgrade your grant tables. See
Section聽5.5.4, 鈥mysql_fix_privilege_tables 鈥 Upgrade MySQL System Tables鈥. (Bug#10246)
Added REFERENCED_TABLE_SCHEMA,
REFERENCED_TABLE_NAME, and
REFERENCED_COLUMN_NAME columns to the
KEY_COLUMN_USAGE table of
INFORMATION_SCHEMA. (Bug#9587)
Added a --show-warnings option to
mysql to cause warnings to be shown after
each statement if there are any. This option applies to
interactive and batch mode. In interactive mode,
\w and \W may be used to
enable and disable warning display. (Bug#8684)
Removed a limitation that prevented use of FIFOs as logging targets (such as for the general query log). This modification does not apply to the binary log and the relay log. (Bug#8271)
Added a --debug option to
my_print_defaults.
When the server cannot read a table because it cannot read the
.frm file, print a message that the table
was created with a different version of MySQL. (This can
happen if you create tables that use new features and then
downgrade to an older version of MySQL.) (Bug#10435)
SHOW VARIABLES now shows the
slave_compressed_protocol,
slave_load_tmpdir and
slave_skip_errors system variables. (Bug#7800)
Removed unused system variable
myisam_max_extra_sort_file_size.
Changed default value of
myisam_data_pointer_size from 4 to 6. This
allows us to avoid table is full errors for
most cases.
The variable concurrent_insert now takes 3
values. Setting this to 2 changes MyISAM to
do concurrent inserts to end of table if table is in use by
another thread.
New /*> prompt for
mysql. This prompt indicates that a
/* ... */ comment was begun on an earlier
line and the closing */ sequence has not
yet been seen. (Bug#9186)
If strict SQL mode is enabled, VARCHAR and
VARBINARY columns with a length greater
than 65,535 no longer are silently converted to
TEXT or BLOB columns.
Instead, an error occurs. (Bug#8295, Bug#8296)
The INFORMATION_SCHEMA.SCHEMATA table now
has a DEFAULT_COLLATION_NAME column. (Bug#8998)
InnoDB: When the maximum length of
SHOW INNODB STATUS output would be
exceeded, truncate the beginning of the list of active
transactions, instead of truncating the end of the output.
(Bug#5436)
InnoDB: If
innodb_locks_unsafe_for_binlog option is
set and the isolation level of the transaction is not set to
serializable then InnoDB uses a consistent
read for select in clauses like INSERT INTO ...
SELECT and UPDATE ... (SELECT)
that do not specify FOR UPDATE or
IN SHARE MODE. Thus no locks are set to
rows read from selected table.
Updated version of libedit to 2.9. (Bug#2596)
Removed mysqlshutdown.exe and
mysqlwatch.exe from the Windows 鈥With
Installer鈥 distribution.
Bugs fixed:
An error in the implementation of the
MyISAM compression algorithm caused
myisampack to fail with very large sets of
data (total size of all the records in a single column needed
to be >= 3 GB in order to trigger this issue). (Bug#8321)
Statements that create and use stored routines were not being written to the binary log, which affects replication and data recovery options. (Bug#2610) Stored routine-related statements now are logged, subject to the issues and limitations discussed in Section聽17.4, 鈥淏inary Logging of Stored Routines and Triggers鈥.
Disabled binary logging within stored routines to avoid
writing spurious extra statements to the binary log. For
example, if a routine p() executes an
INSERT statement, then for CALL
p(), the CALL statement appears
in the binary log, but not the INSERT
statement. (Bug#9100)
Statements that create and drop triggers were not being written to the binary log, which affects replication and data recovery options. (Bug#10417) Trigger-related statements now are logged, subject to the issues and limitations discussed in Section聽17.4, 鈥淏inary Logging of Stored Routines and Triggers鈥.
The mysql_stmt_execute() and
mysql_stmt_reset() C API functions now
close any cursor that is open for the statement, which
prevents a server crash. (Bug#9478)
The mysql_stmt_attr_set() C API function
now returns an error for option values that are defined in
mysql.h but not yet implemented, such as
CURSOR_TYPE_SCROLLABLE. (Bug#9643)
MERGE tables could fail on Windows due to
incorrect interpretation of pathname separator characters for
filenames in the .MRG file. (Bug#10687)
Fixed a server crash for INSERT ... ON DUPLICATE KEY
UPDATE with MERGE tables, which
do not have unique indexes. (Bug#10400)
Fix FORMAT() to do better rounding for
double values (for example, FORMAT(4.55,1)
returns 4.6, not 4.5).
(Bug#9060)
Disallow use of SESSION or
GLOBAL for user variables or local
variables in stored routines. (Bug#9286)
Fixed a server crash when using GROUP BY ... WITH
ROLLUP on an indexed column in an
InnoDB table. (Bug#9798)
In strict SQL mode, some assignments to numeric columns that
should have been rejected were not (such as the result of an
arithmetic expression or an explicit CAST()
operation). (Bug#6961)
CREATE TABLE t AS SELECT UUID() created a
VARCHAR(12) column, which is too small to
hold the 36-character result from UUID().
(Bug#9535)
Fixed a server crash in the BLACKHOLE
storage engine. (Bug#10175)
Fixed a server crash resulting from repeated calls to
ABS() when the argument evaluated to
NULL. (Bug#10599)
For a user-defined function invoked from within a prepared
statement, the UDF's initialization routine was invoked for
each execution of the statement, but the deinitialization
routine was not. (It was invoked only when the statement was
closed.) Similarly, when invoking a UDF from within a trigger,
the initialization routine was invoked but the
deinitialization routine was not. For UDFs that have an
expensive deinit function (such as myperl,
this bugfix will have negative performance consequences. (Bug#9913)
Portability fix for Cygwin: Don't use #pragma
interface in source files. (Bug#10241)
Fix CREATE TABLE ... LIKE to work when
lower_case_table_names is set on a
case-sensitive filesystem and the source table name is not
given in lowercase. (Bug#9761)
Fixed a server crash resulting from a CHECK
TABLE statement where the arguments were a view name
followed by a table name. (Bug#9897)
Within a stored procedure, attempting to update a view defined
as an inner join failed with a Table
' error. (Bug#9481)
tbl_name' was locked with a READ
lock and can't be updated
Fixed a problem with INFORMATION_SCHEMA
tables being inaccessible depending on lettercase used to
refer to them. (Bug#10018)
my_print_defaults was ignoring the
--defaults-extra-file option or crashing when
the option was given. (Bug#9136, Bug#9851)
The INFORMATION_SCHEMA.COLUMNS table was
missing columns of views for which the user has access. (Bug#9838)
Fixed a mysqldump crash that occurred with
the --complete-insert option when dumping
tables with a large number of long column names. (Bug#10286)
Corrected a problem where DEFAULT values
were not assigned properly to BIT(1) or
CHAR(1) columns if certain other columns
preceded them in the table definition. (Bug#10179)
For MERGE tables, avoid writing absolute
pathnames in the .MRG file for the names
of the constituent MyISAM tables so that if
the data directory is moved, MERGE tables
will not break. For mysqld, write just the
MyISAM table name if it is in the same
database as the MERGE table, and a path
relative to the data directory otherwise. For the embedded
servers, absolute pathnames may still be used. (Bug#5964)
Corrected a problem resolving outer column references in correlated subqueries when using the prepared statements. (Bug#10041)
Corrected the error message for exceeding the
MAX_CONNECTIONS_PER_HOUR limit to say
max_connections_per_hour instead of
max_connections. (Bug#9947)
Fixed incorrect memory block allocation for the query cache in the embedded server. (Bug#9549)
Corrected an inability to select from a view within a stored procedure. (Bug#9758)
Fixed a server crash resulting from use of
AVG(DISTINCT) with GROUP BY ...
WITH ROLLUP. (Bug#9799)
Fixed a server crash resulting from use of DISTINCT
AVG() with GROUP BY ... WITH
ROLLUP. (Bug#9800)
Fixed a server crash resulting from use of a
CHAR or VARCHAR column
with MIN() or MAX() and
GROUP BY ... WITH ROLLUP. (Bug#9820)
Fixed a server crash resulting from use of SELECT
DISTINCT with a prepared statement that uses a
cursor. (Bug#9520)
Fixed server crash resulting from multiple calls to a stored
procedure that assigned the result of a subquery to a variable
or compared it to a value with IN. (Bug#5963)
Selecting from a single-table view defined on multiple-table views caused a server crash. (Bug#8528)
If the file named by a --defaults-extra-file
option does not exist or is otherwise inaccessible, an error
now occurs. (Bug#5056)
net_read_timeout and
net_write_timeout were not being respected
on Windows. (Bug#9721)
SELECT from
INFORMATION_SCHEMA tables failed if the
statement has a GROUP BY clause and an
aggregate function in the select list. (Bug#9404)
Corrected some failures of prepared statements for SQL
(PREPARE plus EXECUTE)
to return all rows for some SELECT
statements. (Bug#9096, Bug#9777)
Remove extra slashes in --tmpdir value (for
example, convert /var//tmp to
/var/tmp, because they caused various
errors. (Bug#8497)
Added Create_routine_priv,
Alter_routine_priv, and
Execute_priv privileges to the
mysql.host privilege table. (They had been
added to mysql.db in MySQL 5.0.3 but not to
the host table.) (Bug#8166)
Fixed configure to properly recognize whether NPTL is available on Linux. (Bug#2173)
Incomplete results were returned from
INFORMATION_SCHEMA.COLUMNS for
INFORMATION_SCHEMA tables for
non-root users. (Bug#10261)
Fixed a portability problem in compiling
mysql.cc with VC++ on
Windows. (Bug#10245)
SELECT 0/0 returned 0
rather than NULL. (Bug#10404)
MAX() for an INT
UNSIGNED (unsigned 4-byte integer) column could
return negative values if the column contained values larger
than 231. (Bug#9298)
SHOW CREATE VIEW got confused and could not
find the view if there was a temporary table with the same
name as the view. (Bug#8921)
Fixed a deadlock resulting from use of FLUSH TABLES
WITH READ LOCK while an INSERT
DELAYED statement is in progress. (Bug#7823)
The optimizer was choosing suboptimal execution plans for
certain outer joins where the right table of a left join (or
left table of a right join) had both ON and
WHERE conditions. (Bug#10162)
RENAME TABLE for an
ARCHIVE table failed if the
.arn file was not present. (Bug#9911)
Invoking a stored function that executed a
SHOW statement resulted in a server crash.
(Bug#8408)
Fixed problems with static variables and do not link with
libsupc++ to allow building on FreeBSD 5.3.
(Bug#9714)
Fixed some awk script portability problems in cmd-line-utils/libedit/makelist.sh. (Bug#9954)
Fixed a problem with mishandling of NULL
key parts in hash indexes on VARCHAR
columns, resulting in incorrect query results. (Bug#9489, Bug#10176)
InnoDB: Fixed a critical bug in InnoDB
AUTO_INCREMENT: it could assign the same
value for several rows. (Bug#10359)
InnoDB: All InnoDB bug fixes from 4.1.12
and earlier versions, and also the fixes to bugs #10335 and
#10607 listed in the 4.1.13 change notes.
No public release of MySQL 5.0.5 was made. The changes described in this section are available in MySQL 5.0.6.
Functionality added or changed:
Added support for the BIT data type to the
MEMORY, InnoDB, and
BDB storage engines.
SHOW VARIABLES no longer displays the
deprecated log_update system variable. (Bug#9738)
The behavior controlled by the
--innodb-fast-shutdown option now can be
changed at runtime by setting the value of the global
innodb_fast_shutdown system variable. It
now accepts values 0, 1 and 2 (except on Netware where 2 is
disabled). If set to 2, then when the MySQL server shuts down,
InnoDB will just flush its logs and shut
down brutally (and quickly) as if a MySQL crash had occurred;
no committed transaction will be lost, but a crash recovery
will be done at next startup.
Bugs fixed:
Security fix: If
mysqld was started with
--user=,
it would run using the privileges of the account it was
invoked from, even if that was non_existent_userroot. (Bug#9833)
Corrected a failure to resolve a column reference correctly
for a LEFT JOIN that compared a join column
to an IN subquery. (Bug#9338)
Fixed a problem where, after an internal temporary table in
memory became too large and had to be converted to an on-disk
table, the error indicator was not cleared and the query
failed with error 1023 (Can't find record in
''). (Bug#9703)
Multiple-table updates could produce spurious data-truncation warnings if they used a join across columns that are indexed using a column prefix. (Bug#9103)
Fixed a string-length comparison problem that caused
mysql to fail loading dump files containing
certain 鈥\鈥-sequences. (Bug#9756)
Fixed a failure to resolve a column reference properly when an outer join involving a view contained a subquery and the column was used in the subquery and the outer query. (Bug#6106, Bug#6107)
Use of a subquery that used WITH ROLLUP in
the FROM clause of the main query sometimes
resulted in a Column cannot be null error.
(Bug#9681)
Fixed a memory leak that occurred when selecting from a view that contained a subquery. (Bug#10107)
Fixed an optimizer bug in computing the union of two ranges
for the OR operator. (Bug#9348)
Fixed a segmentation fault in mysqlcheck
that occurred when the last table checked in
--auto-repair mode returned an error (such as
the table being a MERGE table). (Bug#9492)
SET @var= CAST(NULL AS [INTEGER|CHAR]) now
sets the result type of the variable to
INTEGER/CHAR. (Bug#6598)
Incorrect results were returned for queries of the form
SELECT ... LEFT JOIN ... WHERE EXISTS
(, where the
subquery selected rows based on an subquery)IS NULL
condition. (Bug#9516)
Executing LOCK TABLES and then calling a
stored procedure caused an error and resulting in the server
thinking that no stored procedures exist. (Bug#9566)
Selecting from a view containing a subquery caused the server to hang. (Bug#8490)
Within a stored procedure, attempting to execute a
multiple-table UPDATE failed with a
Table ' error.
(Bug#9486)
tbl_name' was
locked with a READ lock and can't be updated
Starting mysqld with the
--skip-innodb and
--default-storage-engine=innodb (or
--default-table-type=innodb caused a server
crash. (Bug#9815)
Queries containing CURRENT_USER()
incorrectly were registered in the query cache. (Bug#9796)
Setting the storage_engine system variable
to MEMORY succeeded, but retrieving the
variable resulted in a value of HEAP (the
old name for the MEMORY storage engine)
rather than MEMORY. (Bug#10039)
mysqlshow displayed an incorrect row count for tables. (Bug#9391)
The server died with signal 11 if a non-existent location was specified for the location of the binary log. Now the server exits after printing an appropriate error message. (Bug#9542)
Fixed a problem in the client/server protocol where the server
closed the connection before sending the final error message.
The problem could show up as a Lost connection to
MySQL server during query when attempting to connect
to access a non-existent database. (Bug#6387, Bug#9455)
Fixed a readline-related crash in
mysql when the user pressed Control-R. (Bug#9568)
For stored functions that should return a
YEAR value, corrected a failure of the
value to be in YEAR format. (Bug#8861)
Fixed a server crash resulting from invocation of a stored
function that returned a value having an
ENUM or SET data type.
(Bug#9775)
Fixed a server crash resulting from invocation of a stored
function that returned a value having a
BLOB data type. (Bug#9102)
Fixed a server crash resulting from invocation of a stored
function that returned a value having a BIT
data type. (Bug#7648)
TIMEDIFF() with a negative time first
argument and positive time second argument produced incorrect
results. (Bug#8068)
Fixed a problem with OPTIMIZE TABLE for
InnoDB tables being written twice to the
binary log. (Bug#9149)
InnoDB: Prevent ALTER
TABLE from changing the storage engine if there are
foreign key constraints on the table. (Bug#5574, Bug#5670)
InnoDB: Fixed a bug where next-key locking
doesn't allow the insert which does not produce a phantom.
(Bug#9354) If the range is of type 'a' <=
uniquecolumn, InnoDB lock only
the RECORD, if the record with the column value
'a' exists in a CLUSTERED index. This
allows inserts before a range.
InnoDB: When
FOREIGN_KEY_CHECKS=0, ALTER
TABLE and RENAME TABLE will
ignore any type incompatibilities between referencing and
referenced columns. Thus, it will be possible to convert the
character sets of columns that participate in a foreign key.
Be sure to convert all tables before modifying any data! (Bug#9802)
Provide more informative error messages in clustered setting when a query is issued against a table that has been modified by another mysqld server. (Bug#6762)
Functionality added or changed:
Added ENGINE=MyISAM table option when
creating mysql.proc table in
mysql_create_system_tables script to make
sure the table is created as a MyISAM table
even if the default storage engine has been changed. (Bug#9496)
SHOW CREATE TABLE for an
INFORMATION_SCHEMA table no longer prints a
MAX_ROWS value because the value has no
meaning. (Bug#8941)
Invalid DEFAULT values for CREATE
TABLE now generate errors. (Bug#5902)
Added --show-table-type option to
mysqlshow, to display a column indicating
the table type, as in SHOW FULL TABLES.
(Bug#5036)
The way the time zone information is stored in the binary log was changed, so that it is now possible to have a replication master and slave running with different global time zones. A drawback is that replication from 5.0.4 masters to pre-5.0.4 slaves is impossible.
Added --with-big-tables compilation option to
configure. (Previously it was necessary to
pass -DBIG_TABLES to the compiler manually in
order to enable large table support.) See
Section聽2.4.14.2, 鈥淭ypical configure Options鈥, for details.
New configuration directives !include and
!includedir implemented for including
option files and searching directories for option files. See
Section聽4.3.2, 鈥淯sing Option Files鈥, for usage.
Bugs fixed:
The use of XOR together with NOT
ISNULL() erroneously resulted in some outer joins
being converted to inner joins by the optimizer. (Bug#9017)
Fixed an optimizer problem where extraneous comparisons
between NULL values in indexed columns were
being done for operators such as = that are
never true for NULL. (Bug#8877)
Fixed the client/server protocol for prepared statements so that reconnection works properly when the connection is killed while reconnect is enabled. (Bug#8866)
A server installed as a Windows service and started with
--shared-memory could not be stopped. (Bug#9665)
Fixed a server crash resulting from multiple executions of a
prepared statement involving a join of an
INFORMATION_SCHEMA table with another
table. (Bug#9383)
Fixed utf8_spanish2_ci and
ucs2_spanish2_ci collations to not consider
鈥r鈥 equal to
鈥rr鈥. If you upgrade to this
version from an earlier version, you should rebuild the
indexes of affected tables. (Bug#9269)
mysqldump dumped core when invoked with
--tmp and
--single-transaction options and a
non-existent table name. (Bug#9175)
Allow extra HKSCS and cp950 characters
(big5 extension characters) to be accepted
in big5 columns. (Bug#9357)
mysql.server no longer uses non-portable alias command or LSB functions. (Bug#9852)
Fixed a server crash resulting from GROUP
BY on a decimal expression. (Bug#9210)
In prepared statements, subqueries containing parameters were
erroneously treated as const tables during
preparation, resulting in a server crash. (Bug#8807)
InnoDB: ENUM and SET
columns were treated incorrectly as character strings. This
bug did not manifest itself with latin1
collations if there were less than about 100 elements in an
ENUM, but it caused malfunction with
UTF-8. Old tables will continue to work. In
new tables, ENUM and SET
will be internally stored as unsigned integers. (Bug#9526)
InnoDB: Avoid test suite failures caused by a locking conflict between two server instances at server shutdown/startup. This conflict on advisory locks appears to be the result of a bug in the operating system; these locks should be released when the files are closed, but somehow that does not always happen immediately in Linux. (Bug#9381)
InnoDB: True VARCHAR: InnoDB stored the
'position' of a row wrong in a column prefix primary key
index; this could cause MySQL to complain ERROR 1032:
Can't find record 鈥 in an update of the primary
key, and also some ORDER BY or
DISTINCT queries. (Bug#9314)
InnoDB: Fix bug in MySQL/InnoDB 5.0.3: SQL statements were not rolled back on error. (Bug#8650)
Fixed a Commands out of sync error when two
prepared statements for single-row result sets were open
simultaneously. (Bug#8880)
Fixed a server crash after a call to
mysql_stmt_close() for single-row result
set. (Bug#9159)
Fixed server crashes for CREATE TABLE ...
SELECT or INSERT INTO ... SELECT
when selecting from multiple-table view. (Bug#8703, Bug#9398)
TRADITIONAL SQL mode should prevent inserts
where a column with no default value is omitted or set to a
value of DEFAULT. Fixed cases where this
restriction was not enforced. (Bug#5986)
Fixed a server crash when creating a PRIMARY
KEY for a table, if the table contained a
BIT column. (Bug#9571)
Warning message from GROUP_CONCAT() did not
always indicate correct number of lines. (Bug#8681)
The commit count cache for NDB was not
properly invalidated when deleting a record using a cursor.
(Bug#8585)
Fixed option-parsing code for the embedded server to
understand K, M, and
G suffixes for the
net_buffer_length and
max_allowed_packet options. (Bug#9472)
Selecting a BIT column failed if the binary
client/server protocol was used. (Bug#9608)
Fixed a permissions problem whereby information in
INFORMATION_SCHEMA could be exposed to a
user with insufficient privileges. (Bug#7214)
An error now occurs if you try to insert an invalid value via
a stored procedure in STRICT mode. (Bug#5907)
Link with libsupc++ on Fedora Core 3 to get
language support functions. (Bug#6554)
The value of the CHARACTER_MAXIMUM_LENGTH
and CHARACTER_OCTET_LENGTH columns of the
INFORMATION_SCHEMA.COLUMNS table must be
NULL for numeric columns, but were not.
(Bug#9344)
DROP TABLE did not drop triggers that were
defined for the table. DROP DATABASE did
not drop triggers in the database. (Bug#5859, Bug#6559)
CREATE OR REPLACE VIEW and ALTER
VIEW now require the CREATE VIEW
and DROP privileges, not CREATE
VIEW and DELETE.
(DELETE is a row-level privilege, not a
table-level privilege.) (Bug#9260)
Some user variables were not being handled with 鈥implicit鈥 coercibility. (Bug#9425)
Setting the max_error_count system variable
to 0 resulted in a setting of 1. (Bug#9072)
Fixed a collation coercibility problem that caused a union between binary and non-binary columns to fail. (Bug#6519)
Fixed a bug in division of floating point numbers. It could
cause nine zeros (000000000) to be inserted
in the middle of the quotient. (Bug#9501)
INFORMATION_SCHEMA tables had an implicit
upper limit for the number of rows. As a result, not all data
could be returned for some queries. (Bug#9317)
Fixed a problem with the tee command in
mysql that resulted in
mysql crashing. (Bug#8499)
CAST() now produces warnings when casting
incorrect INTEGER and
CHAR values. This also applies to implicit
string to number casts.
(Bug#5912)
ALTER TABLE now fails in
STRICT mode if the alteration generates
warnings.
Using CONVERT('0000-00-00',date) or
CAST('0000-00-00' as date) with the
NO_ZERO_DATE SQL mode enabled now produces
a warning. (Bug#6145)
Inserting a zero date in a DATE,
DATETIME or TIMESTAMP
column during TRADITIONAL mode now produces
an error. (Bug#5933)
Inserting a zero date into a DATETIME
column in TRADITIONAL mode now produces an
error.
STR_TO_DATE() now produces errors in strict
mode (and warnings otherwise) when given an illegal argument.
(Bug#5902)
Fixed a problem with ORDER BY that
sometimes caused incorrect sorting of utf8
data. (Bug#9309)
Fixed server crash resulting from queries that combined
SELECT DISTINCT, SUM(),
and ROLLUP. (Bug#8615)
Incorrect results were returned from queries that combined
SELECT DISTINCT, GROUP BY
, and ROLLUP. (Bug#8616)
Too many rows were returned from queries that combined
ROLLUP and LIMIT if
SQL_CALC_FOUND_ROWS was given. (Bug#8617)
If, on a replication master a LOAD DATA
INFILE operation was interrupted (by, for example,
an integrity constraint violation or killed connection), the
slave skipped the LOAD DATA INFILE
entirely, thus missing changes if this command permanently
inserted or updated table records before being interrupted.
(Bug#3247)
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 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.
Functionality added or changed:
Security improvement: The server creates
.frm, .MYD,
.MYI, .MRG,
.ISD, and .ISM table
files only if a file with the same name does not already
exist. Thanks to Stefano Di Paola
<stefano.dipaola@wisec.it> for finding and
informing us about this issue.
(CVE-2005-0711)
Security improvement: User-defined functions should have at
least one symbol defined in addition to the
xxx symbol that corresponds to the main
xxx() function. These auxiliary symbols
correspond to the xxx_init(),
xxx_deinit(),
xxx_reset(),
xxx_clear(), and
xxx_add() functions.
mysqld by default no longer loads UDFs
unless they have at least one auxiliary symbol defined in
addition to the main symbol. The
--allow-suspicious-udfs option controls
whether UDFs that have only an xxx symbol
can be loaded. By default, the option is off.
mysqld also checks UDF filenames when it
reads them from the mysql.func table and
rejects those that contain directory pathname separator
characters. (It already checked names as given in
CREATE FUNCTION statements.) See
Section聽24.2.4.1, 鈥淯DF Calling Sequences for Simple Functions鈥,
Section聽24.2.4.2, 鈥淯DF Calling Sequences for Aggregate Functions鈥, and
Section聽24.2.4.6, 鈥淯ser-Defined Function Security Precautions鈥. Thanks to Stefano Di Paola
<stefano.dipaola@wisec.it> for finding and
informing us about this issue.
(CVE-2005-0709,
CVE-2005-0710)
The DECIMAL and NUMERIC
data types now are handled with a fixed-point library that
allows for precision math handling that results in more
accurate results. See Chapter聽21, Precision Math.
Warning: Incompatible change:
A consequence of the change in handling of the
DECIMAL and NUMERIC
fixed-point data types is that the server is more strict to
follow standard SQL. For example, a data type of
DECIMAL(3,1) stores a maximum value of
99.9. Previously, the server allowed larger numbers to be
stored. That is, it stored a value such as 100.0 as 100.0. Now
the server clips 100.0 to the maximum allowable value of 99.9.
If you have tables that were created before MySQL 5.0.3 and
that contain floating-point data not strictly legal for the
data type, you should alter the data types of those columns.
For example:
ALTER TABLEtbl_nameMODIFYcol_nameDECIMAL(4,1);
Warning: Incompatible change:
For user-defined functions, exact-value decimal arguments such
as 1.3 or DECIMAL column
values were passed as REAL_RESULT values
prior to MySQL 5.0.3. As of 5.0.3, they are passed as strings
with a type of DECIMAL_RESULT. If you
upgrade to 5.0.3 and find that your UDF now receives string
values, use the initialization function to coerce the
arguments to numbers as described in
Section聽24.2.4.3, 鈥淯DF Argument Processing鈥.
For the FLOOR() and
CEILING() functions, the return type is no
longer always BIGINT. For exact-value
numeric arguments, the return value has an exact-value numeric
type. For string or floating-point arguments, the return value
has a floating-point type.
Incompatible change: The C
API ER_WARN_DATA_TRUNCATED warning symbol
was renamed to WARN_DATA_TRUNCATED.
InnoDB: Upgrading from 4.1:
The sorting order for end-space in TEXT
columns for InnoDB tables has changed. Starting from 5.0.3,
InnoDB compares TEXT columns as
space-padded at the end. If you have a non-unique index on a
TEXT column, you should run CHECK
TABLE on it, and run OPTIMIZE
TABLE if the check reports errors. If you have a
UNIQUE INDEX on a TEXT
column, you should rebuild the table with OPTIMIZE
TABLE.
Implemented support for XA transactions. See
Section聽13.4.7, 鈥淴A Transactions鈥. The implementation make the
innodb_safe_binlog system variable
obsolete, so it has been removed.
mysqlbinlog now prints a
ROLLBACK statement at the end of its
output, in case the server crashed while it was in the process
of writing the final entry into the last binary log named on
the command line. This causes any half-written transaction to
be rolled back when the output is executed. The
ROLLBACK is harmless if the binary log file
was written and closed normally.
Added the engine_condition_pushdown system
variable. For NDB, setting this variable to 1 allows
processing of some WHERE clause conditions
to be processed in NDB nodes before rows are sent to the MySQL
server, rather than having rows sent to the server for
evaluation.
Additional control over transaction completion was
implemented. The COMMIT and
ROLLBACK statements support AND
[NO] CHAIN and RELEASE clauses.
There is a new RELEASE SAVEPOINT statement.
The completion_type system variable was
added for setting the global and session default completion
type.
A new CREATE USER privilege was added.
my.cnf in the compile-time datadir
(usually /usr/local/mysql/data/ in the
binary tarball distributions) is not being read anymore. The
value of the environment variable
MYSQL_HOME is used instead of the
hard-coded path.
Support for the ISAM storage engine has
been removed. If you have ISAM tables, you
should convert them before upgrading. See
Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
Support for RAID options in
MyISAM tables has been removed. If you have
tables that use these options, you should convert them before
upgrading. See Section聽2.4.16.2, 鈥淯pgrading from MySQL 4.1 to 5.0鈥.
Added support for AVG(DISTINCT).
ONLY_FULL_GROUP_BY no longer is included in
the ANSI composite SQL mode. (Bug#8510)
mysqld_safe will create the directory where the UNIX socket file is to be located if the directory does not exist. This applies only to the last component of the directory pathname. (Bug#8513)
The coercibility for the return value of functions such as
USER() or VERSION() now
is 鈥system constant鈥 rather than
鈥implicit.鈥 This makes these functions more
coercible than column values so that comparisons of the two do
not result in Illegal mix of collations
errors. COERCIBILITY() was modified to
accommodate this new coercibility value. See
Section聽12.10.3, 鈥淚nformation Functions鈥.
User variable coercibility has been changed from 鈥coercible鈥 to 鈥implicit.鈥 That is, user variables have the same coercibility as column values.
Boolean full-text phrase searching now requires only that matches contain exactly the same words as the phrase and in the same order. Non-word characters no longer need match exactly.
CHECKSUM TABLE returns a warning for
non-existing tables. The checksum value remains
NULL as before. (Bug#8256)
The server now includes a timestamp in the Ready for
connections message that is written to the error log
at startup. (Bug#8444)
Added SQL_NOTES session variable to cause
Note-level warnings not to be recorded.
(Bug#6662)
Allowed the service-installation command for Windows servers
to specify a single option other than
--defaults-file following the service name.
This is for compatibility with MySQL 4.1. (Bug#7856)
InnoDB: Commit after every 10,000 copied
rows when executing ALTER TABLE,
CREATE INDEX, DROP INDEX
or OPTIMIZE TABLE. This makes it much
faster to recover from an aborted operation.
Added VAR_POP() and
STDDEV_POP() as standard SQL aliases for
the VARIANCE() and
STDDEV() functions that compute population
variance and standard deviation. Added new
VAR_SAMP() and
STDDEV_SAMP() functions to compute sample
variance and standard deviation. (Bug#3190)
Fixed a problem with out-of-order packets being sent
(ERROR after OK or
EOF) following a KILL
QUERY statement. (Bug#6804)
Retrieving from a view defined as a SELECT
that mixed UNION ALL and UNION
DISTINCT resulted in a different result than
retrieving from the original SELECT. (Bug#6565)
Fixed a problem with non-optimal
index_merge query execution plans being
chosen on IRIX. (Bug#8578)
BIT in column definitions now is a distinct
data type; it no longer is treated as a synonym for
TINYINT(1).
Bit-field values can be written using
b'
notation. value'value is a binary value
written using 0s and 1s.
From the Windows distribution, predefined accounts without passwords for remote users ("root@%", "@%") were removed (other distributions never had them).
Added mysql_library_init() and
mysql_library_end() as synonyms for the
mysql_server_init() and
mysql_server_end() C API functions.
mysql_library_init() and
mysql_library_end() are
#define symbols, but the names more clearly
indicate that they should be called when beginning and ending
use of a MySQL C API library no matter whether the application
uses libmysqlclient or
libmysqld. (Bug#6149)
SHOW COLUMNS now displays
NO rather than blank in the
Null output column if the corresponding
table column cannot be NULL.
Changed XML format for mysql from
<
to col_name>col_value</col_name><field
name="
to allow for proper encoding of column names that are not
legal as element names. (Bug#7811)
col_name">col_value</field>
Added --innodb-checksums and
--innodb-doublewrite options for
mysqld.
Added --large-pages option for
mysqld.
Added multi_read_range system variable.
SHOW DATABASES, SHOW
TABLES, SHOW COLUMNS, and so
forth display information about the
INFORMATION_SCHEMA database. Also, several
SHOW statements now accept a
WHERE clause specifying which output rows
to display. See Chapter聽20, The INFORMATION_SCHEMA Database.
Added the CREATE ROUTINE and ALTER
ROUTINE privileges, and made the
EXECUTE privilege operational.
InnoDB: Corrected a bug in the crash recovery of
ROW_FORMAT=COMPACT tables that caused
corruption. (Bug#7973) There may still be bugs in the crash
recovery, especially in COMPACT tables.
When the MyISAM storage engine detects
corruption of a MyISAM table, a message
describing the problem now is written to the error log.
InnoDB: When MySQL/InnoDB is compiled on Mac OS X 10.2 or
earlier, detect the operating system version at run time and
use the fcntl() file flush method on Mac OS
X versions 10.3 and later. In Mac OS X,
fsync() does not flush the write cache in
the disk drive, but the special fcntl()
does; however, the flush request is ignored by some external
devices. Failure to flush the buffers may cause severe
database corruption at power outages.
InnoDB: Implemented fast TRUNCATE TABLE.
The old approach (deleting rows one by one) may be used if the
table is being referenced by foreign keys. (Bug#7150)
Added cp932 (SJIS for Windows Japanese) and
eucjpms (UJIS for Windows Japanese)
character sets.
Added several InnoDB status variables. See
Section聽5.2.5, 鈥淪tatus Variables鈥.
Added the FEDERATED storage engine. See
Section聽14.7, 鈥淭he FEDERATED Storage Engine鈥.
SHOW CREATE TABLE now uses USING
rather than
index_typeTYPE
to specify an index type. (Bug#7233)
index_type
InnoDB now supports a fast TRUNCATE TABLE.
One visible change from this is that auto-increment values for
this table are reset on TRUNCATE.
Added an error member to the
MYSQL_BIND data structure that is used in
the C API for prepared statements. This member is used for
reporting data truncation errors. Truncation reporting is
enabled via the new
MYSQL_REPORT_DATA_TRUNCATION option for the
mysql_options() C API function.
API change: the reconnect flag in the
MYSQL structure is now set to 0 by
mysql_real_connect(). Only those client
programs which didn't explicitly set this flag to 0 or 1 after
mysql_real_connect() experience a change.
Having automatic reconnection enabled by default was
considered too dangerous (after reconnection, table locks,
temporary tables, user and session variables are lost).
FLUSH TABLES WITH READ LOCK is now killable
while it's waiting for running COMMIT
statements to finish.
MEMORY (HEAP) can have
VARCHAR() fields.
VARCHAR columns now remember end space. A
VARCHAR() column can now contain up to
65535 bytes. For more details, see
Section聽E.1, 鈥淐hanges in release 5.0.x (Production)鈥. If the table handler doesn't
support the new VARCHAR type, then it's
converted to a CHAR column. Currently this
happens for NDB tables.
InnoDB: Introduced a compact record format
that does not store the number of columns or the lengths of
fixed-size columns. The old format can be requested by
specifying ROW_FORMAT=REDUNDANT. The new
format (ROW_FORMAT=COMPACT) is the default.
The new format typically saves 20 % of disk space and memory.
InnoDB: Setting the initial
AUTO_INCREMENT value for an
InnoDB table using CREATE TABLE
... AUTO_INCREMENT =
now works, and nALTER TABLE ... AUTO_INCREMENT =
resets the current
value.
n
Seconds_Behind_Master is
NULL (which means 鈥unknown鈥)
if the slave SQL thread is not running, or if the slave I/O
thread is not running or not connected to master. It is zero
if the SQL thread has caught up to the I/O thread. It no
longer grows indefinitely if the master is idle.
The MySQL server aborts immediately instead of simply issuing
a warning if it is started with the --log-bin
option but cannot initialize the binary log at startup (that
is, an error occurs when writing to the binary log file or
binary log index file).
The binary log file and binary log index file now are handled
the same way as MyISAM tables when there is
a 鈥disk full鈥 or 鈥quota exceeded鈥
error. See Section聽B.1.4.3, 鈥淗ow MySQL Handles a Full Disk鈥.
The MySQL server now aborts when started with the option
--log-bin-index and without
--log-bin, and when started with
--log-slave-updates and without
--log-bin.
If the MySQL server is started without an argument to
--log-bin and without
--log-bin-index, thus not providing a name
for the binary log index file, a warning is issued because
MySQL falls back to using the hostname for that name, and this
is prone to replication issues if the server's hostname's gets
changed later. See Section聽B.1.8.1, 鈥淥pen Issues in MySQL鈥.
Added account-specific MAX_USER_CONNECTIONS
limit, which allows you to specify the maximum number of
concurrent connections for the account. Also, all limited
resources now are counted per account (instead of being
counted per user + host pair as it was before). Use the
--old-style-user-limits option to get the old
behavior.
InnoDB: A shared record lock
(LOCK_REC_NOT_GAP) is now taken for a
matching record in the foreign key check because inserts can
be allowed into gaps.
InnoDB: Relaxed locking in INSERT鈥ELECT,
single table UPDATE鈥ELECT and single
table DELETE鈥ELECT clauses when
innodb_locks_unsafe_for_binlog is used and
isolation level of the transaction is not serializable.
InnoDB uses consistent read in these cases
for a selected table.
Added a new global system variable
slave_transaction_retries: if the
replication slave SQL thread fails to execute a transaction
because of an InnoDB deadlock or exceeded
InnoDB's innodb_lock_wait_timeout or
NDBCluster's
TransactionDeadlockDetectionTimeout or
TransactionInactiveTimeout, it
automatically retries
slave_transaction_retries times before
stopping with an error. The default is 10. (Bug#8325)
When a client releases a user-level lock, DO
RELEASE_LOCK() will not be written to the binary log
anymore (this makes the binary log smaller); as a counterpart,
the slave does not actually take the lock when it executes
GET_LOCK(). This is mainly an optimization
and should not affect existing setups. (Bug#7998)
The way the character set information is stored into the binary log was changed, so that it's now possible to have a replication master and slave running with different global character sets. A drawback is that replication from 5.0.3 masters to pre-5.0.3 slaves is impossible.
The LOAD DATA statement was extended to
support user variables in the target column list, and an
optional SET clause. Now one can perform
some transformations on data after they have been read and
before they are inserted into the table. For example:
LOAD DATA INFILE 'file.txt' INTO TABLE t1 (column1, @var1) SET column2 = @var1/100;
Also, replication of LOAD DATA was changed,
so you can't replicate such statements from a 5.0.3 master to
pre-5.0.3 slaves.
NDB Cluster: When using this storage
engine, the output of SHOW TABLE STATUS now
displays properly-calculated values in the
Avg_row_length and
Data_length columns. (Note that
BLOB columns are not yet taken into
account.) In addition, the number of replicas is now shown in
the Comment column (as
number_of_replicas).
Bugs fixed:
If a MyISAM table on Windows had
INDEX DIRECTORY or DATA
DIRECTORY table options,
mysqldump dumped the directory pathnames
with single-backslash pathname separators. This would cause
syntax errors when importing the dump file.
mysqldump now changes
鈥\鈥 to
鈥/鈥 in the pathnames on
Windows. (Bug#6660)
mysql_fix_privilege_tables now fixes that
the mysql privilege tables can be used in
MySQL 4.1. This allows one to easily downgrade to 4.1 or run
MySQL 5.0 and 4.1 with the same privilege files for testing
purposes.
Fixed bug creating user with GRANT fails with password but works without, (Bug#7905)
mysqldump misinterpreted
鈥_鈥 and
鈥%鈥 characters in the names of
tables to be dumped as wildcard characters. (Bug#9123)
The definition of the enumeration-valued
sql_mode column of the
mysql.proc table was missing some of the
current allowable SQL modes, so stored routines would not
necessarily execute with the SQL mode in effect at the time of
routine definition. (Bug#8902)
REPAIR TABLE did not invalidate query
results in the query cache that were generated from the table.
(Bug#8480)
In strict or traditional SQL mode, too-long string values
assigned to string columns (CHAR,
VARCHAR, BINARY,
VARBINARY, TEXT, or
BLOB) were correctly truncated, but the
server returned an SQLSTATE value of 01000
(should be 22001). (Bug#6999, Bug#9029)
Stored functions that used cursors could return incorrect results. (Bug#8386)
AES_DECRYPT(
could fail to return col_name,key)NULL for invalid
values in col_name, if
col_name was declared as
NOT NULL. (Bug#8669)
Ordering by unsigned expression (more complex than a column reference) was treating the value as signed, producing incorrectly sorted results. (Bug#7425)
HAVING was treating unsigned columns as
signed. (Bug#7425)
Fixed a problem with boolean full-text searches on
utf8 columns where a double quote in the
search string caused a server crash. (Bug#8351)
For a query with both GROUP BY and
COUNT(DISTINCT) clauses and a
FROM clause with a subquery,
NULL was returned for any
VARCHAR column selected by the subquery.
(Bug#8218)
Fixed a bug in TRUNCATE, which did not work
within stored procedures. A workaround has been made so that
within stored procedures, TRUNCATE is
executed like DELETE. This was necessary
because TRUNCATE is implicitly locking
tables. (Bug#8850)
Fixed an optimizer bug that caused incorrectly ordered result
from a query that used a FULLTEXT index to
retrieve rows and there was another index that was usable for
ORDER BY. For such a query,
EXPLAIN showed fulltext
join type, but regular (not FULLTEXT) index
in the Key column. (Bug#6635)
If SELECT DISTINCT named an index column
multiple times in the select list, the server tried to access
different key fields for each instance of the column, which
could result in a crash. (Bug#8532)
For a stored function that refers to a given table, invoking the function while selecting from the same table resulted in a server crash. (Bug#8405)
Comparison of a DECIMAL column containing
NULL to a subquery that produced
DECIMAL values resulted in a server crash.
(Bug#8397)
The --set-character-set option for
myisamchk was changed to
--set-collation. The value needed for
specifying how to sort indexes is a collation name, not a
character set name. (Bug#8349)
Hostname matching didn't work if a netmask was specified for table-specific privileges. (Bug#3309)
Corruption of MyISAM table indexes could
occur with TRUNCATE TABLE if the table had
already been opened. For example, this was possible if the
table had been opened implicitly by selecting from a
MERGE table that mapped to the
MyISAM table. The server now issues an
error message for TRUNCATE TABLE under
these conditions. (Bug#8306)
Setting the connection collation to a value different from the
server collation followed by a CREATE TABLE
statement that included a quoted default value resulted in a
server crash. (Bug#8235)
Fixed handling of table-name matching in
mysqlhotcopy to accommodate
DBD::mysql 2.9003 and up (which implement
identifier quoting). (Bug#8136)
Selecting from a view defined as a join caused a server crash if the query cache was enabled. (Bug#8054)
Results in the query cache generated from a view were not
properly invalidated after ALTER VIEW or
DROP VIEW on that view. (Bug#8050)
FOUND_ROWS() returned an incorrect value
after a SELECT SQL_CALC_FOUND_ROWS DISTINCT
statement that selected constants and included GROUP
BY and LIMIT clauses. (Bug#7945)
Selecting from an INFORMATION_SCHEMA table
combined with a subquery on an
INFORMATION_SCHEMA table caused an error
with the message Table
.
(Bug#8164)
tbl_name is corrupted
Fixed a problem with equality propagation optimization for prepared statements and stored procedures that caused a server crash upon re-execution of the prepared statement or stored procedure. (Bug#8115, Bug#8849)
LEFT OUTER JOIN between an empty base table
and a view on an empty base table caused a server crash. (Bug#7433)
Use of GROUP_CONCAT() in the select list
when selecting from a view caused a server crash. (Bug#7116)
Use of a view in a correlated subquery that contains
HAVING but no GROUP BY
caused a server crash. (Bug#6894)
Handling by mysql_list_fields() of
references to stored functions within views was incorrect and
could result in a server crash. (Bug#6814)
mysqldump now avoids writing SET
NAMES to the dump output if the server is older than
version 4.1 and would not understand that statement. (Bug#7997)
Fixed problems when selecting from a view that had an
EXISTS or NOT EXISTS
subquery. Selecting columns by name caused a server crash.
With SELECT *, a crash did not occur, but
columns in outer query were not resolved properly. (Bug#6394)
DDL statements for views were not being written to the binary log (and thus not subject to replication). (Bug#4838)
The CHAR() function was not ignoring
NULL arguments, contrary to the
documentation. (Bug#6317)
Creating a table using a name containing a character that is
illegal in character_set_client resulted in
the character being stripped from the name and no error. The
character now is considered an error. (Bug#8041)
Fixed a problem with the Cyrillic letters I and SHORT I being
treated the same by the utf8_general_ci
collation. (Bug#8385)
Some INFORMATION_SCHEMA columns that
contained catalog identifiers were of type
LONGTEXT. These were changed to
VARCHAR(, where
NN is the appropriate maximum
identifier length. (Bug#7215)
Some INFORMATION_SCHEMA columns that
contained timestamp values were of type
VARBINARY. These were changed to
TIMESTAMP. (Bug#7217)
An expression that tested a case-insensitive character column
against string constants that differed in lettercase could
fail because the constants were treated as having a binary
collation. (For example, WHERE city='London' AND
city='london' could fail.) (Bug#7098, Bug#8690)
The output of the STATUS
(\s) command in mysql
had the values for the server and client character sets
reversed. (Bug#7571)
If the slave was running with
--replicate-*-table options which excluded
one temporary table and included another, and the two tables
were used in a single DROP TEMPORARY TABLE IF
EXISTS statement, as the ones the master
automatically writes to its binary log upon client's
disconnection when client has not explicitly dropped these,
the slave could forget to delete the included replicated
temporary table. Only the slave needs to be upgraded. (Bug#8055)
When setting integer system variables to a negative value with
SET VARIABLES, the value was treated as a
positive value modulo 232. (Bug#6958)
Corrected a problem with references to DUAL
where statements such as SELECT 1 AS a FROM
DUAL would succeed but statements such as
SELECT 1 AS a FROM DUAL LIMIT 1 would fail.
(Bug#8023)
Fixed a server crash caused by DELETE FROM
when the tbl_name ... WHERE ... ORDER BY
tbl_name.col_nameORDER BY column was qualified with
the table name. (Bug#8392)
Fixed a bug in MATCH ... AGAINST in natural
language mode that could cause a server crash if the
FULLTEXT index was not used in a join
(EXPLAIN did not show
fulltext join mode) and the search query
matched no rows in the table (Bug#8522).
InnoDB: Honor the --tmpdir
startup option when creating temporary files. Previously,
InnoDB temporary files were always created
in the temporary directory of the operating system. On
Netware, InnoDB will continue to ignore
--tmpdir. (Bug#5822)
Platform and architecture information in version information
produced for --version option on Windows was
always Win95/Win98 (i32). More accurately
determine platform as Win32 or
Win64 for 32-bit or 64-bit Windows, and
architecture as ia32 for x86,
ia64 for Itanium, and
axp for Alpha. (Bug#4445)
If multiple semicolon-separated statements were received in a single packet, they were written to the binary log as a single event rather than as separate per-statement events. For a server serving as a replication master, this caused replication to fail when the event was sent to slave servers. (Bug#8436)
Fixed LOAD INDEX statement to actually load
index in memory. (Bug#8452)
Fixed a failure of multiple-table updates to replicate
properly on slave servers when
--replicate-*-table options had been
specified. (Bug#7011)
Fixed failure of CREATE TABLE ... LIKE
Windows when the source or destination table was located in a
symlinked database directory. (Bug#6607)
With lower_case_table_names set to 1,
mysqldump on Windows could write the same
table name in different lettercase for different SQL
statements. Fixed so that consistent lettercase is used. (Bug#5185)
mysqld_safe now understands the
--help option. Previously, it ignored the
option and attempted to start the server anyway. (Bug#7931)
Fixed problem in NO_BACKSLASH_ESCAPES SQL
mode for strings that contained both the string quoting
character and backslash. (Bug#6368)
Fixed some portability issues with overflow in floating point values.
Prepared statements now gives warnings on prepare.
Fixed bug in prepared statements with
SUM(DISTINCT...).
Fixed bug in prepared statements with OUTER
JOIN.
Fixed a bug in CONV() function returning
unsigned BIGINT number (third argument is
positive, and return value does not fit in 32 bits). (Bug#7751)
Fixed a failure of the IN() operator to
return correct result if all values in the list were constants
and some of them were using substring functions, for example,
LEFT(), RIGHT(), or
MID(). (Bug#7716)
Fixed a crash in CONVERT_TZ() function when
its second or third argument was from a
const table (see
Section聽7.2.1, 鈥淥ptimizing Queries with EXPLAIN鈥). (Bug#7705)
Fixed a problem with calculation of number of columns in row comparison against subquery. (Bug#8020)
Fixed erroneous output resulting from SELECT
DISTINCT combined with a subquery and GROUP
BY. (Bug#7946)
Fixed server crash in comparing a nested row expression (for
example row(1,(2,3))) with a subquery. (Bug#8022)
Fixed server crash resulting from certain correlated subqueries with forward references (references to an alias defined later in the outer query). (Bug#8025)
Fixed server crash resulting from re-execution of prepared statements containing subqueries. (Bug#8125)
Fixed a bug where ALTER TABLE improperly
would accept an index on a TIMESTAMP column
that CREATE TABLE would reject. (Bug#7884)
SHOW CREATE TABLE now reports
ENGINE=MEMORY rather than
ENGINE=HEAP for a MEMORY
table (unless the MYSQL323 SQL mode is
enabled). (Bug#6659)
Fixed a bug where the use of GROUP_CONCAT()
with HAVING caused a server crash. (Bug#7769)
Fixed a bug where comparing the result of a subquery to a non-existent column caused a server crash on Windows. (Bug#7885)
Fixed a bug in a combination of -not and
trunc* operators of full-text search. Using
more than one truncated negative search term, was causing
empty result set.
InnoDB: Corrected the handling of trailing spaces in the
ucs2 character set. (Bug#7350, Bug#8771)
InnoDB: Use native tmpfile() function on
Netware. All InnoDB temporary files are created under
sys:\tmp. Previously, InnoDB temporary
files were never deleted on Netware.
Fixed a bug in max_heap_table_size
handling, that resulted in Table is full
error when the table was still smaller than the limit. (Bug#7791).
Fixed a symlink vulnerability in the mysqlaccess script. Reported by Javier Fernandez-Sanguino Pena and Debian Security Audit Team. (CVE-2005-0004)
Fixed a bug that caused server crash if some error occurred during filling of temporary table created for derived table or view handling. (Bug#7413)
Fixed a bug which caused server crash if query containing
CONVERT_TZ() function with constant
arguments was prepared. (Bug#6849)
Prevent adding CREATE TABLE .. SELECT query
to the binary log when the insertion of new records partially
failed. (Bug#6682)
Fixed a bug which caused a crash when only the slave I/O thread was stopped and started. (Bug#6148)
Giving mysqld a SIGHUP
caused it to crash.
Changed semantics of CREATE/ALTER/DROP
DATABASE statements so that replication of
CREATE DATABASE is possible when using
--binlog-do-db and
--binlog-ignore-db. (Bug#6391)
A sequence of BEGIN (or SET
AUTOCOMMIT=0), FLUSH TABLES WITH READ
LOCK, transactional update,
COMMIT, FLUSH TABLES WITH READ
LOCK could hang the connection forever and possibly
the MySQL server itself. This happened for example when
running the innobackup script several
times. (Bug#6732)
mysqlbinlog did not print SET
PSEUDO_THREAD_ID statements in front of
LOAD DATA INFILE statements inserting into
temporary tables, thus causing potential problems when rolling
forward these statements after restoring a backup. (Bug#6671)
InnoDB: Fixed a bug no error message for ALTER with InnoDB and
AUTO_INCREMENT (Bug#7061). InnoDB now
supports ALTER TABLE...AUTO_INCREMENT = x
query to set auto increment value for a table.
Made the MySQL server accept executing SHOW CREATE
DATABASE even if the connection has an open
transaction or locked tables; refusing it made
mysqldump --single-transaction sometimes
fail to print a complete CREATE DATABASE
statement for some dumped databases. (Bug#7358)
Fixed that, when encountering a 鈥disk full鈥 or
鈥quota exceeded鈥 write error,
MyISAM sometimes didn't sleep and retry the
write, thus resulting in a corrupted table. (Bug#7714)
Fixed that --expire-log-days was not honored
if using only transactions. (Bug#7236)
Fixed that a slave could crash after replicating many
ANALYZE TABLE, OPTIMIZE
TABLE, or REPAIR TABLE statements
from the master. (Bug#6461, Bug#7658)
mysqlbinlog forgot to add backquotes around
the collation of user variables (causing later parsing
problems as BINARY is a reserved word).
(Bug#7793)
Ensured that mysqldump --single-transaction
sets its transaction isolation level to REPEATABLE
READ before proceeding (otherwise if the MySQL
server was configured to run with a default isolation level
lower than REPEATABLE READ it could give an
inconsistent dump). (Bug#7850)
Fixed that when using the RPAD() function
(or any function adding spaces to the right) in a query that
had to be resolved by using a temporary table, all resulting
strings had rightmost spaces removed (that is,
RPAD() did not work) (Bug#4048)
Fixed that a 5.0.3 slave can connect to a master < 3.23.50
without hanging (the reason for the hang is a bug in these
quite old masters -- SELECT @@unknown_var
hangs them -- which was fixed in MySQL 3.23.50). (Bug#7965)
InnoDB: Fixed a deadlock without any locking, simple select
and update (Bug#7975). InnoDB now takes an
exclusive lock when INSERT ON DUPLICATE KEY
UPDATE is checking duplicate keys.
Fixed a bug where MySQL was allowing concurrent updates (inserts, deletes) to a table if binary logging is enabled. Changed to ensure that all updates are executed in a serialized fashion, because they are executed serialized when binlog is replayed. (Bug#7879)
Fixed a rare race condition which could lead to FLUSH
TABLES WITH READ LOCK hanging. (Bug#8682)
Fixed a bug in replication that caused the master to stamp
generated statements (such as SET commands)
with an error_code intended only for
another statement. This could happen, for example, when a
statements generates a duplicate key error on the master but
must be replicated. (Bug#8412)
Functionality added or changed:
Warning: Incompatible change!
The precedence of NOT operator has changed
so that expressions such as NOT a BETWEEN b AND
c are parsed correctly as NOT (a BETWEEN b
AND c) rather than as (NOT a) BETWEEN b AND
c. The pre-5.0 higher-precedence behavior can be
obtained by enabling the new
HIGH_NOT_PRECEDENCE SQL mode.
Warning: Incompatible change!
SHOW STATUS now shows the session
(thread-specific) status variables and SHOW GLOBAL
STATUS shows the status variables for the whole
server.
Before MySQL 5.0.2, SHOW STATUS returned
global status values. Because the default as of 5.0.2 is to
return session values, this is incompatible with previous
versions. To issue a SHOW STATUS statement
that will retrieve global status values for all versions of
MySQL, write it like this:
SHOW /*!50002 GLOBAL */ STATUS;
Added support for the INFORMATION_SCHEMA
鈥information database鈥 that provides database
metadata. See Chapter聽20, The INFORMATION_SCHEMA Database.
A HAVING clause in a
SELECT statement now can refer to columns
in the GROUP BY clause, as required by
standard SQL.
Added the CREATE USER and RENAME
USER statements.
Modify DROP USER so that it drops the
account, including all its privileges. Formerly, it removed
the account record only for an account that had all privileges
revoked.
Added IS [NOT]
syntax,
where boolean_valueboolean_value is
TRUE, FALSE, or
UNKNOWN.
Added several InnoDB status variables. See
Section聽5.2.5, 鈥淪tatus Variables鈥.
Implemented the WITH CHECK OPTION clause
for CREATE VIEW.
CHECK TABLE now works for views.
The SCHEMA and SCHEMAS
keywords are now accepted as synonyms for
DATABASE and DATABASES.
Added initial support for rudimentary triggers (the
CREATE TRIGGER and DROP
TRIGGER statements).
Added basic support for read-only server side cursors.
mysqldump --single-transaction --master-data is now able to take an online (non-blocking) dump of InnoDB and report the corresponding binary log coordinates, which makes a backup suitable for point-in-time recovery, roll-forward or replication slave creation. See Section聽8.13, 鈥mysqldump 鈥 A Database Backup Program鈥.
Added --start-datetime,
--stop-datetime,
--start-position,
--stop-position options to
mysqlbinlog (makes point-in-time recovery
easier).
Made the MySQL server not react to signals
SIGHUP and SIGQUIT on
Mac OS X 10.3. This is needed because under this OS, the MySQL
server receives lots of these signals (reported as Bug#2030).
New --auto-increment-increment and
--auto-increment-offset startup options.
These allow you to set up a server to generate auto-increment
values that don't conflict with another server.
MySQL now by default checks dates and in strict mode allows
only fully correct dates. If you want MySQL to behave as
before, you should enable the new
ALLOW_INVALID_DATES SQL mode.
Added STRICT_TRANS_TABLES,
STRICT_ALL_TABLES,
NO_ZERO_IN_DATE,
NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO, and
TRADITIONAL SQL modes. The
TRADITIONAL mode is shorthand for all the
preceding modes. When using mode
TRADITIONAL, MySQL generates an error if
you try to insert a wrong value in a column. It does not
adjust the value to the closest possible legal value.
MySQL now remembers which columns were declared to have
default values. In
STRICT_TRANS_TABLES/STRICT_ALL_TABLES
mode, you now get an error if you do an
INSERT without specifying all columns that
don't have a default value. A side effect of this is that when
you do SHOW CREATE for a new table, you no
longer see a DEFAULT value for a column for
which you didn't specify a default value.
The compilation flag
DONT_USE_DEFAULT_FIELDS was removed because
you can get the same behavior by setting the
sql_mode system variable to
STRICT_TRANS_TABLES.
Added NO_AUTO_CREATE_USER SQL mode to
prevent GRANT from automatically creating
new users if it would otherwise do so, unless a password also
is specified.
We now detect too-large floating point numbers during statement parsing and generate an error messages for them.
Renamed the sql_updatable_view_key system
variable to updatable_views_with_limit.
This variable now can have only two values:
1 or YES: Don't
issue an error message (warning only) if a VIEW without
presence of a key in the underlying table is used in
queries with a LIMIT clause for
updating. (This is the default value.)
0 or NO: Prohibit
update of a VIEW, which does not contain a key in the
underlying table and the query uses a
LIMIT clause (usually get from GUI
tools).
Reverted output format of SHOW TABLES to
old pre-5.0.1 format that did not include a table type column.
To get the additional column that lists the table type, use
SHOW FULL TABLES now.
The mysql_fix_privilege_tables script now
initializes the global CREATE VIEW and
SHOW VIEW privileges in the
user table to the value of the
CREATE privilege in that table.
If the server finds that the user table has
not been upgraded to include the view-related privilege
columns, it treats each account as having view privileges that
are the same as its CREATE privilege.
InnoDB: If you specify the option
innodb_locks_unsafe_for_binlog in
my.cnf, InnoDB in an
UPDATE or a DELETE only
locks the rows that it updates or deletes. This greatly
reduces the probability of deadlocks.
A connection doing a rollback now displays "Rolling back" in
the State column of SHOW
PROCESSLIST.
mysqlbinlog now prints an informative
commented line (thread id, timestamp, server id, and so forth)
before each LOAD DATA INFILE, like it does
for other queries; unless --short-form is
used.
Two new server system variables were introduced.
auto_increment_increment and
auto_increment_offset can be set locally or
globally, and are intended for use in controlling the behavior
of AUTO_INCREMENT columns in
master-to-master replication. Note that these variables are
not intended to take the place of sequences. See
Section聽5.2.3, 鈥淪ystem Variables鈥.
Bugs fixed:
Fixed that mysqlbinlog --read-from-remote-server sometimes couldn't accept two binary log files on the command line. (Bug#4507)
Fixed that mysqlbinlog --position
--read-from-remote-server had incorrect #
at lines. (Bug#4506)
Fixed that CREATE TABLE ... TYPE=HEAP ... AS
SELECT... caused replication slave to stop. (Bug#4971)
Fixed that
mysql_options(...,MYSQL_OPT_LOCAL_INFILE,...)
failed to disable LOAD DATA LOCAL INFILE.
(Bug#5038)
Fixed that disable-local-infile option had
no effect if client read it from a configuration file using
mysql_options(...,MYSQL_READ_DEFAULT,...).
(Bug#5073)
Fixed that SET GLOBAL SYNC_BINLOG did not
work on some platforms (Mac OS X). (Bug#5064)
Fixed that mysql-test-run failed on the
rpl_trunc_binlog test if running test from
the installed (the target of 'make install') directory. (Bug#5050)
Fixed that mysql-test-run failed on the
grant_cache test when run as Unix user
'root'. (Bug#4678)
Fixed an unlikely deadlock which could happen when using
KILL. (Bug#4810)
Fixed a crash when one connection got
KILLed while it was doing START
SLAVE. (Bug#4827)
Made FLUSH TABLES WITH READ LOCK block
COMMIT if server is running with binary
logging; this ensures that the binary log position can be
trusted when doing a full backup of tables and the binary log.
(Bug#4953)
Fixed that the counter of an auto_increment
column was not reset by TRUNCATE TABLE is
the table was a temporary one. (Bug#5033)
Fixed slave SQL thread so that the SET
COLLATION_SERVER... statements it replicates don't
advance its position (so that if it gets interrupted before
the actual update query, it later redoes the
SET). (Bug#5705)
Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug#5711)
Fixed that if a write to a MyISAM table
fails because of a full disk or an exceeded disk quota, it
prints a message to the error log every 10 minutes, and waits
until disk becomes free. (Bug#3248)
Fixed problem introduced in 4.0.21 where a connection starting
a transaction, doing updates, then FLUSH TABLES WITH
READ LOCK, then COMMIT, would
cause replication slaves to stop (complaining about error
1223). Bug surfaced when using the InnoDB
innobackup script. (Bug#5949)
OPTIMIZE TABLE, REPAIR
TABLE, and ANALYZE TABLE are now
replicated without any error code in the binary log. (Bug#5551)
If a connection had an open transaction but had done no
updates to transactional tables (for example if had just done
a SELECT FOR UPDATE then executed a
non-transactional update, that update automatically committed
the transaction (thus releasing InnoDB's row-level locks etc).
(Bug#5714)
If a connection was interrupted by a network error and did a
rollback, the network error code got stored into the
BEGIN and ROLLBACK
binary log events; that caused superfluous slave stops. (Bug#6522)
Fixed a bug which prevented mysqlbinlog
from being able to read from stdin, for
example, when piping the output from zcat
to mysqlbinlog. (Bug#7853)
Note: This build passes our test suite and fixes a lot of reported bugs found in the previous 5.0.0 release. However, please be aware that this is not a 鈥standard MySQL build鈥 in the sense that there are still some open critical bugs in our bugs database at http://bugs.mysql.com/ that affect this release as well. We are actively fixing these and will make a new release where these are fixed as soon as possible. However, this binary should be a good candidate for testing new MySQL 5.0 features for future products.
Functionality added or changed:
Warning: Incompatible change!
C API change: mysql_shutdown() now requires
a second argument. This is a source-level incompatibility that
affects how you compile client programs; it does not affect
the ability of compiled clients to communicate with older
servers. See Section聽22.2.3.65, 鈥mysql_shutdown()鈥.
When installing a MySQL server as a Windows service, the
installation command can include a
--local-service option following the service
name to cause the server to run using the
LocalService Windows account that has
limited privileges. This is in addition to the
--defaults-file option that also can be given
following the service name.
Added support for read-only and updatable views based on a single table or other updatable views. View use requires that you upgrade your grant tables to add the view-related privileges. See Section聽5.5.4, 鈥mysql_fix_privilege_tables 鈥 Upgrade MySQL System Tables鈥.
Implemented a new 鈥greedy search鈥 optimizer that
can significantly reduce the time spent on query optimization
for some many-table joins. (You are affected if not only some
particular SELECT is slow, but even using
EXPLAIN for it takes a noticeable amount of
time.) Two new system variables,
optimizer_search_depth and
optimizer_prune_level, can be used to
fine-tune optimizer behavior.
A stored procedure is no longer 鈥global.鈥 That is, it now belongs to a specific database:
When a database is dropped, all routines belonging to that database are also dropped.
Procedure names may be qualified, for example,
db.p()
When executed from another database, an implicit
USE
is in effect.
db_name
Explicit USE
statements no
longer are allowed in a stored procedure.
db_name
Fixed SHOW TABLES output field name and
values according to standard. Field name changed from
Type to table_type,
values are BASE TABLE,
VIEW and ERROR. (Bug#4603)
Added the sql_updatable_view_key system
variable.
Added the --replicate-same-server-id server
option.
Added Last_query_cost status variable that
reports optimizer cost for last compiled query.
Added the --to-last-log option to
mysqlbinlog, for use in conjunction with
--read-from-remote-server.
Added the --innodb-safe-binlog server option,
which adds consistency guarantees between the content of
InnoDB tables and the binary log. See
Section聽5.11.3, 鈥淭he Binary Log鈥.
OPTIMIZE TABLE for
InnoDB tables is now mapped to
ALTER TABLE instead of ANALYZE
TABLE. This rebuilds the table, which updates index
statistics and frees space in the clustered index.
sync_frm is now a settable global variable
(not only a startup option).
For replication of MEMORY
(HEAP) tables: Made the master
automatically write a DELETE FROM statement
to its binary log when a MEMORY table is
opened for the first time since master's startup. This is for
the case where the slave has replicated a non-empty
MEMORY table, then the master is shut down
and restarted: the table is now empty on master; the
DELETE FROM empties it on slave too. Note
that even with this fix, between the master's restart and the
first use of the table on master, the slave still has
out-of-date data in the table. But if you use the
--init-file option to populate the
MEMORY table on the master at startup, it
ensures that the failing time interval is zero. (Bug#2477)
When a session having open temporary tables terminates, the
statement automatically written to the binary log is now
DROP TEMPORARY TABLE IF EXISTS instead of
DROP TEMPORARY TABLE, for more robustness.
The MySQL server now returns an error if SET
SQL_LOG_BIN is issued by a user without the
SUPER privilege (in previous versions it
just silently ignored the statement in this case).
Changed that when the MySQL server has binary logging disabled
(that is, no --log-bin option was used), then
no transaction binary log cache is allocated for connections.
This should save binlog_cache_size bytes of
memory (32KB by default) for every connection.
Added the sync_binlog=N global variable and
startup option, which makes the MySQL server synchronize its
binary log to disk (fdatasync()) after
every Nth write to the binary log.
Changed the slave SQL thread to print less useless error
messages (no more message duplication; no more messages when
an error is skipped because of
slave-skip-errors).
DROP DATABASE IF EXISTS, DROP
TABLE IF EXISTS, single-table
DELETE, and single-table
UPDATE now are written to the binary log
even if they changed nothing on the master (for example, even
if a DELETE matched no rows). The old
behavior sometimes caused bad surprises in replication setups.
Replication and mysqlbinlog now have better support for the case that the session character set and collation variables are changed within a given session. See Section聽6.7, 鈥淩eplication Features and Known Problems鈥.
Killing a CHECK TABLE statement does not
result in the table being marked as 鈥corrupted鈥
any more; the table remains as if CHECK
TABLE had not even started. See
Section聽13.5.5.3, 鈥KILL Syntax鈥.
Bugs fixed:
Strange results with index (x, y) ... WHERE
x= (Bug#3155)
val_1 AND
y>=val_2 ORDER BY
pk;
Adding ORDER BY to a query that uses a
subquery can cause incorrect results. (Bug#3118)
ALTER DATABASE caused the client to hang if
the database did not exist. (Bug#2333)
SLAVE START (which is a deprecated syntax,
START SLAVE should be used instead) could
crash the slave. (Bug#2516)
Multiple-table DELETE statements were never
replicated by the slave if there were any
--replicate-*-table options. (Bug#2527)
The MySQL server did not report any error if a statement
(submitted through mysql_real_query() or
mysql_stmt_prepare()) was terminated by
garbage characters. This can happen if you pass a wrong
length parameter to these functions. The
result was that the garbage characters were written into the
binary log. (Bug#2703)
Replication: If a client connects to a slave server and issues
an administrative statement for a table (for example,
OPTIMIZE TABLE or REPAIR
TABLE), this could sometimes stop the slave SQL
thread. This does not lead to any corruption, but you must use
START SLAVE to get replication going again.
(Bug#1858)
Made clearer the error message that one gets when an update is
refused because of the --read-only option.
(Bug#2757)
Fixed that --replicate-wild-*-table rules
apply to ALTER DATABASE when the table
pattern is %, as is the case for
CREATE DATABASE and DROP
DATABASE. (Bug#3000)
Fixed that when a Rotate event is found by
the slave SQL thread in the middle of a transaction, the value
of Relay_Log_Pos in SHOW SLAVE
STATUS remains correct. (Bug#3017)
Corrected the master's binary log position that
InnoDB reports when it is doing a crash
recovery on a slave server. (Bug#3015)
Changed the column Seconds_Behind_Master in
SHOW SLAVE STATUS to never show a value of
-1. (Bug#2826)
Changed that when a DROP TEMPORARY TABLE
statement is automatically written to the binary log when a
session ends, the statement is recorded with an error code of
value zero (this ensures that killing a
SELECT on the master does not result in a
superfluous error on the slave). (Bug#3063)
Changed that when a thread handling INSERT
DELAYED (also known as a
delayed_insert thread) is killed, its
statements are recorded with an error code of value zero
(killing such a thread does not endanger replication, so we
thus avoid a superfluous error on the slave). (Bug#3081)
Fixed deadlock when two START SLAVE
commands were run at the same time. (Bug#2921)
Fixed that a statement never triggers a superfluous error on
the slave, if it must be excluded given the
--replicate-* options. The bug was that if
the statement had been killed on the master, the slave would
stop. (Bug#2983)
The --local-load option of
mysqlbinlog now requires an argument.
Fixed a segmentation fault when running LOAD DATA
FROM MASTER after RESET SLAVE.
(Bug#2922)
mysqlbinlog --read-from-remote-server read
all binary logs following the one that was requested. It now
stops at the end of the requested file, the same as it does
when reading a local binary log. There is an option
--to-last-log to get the old behavior. (Bug#3204)
Fixed mysqlbinlog --read-from-remote-server to print the exact positions of events in the "at #" lines. (Bug#3214)
Fixed a rare error condition that caused the slave SQL thread
spuriously to print the message Binlog has bad magic
number and stop when it was not necessary to do so.
(Bug#3401)
mysqlbinlog failed to print a
USE statement under rare circumstances
where the binary log contained a LOAD DATA
INFILE statement. (Bug#3415)
Fixed memory corruption occurring when replicating a
LOAD DATA INFILE from a master running
MySQL version 3.23. (Bug#3422)
Multiple-table DELETE statements were
always replicated by the slave if there were some
--replicate-*-ignore-table options and no
--replicate-*-do-table options. (Bug#3461)
Fixed a crash of the MySQL slave server when it was built with
--with-debug and replicating itself. (Bug#3568)
Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug#3357)
If server-id was not set using startup
options but with SET GLOBAL, the
replication slave still complained that it was not set. (Bug#3829)
mysql_fix_privilege_tables didn't correctly
handle the argument of its
--password=
option. (Bug#4240)
password_val
Fixed potential memory overrun in
mysql_real_connect() (which required a
compromised DNS server and certain operating systems). (Bug#4017,
CVE-2004-0836)
During the installation process of the server RPM on Linux,
mysqld was run as the
root system user, and if you had
--log-bin=
it created binary log files owned by somewhere_out_of_var_lib_mysqlroot
in this directory, which remained owned by
root after the installation. This is now
fixed by starting mysqld as the
mysql system user instead. (Bug#4038)
Made DROP DATABASE honor the value of
lower_case_table_names. (Bug#4066)
The slave SQL thread refused to replicate INSERT ...
SELECT if it examined more than 4 billion rows. (Bug#3871)
mysqlbinlog didn't escape the string content of user variables, and did not deal well when these variables were in non-ASCII character sets; this is now fixed by always printing the string content of user variables in hexadecimal. The character set and collation of the string is now also printed. (Bug#3875)
Fixed incorrect destruction of expression that led to a server
crash on complex AND/OR
expressions if query was ignored (either by a replication
server because of --replicate-*-table rules,
or by any MySQL server because of a syntax error). (Bug#3969,
Bug#4494)
If CREATE TEMPORARY TABLE t SELECT failed
while loading the data, the temporary table was not dropped.
(Bug#4551)
Fixed that when a multiple-table DROP TABLE
failed to drop a table on the master server, the error code
was not written to the binary log. (Bug#4553)
When the slave SQL thread was replicating a LOAD DATA
INFILE statement, it didn't show the statement in
the output of SHOW PROCESSLIST. (Bug#4326)
Functionality added or changed:
The output of the SHOW BINLOG EVENTS
statement has been modified. The
Orig_log_pos column has been renamed to
End_log_pos and now represents the offset
of the last byte of the event, plus one.
Important note: If you
upgrade to MySQL 4.1.1 or higher, it is difficult to downgrade
back to 4.0 or 4.1.0! That is because, for earlier versions,
InnoDB is not aware of multiple
tablespaces.
Added support for SUM(DISTINCT),
MIN(DISTINCT), and
MAX(DISTINCT).
The KILL statement now takes
CONNECTION and QUERY
modifiers. The first is the same as KILL
with no modifier (it kills a given connection thread). The
second kills only the statement currently being executed by
the connection.
Added TIMESTAMPADD() and
TIMESTAMPDIFF() functions.
Added WEEK and QUARTER
values as INTERVAL arguments for the
DATE_ADD() and
DATE_SUB() functions.
New binary log format that enables replication of these
session variables: sql_mode,
SQL_AUTO_IS_NULL,
FOREIGN_KEY_CHECKS (which was replicated
since 4.0.14, but here it's done more efficiently and takes
less space in the binary logs),
UNIQUE_CHECKS. Other variables (like
character sets, SQL_SELECT_LIMIT, ...) will
be replicated in upcoming 5.0.x releases.
Implemented Index Merge optimization for OR
clauses. See Section聽7.2.6, 鈥淚ndex Merge Optimization鈥.
Basic support for stored procedures (SQL:2003 style). See Chapter聽17, Stored Procedures and Functions.
Added SELECT INTO
, which can
be of mixed (that is, global and local) types. See
Section聽17.2.7.3, 鈥list_of_varsSELECT ... INTO Statement鈥.
Easier replication upgrade (5.0.0 masters can read older binary logs and 5.0.0 slaves can read older relay logs). See Section聽6.5, 鈥淩eplication Compatibility Between MySQL Versions鈥, for more details). The format of the binary log and relay log is changed compared to that of MySQL 4.1 and older.
LOAD DATA INFILE causes an implicit commit.
Important: The behaviour of
LOAD DATA INFILE in this regard was changed
again in MySQL 5.0.26. See Section聽E.1.2, 鈥淐hanges in release 5.0.26 (03 October 2006)鈥.
Bugs fixed:
Starting from 4.1.13 and 5.0.7, all Cluster changes are included in the MySQL Change History, and this manual section is no longer separately maintained.
Note: Starting with version 5.0.8, changes for MySQL Cluster can be found in the combined MySQL Change History.
Functionality added or changed:
Bugs fixed:
(Bug#11019) mgmapi start backup in some cases returns wrong backupid
(Bug#10190) Backup from cluster wih NoOfReplica=1 is corrupt
(Bug#9246) Condition pushdown and left join, wrong result
(Bug#10956) More than 7 node restarts with
--initial caused cluster to fail.
(Bug#9945) ALTER TABLE caused server
crash. (Linux/390)
(Bug#9826) (Bug#10948) Schema change (DROP
TABLE, ALTER TABLE) crashed HPUX
and PPC32.
(Bug#10711) (Bug#9363) (Bug#8918) (Bug#10058) (Bug#9025)
Cluster would time out and crash after first query; setting
DataMemory to more than 2GB prevented cluster from starting;
calling ndb_select_count() crashed the
cluster. (64-bit Unix OSes)
Functionality added or changed:
Limit on number of metadata objects (number of tables, indexes and BLOBs) now increased to 20,320
Bugs fixed:
Functionality added or changed:
Decreased IndexMemory Usage
Parallel key lookup (read-multi-range) for queries like
SELECT * FROM t1 WHERE primary_key IN
(1,2,3,4,5,6,7,8,9,10);
Bugs fixed:
Patches merged from versions 4.1.11 and 4.1.12
(Bug#8315) NdbScanFilter cmp method only works for strings of exact word boundary length
(Bug#8103) Configuration handling error
(Bug#8035) mysqld signal 10 when ndbd is shutdown
(Bug#7631) NDB$EVENT contains unreadable event and table names
(Bug#7628) Filtered event types are ignored
(Bug#7627) Drop Event operation fails
(Bug#7424) create index on datetime fails
Functionality added or changed:
Condition pushdown to storage engine now works for update and delete as well
Bugs fixed:
(Bug#9675) Auto-increment not working with INSERT..SELECT and NDB storage
(Bug#9517) Condition pushdown to storage engine does not work for update/delete
(Bug#9282) API Node Crashes/Reloads on 'DELETE FROM'
(Bug#9280) Memory leak in cluster when dependent sub-queries are used
(Bug#8585) ndb_cache2 fails on aix52
Functionality added or changed:
Condition pushdown to storage engine
Query cache enabled for cluster
Bugs fixed:
Patches merged from version 4.1.10
Functionality added or changed:
This was the first MySQL Cluster release in the 5.0 series. As nearly all attention was still focused on getting 4.1 stable, it is not recommended to use MySQL 5.0.1 for MySQL Cluster.
Bugs fixed:
N/A
Functionality added or changed:
Bugs fixed:
(Bug#11132) Connections between data nodes and management
nodes were not being closed following shutdown of
ndb_mgmd.
(Bug#11050) ndb_mgm> show printed
incorrectly after master data node failure.
(Bug#10956) More than 7 node restarts with
--initial caused cluster to fail.
(Bug#9826) (Bug#10948) Schema change (DROP
TABLE, ALTER TABLE) crashed HPUX
and PPC32.
(Bug#9025) Data nodes failed to restart on 64-bit Solaris.
(Bug#11166) Insert records were incorrectly applied by
ndb_restore, thus making restoration from
backup inconsistent if the binlog contained inserts.
(Bug#8918) (Bug#9363) (Bug#10711) (Bug#10058) (Bug#9025)
Cluster would time out and crash after first query; setting
DataMemory to more than 2GB prevented cluster from starting;
calling ndb_select_count() crashed the
cluster. (64-bit Unix OSes)
(Bug#10190) When making a backup of a cluster where
NumberOfReplicas was equal to 1, the
backup's metadata was corrupted. (Linux)
(Bug#9945) ALTER TABLE caused server
crash. (Linux/390)
(Bug#11133) A delete operation performed as part of a transaction caused an erroneous result.
(Bug#10294) Not allowing sufficient parallelism in cluster
configuration (for example,
NoOfTransactions too small) caused
ndb_restore to fail without generating any
error messages.
(Bug#11290) Setting TransactionInactiveTimeout= 0 did not result in an infinite timeout.
Functionality added or changed:
Bugs fixed:
(Bug#10471) Backup can become inconsistent with certain combinations of multiple-row updates
(Bug#10287) ndb_select_all "delimiter" option non functional
(Bug#10142) Unhandled resource shortage in UNIQUE index code
(Bug#10029) crash in ordered index scan after db full
(Bug#10001) 2 NDB nodes get signal 6 (abort) in DBTC
(Bug#9969) 4012 - has misleading error message
(Bug#9960) START BACKUP reports failure albeit succeeding
(Bug#9924) ABORT BACKUP 1 crashes 4 node cluster
(Bug#9892) Index activation file during node recovery
(Bug#9891) Crash in DBACC (line 7004) during commit
(Bug#9865) SELECT does not function properly
(Bug#9839) Column with AUTOINC contains -1 Value on node stop
(Bug#9757) Uncompleted node failure after gracefully stopping node
(Bug#9749) Transactions causes deadlock in ACC
(Bug#9724) Node fails to start: Message: File has already been opened
(Bug#9691) UPDATE fails on attempt to update primary key
(Bug#9675) Auto-increment not working with INSERT..SELECT and NDB storage
(Bug#9318) drop database does not drop ndb tables
(Bug#9280) Memory leak in cluster when dependent sub-queries are used
(Bug#8928) create table with keys will shutdown the cluster
Creating a table did not work for a cluster with 6 nodes. (Bug#8928) Databases with 1, 2, 4, 8, ...
(2n
nodes) did not have the problem. After a rolling upgrade,
restart each node manually by restarting it with the
--initial option. Otherwise, use dump and
restore after an upgrade.
Functionality added or changed:
Bugs fixed:
(Bug#9916) DbaccMain.cpp / DBACC (Line: 4876) / Pointer too large
(Bug#9435) TIMESTAMP columns don't update
(Bug#9052) Uninitialized data during unique index build, potential cluster crash
(Bug#8876) Timeout when committing aborted transaction after node failure
(Bug#8786) ndb_autodiscover, drop index can fail, wait 2 minutes timeout
(Bug#8853) Transaction aborted after long time during node failure (4012)
(Bug#8753) Invalid schema object version after dropping index (crash fixed, currently retry required)
(Bug#8645) Assertion failure with multiple management servers
(Bug#8557) ndbd does not get same nodeid on restart
(Bug#8556) corrupt ndb_mgm show printout for certain configurations
(Bug#8167) cluster shared memory and mysqld signal usage clash
Bugs fixed:
(Bug#8284) Out of fragment memory in DBACC
(Bug#8262) Node crash due to bug in DBLQH
(Bug#8208) node restart fails on Aix 5.2
(Bug#8167) cluster shared memory and mysqld signal usage clash
(Bug#8101) unique index and error 4209 while selecting
(Bug#8070) (Bug#7937) (Bug#6716) various ndb_restore core dumps on HP-UX
(Bug#8010) 4006 forces MySQL Node Restart
(Bug#7928) out of connection objects
(Bug#7898) mysqld crash with ndb (solaris)
(Bug#7864) Not possible to have more than 4.5G data memory
Functionality added or changed:
New implementation of shared memory transporter.
Cluster automatically configures shared memory transporter if possible.
Cluster prioritizes usage of transporters with shared memory and localhost TCP
Added switches to control the above functions,
ndb-shm and
ndb-optimized-node-selection.
Bugs fixed:
(Bug#7805) config.ini parsing error
(Bug#7798) Running range scan after alter table in different thread causes node failure
(Bug#7761) Alter table does not autocommit
(Bug#7725) Indexed DATETIME Columns Return Random Results
(Bug#7660) START BACKUP does not increment BACKUP-ID (Big Endian machines)
(Bug#7593) Cannot Create A Large NDB Data Warehouse
(Bug#7480) Mysqld crash in ha_ndbcluster using Query Browser
(Bug#7470) shared memory transporter does not connect
(Bug#7396) Primary Key not working in NDB Mysql Clustered table (solaris)
(Bug#7379) ndb restore fails to handle blobs and multiple databases
(Bug#7346) ndb_restore enters infinite loop
(Bug#7340) Problem for inserting data into the Text field on utf8
(Bug#7124) ndb_mgmd is aborted on startup when using SHM connection
Functionality added or changed:
Default port for ndb_mgmd was changed to 1186 (from 2200) as this port number was officially assigned to MySQL Cluster by IANA.
New command in ndb_mgm, PURGE STALE SESSIONS, as a workaround for cases where nodes fail to allocate a node id even if it is free to use.
New command in ndb_mgm, CONNECT.
The ndb executables have been changed to make use of the regular MySQL command line option parsing features. See Section聽15.6.5, 鈥淐ommand Options for MySQL Cluster Processes鈥, for notes on changes.
As bonus of the above you can now specify all command line
options in my.cnf using the executable
names as sections, that is, [ndbd],
[ndb_mgmd], [ndb_mgm],
[ndb_restore], and so forth.
[ndbd]
ndb-connectstring=myhost.domain.com:1234
[ndb_mgm]
ndb-connectstring=myhost.domain.com:1234
Added use of section [mysql_cluster] in
my.cnf. All cluster executables,
including mysqld, parse this section. For example, this is a
convenient place to put ndb-connectstring
so that it need be specified only once.
Added cluster log info events on allocation and deallocation of nodeid's.
Added cluster log info events on connection refuse as a result of version mismatch.
Extended connectstring syntax to allow for leaving the port
number out. For example,
ndb-connectstring|connect-string=myhost1,myhost2,myhost3
is a valid connectstring and connect occurs on default port
1186.
Clear text ndb error messages provided also for error codes
that are mapped to corresponding mysql error codes, by
executing SHOW WARNINGS after an error has
occurred which relates to the ndb storage engine.
Significant performance improvements done for read performance, especially for blobs.
Added some variables for performance tuning,
ndb_force_send and
ndb_use_exact_count. Do show
variables like 'ndb%'; in mysql client for listing.
Use set command to alter variables.
Added variables to set some options,
ndb_use_transactions and
ndb_autoincrement_prefetch_sz.
Bugs fixed:
(Bug#7303) ndb_mgm: Trying to set CLUSTERLOG for a specific node id core dumps
(Bug#7193) start backup gives false error printout
(Bug#7153) Cluster nodes don't report error on endianness mismatch
(Bug#7152) ndb_mgmd segmentation fault on incorrect HostName in configuration
(Bug#7104) clusterlog filtering and level setting broken
(Bug#6995) ndb_recover on varchar fields results in changing case of data
(Bug#6919) all status only shows 2 nodes on a 8-node cluster
(Bug#6871) DBD execute failed: Got error 897 'Unknown error code' from ndbcluster
(Bug#6794) Wrong outcome of update operation of ndb table
(Bug#6791) Segmentation fault when config.ini is not correctly set
(Bug#6775) failure in acc when running many mysql clients
(Bug#6696) ndb_mgm command line options inconsistent with behavior
(Bug#6684) ndb_restore doesn't give error messages if improper command given
(Bug#6677) ndb_mgm can crash on "ALL CLUSTERLOG"
(Bug#6538) Error code returned when select max() on empty table with index
(Bug#6451) failing create table givers "ghost" tables which are impossible to remove
(Bug#6435) strange behavior of left join
(Bug#6426) update with long pk fails
(Bug#6398) update of primary key fails
(Bug#6354) mysql does not complain about --ndbcluster option when NDB is not compiled in
(Bug#6331) INSERT IGNORE .. SELECT breaks subsequent inserts
(Bug#6288) cluster nodes crash on data import
(Bug#6031) To drop database you have to execute DROP DATABASE command twice
(Bug#6020) LOCK TABLE + delete returns error 208
(Bug#6018) REPLACE does not work for BLOBs + NDB
(Bug#6016) Strange crash with blobs + different DATABASES
(Bug#5973) ndb table belonging to different database shows up in show tables
(Bug#5872) ALTER TABLE with blob from ndb table to myisam fails
(Bug#5844) Failing mysql-test-run leaves stray NDB processes behind
(Bug#5824) HELP text messed up in ndb_mgm
(Bug#5786) Duplicate key error after restore
(Bug#5785) lock timeout during concurrent update
(Bug#5782) Unknown error when using LIMIT with ndb table
(Bug#5756) RESTART node from ndb_mgm fails
A few more not reported bugs fixed
Functionality added or changed:
Optimization 1: Improved performance on index scans. Measured 30% performance increase on query which do large amounts of index scans.
Optimization 2: Improved performance on primary key lookups. Around double performance for autocommitted primary key lookups.
Optimization 3: Improved performance when using blobs by avoiding usage of exclusive locks for blobs.
Bugs fixed:
A few bugs fixed.
Functionality added or changed:
Limited character set support for storage engine NDBCLUSTER:
| Char set | Collation |
| big5 | big5_chinese_ci |
| 聽 | big5_bin |
| binary | binary |
| euckr | euckr_korean_ci |
| 聽 | euckr_bin |
| gb2312 | gb2312_chinese_ci |
| 聽 | gb2312_bin |
| gbk | gbk_chinese_ci |
| 聽 | gbk_bin |
| latin1 | latin1_swedish_ci |
| 聽 | latin1_bin |
| sjis | sjis_japanese_ci |
| 聽 | sjis_bin |
| tis620 | tis620_bin |
| ucs2 | ucs2_general_ci |
| 聽 | ucs2_bin |
| ujis | ujis_japanese_ci |
| 聽 | ujis_bin |
| utf8 | utf8_general_ci |
| 聽 | utf8_bin |
The SCI Transporter has been brought up-to-date with all changes and now works and has been documented as well.
Optimizations when several clients to a MySQL Server access ndb tables.
Added more checks and warnings for erroneous and inappropriate cluster configurations.
SHOW TABLES now directly shows ndb tables
created on a different MySQL server, that is, without a prior
table access.
Enhanced support for starting MySQL Server independently of ndbd and ndb_mgmd.
Clear text ndb error messages provided by executing
SHOW WARNINGS after an error has occurred
which relates to the ndb storage engine.
Bugs fixed:
Quite a few bugs fixed.
Functionality added or changed:
Many queries in MySQL Cluster are executed as range scans or full table scans. All queries that don't use a unique hash index or the primary hash index use this access method. In a distributed system it is crucial that batching is properly performed.
In previous versions, the batch size was fixed to 16 per data node. In this version it is configurable per MySQL Server. So for queries using lots of large scans it is appropriate to set this parameter rather large and for queries using many small scans only fetching a small amount of records it is appropriate to set it low.
The performance of queries can easily change as much as 40% based on how this variable is set.
In future versions more logic will be implemented for
assessing the batch size on a per-query basis. Thus, the
semantics of the new configuration variable
ScanBatchSize are likely to change.
The fixed size overhead of the ndbd process has been greatly decreased. This is also true for the overhead per operation record as well as overhead per table and index.
A number of new configuration variables have been introduced to enable configuration of system buffers. Configuration variables for specifying the numbers of tables, unique hash indexes, and ordered indexes have also been introduced.
New configuration variables:
MaxNoOfOrderedIndexes,
MaxNoOfUniqueHashIndexes
Configuration variables no longer used:
MaxNoOfIndexes (split into the two above).
In previous versions ALTER TABLE,
TRUNCATE TABLE, and LOAD
DATA were performed as one big transaction. In this
version, all of these statements are automatically separated
into several distinct transactions.
This removes the limitation that one could not change very
large tables due to the
MaxNoOfConcurrentOperations parameter.
MySQL CLuster's online backup feature now backs up indexes so that both data and indexes are restored.
In previous versions it was not possible to use
NULL in indexes. This is now possible for
all supported index types.
Much work has been put onto making
AUTO_INCREMENT features work as for other
table handlers. Autoincrements as a partial key is still only
supported by MyISAM.
In earlier versions, mysqld would crash if
the cluster wasn't started with the
--ndbcluster option. Now
mysqld handles cluster crashes and starts
without crashing.
The -i option for initial startup of
ndbd has been removed. Initial startup
still can be specified by using the --initial
option. The reason for this is to ensure that it is clear what
takes place when using --initial: this option
completely removes all data from the disk and should only be
used at initial start, in certain software upgrade cases, and
in some cases as a workaround when nodes cannot be restarted
successfully.
The management client (ndb_mgm) now has
additional commands and more information is printed for some
commands such as show.
In previous versions, the files were called
ndb_0.. when it wasn't possible to
allocate a node ID when starting the node. To ensure that
files are not so easily overwritten, these files are now named
ndb_pid.., where pid is the process ID
assigned by the OS.
The default parameters have changed for
ndb_mgmd and ndbd. In
particular, they are now started as daemons by default. The
-n option has been removed since it could
cause confusion as to its meaning (nostart or nodaemon).
In the configuration file, you can now use
[NDBD] as an alias for
[DB], [MYSQLD] as an
alias for [API], and
[NDB_MGMD] as an alias for
[MGM].
Note: In fact,
[NDBD], [MYSQLD], and
[NDB_MGMD] are now the preferred
designations, although the older ones will continue to be
supported for some time to come in order to maintain backward
compatibility.
Many more checks for consistency in configuration have been introduced to in order to provide quicker feedback on configuration errors.
In the connect string, it is now possible to use both
鈥;鈥 and
鈥,鈥 as the separator between
entries. Thus, "nodeid=2,host=localhost:2200" is equivalent to
"nodeid=2;host=localhost:2200".
In the configuration file, it is also possible to use
鈥:鈥 or
鈥=鈥 for assignment values. For
example, MaxNoOfOrderedIndexes : 128 and
MaxNoOfOrderedIndexes = 128 are equivalent
expressions.
The configuration variable names are now case insensitive, so
MaxNoOfOrderedIndexes: 128 is equivalent to
MAXNOOFORDEREDINDEXES = 128.
It is possible now to set the backup directory separately from
the FileSystemPath by using the
BackupDir configuration variable.
Log files and trace files can now be placed in any directory
by setting the DataDir configuration
variable.
FileSystemPath is no longer mandatory and
defaults to DataDir.
Queries involving tables from different databases are now supported.
It is now possible to update the primary key.
The performance of ordered indexes has been greatly improved, particularly the maintenance of indexes on updates, inserts and deletes.
Bugs fixed:
Quite a few bugs fixed.
Functionality added or changed:
The names of the log files and trace files created by the ndbd and ndb_mgmd processes have changed.
Support for the many BLOB data types was
introduced in this version.
Bugs fixed:
Quite a few bugs were fixed in the 4.1.4 release.
Functionality added or changed:
Driver now builds and is partially tested under Linux with the iODBC driver manager.
Added support for ODBC v2 statement options using attributes.
Bugs fixed:
Internal function,
my_setpos_delete_ignore() could cause a
crash. (Bug#22796)
Updates of MEMO or TEXT
columns from within Microsoft Access would fail. (Bug#25263)
Transaction support has been added and tested. (Bug#25045)
Connection string parsing for DSN-less connections could fail to identify some parameters. (Bug#25316)
Fixed occasional mis-handling of the
SQL_NUMERIC_C type.
Fixed the binding of certain integer types.
Connector/ODBC 5.0.10 is the sixth BETA release.
Functionality added or changed:
Added wide-string type info for
SQLGetTypeInfo().
Added loose handling of retrieving some diagnostic data. (Bug#15782)
Added initial support for removing braces when calling stored procedures and retrieving result sets from procedure calls. (Bug#24485)
Added initial unicode support in data and metadata. (Bug#24837)
Significant performance improvement when retrieving large text
fields in pieces using SQLGetData() with a
buffer smaller than the whole data. Mainly used in Access when
fetching very large text fields. (Bug#24876)
Bugs fixed:
Connector/ODBC 5.0.9 is the fifth BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality added or changed:
Added recognition of SQL_C_SHORT and
SQL_C_TINYINT as C types.
Added support for column binding as SQL_NUMBERIC_STRUCT.
Bugs fixed:
Fixed wildcard handling of and listing of catalogs and tables
in SQLTables.
Catch use of SQL_ATTR_PARAMSET_SIZE and
report error until we fully support.
Corrected retrieval multiple field types bit and blob/text.
Fixed buffer length return for SQLDriverConnect.
Added limit of display size when requested via
SQLColAttribute/SQL_DESC_DISPLAY_SIZE.
Fixed statistics to fail if it couldn't be completed.
Fixed SQLGetData to clear the NULL indicator correctly during multiple calls.
ODBC v2 behaviour in driver now supports ODBC v3 date/time types (since DriverManager maps them).
Connector/ODBC 5.0.8 is the fourth BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality added or changed:
Made distinction between
CHAR/BINARY (and VAR
versions).
Wildcards now support escaped chars and underscore matching (needed to link tables with underscores in access).
Also made SQL_DESC_NAME only fill in the
name if there was a data pointer given, otherwise just the
length.
Fixed display size to be length if max length isn鈥檛 available.
Bugs fixed:
Length now used when handling bind parameter (needed in
particular for SQL_WCHAR) - this enables
updating char data in MS Access.
Fixed string length to chars, not bytes, returned by SQLGetDiagRec.
Fixed using wrong pointer for
SQL_MAX_DRIVER_CONNECTIONS in
SQLGetInfo.
Fixed binding using SQL_C_LONG.
Allow SQLDescribeCol to be called to retrieve the length of the column name, but not the name itself.
Fix size return from SQLDescribeCol.
Fixed hanlding of numeric pointers in SQLColAttribute.
Fixed type returned for MYSQL_TYPE_LONG to
SQL_INTEGER instead of
SQL_TINYINT.
Fixed MDiagnostic to use correct v2/v3 error codes.
Set default return to SQL_SUCCESS if
nothing is done for SQLSpecialColumns.
Updated retrieval of descriptor fields to use the right pointer types.
Connector/ODBC 5.0.7 is the third BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Functionality added or changed:
Improved trace/log.
Added support for SQLStatistics to
MYODBCShell.
Bugs fixed:
Fixed SQLDescribeCol returning column name
length in bytes rather than chars.
SQLBindParameter now handles SQL_C_DEFAULT.
Corrected incorrect column index within
SQLStatistics. Many more tables can now be
linked into MS Access.
Connector/ODBC 5.0.6 is the second BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Features, limitations and notes on this release:
You no longer have to have Connector/ODBC 3.51 installed before installing this version.
Installation is provided in the form of a standard Microsoft System Installer (MSI).
Connector/ODBC supports both User and
System DSNs.
Connector/ODBC 5.0.5 is the first BETA release.
This is an implementation and testing release, and is not designed for use within a production environment.
Features, limitations and notes on this release:
You no longer have to have Connector/ODBC 3.51 installed before installing this version.
This is an implementation and testing release, and is not designed for use within a production environment.
Features, limitations and notes on this release:
The following ODBC API functions have been added in this release:
SQLBindParameter
SQLBindCol
Connector/ODBC 5.0.2 was an internal implementation and testing release.
Features, limitations and notes on this release:
Connector/ODBC 5.0 is Unicode aware.
Connector/ODBC is currently limited to basic applications. ADO applications and Microsoft Office are not supported.
Connector/ODBC must be used with a Driver Manager.
The following ODBC API functions are implemented:
SQLAllocHandle
SQLCloseCursor
SQLColAttribute
SQLColumns
SQLConnect
SQLCopyDesc
SQLDisconnect
SQLExecDirect
SQLExecute
SQLFetch
SQLFreeHandle
SQLFreeStmt
SQLGetConnectAttr
SQLGetData
SQLGetDescField
SQLGetDescRec
SQLGetDiagField
SQLGetDiagRec
SQLGetEnvAttr
SQLGetFunctions
SQLGetStmtAttr
SQLGetTypeInfo
SQLNumResultCols
SQLPrepare
SQLRowcount
SQLTables
The following ODBC API function are implemented, but not yet support all the available attributes/options:
SQLSetConnectAttr
SQLSetDescField
SQLSetDescRec
SQLSetEnvAttr
SQLSetStmtAttr
Bugs fixed:
Functionality added or changed:
Use of SQL_ATTR_CONNECTION_TIMEOUT on the
server has now been disabled. If you attempt to set this
attribute on your connection the
SQL_SUCCESS_WITH_INFO will be returned,
with an error number/string of HYC00: Optional
feature not supported. (Bug#19823)
Added support for the HENV handlers in
SQLEndTran().
Added auto-reconnect option to Connector/ODBC option parameters.
Added auto is null option to Connector/ODBC option parameters. (Bug#10910)
Bugs fixed:
A string format exception would be raised when using iODBC, Connector/ODBC and the embedded MySQL server. (Bug#16535)
When retrieving data from columns that have been compressed
using COMPRESS(), the retrived data would
be truncated to 8KB. (Bug#20208)
When retrieving TIME columns, C/ODBC would
incorrectly interpret the type of the string and could
interpret it as a DATE type instead. (Bug#25846)
On 64-bit systems, some types would be incorrectly returned. (Bug#26024)
Using DataAdapter, Connector/ODBC may
continually consume memory when reading the same records
within a loop (Windows Server 2003 SP1/SP2 only). (Bug#20459)
Connector/ODBC may insert the wrong parameter values when using prepared statements under 64-bit Linux. (Bug#22446)
Using Connector/ODBC, with SQLBindCol and
binding the length to the return value from
SQL_LEN_DATA_AT_EXEC fails with a memory
allocation error. (Bug#20547)
The SQLDriverConnect() ODBC method did not
work with recent Connector/ODBC releases. (Bug#12393)
Connector/ODBC 3.51.13 was an internal implementation and testing release.
Functionality added or changed:
N/A
Bugs fixed:
Functionality added or changed: No changes.
Bugs fixed:
mysql_list_dbcolumns() and
insert_fields() were retrieving all rows
from a table. Fixed the queries generated by these functions
to return no rows. (Bug#8198)
SQLGetTypoInfo() returned
tinyblob for
SQL_VARBINARY and nothing for
SQL_BINARY. Fixed to return
varbinary for
SQL_VARBINARY, binary
for SQL_BINARY, and
longblob for
SQL_LONGVARBINARY. (Bug#8138)
Bugs fixed:
The CreateFormat column of the
DataTypes collection did not contain a
format specification for creating a new column type. (Bug#25947)
The characterset property would not be
identified during a connection (also affected Visual Studion
Plugin). (Bug#27240, Bug#26147)
When cloning an open
MySqlClient.MySqlConnection with the
Persist Security Info=False option set, the
cloned connection is not usable because the security
information has not been cloned. (Bug#27269)
If you close an open connection with an active transaction, the transaction is not automatically rolled back. (Bug#27289)
Bugs fixed:
MySqlParameterCollection and parameters
added with Insert method can not be
retrieved later using ParameterName. (Bug#27135)
Publisher listed in "Add/Remove Programs" is not consistent with other MySQL products. (Bug#27253)
cmd.Parameters.RemoveAt("Id") will cause an
error if the last item is requested. (Bug#27187)
Exception thrown when using large values in
UInt64 parameters. (Bug#27093)
DESCRIBE .... SQL command returns byte
arrays rather than data on MySQL versions older than 4.1.15.
(Bug#27221)
MySQL Visual Studio Plugin 1.1.2 does not work with Connector/Net 5.0.5. (Bug#26960)
Functionality added or changed:
Return parameters created with DeriveParameters now have the
name RETURN_VALUE.
Fixed problem with parameter name hashing where the hashes were not getting updated when parameters were removed from the collection.
Fixed problem with calling stored functions when a return parameter was not given.
Fixed problem that prevented use of
SchemaOnly or SingleRow
command behaviors with stored procedures or prepared
statements.
Assembly now properly appears in the Visual Studio 2005 Add/Remove Reference dialog.
Added MySqlParameterCollection.AddWithValue
and marked the Add(name, value) method as
obsolete.
Added Use Procedure Bodies connection
string option to allow calling procedures without using
procedure metadata.
Reverted behavior that required parameter names to start with
the parameter marker. We apologize for this back and forth but
we mistakenly changed the behavior to not match what
SqlClient supports. We now support using
either syntax for adding parameters however we also respond
exactly like SqlClient in that if you ask
for the index of a parameter using a syntax different than you
added the parameter, the result will be -1.
Bugs fixed:
The UpdateRowSource.FirstReturnedRecord
method does not work. (Bug#25569)
A critical ConnectionPool error would
result in repeated
System.NullReferenceException. (Bug#25603)
Applications would crash when calling with
CommandType set to
StoredProcedure.
BINARY and VARBINARY
columns would be returned as a string, not binary, datatype.
(Bug#25605)
MySqlConnection.GetSchema fails with
NullReferenceException for Foreign Keys.
(Bug#26660)
When a MySqlConversionException is raised
on a remote object, the client application would receive a
SerializationException instead. (Bug#24957)
High CPU utilization would be experienced when there is no
idle connection waiting when using pooled connections through
MySqlPool.GetConnection. (Bug#24373)
Connector/NET would not compile properly when used with Mono 1.2. (Bug#24263)
Opening a connection would be slow due to hostname lookup. (Bug#26152).
Connector/NET would fail to install under Windows Vista. (Bug#26430)
Incorrect values/formats would be applied when the
OldSyntax connection string option was
used. (Bug#25950)
Registry would be incorrectly populated with installation locations. (Bug#25928)
Filling a table schema through a stored procedure triggers a runtime error. (Bug#25609)
MySqlConnection throws an exception when
connecting to MySQL v4.1.7. (Bug#25726)
Returned data types of a DataTypes
collection do not contain the right correctl CLR Datatype.
(Bug#25907)
GetSchema and DataTypes
would throw an exception due to an incorrect table name. (Bug#25906)
Times with negative values would be returned incorrectly. (Bug#25912)
SELECT did not work correctly when using a
WHERE clause containing a UTF-8 string.
(Bug#25651)
When closing and then re-opening a connection to a database, the character set specification is lost. (Bug#25614)
When connecting to a MySQL Server earlier than version 4.1, the connection would hang when reading data. (Bug#25458)
When connecting to a server, the return code from the connection could be zero, even though the hostname was incorrect. (Bug#24802)
Using ExecuteScalar() with more than one
query, where one query fails, will hang the connection. (Bug#25443)
Connector/NET Version 5.0.4 was not released due to an incomplete bug fix.
Functionality added or changed:
SSL support has been updated.
The ViewColumns
GetSchema collection has been updated.
The CommandBuilder.DeriveParameters
function has been updated to the procedure cache.
Improved speed and performance by re-architecting certain sections of the code.
Usage Advisor has been implemented. The Usage Advisor checks your queries and will report if you are usiing the connection inefficiently.
The MySqlCommand object now supports
asynchronous query methods. This is implemented useg the
BeginExecuteNonQuery and
EndExecuteNonQuery methods.
Metadata from storaed procedures and stored function execution are cached.
PerfMon hooks have been added to monitor the stored procedure cache hits and misses.
The ShapZipLib library has been replaced with the deflate support provided within .NET 2.0.
Support for the embedded server and client library have been removed from this release. Support will be added back to a later release.
Bugs fixed:
An exception would be raised, or the process would hang, if
SELECT privileges on a database were not
granted and a stored procedure was used. (Bug#25033)
Nested transactions (which are unsupported)do not raise an error or warning. (Bug#22400)
When adding parameter objects to a command object, if the
parameter direction is set to ReturnValue
before the parameter is added to the command object then when
the command is executed it throws an error. (Bug#25013)
Additional text added to error message (Bug#25178)
Stored procedure executions are not thread safe. (Bug#23905)
Using Driver.IsTooOld() would return the
wrong value. (Bug#24661)
Deleting a connection to a disconnected server when using the Visual Studio Plugin would cause an assertion failure. (Bug#23687)
When using a DbNull.Value as the value for
a parameter value, and then later setting a specific value
type, the command would fail with an exception because the
wrong type was implied from the
DbNull.Value. (Bug#24565)
Functionality added or changed:
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/NET 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string properties:
ignore prepare=false
The default value of this property is true.
Implemented a stored procedure cache. By default, the
connector caches the metadata for the last 25 procedures that
are seen. You can change the numbver of procedures that are
cacheds by using the procedure cache
connection string.
An Ignore Prepare option has been added to
the connection string options. If enabled, prepared statements
will be disabled application-wide. The default for this option
is true.
Bugs fixed:
Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that Connector/NET 5.0.2 must be installed. (Bug#23071)
Within Mono, using the PreparedStatement
interface could result in an error due to a
BitArray copying error. (Bug#18186)
Using Windows Vista (RC2) as a non-privileged user would raise
a Registry key 'Global' access denied. (Bug#22882)
One system where IPv6 was enabled, Connector/NET would incorrectly resolve hostnames. (Bug#23758)
Column names with accented characters were not parsed properly causing malformed column names in result sets. (Bug#23657)
Connector/NET did not work as a data source for the
SqlDataSource object used by ASP.NET 2.0.
(Bug#16126)
A System.FormatException exception would be
raised when invoking a stored procedure with an
ENUM input parameter. (Bug#23268)
During installation, an antivirus error message would be raised (indicating a malicious script problem). (Bug#23245)
An exception would be thrown when calling
GetSchemaTable and
fields was null. (Bug#23538)
Bugs fixed:
Using ExecuteScalar with a datetime field,
where the value of the field is "0000-00-00 00:00:00", a
MySqlConversionException exception would be
raised. (Bug#11991)
An
MySql.Data.Types.MySqlConversionException
would be raised when trying to update a row that contained a
date field, where the date field contained a zero value
(0000-00-00 00:00:00). (Bug#9619)
Incorrect field/data lengths could be returned for
VARCHAR UTF8 columns. Bug (#14592)
Submitting an empty string to a command object through
prepare raises an
System.IndexOutOfRangeException, rather
than a Connector/Net exception. (Bug#18391)
Starting a transaction on a connection created by
MySql.Data.MySqlClient.MySqlClientFactory,
using BeginTransaction without specifying
an isolation level, causes the SQL statement to fail with a
syntax error. (Bug#22042)
Connector/NET on a Tukish operating system, may fail to execute certain SQL statements correctly. (Bug#22452)
You can now install the Connector/NET MSI package from the
command line using the /passive,
/quiet, /q options. (Bug#19994)
The MySqlexception class is now derived
from the DbException class. (Bug#21874)
Executing multiple queries as part of a transaction returns
There is already an openDataReader associated with
this Connection which must be closed first. (Bug#7248)
The # would not be accepted within
column/table names, even though it was valid. (Bug#21521)
This is a new Alpha development release, fixing recently discovered bugs.
NOTE: This Alpha 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.
Bugs fixed:
CommandText: Question mark in comment line is being parsed as a parameter. (Bug#6214)
Functionality added or changed:
Implemented Usage Advisor.
Added Async query methods.
Reimplemented PacketReader/PacketWriter support into
MySqlStream class.
Added internal implemention of SHA1 so we don't have to distribute the OpenNetCF on mobile devices.
Added usage advisor warnings for requesting column values by the wrong type.
Reworked connection string classes to be simpler and faster.
Added procedure metadata caching.
Added perfmon hooks for stored procedure cache hits and misses.
Implemented MySqlConnectionBuilder
class.
Implemented MySqlClientFactory class.
Implemented classes and interfaces for ADO.Net 2.0 support.
Replaced use of ICSharpCode with .NET 2.0 internal deflate support.
Refactored test suite to test all protocols in a single pass.
Completely refactored how column values are handled to avoid boxing in some cases.
Bugs fixed:
Publisher listed in "Add/Remove Programs" is not consistent with other MySQL products. (Bug#27253)
MySqlParameterCollection and parameters
added with Insert method can not be
retrieved later using ParameterName. (Bug#27135)
A critical ConnectionPool error would
result in repeated
System.NullReferenceException. (Bug#25603)
When a MySqlConversionException is raised
on a remote object, the client application would receive a
SerializationException instead. (Bug#24957)
High CPU utilization would be experienced when there is no
idle connection waiting when using pooled connections through
MySqlPool.GetConnection. (Bug#24373)
BINARY and VARBINARY
columns would be returned as a string, not binary, datatype.
(Bug#25605)
Functionality added or changed:
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/NET 5.0.2 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string properties:
ignore prepare=false
The default value of this property is true.
Important change: Binaries for .NET 1.0 are no longer supplied with this release. If you need support for .NET 1.0, you must build from source.
Implemented a stored procedure cache. By default, the
connector caches the metadata for the last 25 procedures that
are seen. You can change the numbver of procedures that are
cacheds by using the procedure cache
connection string.
An Ignore Prepare option has been added to
the connection string options. If enabled, prepared statements
will be disabled application-wide. The default for this option
is true.
The ICSharpCode ZipLib is no longer used by the Connector, and is no longer distributed with it.
Improved CommandBuilder.DeriveParameters to
first try and use the procedure cache before querying for the
stored procedure metadata. Return parameters created with
DeriveParameters now have the name
RETURN_VALUE.
Bugs fixed:
Trying to fill a table schema through a stored procedure triggers a runtime error. (Bug#25609)
MySqlConnection throws a
NullReferenceException and
ArgumentNullException when connecting to
MySQL v4.1.7. (Bug#25726)
SELECT did not work correctly when using a
WHERE clause containing a UTF-8 string.
(Bug#25651)
Times with negative values would be returned incorrectly. (Bug#25912)
When closing and then re-opening a connection to a database, the character set specification is lost. (Bug#25614)
When connecting to a server, the return code from the connection could be zero, even though the hostname was incorrect. (Bug#24802)
Using ExecuteScalar() with more than one
query, where one query fails, will hang the connection. (Bug#25443)
Nested transactions do not raise an error or warning. (Bug#22400)
When adding parameter objects to a command object, if the
parameter direction is set to ReturnValue
before the parameter is added to the command object then when
the command is executed it throws an error. (Bug#25013)
Additional text added to error message. (Bug#25178)
The CommandBuilder would mistakenly add
insert parameters for a table column with auto incrementation
enabled. (Bug#23862)
Stored procedure executions are not thread safe. (Bug#23905)
Using Driver.IsTooOld() would return the
wrong value. (Bug#24661)
When using a DbNull.Value as the value for
a parameter value, and then later setting a specific value
type, the command would fail with an exception because the
wrong type was implied from the
DbNull.Value. (Bug#24565)
Within Mono, using the PreparedStatement
interface could result in an error due to a
BitArray copying error. (Bug 18186)
One system where IPv6 was enabled, Connector/NET would incorrectly resolve hostnames. (Bug#23758)
An System.OverflowException would be raised
when accessing a varchar field over 255 bytes. Bug (#23749)
Bugs fixed:
Using ExecuteScalar with a datetime field,
where the value of the field is "0000-00-00 00:00:00", a
MySqlConversionException exception would be
raised. (Bug#11991)
The MySqlDateTime class did not contain
constructors. (Bug#15112)
DataReader would show the value of the
previous row (or last row with non-null data) if the current
row contained a datetime field with a null
value. (Bug#16884)
An
MySql.Data.Types.MySqlConversionException
would be raised when trying to update a row that contained a
date field, where the date field contained a zero value
(0000-00-00 00:00:00). (Bug#9619)
When using MySqlDataAdapter, connections to
a MySQL server may remain open and active, even though the use
of the connection has been completed and the data received.
(Bug#8131)
Incorrect field/data lengths could be returned for
VARCHAR UTF8 columns. Bug (#14592)
Submitting an empty string to a command object through
prepare raises an
System.IndexOutOfRangeException, rather
than a Connector/Net exception. (Bug#18391)
Connector/NET on a Tukish operating system, may fail to execute certain SQL statements correctly. (Bug#22452)
You can now install the Connector/NET MSI package from the
command line using the /passive,
/quiet, /q options. (Bug#19994)
Executing multiple queries as part of a transaction returns
There is already an openDataReader associated with
this Connection which must be closed first. (Bug#7248)
Called MySqlCommandBuilder.DeriveParameters
for a stored procedure that has no paramers would cause an
application crash. (Bug#15077)
A SELECT query on a table with a date with
a value of '0000-00-00' would hang the
application. (Bug#17736)
The # would not be accepted within
column/table names, even though it was valid. (Bug#21521)
Calling Close on a connection after
calling a stored procedure would trigger a
NullReferenceException. (Bug#20581)
IDataRecord.GetString would raise
NullPointerException for null values in
returned rows. Method now throws
SqlNullValueException. (Bug#19294)
An exception would be raised when using an output parameter to
a System.String value. (Bug#17814)
The DiscoverParameters function would fail when a stored
procedure used a NUMERIC parameter type.
(Bug#19515)
When running a query that included a date comparison, a DateReader error would be raised. (Bug#19481)
Parameter substitution in queries where the order of parameters and table fields did not match would substitute incorrect values. (Bug#19261)
When working with multiple threads, character set initialization would generate errors. (Bug#17106)
When using an unsigned 64-bit integer in a stored procedure, the unsigned bit would be lost stored. (Bug#16934)
The connection string parser did not allow single or double quotes in the password. (Bug#16659)
The CommandBuilder ignored Unsigned flag at Parameter creation. (Bug#17375)
CHAR type added to MySqlDbType. (Bug#17749)
Unsigned data types were not properly supported. (Bug#16788)
Functionality added or changed:
Stored procedures are now cached.
The method for retrieving stored procedured metadata has been
changed so that users without SELECT
privileges on the mysql.proc table can use
a stored procedure.
Unsigned tinyint (NET byte) would lead to
and incorrectly determined parameter type from the parameter
value. (Bug#18570)
The parameter collection object's Add()
method added parameters to the list without first checking to
see whether they already existed. Now it updates the value of
the existing parameter object if it exists. (Bug#13927)
A #42000Query was empty exception occurred
when executing a query built with
MySqlCommandBuilder, if the query string
ended with a semicolon. (Bug#14631)
Implemented the
MySqlCommandBuilder.DeriveParameters method
that is used to discover the parameters for a stored
procedure. (Bug#13632)
Added support for the cp932 character set.
(Bug#13806)
Calling a stored procedure where a parameter contained special
characters (such as '@') would produce an
exception. Note that ANSI_QUOTES had to be
enabled to make this possible. (Bug#13753)
A statement that contained multiple references to the same parameter could not be prepared. (Bug#13541)
The Ping() method did not update the
State property of the
Connection object. (Bug#13658)
The nant build sequence had problems. (Bug#12978)
Serializing a parameter failed if the first value passed in
was NULL. (Bug#13276)
Field names that contained the following characters caused
errors: ()%<>/ (Bug#13036)
The Connector/NET 1.0.5 installer would not install alongside Connector/NET 1.0.4. (Bug#12835)
Connector/NET 1.0.5 could not connect on Mono. (Bug#13345)
With multiple hosts in the connection string, Connector/NET would not connect to the last host in the list. (Bug#12628)
Connector/NET interpreted the new decimal data type as a byte array. (Bug#11294)
The cp1250 character set was not supported.
(Bug#11621)
Connection could fail when .NET thread pool had no available worker threads. (Bug#10637)
Decimal parameters caused syntax errors. (Bug#11550, Bug#10486, Bug#10152)
A call to a stored procedure caused an exception if the stored procedure had no parameters. (Bug#11542)
Certain malformed queries would trigger a Connection
must be valid and open error message. (Bug#11490)
The MySqlCommandBuilder class could not
handle queries that referenced tables in a database other than
the default database. (Bug#8382)
Connector/NET could not work properly with certain regional settings. (WL#8228)
Trying to use a stored procedure when
Connection.Database was not populated
generated an exception. (Bug#11450)
Trying to read a TIMESTAMP column generated
an exception. (Bug#7951)
Parameters were not recognized when they were separated by linefeeds. (Bug#9722)
Calling MySqlConnection.clone when a
connection string had not yet been set on the original
connection would generate an error. (Bug#10281)
Added support to call a stored function from Connector/NET. (Bug#10644)
Connector/NET could not connect to MySQL 4.1.14. (Bug#12771)
The ConnectionString property could not be
set when a MySqlConnection object was added
with the designer. (Bug#12551, Bug#8724)
Calling prepare causing exception. (Bug#7243)
Fixed another small problem with prepared statements.
MySqlCommand.Connection returns an
IDbConnection. (Bug#7258)
MySqlAdapter.Fill method throws error
message Non-negative number required. (Bug#7345)
Clone method bug in MySqlCommand. (Bug#7478)
MySqlDataReader.GetString(index) returns
non-Null value when field is Null. (Bug#7612)
MySqlReader.GetInt32 throws exception if
column is unsigned. (Bug#7755)
GetBytes is working no more. (Bug#7704).
Quote character \222 not quoted in
EscapeString. (Bug#7724)
Fixed problem that causes named pipes to not work with some blob functionality.
Fixed problem with shared memory connections.
Problem with Multiple resultsets. (Bug#7436)
Added or filled out several more topics in the API reference documentation.
Made MySQL the default named pipe name.
Now SHOW COLLATION is used upon connection
to retrieve the full list of charset ids.
Fixed Invalid character set index: 200. (Bug#6547)
Installer now includes options to install into GAC and create items.
Int64 Support in MySqlCommand Parameters.
(Bug#6863)
Connections now do not have to give a database on the connection string.
MySqlDataReader.GetChar(int i) throws
IndexOutOfRange exception. (Bug#6770)
Fixed problem where multiple resultsets having different numbers of columns would cause a problem.
Exception stack trace lost when re-throwing exceptions. (Bug#6983)
Fixed major problem with detecting null values when using prepared statements.
Errors in parsing stored procedure parameters. (Bug#6902)
Integer "out" parameter from stored procedure returned as string. (Bug#6668)
MySqlDateTime in Datatables sorting by
Text, not Date. (Bug#7032)
Invalid query string when using inout parameters (Bug#7133)
Test suite fails with MySQL 4.0 because of case sensitivity of table names. (Bug#6831)
Inserting DateTime causes
System.InvalidCastException to be thrown.
(Bug#7132)
InvalidCast when using DATE_ADD-function.
(Bug#6879)
An Open Connection has been Closed by the Host System. (Bug#6634)
Added ServerThread property to
MySqlConnection to expose server thread id.
Added Ping method to MySqlConnection.
Changed the name of the test suite to
MySql.Data.Tests.dll.
Fixed problem with MySqlBinary where string values could not be used to update extended text columns
Fixed Installation directory ignored using custom installation (Bug#6329)
Fixed problem where setting command text leaves the command in a prepared state
Fixed double type handling in MySqlParameter(string parameterName, object value) (Bug#6428)
Fixed Zero date "0000-00-00" is returned wrong when filling Dataset (Bug#6429)
Fixed problem where calling stored procedures might cause an "Illegal mix of collations" problem.
Added charset connection string option
Fixed #HY000 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ (Bug#6322)
Added the TableEditor CS and VB sample
Fixed Charset-map for UCS-2 (Bug#6541)
Updated the installer to include the new samples
Fixed Long inserts take very long time (Bu #5453)
Fixed Objects not being disposed (Bug#6649)
Provider is now using character set specified by server as default
Fixed Bug#5602 Possible bug in MySqlParameter(string, object) constructor
Fixed Bug#5458 Calling GetChars on a longtext column throws an exception
Fixed Bug#5474 cannot run a stored procedure populating mysqlcommand.parameters
Fixed Bug#5469 Setting DbType throws NullReferenceException
Fixed problem where connector was not issuing a CMD_QUIT before closing the socket
Fixed Bug#5392 MySqlCommand sees "?" as parameters in string literals
Fixed problem with ConnectionInternal where a key might be added more than once
CP1252 is now used for Latin1 only when the server is 4.1.2 and later
Fixed Bug#5388 DataReader reports all rows as NULL if one row is NULL
Virtualized driver subsystem so future releases could easily support client or embedded server support
Field buffers being reused to decrease memory allocations and increase speed
Fixed problem where using old syntax while using the interfaces caused problems
Using PacketWriter instead of Packet for writing to streams
Refactored compression code into CompressedStream to clean up NativeDriver
Added test case for resetting the command text on a prepared command
Fixed problem where MySqlParameterCollection.Add() would throw unclear exception when given a null value (Bug#5621)
Fixed construtor initialize problems in MySqlCommand() (Bug#5613)
Fixed Parsing the ';' char (Bug#5876)
Fixed missing Reference in DbType setter (Bug#5897)
Fixed System.OverflowException when using YEAR datatype (Bug#6036)
Added Aggregate function test (wasn't really a bug)
Fixed serializing of floating point parameters (double, numeric, single, decimal) (Bug#5900)
IsNullable error (Bug#5796)
Fixed problem where connection lifetime on the connect string was not being respected
Fixed problem where Min Pool Size was not being respected
Fixed MySqlDataReader and 'show tables from ...' behavior (Bug#5256)
Implemented SequentialAccess
Fixed MySqlDateTime sets IsZero property on all subseq.records after first zero found (Bug#6006)
Fixed Can't display Chinese correctly (Bug#5288)
Fixed Russian character support as well
Fixed Method TokenizeSql() uses only a limited set of valid characters for parameters (Bug#6217)
Fixed NET Connector source missing resx files (Bug#6216)
Fixed DBNull Values causing problems with retrieving/updating queries. (Bug#5798)
Fixed Yet Another "object reference not set to an instance of an object" (Bug#5496)
Fixed problem in PacketReader where it could try to allocate the wrong buffer size in EnsureCapacity
Fixed GetBoolean returns wrong values (Bug#6227)
Fixed IndexOutOfBounds when reading BLOB with DataReader with GetString(index) (Bug#6230)
Thai encoding not correctly supported. (Bug#3889)
Updated many of the test cases.
Fixed problem with using compression.
Bumped version number to 1.0.0 for beta 1 release.
Added COPYING.rtf file for use in
installer.
Removed all of the XML comment warnings.
Removed some last references to ByteFX.
Added test fixture for prepared statements.
All type classes now implement a
SerializeBinary method for sending their
data to a PacketWriter.
Added PacketWriter class that will enable
future low-memory large object handling.
Fixed many small bugs in running prepared statements and stored procedures.
Changed command so that an exception will not be throw in executing a stored procedure with parameters in old syntax mode.
SingleRow behavior now working right even
with limit.
GetBytes now only works on binary columns.
Logger now truncates long sql commands so blob columns don't blow out our log.
host and database now have a default value of "" unless otherwise set.
Connection Timeout seems to be ignored. (Bug#5214)
Added test case for bug# 5051: GetSchema not working correctly.
Fixed problem where GetSchema would return
false for IsUnique when the column is key.
MySqlDataReader GetXXX methods now using
the field level MySqlValue object and not
performing conversions.
DataReader returning
NULL for time column. (Bug#5097)
Added test case for LOAD DATA LOCAL INFILE.
Added replacetext custom nant task.
Added CommandBuilderTest fixture.
Added Last One Wins feature to
CommandBuilder.
Fixed persist security info case problem.
Fixed GetBool so that 1, true, "true", and
"yes" all count as true.
Make parameter mark configurable.
Added the "old syntax" connection string parameter to allow use of @ parameter marker.
MySqlCommandBuilder. (Bug#4658)
ByteFX.MySqlClient caches passwords if
Persist Security Info is false. (Bug#4864)
Updated license banner in all source files to include FLOSS exception.
Added new .Types namespace and implementations for most current MySql types.
Added MySqlField41 as a subclass of
MySqlField.
Changed many classes to now use the new .Types types.
Changed type enum int to
Int32, short to
Int16, and bigint to
Int64.
Added dummy types UInt16,
UInt32, and UInt64 to
allow an unsigned parameter to be made.
Connections are now reset when they are pulled from the connection pool.
Refactored auth code in driver so it can be used for both auth and reset.
Added UserReset test in
PoolingTests.cs.
Connections are now reset using
COM_CHANGE_USER when pulled from the pool.
Implemented SingleResultSet behavior.
Implemented support of unicode.
Added char set mappings for utf-8 and ucs-2.
Time fields overflow using bytefx .net mysql driver (Bug#4520)
Modified time test in data type test fixture to check for time spans where hours > 24.
Wrong string with backslash escaping in
ByteFx.Data.MySqlClient.MySqlParameter.
(Bug#4505)
Added code to Parameter test case TestQuoting to test for backslashes.
MySqlCommandBuilder fails with multi-word
column names. (Bug#4486)
Fixed bug in TokenizeSql where underscore
would terminate character capture in parameter name.
Added test case for spaces in column names.
MySqlDataReader.GetBytes don't works
correctly. (Bug#4324)
Added GetBytes() test case to
DataReader test fixture.
Now reading all server variables in
InternalConnection.Configure into
Hashtable.
Now using string[] for index map in
CharSetMap.
Added CRInSQL test case for carriage returns in SQL.
Setting maxPacketSize to default value in
Driver.ctor.
Setting MySqlDbType on a parameter doesn't
set generic type. (Bug#4442)
Removed obsolete data types Long and
LongLong.
Overflow exception thrown when using "use pipe" on connection string. (Bug#4071)
Changed "use pipe" keyword to "pipe name" or just "pipe".
Allow reading multiple resultsets from a single query.
Added flags attribute to ServerStatusFlags
enum.
Changed name of ServerStatus enum to
ServerStatusFlags.
Inserted data row doesn't update properly.
Error processing show create table. (Bug#4074)
Change Packet.ReadLenInteger to
ReadPackedLong and added
packet.ReadPackedInteger that alwasy reads
integers packed with 2,3,4.
Added syntax.cs test fixture to test
various SQL syntax bugs.
Improper handling of time values. Now time value of 00:00:00 is not treated as null. (Bug#4149)
Moved all test suite files into TestSuite
folder.
Fixed bug where null column would move the result packet pointer backward.
Added new nant build script.
Clear tablename so it will be regen'ed properly during the
next GenerateSchema. (Bug#3917)
GetValues was always returning zero and was
also always trying to copy all fields rather than respecting
the size of the array passed in. (Bug#3915)
Implemented shared memory access protocol.
Implemented prepared statements for MySQL 4.1.
Implemented stored procedures for MySQL 5.0.
Renamed MySqlInternalConnection to
InternalConnection.
SQL is now parsed as chars, fixes problems with other languages.
Added logging and allow batch connection string options.
RowUpdating event not set when setting the
DataAdapter property. (Bug#3888)
Fixed bug in char set mapping.
Implemented 4.1 authentication.
Improved open/auth code in driver.
Improved how connection bits are set during connection.
Database name is now passed to server during initial handshake.
Changed namespace for client to
MySql.Data.MySqlClient.
Changed assembly name of client to
MySql.Data.dll.
Changed license text in all source files to GPL.
Added the MySqlClient.build Nant file.
Removed the mono batch files.
Moved some of the unused files into notused folder so nant build file can use wildcards.
Implemented shared memory accesss.
Major revamp in code structure.
Prepared statements now working for MySql 4.1.1 and later.
Finished implementing auth for 4.0, 4.1.0, and 4.1.1.
Changed namespace from
MySQL.Data.MySQLClient back to
MySql.Data.MySqlClient.
Fixed bug in CharSetMapping where it was
trying to use text names as ints.
Changed namespace to
MySQL.Data.MySQLClient.
Integrated auth changes from UC2004.
Fixed bug where calling any of the GetXXX methods on a datareader before or after reading data would not throw the appropriate exception (thanks Luca Morelli).
Added TimeSpan code in parameter.cs to
properly serialize a timespan object to mysql time format
(thanks Gianluca Colombo).
Added TimeStamp to parameter serialization
code. Prevented DataAdatper updates from
working right (thanks Michael King).
Fixed a misspelling in MySqlHelper.cs
(thanks Patrick Kristiansen).
Driver now using charset number given in handshake to create encoding.
Changed command editor to point to
MySqlClient.Design.
Fixed bug in Version.isAtLeast.
Changed DBConnectionString to support
changes done to MySqlConnectionString.
Removed SqlCommandEditor and
DataAdapterPreviewDialog.
Using new long return values in many places.
Integrated new CompressedStream class.
Changed ConnectionString and added
attributes to allow it to be used in
MySqlClient.Design.
Changed packet.cs to support newer
lengths in ReadLenInteger.
Changed other classes to use new properties and fields of
MySqlConnectionString.
ConnectionInternal is now using PING to see
whether the server is alive.
Moved toolbox bitmaps into resource folder.
Changed field.cs to allow values to come
directly from row buffer.
Changed to use the new driver.Send syntax.
Using a new packet queueing system.
Started work handling the "broken" compression packet handling.
Fixed bug in StreamCreator where failure to
connect to a host would continue to loop infinitly (thanks
Kevin Casella).
Improved connectstring handling.
Moved designers into Pro product.
Removed some old commented out code from
command.cs.
Fixed a problem with compression.
Fixed connection object where an exception throw prior to the connection opening would not leave the connection in the connecting state (thanks Chris Cline).
Added GUID support.
Fixed sequence out of order bug (thanks Mark Reay).
Enum values now supported as parameter values (thanks Philipp Sumi).
Year datatype now supported.
Fixed compression.
Fixed bug where a parameter with a TimeSpan
as the value would not serialize properly.
Fixed bug where default constructor would not set default connection string values.
Added some XML comments to some members.
Work to fix/improve compression handling.
Improved ConnectionString handling so that
it better matches the standard set by
SqlClient.
A MySqlException is now thrown if a
username is not included in the connection string.
Localhost is now used as the default if not specified on the connection string.
An exception is now thrown if an attempt is made to set the connection string while the connection is open.
Small changes to ConnectionString docs.
Removed MultiHostStream and
MySqlStream. Replaced it with
Common/StreamCreator.
Added support for Use Pipe connection string value.
Added Platform class for easier access to platform utility functions.
Fixed small pooling bug where new connection was not getting
created after IsAlive fails.
Added Platform.cs and
StreamCreator.cs.
Fixed Field.cs to properly handle 4.1
style timestamps.
Changed Common.Version to
Common.DBVersion to avoid name conflict.
Fixed field.cs so that text columns
return the right field type.
Added MySqlError class to provide some
reference for error codes (thanks Geert Veenstra).
Added Unix socket support (thanks Mohammad DAMT).
Only calling Thread.Sleep when no data is
available.
Improved escaping of quote characters in parameter data.
Removed misleading comments from
parameter.cs.
Fixed pooling bug.
Fixed ConnectionString editor dialog
(thanks marco p (pomarc)).
UserId now supported in connection strings
(thanks Jeff Neeley).
Attempting to create a parameter that is not input throws an exception (thanks Ryan Gregg).
Added much documentation.
Checked in new MultiHostStream capability.
Big thanks to Dan Guisinger for this. he originally submitted
the code and idea of supporting multiple machines on the
connect string.
Added a lot of documentation.
Fixed speed issue with 0.73.
Changed to Thread.Sleep(0) in MySqlDataStream to help optimize the case where it doesn't need to wait (thanks Todd German).
Prepopulating the idlepools to MinPoolSize.
Fixed MySqlPool deadlock condition as well
as stupid bug where CreateNewPooledConnection was not ever
adding new connections to the pool. Also fixed
MySqlStream.ReadBytes and
ReadByte to not use
TicksPerSecond which does not appear to
always be right. (thanks Matthew J. Peddlesden)
Fix for precision and scale (thanks Matthew J. Peddlesden).
Added Thread.Sleep(1) to stream reading
methods to be more cpu friendly (thanks Sean McGinnis).
Fixed problem where ExecuteReader would
sometime return null (thanks Lloyd Dupont).
Fixed major bug with null field handling (thanks Naucki).
Enclosed queries for max_allowed_packet and
characterset inside try catch (and set
defaults).
Fixed problem where socket was not getting closed properly (thanks Steve!).
Fixed problem where ExecuteNonQuery was not
always returning the right value.
Fixed InternalConnection to not use
@@session.max_allowed_packet but use
@@max_allowed_packet. (Thanks Miguel)
Added many new XML doc lines.
Fixed sql parsing to not send empty queries (thanks Rory).
Fixed problem where the reader was not unpeeking the packet on close.
Fixed problem where user variables were not being handled (thanks Sami Vaaraniemi).
Fixed loop checking in the MySqlPool (thanks Steve M. Brown)
Fixed ParameterCollection.Add method to
match SqlClient (thanks Joshua Mouch).
Fixed ConnectionString parsing to handle no
and yes for boolean and not lowercase values (thanks Naucki).
Added InternalConnection class, changes to
pooling.
Implemented Persist Security Info.
Added security.cs and
version.cs to project
Fixed DateTime handling in
Parameter.cs (thanks Burkhard
Perkens-Golomb).
Fixed parameter serialization where some types would throw a cast exception.
Fixed DataReader to convert all returned
values to prevent casting errors (thanks Keith Murray).
Added code to Command.ExecuteReader to
return null if the initial SQL command throws an exception
(thanks Burkhard Perkens-Golomb).
Fixed ExecuteScalar bug introduced with
restructure.
Restructure to allow for LOCAL DATA INFILE
and better sequencing of packets.
Fixed several bugs related to restructure.
Early work done to support more secure passwords in Mysql 4.1. Old passwords in 4.1 not supported yet.
Parameters appearing after system parameters are now handled correctly (Adam M. (adammil)).
Strings can now be assigned directly to blob fields (Adam M.).
Fixed float parameters (thanks Pent).
Improved Parameter constructor and
ParameterCollection.Add methods to better
match SqlClient (thanks Joshua Mouch).
Corrected Connection.CreateCommand to
return a MySqlCommand type.
Fixed connection string designer dialog box problem (thanks Abraham Guyt).
Fixed problem with sending commands not always reading the response packet (thanks Joshua Mouch).
Fixed parameter serialization where some blobs types were not being handled (thanks Sean McGinnis).
Removed spurious MessageBox.show from
DataReader code (thanks Joshua Mouch).
Fixed a nasty bug in the split sql code (thanks everyone!).
Fixed bug in MySqlStream where too much
data could attempt to be read (thanks Peter Belbin)
Implemented HasRows (thanks Nash Pherson).
Fixed bug where tables with more than 252 columns cause an exception (thanks Joshua Kessler).
Fixed bug where SQL statements ending in ; would cause a problem (thanks Shane Krueger).
Fixed bug in driver where error messages were getting truncated by 1 character (thanks Shane Krueger).
Made MySqlException serializable (thanks
Mathias Hasselmann).
Updated some of the character code pages to be more accurate.
Fixed problem where readers could be opened on connections that had readers open.
Moved test to separate assembly
MySqlClientTests.
Fixed stupid problem in driver with sequence out of order (Thanks Peter Belbin).
Added some pipe tests.
Increased default max pool size to 50.
Compiles with Mono 0-24.
Fixed connection and data reader dispose problems.
Added String datatype handling to parameter
serialization.
Fixed sequence problem in driver that occurred after thrown exception (thanks Burkhard Perkens-Golomb).
Added support for CommandBehavior.SingleRow
to DataReader.
Fixed command sql processing so quotes are better handled (thanks Theo Spears).
Fixed parsing of double, single, and decimal values to account for non-English separators. You still have to use the right syntax if you using hard coded sql, but if you use parameters the code will convert floating point types to use '.' appropriately internal both into the server and out.
Added MySqlStream class to simplify
timeouts and driver coding.
Fixed DataReader so that it is closed
properly when the associated connection is closed. [thanks
smishra]
Made client more SqlClient compliant so that DataReaders have to be closed before the connection can be used to run another command.
Improved DBNull.Value handling in the
fields.
Added several unit tests.
Fixed MySqlException base class.
Improved driver coding
Fixed bug where NextResult was returning false on the last resultset.
Added more tests for MySQL.
Improved casting problems by equating unsigned 32bit values to Int64 and usigned 16bit values to Int32, and so forth.
Added new constructor for MySqlParameter
for (name, type, size, srccol)
Fixed bug in MySqlDataReader where it
didn't check for null fieldlist before returning field count.
Started adding MySqlClient unit tests
(added MySqlClient/Tests folder and some
test cases).
Fixed some things in Connection String handling.
Moved INIT_DB to
MySqlPool. I may move it again, this is in
preparation of the conference.
Fixed bug inside CommandBuilder that
prevented inserts from happening properly.
Reworked some of the internals so that all three execute methods of Command worked properly.
Fixed many small bugs found during benchmarking.
The first cut of CoonectionPooling is
working. "min pool size" and "max pool size" are respected.
Work to enable multiple resultsets to be returned.
Character sets are handled much more intelligently now. The driver queries MySQL at startup for the default character set. That character set is then used for conversions if that code page can be loaded. If not, then the default code page for the current OS is used.
Added code to save the inferred type in the name,value
constructor of Parameter.
Also, inferred type if value of null parameter is changed
using Value property.
Converted all files to use proper Camel case. MySQL is now MySql in all files. PgSQL is now PgSql.
Added attribute to PgSql code to prevent designer from trying to show.
Added MySQLDbType property to Parameter
object and added proper conversion code to convert from
DbType to MySQLDbType).
Removed unused ObjectToString method from
MySQLParameter.cs.
Fixed Add(..) method in
ParameterCollection so that it doesn't use
Add(name, value) instead.
Fixed IndexOf and
Contains in
ParameterCollection to be aware that
parameter names are now stored without @.
Fixed Command.ConvertSQLToBytes so it only
allows characters that can be in MySQL variable names.
Fixed DataReader and
Field so that blob fields read their data
from Field.cs and
GetBytes works right.
Added simple query builder editor to
CommandText property of
MySQLCommand.
Fixed CommandBuilder and
Parameter serialization to account for
Parameters not storing @ in their names.
Removed MySQLFieldType enum from Field.cs.
Now using MySQLDbType enum.
Added Designer attribute to several classes
to prevent designer view when using VS.Net.
Fixed Initial catalog typo in
ConnectionString designer.
Removed 3 parameter constructor for
MySQLParameter that conflicted with (name,
type, value).
Changed MySQLParameter so
paramName is now stored without leading @
(this fixed null inserts when using designer).
Changed TypeConverter for
MySQLParameter to use the constructor with
all properties.
Fixed sequence issue in driver.
Added DbParametersEditor to make parameter
editing more like SqlClient.
Fixed Command class so that parameters can
be edited using the designer
Update connection string designer to support Use
Compression flag.
Fixed string encoding so that European characters like 盲 will work correctly.
Creating base classes to aid in building new data providers.
Added support for UID key in connection string.
Field, parameter, command now using DBNull.Value instead of null.
CommandBuilder using
DBNull.Value.
CommandBuilder now builds insert command
correctly when an auto_insert field is not present.
Field now uses typeof keyword to return
System.Types (performance).
MySQLCommandBuilder now implemented.
Transaction support now implemented (not all table types support this).
GetSchemaTable fixed to not use xsd (for
Mono).
Driver is now Mono-compatible.
TIME data type now supported.
More work to improve Timestamp data type handling.
Changed signatures of all classes to match corresponding
SqlClient classes.
Protocol compression using SharpZipLib (www.icsharpcode.net).
Named pipes on Windows now working properly.
Work done to improve Timestamp data type
handling.
Implemented IEnumerable on
DataReader so DataGrid
would work.
Bugs fixed:
Running queries based on a stored procedure would cause the dataset designer to terminate. (Bugs #26364)
DataSet wizard would show all tables instead of only the tables available within the selected database. (Bugs #26348)
Bugs fixed:
Creating a connection through the Server Explorer when using the Visual Studio Plugin would fail. The installer for the Visual Studio Plugin has been updated to ensure that Connector/NET 5.0.2 must be installed. (Bug#23071)
The Add Connection dialog of the Server Explorer would freeze when accessing databases with capitalized characters in their name. (Bug#24875)
This is a bug fix release to resolve an incompatibility issue with Connector/NET 5.0.1.
It is critical that this release only be used with Connector/NET
5.0.1. After installing Connector/NET 5.0.1, you will need to make
a small change in your machine.config file. This file should be
located at
%win%\Microsoft.Net\Framework\v2.0.50727\CONFIG\machine.config
(%win% should be the location of your Windows
folder). Near the bottom of the file you will see a line like
this:
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data"/>
It needs to be changed to be like this:
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=5.0.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is false
(that is, Connector/J does not use server-side prepared
statements).
The disabling of server-side prepared statements does not
affect the operation of the connector. However, if you use the
useTimezone=true connection option and use
client-side prepared statements (instead of server-side
prepared statements) you should also set
useSSPSCompatibleTimezoneShift=true.
Functionality added or changed:
Re-worked Ant buildfile to build JDBC-4.0 classes separately, as well as support building under Eclipse (since Eclipse can't mix/match JDKs).
To build, you must set JAVA_HOME to
J2SDK-1.4.2 or Java-5, and set the following properties on
your Ant command line:
com.mysql.jdbc.java6.javac 鈥
full path to your Java-6 javac
executable
com.mysql.jdbc.java6.rtjar 鈥
full path to your Java-6 rt.jar
file
New feature 鈥 driver will automatically adjust session
variable net_write_timeout when it
determines it has been asked for a "streaming"
result, and resets it to the previous value when the result
set has been consumed. (configuration property is named
netTimeoutForStreamingResults value and
has a unit of seconds, the value 0 means
the driver will not try and adjust this value).
Added support for JDBC-4.0 categorized
SQLExceptions.
Refactored CommunicationsException into a
JDBC-3.0 version, and a JDBC-4.0 version (which extends
SQLRecoverableException, now that it
exists).
This change means that if you were catching
com.mysql.jdbc.CommunicationsException
in your applications instead of looking at the SQLState
class of 08, and are moving to Java 6
(or newer), you need to change your imports to that
exception to be
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException,
as the old class will not be instantiated for
communications link-related errors under Java 6.
Added support for JDBC-4.0's client information. The backend
storage of information provided via
Connection.setClientInfo() and retrieved
by Connection.getClientInfo() is
pluggable by any class that implements the
com.mysql.jdbc.JDBC4ClientInfoProvider
interface and has a no-args constructor.
The implementation used by the driver is configured using
the clientInfoProvider configuration
property (with a default of value of
com.mysql.jdbc.JDBC4CommentClientInfoProvider,
an implementation which lists the client information as a
comment prepended to every query sent to the server).
This functionality is only available when using Java-6 or newer.
Added support for JDBC-4.0's SQLXML interfaces.
Added support for JDBC-4.0's Wrapper
interface.
Added support for JDBC-4.0's NCLOB, and
NCHAR/NVARCHAR types.
Functionality added or changed:
Give better error message when "streaming" result
sets, and the connection gets clobbered because of exceeding
net_write_timeout on the server.
New configuration property,
enableQueryTimeouts (default
true).
When enabled, query timeouts set via
Statement.setQueryTimeout() use a shared
java.util.Timer instance for scheduling.
Even if the timeout doesn't expire before the query is
processed, there will be memory used by the
TimerTask for the given timeout which
won't be reclaimed until the time the timeout would have
expired if it hadn't been cancelled by the driver. High-load
environments might want to consider disabling this
functionality. (this configuration property is part of the
maxPerformance configuration bundle).
Added configuration property
padCharsWithSpace (defaults to
false). If set to
true, and a result set column has the
CHAR type and the value does not fill the
amount of characters specified in the DDL for the column,
the driver will pad the remaining characters with space (for
ANSI compliance).
Added configuration property
useDynamicCharsetInfo. If set to
false (the default), the driver will use
a per-connection cache of character set information queried
from the server when necessary, or when set to
true, use a built-in static mapping that
is more efficient, but isn't aware of custom character sets
or character sets implemented after the release of the JDBC
driver.
Note: this only affects the
padCharsWithSpace configuration
property and the
ResultSetMetaData.getColumnDisplayWidth()
method.
More intelligent initial packet sizes for the "shared" packets are used (512 bytes, rather than 16K), and initial packets used during handshake are now sized appropriately as to not require reallocation.
Bugs fixed:
Client options not sent correctly when using SSL, leading to stored procedures not being able to return results. Thanks to Don Cohen for the bug report, testcase and patch. (Bug#25545)
PreparedStatement is not closed in
BlobFromLocator.getBytes(). (Bug#26592)
Whitespace surrounding storage/size specifiers in stored
procedure parameters declaration causes
NumberFormatException to be thrown when
calling stored procedure on JDK-1.5 or newer, as the Number
classes in JDK-1.5+ are whitespace intolerant. (Bug#25624)
When the configuration property
useCursorFetch was set to
true, sometimes server would return new,
more exact metadata during the execution of the server-side
prepared statement that enables this functionality, which
the driver ignored (using the original metadata returned
during prepare()), causing corrupt
reading of data due to type mismatch when the actual rows
were returned. (Bug#26173)
Comments in DDL of stored procedures/functions confuse procedure parser, and thus metadata about them can not be created, leading to inability to retrieve said metadata, or execute procedures that have certain comments in them. (Bug#26959)
Fast date/time parsing doesn't take into account
00:00:00 as a legal value. (Bug#26789)
ResultSet.get*() with a column index <
1 returns misleading error message. (Bug#27317)
Statement.setMaxRows() is not effective
on result sets materialized from cursors. (Bug#25517)
CALL /* ... */
doesn't
work. As a side effect of this fix, you can now use
some_proc()/* */ and # comments
when preparing statements using client-side prepared
statement emulation. (Bug#27400)
If the comments happen to contain parameter markers
(?), they will be treated as belonging to
the comment (that is, not recognized) rather than being a
parameter of the statement.
The statement when sent to the server will contain the
comments as-is, they're not stripped during the process of
preparing the PreparedStatement or
CallableStatement.
BIT(> 1) is returned as
java.lang.String from
ResultSet.getObject() rather than
byte[]. (Bug#25328)
CallableStatements with
OUT/INOUT parameters that are "binary"
(BLOB, BIT,
(VAR)BINARY,
JAVA_OBJECT) have extra 7 bytes. (Bug#25715)
Connection.getTransactionIsolation() uses
"SHOW VARIABLES LIKE" which is
very inefficient on MySQL-5.0+ servers. (Bug#27655)
Fixed issue where calling
getGeneratedKeys() on a prepared
statement after calling execute() didn't
always return the generated keys
(executeUpdate() worked fine however).
Functionality added or changed:
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is
false (that is, Connector/J does not use
server-side prepared statements).
Improved speed of datetime parsing for
ResultSets that come from plain or non-server-side prepared
statements. You can enable old implementation with
useFastDateParsing=false as a
configuration parameter.
Added configuration property
localSocketAddress,which is the hostname
or IP address given to explicitly configure the interface
that the driver will bind the client side of the TCP/IP
connection to when connecting.
The rewriteBatchedStatements feature can
now be used with server-side prepared statements.
We've added a new configuration option
treatUtilDateAsTimestamp, which is
false by default, as (1) We already had
specific behavior to treat java.util.Date as a
java.sql.Timestamp because it's useful to many folks, and
(2) that behavior will very likely be required for drivers
JDBC-post-4.0.
Fixed logging of XA commands sent to server, it's now
configurable via logXaCommands property
(defaults to false).
Usage Advisor now detects empty results sets and does not report on columns not referenced in those empty sets.
Usage Advisor will now issue warnings for result sets with
large numbers of rows. You can configure the trigger value
by using the resultSetSizeThreshold
parameter, which has a default value of 100.
Bugs fixed:
Fixed an issue where XADataSources
couldn't be bound into JNDI, as the
DataSourceFactory didn't know how to
create instances of them.
Calling Statement.cancel() could result
in a Null Pointer Exception (NPE). (Bug#24721)
Calendars and timezones are now lazily instantiated when required. (Bug#24351)
Client-side prepared statement parser gets confused by
in-line comments /*...*/ and therefore
cannot rewrite batch statements or reliably detect the type
of statements when they are used. (Bug#25025)
When using a JDBC connection URL that is malformed, the
NonRegisteringDriver.getPropertyInfo
method will throw a Null Pointer Exception (NPE). (Bug#22628)
Using DatabaseMetaData.getSQLKeywords()
does not return a all of the of the reserved keywords for
the current MySQL version. Current implementation returns
the list of reserved words for MySQL 5.1, and does not
distinguish between versions. (Bug#24794)
Specifying US-ASCII as the character set
in a connection to a MySQL 4.1 or newer server does not map
correctly. (Bug#24840)
Storing a java.util.Date object in a
BLOB column would not be serialized
correctly during setObject. (Bug#25787)
A query execution which timed out did not always throw a
MySQLTimeoutException. (Bug#25836)
A connection error would occur when connecting to a MySQL
server with certain character sets. Some
collations/character sets reported as "unknown"
(specifically cias variants of existing
character sets), and inability to override the detected
server character set. (Bug#23645)
Using setFetchSize() breaks prepared
SHOW and other commands. (Bug#24360)
Using DATETIME columns would result in
time shifts when useServerPrepStmts was
true. The reason was due to different behavior when using
client-side compared to server-side prepared statements and
the useJDBCCompliantTimezoneShift option.
This is now fixed if moving from server-side prepared
statements to client-side prepared statements by setting
useSSPSCompatibleTimezoneShift to
true, as the driver can't tell if this is
a new deployment that never used server-side prepared
statements, or if it is an existing deployment that is
switching to client-side prepared statements from
server-side prepared statements. (Bug#24344)
Inconsistency between getSchemas and
INFORMATION_SCHEMA. (Bug#23304)
When using the rewriteBatchedStatements
connection option with
PreparedState.executeBatch() an internal
memory leak would occur. (Bug#25073)
Fixed issue where field-level for metadata from
DatabaseMetaData when using
INFORMATION_SCHEMA didn't have references
to current connections, sometimes leading to Null Pointer
Exceptions (NPEs) when introspecting them via
ResultSetMetaData.
Connector/J now returns a better error message when server doesn't return enough information to determine stored procedure/function parameter types. (Bug#24065)
When using server-side prepared statements and timestamp columns, value would be incorrectly populated (with nanoseconds, not microseconds). (Bug#21438)
Timer instance used for
Statement.setQueryTimeout() created
per-connection, rather than per-VM, causing memory leak.
(Bug#25514)
Results sets from UPDATE statements that
are part of multi-statement queries would cause an
SQLException error, "Result is from
UPDATE". (Bug#25009)
StringUtils.indexOfIgnoreCaseRespectQuotes()
isn't case-insensitive on the first character of the target.
This bug also affected
rewriteBatchedStatements functionality
when prepared statements did not use uppercase for the
VALUES clause. (Bug#25047)
Some exceptions thrown out of
StandardSocketFactory were needlessly
wrapped, obscuring their true cause, especially when using
socket timeouts. (Bug#21480)
DatabaseMetaData.getSchemas() doesn't
return a TABLE_CATALOG column. (Bug#23303)
EscapeProcessor gets confused by multiple
backslashes. We now push the responsibility of syntax errors
back on to the server for most escape sequences. (Bug#25399)
INOUT parameters in
CallableStatements get doubly-escaped.
(Bug#25379)
Connection property socketFactory wasn't
exposed via correctly named mutator/accessor, causing data
source implementations that use JavaBean naming conventions
to set properties to fail to set the property (and in the
case of SJAS, fail silently when trying to set this
parameter). (Bug#26326)
ParameterMetaData throws
NullPointerException when prepared SQL
has a syntax error. Added
generateSimpleParameterMetadata
configuration property, which when set to
true will generate metadata reflecting
VARCHAR for every parameter (the default
is false, which will cause an exception
to be thrown if no parameter metadata for the statement is
actually available). (Bug#21267)
Other changes:
Performance enhancement of initial character set configuration, driver will only send commands required to configure connection character set session variables if the current values on the server do not match what is required.
Re-worked stored procedure parameter parser to be more
robust. Driver no longer requires BEGIN
in stored procedure definition, but does have requirement
that if a stored function begins with a label directly after
the "returns" clause, that the label is not a quoted
identifier.
Reverted back to internal character conversion routines for single-byte character sets, as the ones internal to the JVM are using much more CPU time than our internal implementation.
Changed cached result set metadata (when using
cacheResultSetMetadata=true) to be cached
per-connection rather than per-statement as previously
implemented.
Use a java.util.TreeMap to map column
names to ordinal indexes for
ResultSet.findColumn() instead of a
HashMap. This allows us to have case-insensitive lookups
(required by the JDBC specification) without resorting to
the many transient object instances needed to support this
requirement with a normal HashMap with
either case-adjusted keys, or case-insensitive keys. (In the
worst case scenario for lookups of a 1000 column result set,
TreeMaps are about half as fast wall-clock time as a
HashMap, however in normal applications their use gives many
orders of magnitude reduction in transient object instance
creation which pays off later for CPU usage in garbage
collection).
Avoid static synchronized code in JVM class libraries for dealing with default timezones.
Fixed cases where
ServerPreparedStatements weren't using
cached metadata when
cacheResultSetMetadata=true was used.
When using cached metadata, skip field-level metadata
packets coming from the server, rather than reading them and
discarding them without creating
com.mysql.jdbc.Field instances.
Throw exceptions encountered during timeout to thread
calling Statement.execute*(), rather than
RuntimeException.
Take localSocketAddress property into
account when creating instances of
CommunicationsException when the
underyling exception is a
java.net.BindException, so that a
friendlier error message is given with a little internal
diagnostics.
Fixed some Null Pointer Exceptions (NPEs) when cached
metadata was used with
UpdatableResultSets.
When extracting foreign key information from SHOW
CREATE TABLE in
DatabaseMetaData, ignore exceptions
relating to tables being missing (which could happen for
cross-reference or imported-key requests, as the list of
tables is generated first, then iterated).
Bugs fixed:
Column names don't match metadata in cases where server doesn't return original column names (column functions) thus breaking compatibility with applications that expect 1-1 mappings between findColumn() and rsmd.getColumnName(), usually manifests itself as "Can't find column ('')" exceptions. (Bug#21379)
When using information_schema for metadata, COLUMN_SIZE for getColumns() is not clamped to range of java.lang.Integer as is the case when not using information_schema, thus leading to a truncation exception that isn't present when not using information_schema. (Bug#21544)
Newlines causing whitespace to span confuse procedure parser when getting parameter metadata for stored procedures. (Bug#22024)
Driver was using milliseconds for Statement.setQueryTimeout() when specification says argument is to be in seconds. (Bug#22359)
Workaround for server crash when calling stored procedures via a server-side prepared statement (driver now detects prepare(stored procedure) and substitutes client-side prepared statement). (Bug#22297)
Added new _ci collations to CharsetMapping - utf8_unicode_ci not working. (Bug#22456)
Driver issues truncation on write exception when it shouldn't (due to sending big decimal incorrectly to server with server-side prepared statement). (Bug#22290)
DBMD.getColumns() does not return expected COLUMN_SIZE for the SET type, now returns length of largest possible set disregarding whitespace or the "," delimitters to be consistent with the ODBC driver. (Bug#22613)
Other changes:
Fixed configuration property
jdbcCompliantTruncation was not being
used for reads of result set values.
Driver now supports {call sp} (without
"()" if procedure has no arguments).
Driver now sends numeric 1 or 0 for client-prepared
statement setBoolean() calls instead of
'1' or '0'.
DatabaseMetaData correctly reports true
for supportsCatalog*() methods.
Fixed Statement.cancel() causes
NullPointerException if underlying
connection has been closed due to server failure. (Bug#20650)
Added configuration option
noAccessToProcedureBodies which will
cause the driver to create basic parameter metadata for
CallableStatements when the user does not
have access to procedure bodies via SHOW CREATE
PROCEDURE or selecting from
mysql.proc instead of throwing an
exception. The default value for this option is
false
Bugs fixed:
If the connection to the server has been closed due to a
server failure, then the cleanup process will call
Statement.cancel(), triggering a
NullPointerException, even though there
is no active connection. (Bug#20650)
Fixed can't use XAConnection for local
transactions when no global transaction is in progress. (Bug#17401)
Fixed driver fails on non-ASCII platforms. The driver was
assuming that the platform character set would be a superset
of MySQL's latin1 when doing the
handshake for authentication, and when reading error
messages. We now use Cp1252 for all strings sent to the
server during the handshake phase, and a hard-coded mapping
of the language systtem variable to the
character set that is used for error messages. (Bug#18086)
Fixed ConnectionProperties (and thus some
subclasses) are not serializable, even though some J2EE
containers expect them to be. (Bug#19169)
Fixed MysqlValidConnectionChecker for
JBoss doesn't work with
MySQLXADataSources. (Bug#20242)
Better caching of character set converters (per-connection) to remove a bottleneck for multibyte character sets.
Added connection/datasource property
pinGlobalTxToPhysicalConnection (defaults
to false). When set to
true, when using
XAConnections, the driver ensures that
operations on a given XID are always routed to the same
physical connection. This allows the
XAConnection to support XA START
... JOIN after XA END has been
called, and is also a workaround for transaction managers
that don't maintain thread affinity for a global transaction
(most either always maintain thread affinity, or have it as
a configuration option).
MysqlXaConnection.recover(int flags) now
allows combinations of
XAResource.TMSTARTRSCAN and
TMENDRSCAN. To simulate the
鈥scanning鈥 nature of the interface, we return
all prepared XIDs for TMSTARTRSCAN, and
no new XIDs for calls with TMNOFLAGS, or
TMENDRSCAN when not in combination with
TMSTARTRSCAN. This change was made for
API compliance, as well as integration with IBM WebSphere's
transaction manager.
Not released due to a packaging error
XADataSource implemented (ported from 3.2
branch which won't be released as a product). Use
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
as your datasource class name in your application server to
utilize XA transactions in MySQL-5.0.10 and newer.
PreparedStatement.setString() didn't work
correctly when sql_mode on server
contained NO_BACKSLASH_ESCAPES and no
characters that needed escaping were present in the string.
Attempt detection of the MySQL type
BINARY (it's an alias, so this isn't
always reliable), and use the
java.sql.Types.BINARY type mapping for
it.
Moved -bin-g.jar file into separate
debug subdirectory to avoid confusion.
Don't allow .setAutoCommit(true), or
.commit() or
.rollback() on an XA-managed connection
as per the JDBC specification.
If the connection useTimezone is set to
true, then also respect time zone
conversions in escape-processed string literals (for
example, "{ts ...}" and "{t
...}").
Return original column name for
RSMD.getColumnName() if the column was
aliased, alias name for .getColumnLabel()
(if aliased), and original table name for
.getTableName(). Note this only works for
MySQL-4.1 and newer, as older servers don't make this
information available to clients.
Setting
useJDBCCompliantTimezoneShift=true (it's
not the default) causes the driver to use GMT for
all
TIMESTAMP/DATETIME
time zones, and the current VM time zone for any other type
that refers to time zones. This feature can not be used when
useTimezone=true to convert between
server and client time zones.
Add one level of indirection of internal representation of
CallableStatement parameter metadata to
avoid class not found issues on JDK-1.3 for
ParameterMetadata interface (which
doesn't exist prior to JDBC-3.0).
Added unit tests for XADatasource, as
well as friendlier exceptions for XA failures compared to
the "stock" XAException (which has no
messages).
Idle timeouts cause XAConnections to
whine about rolling themselves back. (Bug#14729)
Added support for Connector/MXJ integration via url
subprotocol jdbc:mysql:mxj://....
Moved all SQLException constructor usage
to a factory in SQLError (ground-work for
JDBC-4.0 SQLState-based exception
classes).
Removed Java5-specific calls to
BigDecimal constructor (when result set
value is '', (int)0
was being used as an argument indirectly via method return
value. This signature doesn't exist prior to Java5.)
Added service-provider entry to
META-INF/services/java.sql.Driver for
JDBC-4.0 support.
Return "[VAR]BINARY" for
RSMD.getColumnTypeName() when that is
actually the type, and it can be distinguished (MySQL-4.1
and newer).
When fix for Bug#14562 was merged from 3.1.12, added
functionality for CallableStatement's
parameter metadata to return correct information for
.getParameterClassName().
Fuller synchronization of Connection to
avoid deadlocks when using multithreaded frameworks that
multithread a single connection (usually not recommended,
but the JDBC spec allows it anyways), part of fix to Bug#14972).
Implementation of Statement.cancel() and
Statement.setQueryTimeout(). Both require
MySQL-5.0.0 or newer server, require a separate connection
to issue the KILL QUERY statement, and in
the case of setQueryTimeout() creates an
additional thread to handle the timeout functionality.
Note: Failures to cancel the statement for
setQueryTimeout() may manifest themselves
as RuntimeExceptions rather than failing
silently, as there is currently no way to unblock the thread
that is executing the query being cancelled due to timeout
expiration and have it throw the exception instead.
Important change: Due to a number of issues with the use of server-side prepared statements, Connector/J 5.0.5 has disabled their use by default. The disabling of server-side prepared statements does not affect the operation of the connector in any way.
To enable server-side prepared statements you must add the following configuration property to your connector string:
useServerPrepStmts=true
The default value of this property is false
(that is, Connector/J does not use server-side prepared
statements).
Bugs fixed:
Specifying US-ASCII as the character set
in a connection to a MySQL 4.1 or newer server does not map
correctly. (Bug#24840)
Fixed updatable result set throws ClassCastException when there is row data and moveToInsertRow() is called. (Bug#20479)
Fixed Updatable result set that contains a BIT column fails when server-side prepared statements are used. (Bug#20485)
Fixed memory leak with profileSQL=true. (Bug#16987)
Connection fails to localhost when using timeout and IPv6 is configured. (Bug#19726)
Fixed NullPointerException in MysqlDataSourceFactory due to Reference containing RefAddrs with null content. (Bug#16791)
Fixed ResultSet.getShort() for UNSIGNED TINYINT returns incorrect values when using server-side prepared statements. (Bug#20306)
Fixed can't pool server-side prepared statements, exception raised when re-using them. (Bug#20687)
ResultSet.getSomeInteger() doesn't work for BIT(>1). (Bug#21062)
ResultSet.getFloatFromString() can't retrieve values near Float.MIN/MAX_VALUE. (Bug#18880)
Escape of quotes in client-side prepared statements parsing not respected. Patch covers more than bug report, including NO_BACKSLASH_ESCAPES being set, and stacked quote characters forms of escaping (that is, '' or ""). (Bug#20888)
ReplicationDriver does not always round-robin load balance depending on URL used for slaves list. (Bug#19993)
Fixed calling toString() on ResultSetMetaData for driver-generated (that is, from DatabaseMetaData method calls, or from getGeneratedKeys()) result sets would raise a NullPointerException.
DDriver throws NPE when tracing prepared statements that have been closed (in asSQL()). (Bug#21207)
Removed logger autodetection altogether, must now specify logger explicitly if you want to use a logger other than one that logs to STDERR.
Driver issues truncation on write exception when it shouldn't (due to sending big decimal incorrectly to server with server-side prepared statement). (Bug#22290)
Driver now sends numeric 1 or 0 for client-prepared statement setBoolean() calls instead of '1' or '0'.
Fixed bug where driver would not advance to next host if roundRobinLoadBalance=true and the last host in the list is down.
Fixed Bug#18258 - DatabaseMetaData.getTables(), columns() with bad catalog parameter threw exception rather than return empty result set (as required by spec).
Check and store value for continueBatchOnError property in constructor of Statements, rather than when executing batches, so that Connections closed out from underneath statements don't cause NullPointerExceptions when it's required to check this property.
Fixed bug when calling stored functions, where parameters weren't numbered correctly (first parameter is now the return value, subsequent parameters if specified start at index "2").
INOUT parameter does not store
IN value. (Bug#15464)
Exception thrown for new decimal type when using updatable result sets. (Bug#14609)
No "dos" character set in MySQL > 4.1.0. (Bug#15544)
PreparedStatement.setObject() serializes
BigInteger as object, rather than sending
as numeric value (and is thus not complementary to
.getObject() on an UNSIGNED
LONG type). (Bug#15383)
ResultSet.getShort() for
UNSIGNED TINYINT returned wrong values.
(Bug#11874)
lib-nodist directory missing from
package breaks out-of-box build. (Bug#15676)
DBMD.getColumns() returns wrong type for
BIT. (Bug#15854)
Fixed issue where driver was unable to initialize character
set mapping tables. Removed reliance on
.properties files to hold this
information, as it turns out to be too problematic to code
around class loader hierarchies that change depending on how
an application is deployed. Moved information back into the
CharsetMapping class. (Bug#14938)
Fixed updatable result set doesn't return
AUTO_INCREMENT values for
insertRow() when multiple column primary
keys are used. (the driver was checking for the existence of
single-column primary keys and an autoincrement value > 0
instead of a straightforward
isAutoIncrement() check). (Bug#16841)
Fixed Statement.getGeneratedKeys() throws
NullPointerException when no query has
been processed. (Bug#17099)
Fixed driver trying to call methods that don't exist on older and newer versions of Log4j. The fix is not trying to auto-detect presence of log4j, too many different incompatible versions out there in the wild to do this reliably. (Bug#13469)
If you relied on autodetection before, you will need to add "logger=com.mysql.jdbc.log.Log4JLogger" to your JDBC URL to enable Log4J usage, or alternatively use the new "CommonsLogger" class to take care of this.
Added support for Apache Commons logging, use "com.mysql.jdbc.log.CommonsLogger" as the value for the "logger" configuration property.
LogFactory now prepends "com.mysql.jdbc.log" to log class name if it can't be found as-specified. This allows you to use "short names" for the built-in log factories, for example "logger=CommonsLogger" instead of "logger=com.mysql.jdbc.log.CommonsLogger".
Fixed issue with ReplicationConnection
incorrectly copying state, doesn't transfer connection
context correctly when transitioning between the same
read-only states. (Bug#15570)
Fixed issue where server-side prepared statements don't cause truncation exceptions to be thrown when truncation happens. (Bug#18041)
Added performance feature, re-writing of batched executes
for Statement.executeBatch() (for all DML
statements) and
PreparedStatement.executeBatch() (for
INSERTs with VALUE clauses only). Enable by using
"rewriteBatchedStatements=true" in your JDBC URL.
Fixed
CallableStatement.registerOutParameter()
not working when some parameters pre-populated. Still
waiting for feedback from JDBC experts group to determine
what correct parameter count from
getMetaData() should be, however. (Bug#17898)
Fixed calling clearParameters() on a
closed prepared statement causes NPE. (Bug#17587)
Map "latin1" on MySQL server to CP1252 for MySQL > 4.1.0.
Added additional accessor and mutator methods on ConnectionProperties so that DataSource users can use same naming as regular URL properties.
Fixed data truncation and getWarnings()
only returns last warning in set. (Bug#18740)
Improved performance of retrieving
BigDecimal, Time,
Timestamp and Date
values from server-side prepared statements by creating
fewer short-lived instances of Strings
when the native type is not an exact match for the requested
type. (Bug#18496)
Fixed aliased column names where length of name > 251 are corrupted. (Bug#18554)
Fixed ResultSet.wasNull() not always
reset correctly for booleans when done via conversion for
server-side prepared statements. (Bug#17450)
Fixed invalid classname returned for
ResultSetMetaData.getColumnClassName()
for BIGINT type. (Bug#19282)
Fixed case where driver wasn't reading server status correctly when fetching server-side prepared statement rows, which in some cases could cause warning counts to be off, or multiple result sets to not be read off the wire.
Driver now aware of fix for BIT type
metadata that went into MySQL-5.0.21 for server not
reporting length consistently (Bug#13601).
Fixed PreparedStatement.setObject(int, Object,
int) doesn't respect scale of BigDecimals. (Bug#19615)
Fixed ResultSet.wasNull() returns
incorrect value when extracting native string from
server-side prepared statement generated result set. (Bug#19282)
Fixed client-side prepared statement bug with embedded
? characters inside quoted identifiers
(it was recognized as a placeholder, when it was not).
Don't allow executeBatch() for
CallableStatements with registered
OUT/INOUT parameters
(JDBC compliance).
Fall back to platform-encoding for
URLDecoder.decode() when parsing driver
URL properties if the platform doesn't have a two-argument
version of this method.
Java type conversion may be incorrect for
MEDIUMINT. (Bug#14562)
Added configuration property
useGmtMillisForDatetimes which when set
to true causes
ResultSet.getDate(),
.getTimestamp() to return correct
millis-since GMT when .getTime() is
called on the return value (currently default is
false for legacy behavior).
Fixed
DatabaseMetaData.stores*Identifiers():
If lower_case_table_names=0 (on
server):
storesLowerCaseIdentifiers()
returns false
storesLowerCaseQuotedIdentifiers()
returns false
storesMixedCaseIdentifiers()
returns true
storesMixedCaseQuotedIdentifiers()
returns true
storesUpperCaseIdentifiers()
returns false
storesUpperCaseQuotedIdentifiers()
returns true
If lower_case_table_names=1 (on
server):
storesLowerCaseIdentifiers()
returns true
storesLowerCaseQuotedIdentifiers()
returns true
storesMixedCaseIdentifiers()
returns false
storesMixedCaseQuotedIdentifiers()
returns false
storesUpperCaseIdentifiers()
returns false
storesUpperCaseQuotedIdentifiers()
returns true
DatabaseMetaData.getColumns() doesn't
return TABLE_NAME correctly. (Bug#14815)
Escape processor replaces quote character in quoted string with string delimiter. (Bug#14909)
OpenOffice expects
DBMD.supportsIntegrityEnhancementFacility()
to return true if foreign keys are
supported by the datasource, even though this method also
covers support for check constraints, which MySQL
doesn't have. Setting the configuration
property
overrideSupportsIntegrityEnhancementFacility
to true causes the driver to return
true for this method. (Bug#12975)
Added
com.mysql.jdbc.testsuite.url.default
system property to set default JDBC url for testsuite (to
speed up bug resolution when I'm working in Eclipse).
Unable to initialize character set mapping tables (due to J2EE classloader differences). (Bug#14938)
Deadlock while closing server-side prepared statements from multiple threads sharing one connection. (Bug#14972)
logSlowQueries should give better info.
(Bug#12230)
Extraneous sleep on autoReconnect. (Bug#13775)
Driver incorrectly closes streams passed as arguments to
PreparedStatements. Reverts to legacy
behavior by setting the JDBC configuration property
autoClosePStmtStreams to
true (also included in the 3-0-Compat
configuration 鈥bundle鈥). (Bug#15024)
maxQuerySizeToLog is not respected. Added
logging of bound values for execute()
phase of server-side prepared statements when
profileSQL=true as well. (Bug#13048)
Usage advisor complains about unreferenced columns, even though they've been referenced. (Bug#15065)
Don't increase timeout for failover/reconnect. (Bug#6577)
Process escape tokens in
Connection.prepareStatement(...). (Bug#15141) You can disable this behavior by setting the JDBC
URL configuration property
processEscapeCodesForPrepStmts to
false.
Reconnect during middle of executeBatch()
should not occur if autoReconnect is
enabled. (Bug#13255)
Spurious ! on console when character
encoding is utf8. (Bug#11629)
Fixed statements generated for testcases missing
; for 鈥plain鈥 statements.
Incorrect generation of testcase scripts for server-side prepared statements. (Bug#11663)
Fixed regression caused by fix for Bug#11552 that caused driver to return incorrect values for unsigned integers when those integers where within the range of the positive signed type.
Moved source code to Subversion repository.
Escape tokenizer doesn't respect stacked single quotes for escapes. (Bug#11797)
GEOMETRY type not recognized when using
server-side prepared statements.
ReplicationConnection won't switch to
slave, throws 鈥Catalog can't be null鈥
exception. (Bug#11879)
Properties shared between master and slave with replication connection. (Bug#12218)
Statement.getWarnings() fails with NPE if
statement has been closed. (Bug#10630)
Only get char[] from SQL in
PreparedStatement.ParseInfo() when
needed.
Geometry types not handled with server-side prepared statements. (Bug#12104)
StringUtils.getBytes() doesn't work when
using multi-byte character encodings and a length in
characters is specified. (Bug#11614)
Pstmt.setObject(...., Types.BOOLEAN)
throws exception. (Bug#11798)
maxPerformance.properties mis-spells
鈥elideSetAutoCommits鈥. (Bug#11976)
DBMD.storesLower/Mixed/UpperIdentifiers()
reports incorrect values for servers deployed on Windows.
(Bug#11575)
ResultSet.moveToCurrentRow() fails to
work when preceded by a call to
ResultSet.moveToInsertRow(). (Bug#11190)
VARBINARY data corrupted when using
server-side prepared statements and
.setBytes(). (Bug#11115)
explainSlowQueries hangs with server-side
prepared statements. (Bug#12229)
Escape processor didn't honor strings demarcated with double quotes. (Bug#11498)
Lifted restriction of changing streaming parameters with
server-side prepared statements. As long as
all streaming parameters were set before
execution, .clearParameters() does not
have to be called. (due to limitation of client/server
protocol, prepared statements can not reset
individual stream data on the server
side).
Reworked Field class,
*Buffer, and MysqlIO
to be aware of field lengths >
Integer.MAX_VALUE.
Updated DBMD.supportsCorrelatedQueries()
to return true for versions > 4.1,
supportsGroupByUnrelated() to return
true and
getResultSetHoldability() to return
HOLD_CURSORS_OVER_COMMIT.
Handling of catalog argument in
DatabaseMetaData.getIndexInfo(), which
also means changes to the following methods in
DatabaseMetaData: (Bug#12541)
getBestRowIdentifier()
getColumns()
getCrossReference()
getExportedKeys()
getImportedKeys()
getIndexInfo()
getPrimaryKeys()
getProcedures() (and thus indirectly
getProcedureColumns())
getTables()
The catalog argument in all of these
methods now behaves in the following way:
Specifying NULL means that catalog
will not be used to filter the results (thus all
databases will be searched), unless you've set
nullCatalogMeansCurrent=true in your
JDBC URL properties.
Specifying "" means
鈥current鈥 catalog, even though this isn't
quite JDBC spec compliant, it's there for legacy users.
Specifying a catalog works as stated in the API docs.
Made Connection.clientPrepare()
available from 鈥wrapped鈥 connections in the
jdbc2.optional package (connections
built by ConnectionPoolDataSource
instances).
Added Connection.isMasterConnection() for
clients to be able to determine if a multi-host master/slave
connection is connected to the first host in the list.
Tokenizer for = in URL properties was
causing sessionVariables=.... to be
parameterized incorrectly. (Bug#12753)
Foreign key information that is quoted is parsed incorrectly
when DatabaseMetaData methods use that
information. (Bug#11781)
The sendBlobChunkSize property is now
clamped to max_allowed_packet with
consideration of stream buffer size and packet headers to
avoid PacketTooBigExceptions when
max_allowed_packet is similar in size to
the default sendBlobChunkSize which is
1M.
CallableStatement.clearParameters() now
clears resources associated with
INOUT/OUTPUT
parameters as well as INPUT parameters.
Connection.prepareCall() is database name
case-sensitive (on Windows systems). (Bug#12417)
cp1251 incorrectly mapped to
win1251 for servers newer than 4.0.x.
(Bug#12752)
java.sql.Types.OTHER returned for
BINARY and VARBINARY
columns when using
DatabaseMetaData.getColumns(). (Bug#12970)
ServerPreparedStatement.getBinding() now
checks if the statement is closed before attempting to
reference the list of parameter bindings, to avoid throwing
a NullPointerException.
ResultSetMetaData from
Statement.getGeneratedKeys() caused a
NullPointerException to be thrown
whenever a method that required a connection reference was
called. (Bug#13277)
Backport of Field class,
ResultSetMetaData.getColumnClassName(),
and ResultSet.getObject(int) changes from
5.0 branch to fix behavior surrounding VARCHAR
BINARY/VARBINARY and related
types.
Fixed NullPointerException when
converting catalog parameter in many
DatabaseMetaDataMethods to
byte[]s (for the result set) when the
parameter is null.
(null isn't technically allowed by the
JDBC specification, but we've historically allowed it).
Backport of VAR[BINARY|CHAR] [BINARY]
types detection from 5.0 branch.
Read response in
MysqlIO.sendFileToServer(), even if the
local file can't be opened, otherwise next query issued will
fail, because it's reading the response to the empty
LOAD DATA INFILE packet sent to the
server.
Workaround for Bug#13374:
ResultSet.getStatement() on closed result
set returns NULL (as per JDBC 4.0 spec,
but not backward-compatible). Set the connection property
retainStatementAfterResultSetClose to
true to be able to retrieve a
ResultSet's statement after the
ResultSet has been closed via
.getStatement() (the default is
false, to be JDBC-compliant and to reduce
the chance that code using JDBC leaks
Statement instances).
URL configuration parameters don't allow
鈥&鈥 or
鈥=鈥 in their values. The JDBC
driver now parses configuration parameters as if they are
encoded using the application/x-www-form-urlencoded format
as specified by java.net.URLDecoder
(http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLDecoder.html).
(Bug#13453)
If the 鈥%鈥 character is
present in a configuration property, it must now be
represented as %25, which is the encoded
form of 鈥%鈥 when using
application/x-www-form-urlencoded encoding.
The configuration property
sessionVariables now allows you to
specify variables that start with the
鈥@鈥 sign.
When gatherPerfMetrics is enabled for
servers older than 4.1.0, a
NullPointerException is thrown from the
constructor of ResultSet if the query
doesn't use any tables. (Bug#13043)
Fixed connecting without a database specified raised an
exception in MysqlIO.changeDatabaseTo().
Initial implemention of ParameterMetadata
for
PreparedStatement.getParameterMetadata().
Only works fully for CallableStatements,
as current server-side prepared statements return every
parameter as a VARCHAR type.
Overhaul of character set configuration, everything now lives in a properties file.
Driver now correctly uses CP932 if available on the server for Windows-31J, CP932 and MS932 java encoding names, otherwise it resorts to SJIS, which is only a close approximation. Currently only MySQL-5.0.3 and newer (and MySQL-4.1.12 or .13, depending on when the character set gets backported) can reliably support any variant of CP932.
com.mysql.jdbc.PreparedStatement.ParseInfo
does unnecessary call to toCharArray().
(Bug#9064)
Memory leak in ServerPreparedStatement if
serverPrepare() fails. (Bug#10144)
Actually write manifest file to correct place so it ends up in the binary jar file.
Added createDatabaseIfNotExist property
(default is false), which will cause the
driver to ask the server to create the database specified in
the URL if it doesn't exist. You must have the appropriate
privileges for database creation for this to work.
Unsigned SMALLINT treated as signed for
ResultSet.getInt(), fixed all cases for
UNSIGNED integer values and server-side
prepared statements, as well as
ResultSet.getObject() for
UNSIGNED TINYINT. (Bug#10156)
Double quotes not recognized when parsing client-side prepared statements. (Bug#10155)
Made enableStreamingResults() visible on
com.mysql.jdbc.jdbc2.optional.StatementWrapper.
Made ServerPreparedStatement.asSql() work
correctly so auto-explain functionality would work with
server-side prepared statements.
Made JDBC2-compliant wrappers public in order to allow access to vendor extensions.
Cleaned up logging of profiler events, moved code to dump a
profiler event as a string to
com.mysql.jdbc.log.LogUtils so that third
parties can use it.
DatabaseMetaData.supportsMultipleOpenResults()
now returns true. The driver has
supported this for some time, DBMD just missed that fact.
Driver doesn't support {?=CALL(...)} for
calling stored functions. This involved adding support for
function retrieval to
DatabaseMetaData.getProcedures() and
getProcedureColumns() as well. (Bug#10310)
SQLException thrown when retrieving
YEAR(2) with
ResultSet.getString(). The driver will
now always treat YEAR types as
java.sql.Dates and return the correct
values for getString(). Alternatively,
the yearIsDateType connection property
can be set to false and the values will
be treated as SHORTs. (Bug#10485)
The datatype returned for TINYINT(1)
columns when tinyInt1isBit=true (the
default) can be switched between
Types.BOOLEAN and
Types.BIT using the new configuration
property transformedBitIsBoolean, which
defaults to false. If set to
false (the default),
DatabaseMetaData.getColumns() and
ResultSetMetaData.getColumnType() will
return Types.BOOLEAN for
TINYINT(1) columns. If
true, Types.BOOLEAN
will be returned instead. Regardless of this configuration
property, if tinyInt1isBit is enabled,
columns with the type TINYINT(1) will be
returned as java.lang.Boolean instances
from ResultSet.getObject(...), and
ResultSetMetaData.getColumnClassName()
will return java.lang.Boolean.
SQLException is thrown when using
property characterSetResults with
cp932 or eucjpms. (Bug#10496)
Reorganized directory layout. Sources now are in
src folder. Don't pollute parent
directory when building, now output goes to
./build, distribution goes to
./dist.
Added support/bug hunting feature that generates
.sql test scripts to
STDERR when
autoGenerateTestcaseScript is set to
true.
0-length streams not sent to server when using server-side prepared statements. (Bug#10850)
Setting cachePrepStmts=true now causes
the Connection to also cache the check
the driver performs to determine if a prepared statement can
be server-side or not, as well as caches server-side
prepared statements for the lifetime of a connection. As
before, the prepStmtCacheSize parameter
controls the size of these caches.
Try to handle OutOfMemoryErrors more
gracefully. Although not much can be done, they will in most
cases close the connection they happened on so that further
operations don't run into a connection in some unknown
state. When an OOM has happened, any further operations on
the connection will fail with a 鈥Connection
closed鈥 exception that will also list the OOM
exception as the reason for the implicit connection close
event.
Don't send COM_RESET_STMT for each
execution of a server-side prepared statement if it isn't
required.
Driver detects if you're running MySQL-5.0.7 or later, and
does not scan for LIMIT ?[,?] in
statements being prepared, as the server supports those
types of queries now.
VARBINARY data corrupted when using
server-side prepared statements and
ResultSet.getBytes(). (Bug#11115)
Connection.setCatalog() is now aware of
the useLocalSessionState configuration
property, which when set to true will
prevent the driver from sending USE ...
to the server if the requested catalog is the same as the
current catalog.
Added the following configuration bundles, use one or many
via the useConfigs configuration
property:
maxPerformance 鈥 maximum
performance without being reckless
solarisMaxPerformance 鈥 maximum
performance for Solaris, avoids syscalls where it can
3-0-Compat 鈥 Compatibility with
Connector/J 3.0.x functionality
Added maintainTimeStats configuration
property (defaults to true), which tells
the driver whether or not to keep track of the last query
time and the last successful packet sent to the server's
time. If set to false, removes two
syscalls per query.
autoReconnect ping causes exception on
connection startup. (Bug#11259)
Connector/J dumping query into
SQLException twice. (Bug#11360)
Fixed PreparedStatement.setClob() not
accepting null as a parameter.
Production package doesn't include JBoss integration classes. (Bug#11411)
Removed nonsensical 鈥costly type conversion鈥 warnings when using usage advisor.
Fixed DatabaseMetaData.getTables()
returning views when they were not asked for as one of the
requested table types.
Added support for new precision-math
DECIMAL type in MySQL 5.0.3 and up.
Fixed ResultSet.getTime() on a
NULL value for server-side prepared
statements throws NPE.
Made Connection.ping() a public method.
DATE_FORMAT() queries returned as
BLOBs from
getObject(). (Bug#8868)
ServerPreparedStatements now correctly
鈥stream鈥
BLOB/CLOB data to the
server. You can configure the threshold chunk size using the
JDBC URL property blobSendChunkSize (the
default is 1MB).
BlobFromLocator now uses correct
identifier quoting when generating prepared statements.
Server-side session variables can be preset at connection
time by passing them as a comma-delimited list for the
connection property sessionVariables.
Fixed regression in ping() for users
using autoReconnect=true.
PreparedStatement.addBatch() doesn't work
with server-side prepared statements and streaming
BINARY data. (Bug#9040)
DBMD.supportsMixedCase*Identifiers()
returns wrong value on servers running on case-sensitive
filesystems. (Bug#8800)
Cannot use UTF-8 for characterSetResults
configuration property. (Bug#9206)
A continuation of Bug#8868, where functions used in queries
that should return non-string types when resolved by
temporary tables suddenly become opaque binary strings
(work-around for server limitation). Also fixed fields with
type of CHAR(n) CHARACTER SET BINARY to
return correct/matching classes for
RSMD.getColumnClassName() and
ResultSet.getObject(). (Bug#9236)
DBMD.supportsResultSetConcurrency() not
returning true for forward-only/read-only
result sets (we obviously support this). (Bug#8792)
DATA_TYPE column from
DBMD.getBestRowIdentifier() causes
ArrayIndexOutOfBoundsException when
accessed (and in fact, didn't return any value). (Bug#8803)
Check for empty strings ('') when
converting
CHAR/VARCHAR column
data to numbers, throw exception if
emptyStringsConvertToZero configuration
property is set to false (for
backward-compatibility with 3.0, it is now set to
true by default, but will most likely
default to false in 3.2).
PreparedStatement.getMetaData() inserts
blank row in database under certain conditions when not
using server-side prepared statements. (Bug#9320)
Connection.canHandleAsPreparedStatement()
now makes 鈥best effort鈥 to distinguish
LIMIT clauses with placeholders in them
from ones without in order to have fewer false positives
when generating work-arounds for statements the server
cannot currently handle as server-side prepared statements.
Fixed build.xml to not compile
log4j logging if log4j
not available.
Added support for the c3p0 connection pool's
(http://c3p0.sf.net/) validation/connection
checker interface which uses the lightweight
COM_PING call to the server if available.
To use it, configure your c3p0 connection pool's
connectionTesterClassName property to use
com.mysql.jdbc.integration.c3p0.MysqlConnectionTester.
Better detection of LIMIT inside/outside
of quoted strings so that the driver can more correctly
determine whether a prepared statement can be prepared on
the server or not.
Stored procedures with same name in different databases confuse the driver when it tries to determine parameter counts/types. (Bug#9319)
Added finalizers to ResultSet and
Statement implementations to be JDBC
spec-compliant, which requires that if not explicitly
closed, these resources should be closed upon garbage
collection.
Stored procedures with DECIMAL parameters
with storage specifications that contained
鈥,鈥 in them would fail. (Bug#9682)
PreparedStatement.setObject(int, Object, int type,
int scale) now uses scale value for
BigDecimal instances.
Statement.getMoreResults() could throw
NPE when existing result set was
.close()d. (Bug#9704)
The performance metrics feature now gathers information about number of tables referenced in a SELECT.
The logging system is now automatically configured. If the
value has been set by the user, via the URL property
logger or the system property
com.mysql.jdbc.logger, then use that,
otherwise, autodetect it using the following steps:
Log4j, if it's available,
Then JDK1.4 logging,
Then fallback to our STDERR logging.
DBMD.getTables() shouldn't return tables
if views are asked for, even if the database version doesn't
support views. (Bug#9778)
Fixed driver not returning true for
-1 when
ResultSet.getBoolean() was called on
result sets returned from server-side prepared statements.
Added a Manifest.MF file with
implementation information to the .jar
file.
More tests in Field.isOpaqueBinary() to
distinguish opaque binary (that is, fields with type
CHAR(n) and CHARACTER SET
BINARY) from output of various scalar and
aggregate functions that return strings.
Should accept null for catalog (meaning
use current) in DBMD methods, even though it's not
JDBC-compliant for legacy's sake. Disable by setting
connection property
nullCatalogMeansCurrent to
false (which will be the default value in
C/J 3.2.x). (Bug#9917)
Should accept null for name patterns in
DBMD (meaning 鈥%鈥), even
though it isn't JDBC compliant, for legacy's sake. Disable
by setting connection property
nullNamePatternMatchesAll to
false (which will be the default value in
C/J 3.2.x). (Bug#9769)
Timestamp key column data needed _binary
stripped for
UpdatableResultSet.refreshRow(). (Bug#7686)
Timestamps converted incorrectly to strings with server-side prepared statements and updatable result sets. (Bug#7715)
Detect new sql_mode variable in string
form (it used to be integer) and adjust quoting method for
strings appropriately.
Added holdResultsOpenOverStatementClose
property (default is false), that keeps
result sets open over statement.close() or new execution on
same statement (suggested by Kevin Burton).
Infinite recursion when 鈥falling back鈥 to master in failover configuration. (Bug#7952)
Disable multi-statements (if enabled) for MySQL-4.1 versions prior to version 4.1.10 if the query cache is enabled, as the server returns wrong results in this configuration.
Fixed duplicated code in
configureClientCharset() that prevented
useOldUTF8Behavior=true from working
properly.
Removed dontUnpackBinaryResults
functionality, the driver now always stores results from
server-side prepared statements as is from the server and
unpacks them on demand.
Emulated locators corrupt binary data when using server-side prepared statements. (Bug#8096)
Fixed synchronization issue with
ServerPreparedStatement.serverPrepare()
that could cause deadlocks/crashes if connection was shared
between threads.
By default, the driver now scans SQL you are preparing via
all variants of
Connection.prepareStatement() to
determine if it is a supported type of statement to prepare
on the server side, and if it is not supported by the
server, it instead prepares it as a client-side emulated
prepared statement. You can disable this by passing
emulateUnsupportedPstmts=false in your
JDBC URL. (Bug#4718)
Remove _binary introducer from parameters
used as in/out parameters in
CallableStatement.
Always return byte[]s for output
parameters registered as *BINARY.
Send correct value for 鈥boolean鈥
true to server for
PreparedStatement.setObject(n, "true",
Types.BIT).
Fixed bug with Connection not caching statements from
prepareStatement() when the statement
wasn't a server-side prepared statement.
Choose correct 鈥direction鈥 to apply time
adjustments when both client and server are in GMT time zone
when using ResultSet.get(..., cal) and
PreparedStatement.set(...., cal).
Added dontTrackOpenResources option
(default is false, to be JDBC compliant),
which helps with memory use for non-well-behaved apps (that
is, applications that don't close
Statement objects when they should).
ResultSet.getString() doesn't maintain
format stored on server, bug fix only enabled when
noDatetimeStringSync property is set to
true (the default is
false). (Bug#8428)
Fixed NPE in ResultSet.realClose() when
using usage advisor and result set was already closed.
PreparedStatements not creating streaming
result sets. (Bug#8487)
Don't pass NULL to
String.valueOf() in
ResultSet.getNativeConvertToString(), as
it stringifies it (that is, returns
null), which is not correct for the
method in question.
ResultSet.getBigDecimal() throws
exception when rounding would need to occur to set scale.
The driver now chooses a rounding mode of 鈥half
up鈥 if non-rounding
BigDecimal.setScale() fails. (Bug#8424)
Added useLocalSessionState configuration
property, when set to true the JDBC
driver trusts that the application is well-behaved and only
sets autocommit and transaction isolation levels using the
methods provided on java.sql.Connection,
and therefore can manipulate these values in many cases
without incurring round-trips to the database server.
Added enableStreamingResults() to
Statement for connection pool
implementations that check
Statement.setFetchSize() for
specification-compliant values. Call
Statement.setFetchSize(>=0) to disable
the streaming results for that statement.
Added support for BIT type in
MySQL-5.0.3. The driver will treat
BIT(1-8) as the JDBC standard
BIT type (which maps to
java.lang.Boolean), as the server does
not currently send enough information to determine the size
of a bitfield when < 9 bits are declared.
BIT(>9) will be treated as
VARBINARY, and will return
byte[] when
getObject() is called.
Fixed hang on SocketInputStream.read()
with Statement.setMaxRows() and multiple
result sets when driver has to truncate result set directly,
rather than tacking a LIMIT
on the end of it.
n
DBMD.getProcedures() doesn't respect
catalog parameter. (Bug#7026)
Fix comparisons made between string constants and dynamic
strings that are converted with either
toUpperCase() or
toLowerCase() to use
Locale.ENGLISH, as some locales
鈥override鈥 case rules for English. Also use
StringUtils.indexOfIgnoreCase() instead
of .toUpperCase().indexOf(), avoids
creating a very short-lived transient
String instance.
Server-side prepared statements did not honor
zeroDateTimeBehavior property, and would
cause class-cast exceptions when using
ResultSet.getObject(), as the all-zero
string was always returned. (Bug#5235)
Fixed batched updates with server prepared statements weren't looking if the types had changed for a given batched set of parameters compared to the previous set, causing the server to return the error 鈥Wrong arguments to mysql_stmt_execute()鈥.
Handle case when string representation of timestamp contains
trailing 鈥.鈥 with no numbers
following it.
Inefficient detection of pre-existing string instances in
ResultSet.getNativeString(). (Bug#5706)
Don't throw exceptions for
Connection.releaseSavepoint().
Use a per-session Calendar instance by
default when decoding dates from
ServerPreparedStatements (set to old,
less performant behavior by setting property
dynamicCalendars=true).
Added experimental configuration property
dontUnpackBinaryResults, which delays
unpacking binary result set values until they're asked for,
and only creates object instances for non-numerical values
(it is set to false by default). For some
usecase/jvm combinations, this is friendlier on the garbage
collector.
UNSIGNED BIGINT unpacked incorrectly from
server-side prepared statement result sets. (Bug#5729)
ServerSidePreparedStatement allocating
short-lived objects unnecessarily. (Bug#6225)
Removed unwanted new Throwable() in
ResultSet constructor due to bad merge
(caused a new object instance that was never used for every
result set created). Found while profiling for Bug#6359.
Fixed too-early creation of StringBuffer
in EscapeProcessor.escapeSQL(), also
return String when escaping not needed
(to avoid unnecessary object allocations). Found while
profiling for Bug#6359.
Use null-safe-equals for key comparisons in updatable result sets.
SUM() on DECIMAL with
server-side prepared statement ignores scale if zero-padding
is needed (this ends up being due to conversion to
DOUBLE by server, which when converted to
a string to parse into BigDecimal, loses
all 鈥padding鈥 zeros). (Bug#6537)
Use
DatabaseMetaData.getIdentifierQuoteString()
when building DBMD queries.
Use 1MB packet for sending file for LOAD DATA LOCAL
INFILE if that is <
max_allowed_packet on server.
ResultSetMetaData.getColumnDisplaySize()
returns incorrect values for multi-byte charsets. (Bug#6399)
Make auto-deserialization of
java.lang.Objects stored in
BLOB columns configurable via
autoDeserialize property (defaults to
false).
Re-work Field.isOpaqueBinary() to detect
CHAR( to support fixed-length binary fields for
n) CHARACTER SET
BINARYResultSet.getObject().
Use our own implementation of buffered input streams to get
around blocking behavior of
java.io.BufferedInputStream. Disable this
with useReadAheadInput=false.
Failing to connect to the server when one of the addresses
for the given host name is IPV6 (which the server does not
yet bind on). The driver now loops through
all IP addresses for a given host, and
stops on the first one that accepts() a
socket.connect(). (Bug#6348)
Connector/J 3.1.3 beta does not handle integers correctly
(caused by changes to support unsigned reads in
Buffer.readInt() ->
Buffer.readShort()). (Bug#4510)
Added support in
DatabaseMetaData.getTables() and
getTableTypes() for views, which are now
available in MySQL server 5.0.x.
ServerPreparedStatement.execute*()
sometimes threw
ArrayIndexOutOfBoundsException when
unpacking field metadata. (Bug#4642)
Optimized integer number parsing, enable 鈥old鈥
slower integer parsing using JDK classes via
useFastIntParsing=false property.
Added useOnlyServerErrorMessages
property, which causes message text in exceptions generated
by the server to only contain the text sent by the server
(as opposed to the SQLState's 鈥standard鈥
description, followed by the server's error message). This
property is set to true by default.
ResultSet.wasNull() does not work for
primatives if a previous null was
returned. (Bug#4689)
Track packet sequence numbers if
enablePacketDebug=true, and throw an
exception if packets received out-of-order.
ResultSet.getObject() returns wrong type
for strings when using prepared statements. (Bug#4482)
Calling MysqlPooledConnection.close()
twice (even though an application error), caused NPE. Fixed.
ServerPreparedStatements dealing with
return of DECIMAL type don't work. (Bug#5012)
ResultSet.getObject() doesn't return type
Boolean for pseudo-bit types from
prepared statements on 4.1.x (shortcut for avoiding extra
type conversion when using binary-encoded result sets
obscured test in getObject() for
鈥pseudo鈥 bit type). (Bug#5032)
You can now use URLs in LOAD DATA LOCAL
INFILE statements, and the driver will use Java's
built-in handlers for retreiving the data and sending it to
the server. This feature is not enabled by default, you must
set the allowUrlInLocalInfile connection
property to true.
The driver is more strict about truncation of numerics on
ResultSet.get*(), and will throw an
SQLException when truncation is detected.
You can disable this by setting
jdbcCompliantTruncation to
false (it is enabled by default, as this
functionality is required for JDBC compliance).
Added three ways to deal with all-zero datetimes when
reading them from a ResultSet:
exception (the default), which throws an
SQLException with an SQLState of
S1009; convertToNull,
which returns NULL instead of the date;
and round, which rounds the date to the
nearest closest value which is
'0001-01-01'.
Fixed ServerPreparedStatement to read
prepared statement metadata off the wire, even though it's
currently a placeholder instead of using
MysqlIO.clearInputStream() which didn't
work at various times because data wasn't available to read
from the server yet. This fixes sporadic errors users were
having with ServerPreparedStatements
throwing ArrayIndexOutOfBoundExceptions.
Use com.mysql.jdbc.Message's classloader
when loading resource bundle, should fix sporadic issues
when the caller's classloader can't locate the resource
bundle.
Mangle output parameter names for
CallableStatements so they will not clash
with user variable names.
Added support for INOUT parameters in
CallableStatements.
Null bitmask sent for server-side prepared statements was incorrect. (Bug#4119)
Use SQL Standard SQL states by default, unless
useSqlStateCodes property is set to
false.
Added packet debuging code (see the
enablePacketDebug property
documentation).
Added constants for MySQL error numbers (publicly
accessible, see
com.mysql.jdbc.MysqlErrorNumbers), and
the ability to generate the mappings of vendor error codes
to SQLStates that the driver uses (for documentation
purposes).
Externalized more messages (on-going effort).
Error in retrieval of mediumint column
with prepared statements and binary protocol. (Bug#4311)
Support new time zone variables in MySQL-4.1.3 when
useTimezone=true.
Support for unsigned numerics as return types from prepared
statements. This also causes a change in
ResultSet.getObject() for the
bigint unsigned type, which used to
return BigDecimal instances, it now
returns instances of
java.lang.BigInteger.
Fixed stored procedure parameter parsing info when size was
specified for a parameter (for example,
char(), varchar()).
Enabled callable statement caching via
cacheCallableStmts property.
Fixed case when no output parameters specified for a stored procedure caused a bogus query to be issued to retrieve out parameters, leading to a syntax error from the server.
Fixed case when no parameters could cause a
NullPointerException in
CallableStatement.setOutputParameters().
Removed wrapping of exceptions in
MysqlIO.changeUser().
Fixed sending of split packets for large queries, enabled nio ability to send large packets as well.
Added .toString() functionality to
ServerPreparedStatement, which should
help if you're trying to debug a query that is a prepared
statement (it shows SQL as the server would process).
Added gatherPerformanceMetrics property,
along with properties to control when/where this info gets
logged (see docs for more info).
ServerPreparedStatements weren't actually
de-allocating server-side resources when
.close() was called.
Added logSlowQueries property, along with
slowQueriesThresholdMillis property to
control when a query should be considered
鈥slow.鈥
Correctly map output parameters to position given in
prepareCall() versus. order implied
during registerOutParameter(). (Bug#3146)
Correctly detect initial character set for servers >= 4.1.0.
Cleaned up detection of server properties.
Support placeholder for parameter metadata for server >= 4.1.2.
getProcedures() does not return any
procedures in result set. (Bug#3539)
getProcedureColumns() doesn't work with
wildcards for procedure name. (Bug#3540)
DBMD.getSQLStateType() returns incorrect
value. (Bug#3520)
Added connectionCollation property to
cause driver to issue set
collation_connection=... query on connection init
if default collation for given charset is not appropriate.
Fixed DatabaseMetaData.getProcedures()
when run on MySQL-5.0.0 (output of SHOW PROCEDURE
STATUS changed between 5.0.0 and 5.0.1.
getWarnings() returns
SQLWarning instead of
DataTruncation. (Bug#3804)
Don't enable server-side prepared statements for server version 5.0.0 or 5.0.1, as they aren't compatible with the '4.1.2+' style that the driver uses (the driver expects information to come back that isn't there, so it hangs).
Fixed bug with UpdatableResultSets not
using client-side prepared statements.
Fixed character encoding issues when converting bytes to ASCII when MySQL doesn't provide the character set, and the JVM is set to a multi-byte encoding (usually affecting retrieval of numeric values).
Unpack 鈥unknown鈥 data types from server
prepared statements as Strings.
Implemented long data (Blobs, Clobs, InputStreams, Readers) for server prepared statements.
Implemented Statement.getWarnings() for
MySQL-4.1 and newer (using SHOW
WARNINGS).
Default result set type changed to
TYPE_FORWARD_ONLY (JDBC compliance).
Centralized setting of result set type and concurrency.
Refactored how connection properties are set and exposed as
DriverPropertyInfo as well as
Connection and
DataSource properties.
Support for NIO. Use useNIO=true on
platforms that support NIO.
Support for transaction savepoints (MySQL >= 4.0.14 or 4.1.1).
Support for mysql_change_user(). See the
changeUser() method in
com.mysql.jdbc.Connection.
Reduced number of methods called in average query to be more efficient.
Prepared Statements will be re-prepared
on auto-reconnect. Any errors encountered are postponed
until first attempt to re-execute the re-prepared statement.
Ensure that warnings are cleared before executing queries on prepared statements, as-per JDBC spec (now that we support warnings).
Support 鈥old鈥 profileSql
capitalization in ConnectionProperties.
This property is deprecated, you should use
profileSQL if possible.
Optimized Buffer.readLenByteArray() to
return shared empty byte array when length is 0.
Allow contents of
PreparedStatement.setBlob() to be
retained between calls to .execute*().
Deal with 0-length tokens in
EscapeProcessor (caused by callable
statement escape syntax).
Check for closed connection on delete/update/insert row
operations in UpdatableResultSet.
Fix support for table aliases when checking for all primary
keys in UpdatableResultSet.
Removed useFastDates connection property.
Correctly initialize datasource properties from JNDI Refs, including explicitly specified URLs.
DatabaseMetaData now reports
supportsStoredProcedures() for MySQL
versions >= 5.0.0
Fixed stack overflow in
Connection.prepareCall() (bad merge).
Fixed IllegalAccessError to
Calendar.getTimeInMillis() in
DateTimeValue (for JDK < 1.4).
DatabaseMetaData.getColumns() is not
returning correct column ordinal info for
non-'%' column name patterns. (Bug#1673)
Merged fix of datatype mapping from MySQL type
FLOAT to
java.sql.Types.REAL from 3.0 branch.
Detect collation of column for
RSMD.isCaseSensitive().
Fixed sending of queries larger than 16M.
Added named and indexed input/output parameter support to
CallableStatement. MySQL-5.0.x or newer.
Fixed NullPointerException in
ServerPreparedStatement.setTimestamp(),
as well as year and month descrepencies in
ServerPreparedStatement.setTimestamp(),
setDate().
Added ability to have multiple database/JVM targets for
compliance and regression/unit tests in
build.xml.
Fixed NPE and year/month bad conversions when accessing some
datetime functionality in
ServerPreparedStatements and their
resultant result sets.
Display where/why a connection was implicitly closed (to aid debugging).
CommunicationsException implemented, that
tries to determine why communications was lost with a
server, and displays possible reasons when
.getMessage() is called.
NULL values for numeric types in binary
encoded result sets causing
NullPointerExceptions. (Bug#2359)
Implemented Connection.prepareCall(), and
DatabaseMetaData.
getProcedures() and
getProcedureColumns().
Reset long binary parameters in
ServerPreparedStatement when
clearParameters() is called, by sending
COM_RESET_STMT to the server.
Merged prepared statement caching, and
.getMetaData() support from 3.0 branch.
Fixed off-by-1900 error in some cases for years in
TimeUtil.fastDate/TimeCreate()
when unpacking results from server-side prepared statements.
Fixed charset conversion issue in
getTables(). (Bug#2502)
Implemented multiple result sets returned from a statement or stored procedure.
Server-side prepared statements were not returning datatype
YEAR correctly. (Bug#2606)
Enabled streaming of result sets from server-side prepared statements.
Class-cast exception when using scrolling result sets and server-side prepared statements. (Bug#2623)
Merged unbuffered input code from 3.0.
Fixed ConnectionProperties that weren't
properly exposed via accessors, cleaned up
ConnectionProperties code.
NULL fields were not being encoded
correctly in all cases in server-side prepared statements.
(Bug#2671)
Fixed rare buffer underflow when writing numbers into buffers for sending prepared statement execution requests.
Use DocBook version of docs for shipped versions of drivers.
Added requireSSL property.
Added useServerPrepStmts property
(default false). The driver will use
server-side prepared statements when the server version
supports them (4.1 and newer) when this property is set to
true. It is currently set to
false by default until all bind/fetch
functionality has been implemented. Currently only DML
prepared statements are implemented for 4.1 server-side
prepared statements.
Track open Statements, close all when
Connection.close() is called (JDBC
compliance).
Timestamp/Time
conversion goes in the wrong 鈥direction鈥 when
useTimeZone=true and server time zone
differs from client time zone. (Bug#5874)
DatabaseMetaData.getIndexInfo() ignored
unique parameter. (Bug#7081)
Support new protocol type
MYSQL_TYPE_VARCHAR.
Added useOldUTF8Behavior' configuration
property, which causes JDBC driver to act like it did with
MySQL-4.0.x and earlier when the character encoding is
utf-8 when connected to MySQL-4.1 or
newer.
Statements created from a pooled connection were returning
physical connection instead of logical connection when
getConnection() was called. (Bug#7316)
PreparedStatements don't encode Big5 (and
other multi-byte) character sets correctly in static SQL
strings. (Bug#7033)
Connections starting up failed-over (due to down master) never retry master. (Bug#6966)
PreparedStatement.fixDecimalExponent()
adding extra +, making number unparseable
by MySQL server. (Bug#7061)
Timestamp key column data needed _binary
stripped for
UpdatableResultSet.refreshRow(). (Bug#7686)
Backported SQLState codes mapping from Connector/J 3.1,
enable with useSqlStateCodes=true as a
connection property, it defaults to false
in this release, so that we don't break legacy applications
(it defaults to true starting with
Connector/J 3.1).
PreparedStatement.fixDecimalExponent()
adding extra +, making number unparseable
by MySQL server. (Bug#7601)
Escape sequence {fn convert(..., type)} now supports
ODBC-style types that are prepended by
SQL_.
Fixed duplicated code in
configureClientCharset() that prevented
useOldUTF8Behavior=true from working
properly.
Handle streaming result sets with more than 2 billion rows properly by fixing wraparound of row number counter.
MS932, SHIFT_JIS, and
Windows_31J not recognized as aliases for
sjis. (Bug#7607)
Adding CP943 to aliases for
sjis. (Bug#6549, fixed while fixing Bug#7607)
Which requires hex escaping of binary data when using multi-byte charsets with prepared statements. (Bug#8064)
NON_UNIQUE column from
DBMD.getIndexInfo() returned inverted
value. (Bug#8812)
Workaround for server Bug#9098: Default values of
CURRENT_* for DATE,
TIME, DATETIME, and
TIMESTAMP columns can't be distinguished
from string values, so
UpdatableResultSet.moveToInsertRow()
generates bad SQL for inserting default values.
EUCKR charset is sent as SET
NAMES euc_kr which MySQL-4.1 and newer doesn't
understand. (Bug#8629)
DatabaseMetaData.supportsSelectForUpdate()
returns correct value based on server version.
Use hex escapes for
PreparedStatement.setBytes() for
double-byte charsets including 鈥aliases鈥
Windows-31J, CP934,
MS932.
Added support for the EUC_JP_Solaris
character encoding, which maps to a MySQL encoding of
eucjpms (backported from 3.1 branch).
This only works on servers that support
eucjpms, namely 5.0.3 or later.
Re-issue character set configuration commands when re-using
pooled connections and/or
Connection.changeUser() when connected to
MySQL-4.1 or newer.
Fixed ResultSetMetaData.isReadOnly() to
detect non-writable columns when connected to MySQL-4.1 or
newer, based on existence of 鈥original鈥 table
and column names.
ResultSet.updateByte() when on insert row
throws ArrayOutOfBoundsException. (Bug#5664)
Fixed DatabaseMetaData.getTypes()
returning incorrect (this is, non-negative) scale for the
NUMERIC type.
Off-by-one bug in
Buffer.readString(.
(Bug#5664)
string)
Made TINYINT(1) ->
BIT/Boolean conversion
configurable via tinyInt1isBit property
(default true to be JDBC compliant out of
the box).
Only set character_set_results during
connection establishment if server version >= 4.1.1.
Fixed regression where useUnbufferedInput
was defaulting to false.
ResultSet.getTimestamp() on a column with
TIME in it fails. (Bug#5664)
StringUtils.escapeEasternUnicodeByteStream
was still broken for GBK. (Bug#4010)
Failover for autoReconnect not using port
numbers for any hosts, and not retrying all hosts.
(Warning: This required a
change to the SocketFactory
connect() method signature, which is now
public Socket connect(String host, int portNumber,
Properties props); therefore, any third-party
socket factories will have to be changed to support this
signature. (Bug#4334)
Logical connections created by
MysqlConnectionPoolDataSource will now
issue a rollback() when they are closed
and sent back to the pool. If your application
server/connection pool already does this for you, you can
set the rollbackOnPooledClose property to
false to avoid the overhead of an extra
rollback().
Removed redundant calls to checkRowPos()
in ResultSet.
DOUBLE mapped twice in
DBMD.getTypeInfo(). (Bug#4742)
Added FLOSS license exemption.
Calling .close() twice on a
PooledConnection causes NPE. (Bug#4808)
DBMD.getColumns() returns incorrect JDBC
type for unsigned columns. This affects type mappings for
all numeric types in the
RSMD.getColumnType() and
RSMD.getColumnTypeNames() methods as
well, to ensure that 鈥like鈥 types from
DBMD.getColumns() match up with what
RSMD.getColumnType() and
getColumnTypeNames() return. (Bug#4138,
Bug#4860)
鈥Production鈥 is now 鈥GA鈥 (General Availability) in naming scheme of distributions.
RSMD.getPrecision() returning 0 for
non-numeric types (should return max length in chars for
non-binary types, max length in bytes for binary types).
This fix also fixes mapping of
RSMD.getColumnType() and
RSMD.getColumnTypeName() for the
BLOB types based on the length sent from
the server (the server doesn't distinguish between
TINYBLOB, BLOB,
MEDIUMBLOB or LONGBLOB
at the network protocol level). (Bug#4880)
ResultSet should release
Field[] instance in
.close(). (Bug#5022)
ResultSet.getMetaData() should not return
incorrectly initialized metadata if the result set has been
closed, but should instead throw an
SQLException. Also fixed for
getRow() and
getWarnings() and traversal methods by
calling checkClosed() before operating on
instance-level fields that are nullified during
.close(). (Bug#5069)
Parse new time zone variables from 4.1.x servers.
Use _binary introducer for
PreparedStatement.setBytes() and
set*Stream() when connected to
MySQL-4.1.x or newer to avoid misinterpretation during
character conversion.
Add unsigned attribute to
DatabaseMetaData.getColumns() output in
the TYPE_NAME column.
Added failOverReadOnly property, to allow
end-user to configure state of connection
(read-only/writable) when failed over.
Backported 鈥change user鈥 and 鈥reset
server state鈥 functionality from 3.1 branch, to allow
clients of MysqlConnectionPoolDataSource
to reset server state on getConnection()
on a pooled connection.
Don't escape SJIS/GBK/BIG5 when using MySQL-4.1 or newer.
Allow url parameter for
MysqlDataSource and
MysqlConnectionPool
DataSource so that passing of other
properties is possible from inside appservers.
Map duplicate key and foreign key errors to SQLState of
23000.
Backport documentation tooling from 3.1 branch.
Return creating statement for ResultSets
created by getGeneratedKeys(). (Bug#2957)
Allow java.util.Date to be sent in as
parameter to
PreparedStatement.setObject(), converting
it to a Timestamp to maintain full
precision. (Bug#103).
Don't truncate BLOB or
CLOB values when using
setBytes() and/or
setBinary/CharacterStream(). (Bug#2670).
Dynamically configure character set mappings for field-level
character sets on MySQL-4.1.0 and newer using SHOW
COLLATION when connecting.
Map binary character set to
US-ASCII to support
DATETIME charset recognition for servers
>= 4.1.2.
Use SET character_set_results during
initialization to allow any charset to be returned to the
driver for result sets.
Use charsetnr returned during connect to
encode queries before issuing SET NAMES
on MySQL >= 4.1.0.
Add helper methods to ResultSetMetaData
(getColumnCharacterEncoding() and
getColumnCharacterSet()) to allow
end-users to see what charset the driver thinks it should be
using for the column.
Only set character_set_results for MySQL
>= 4.1.0.
StringUtils.escapeSJISByteStream() not
covering all eastern double-byte charsets correctly. (Bug#3511)
Renamed
StringUtils.escapeSJISByteStream() to
more appropriate
escapeEasternUnicodeByteStream().
Not specifying database in URL caused
MalformedURL exception. (Bug#3554)
Auto-convert MySQL encoding names to Java encoding names if
used for characterEncoding property.
Added encoding names that are recognized on some JVMs to fix case where they were reverse-mapped to MySQL encoding names incorrectly.
Use junit.textui.TestRunner for all unit
tests (to allow them to be run from the command line outside
of Ant or Eclipse).
UpdatableResultSet not picking up default
values for moveToInsertRow(). (Bug#3557)
Inconsistent reporting of data type. The server still doesn't return all types for *BLOBs *TEXT correctly, so the driver won't return those correctly. (Bug#3570)
DBMD.getSQLStateType() returns incorrect
value. (Bug#3520)
Fixed regression in
PreparedStatement.setString() and eastern
character encodings.
Made StringRegressionTest 4.1-unicode
aware.
Trigger a SET NAMES utf8 when encoding is
forced to utf8 or
utf-8 via the
characterEncoding property. Previously,
only the Java-style encoding name of
utf-8 would trigger this.
AutoReconnect time was growing faster
than exponentially. (Bug#2447)
Fixed failover always going to last host in list. (Bug#2578)
Added useUnbufferedInput parameter, and
now use it by default (due to JVM issue
http://developer.java.sun.com/developer/bugParade/bugs/4401235.html)
Detect on/off or
1, 2,
3 form of
lower_case_table_names value on server.
Return java.lang.Integer for
TINYINT and SMALLINT
types from
ResultSetMetaData.getColumnClassName().
(Bug#2852)
Return java.lang.Double for
FLOAT type from
ResultSetMetaData.getColumnClassName().
(Bug#2855)
Return [B instead of
java.lang.Object for
BINARY, VARBINARY and
LONGVARBINARY types from
ResultSetMetaData.getColumnClassName()
(JDBC compliance).
Issue connection events on all instances created from a
ConnectionPoolDataSource.
Don't count quoted IDs when inside a 'string' in
PreparedStatement parsing. (Bug#1511)
鈥Friendlier鈥 exception message for
PacketTooLargeException. (Bug#1534)
Backported fix for aliased tables and
UpdatableResultSets in
checkUpdatability() method from 3.1
branch.
Fix for ArrayIndexOutOfBounds exception
when using Statement.setMaxRows(). (Bug#1695)
Barge blobs and split packets not being read correctly. (Bug#1576)
Fixed regression of
Statement.getGeneratedKeys() and
REPLACE statements.
Subsequent call to ResultSet.updateFoo()
causes NPE if result set is not updatable. (Bug#1630)
Fix for 4.1.1-style authentication with no password.
Foreign Keys column sequence is not consistent in
DatabaseMetaData.getImported/Exported/CrossReference().
(Bug#1731)
DatabaseMetaData.getSystemFunction()
returning bad function VResultsSion. (Bug#1775)
Cross-database updatable result sets are not checked for updatability correctly. (Bug#1592)
DatabaseMetaData.getColumns() should
return Types.LONGVARCHAR for MySQL
LONGTEXT type.
ResultSet.getObject() on
TINYINT and SMALLINT
columns should return Java type Integer.
(Bug#1913)
Added alwaysClearStream connection
property, which causes the driver to always empty any
remaining data on the input stream before each query.
Added more descriptive error message Server
Configuration Denies Access to DataSource, as well
as retrieval of message from server.
Autoreconnect code didn't set catalog upon reconnect if it had been changed.
Implement ResultSet.updateClob().
ResultSetMetaData.isCaseSensitive()
returned wrong value for
CHAR/VARCHAR columns.
Connection property maxRows not honored.
(Bug#1933)
Statements being created too many times in
DBMD.extractForeignKeyFromCreateTable().
(Bug#1925)
Support escape sequence {fn convert ... }. (Bug#1914)
ArrayIndexOutOfBounds when parameter
number == number of parameters + 1. (Bug#1958)
ResultSet.findColumn() should use first
matching column name when there are duplicate column names
in SELECT query (JDBC-compliance). (Bug#2006)
Removed static synchronization bottleneck from
PreparedStatement.setTimestamp().
Removed static synchronization bottleneck from instance
factory method of
SingleByteCharsetConverter.
Enable caching of the parsing stage of prepared statements
via the cachePrepStmts,
prepStmtCacheSize, and
prepStmtCacheSqlLimit properties
(disabled by default).
Speed up parsing of PreparedStatements,
try to use one-pass whenever possible.
Fixed security exception when used in Applets (applets can't
read the system property file.encoding
which is needed for LOAD DATA LOCAL
INFILE).
Use constants for SQLStates.
Map charset ko18_ru to
ko18r when connected to MySQL-4.1.0 or
newer.
Ensure that Buffer.writeString() saves
room for the \0.
Fixed exception Unknown character set
'danish' on connect with JDK-1.4.0
Fixed mappings in SQLError to report deadlocks with
SQLStates of 41000.
maxRows property would affect internal
statements, so check it for all statement creation internal
to the driver, and set to 0 when it is not.
Faster date handling code in ResultSet
and PreparedStatement (no longer uses
Date methods that synchronize on static
calendars).
Fixed test for end of buffer in
Buffer.readString().
Fixed ResultSet.previous() behavior to
move current position to before result set when on first row
of result set. (Bug#496)
Fixed Statement and
PreparedStatement issuing bogus queries
when setMaxRows() had been used and a
LIMIT clause was present in the query.
refreshRow didn't work when primary key
values contained values that needed to be escaped (they
ended up being doubly escaped). (Bug#661)
Support InnoDB contraint names when
extracting foreign key information in
DatabaseMetaData (implementing ideas from
Parwinder Sekhon). (Bug#517, Bug#664)
Backported 4.1 protocol changes from 3.1 branch (server-side SQL states, new field information, larger client capability flags, connect-with-database, and so forth).
Fix UpdatableResultSet to return values
for get
when on insert row. (Bug#675)
XXX()
The insertRow in an
UpdatableResultSet is now loaded with the
default column values when
moveToInsertRow() is called. (Bug#688)
DatabaseMetaData.getColumns() wasn't
returning NULL for default values that
are specified as NULL.
Change default statement type/concurrency to
TYPE_FORWARD_ONLY and
CONCUR_READ_ONLY (spec compliance).
Don't try and reset isolation level on reconnect if MySQL doesn't support them.
Don't wrap SQLExceptions in
RowDataDynamic.
Don't change timestamp TZ twice if
useTimezone==true. (Bug#774)
Fixed regression in large split-packet handling. (Bug#848)
Better diagnostic error messages in exceptions for 鈥streaming鈥 result sets.
Issue exception on
ResultSet.get
on empty result set (wasn't caught in some cases).
XXX()
Don't hide messages from exceptions thrown in I/O layers.
Don't fire connection closed events when closing pooled
connections, or on
PooledConnection.getConnection() with
already open connections. (Bug#884)
Clip +/- INF (to smallest and largest representative values
for the type in MySQL) and NaN (to 0) for
setDouble/setFloat(),
and issue a warning on the statement when the server does
not support +/- INF or NaN.
Double-escaping of '\' when charset is
SJIS or GBK and '\' appears in
non-escaped input. (Bug#879)
When emptying input stream of unused rows for
鈥streaming鈥 result sets, have the current
thread yield() every 100 rows in order to
not monopolize CPU time.
DatabaseMetaData.getColumns() getting
confused about the keyword 鈥set鈥 in character
columns. (Bug#1099)
Fixed deadlock issue with
Statement.setMaxRows().
Fixed CLOB.truncate(). (Bug#1130)
Optimized CLOB.setChracterStream(). (Bug#1131)
Made databaseName,
portNumber, and
serverName optional parameters for
MysqlDataSourceFactory. (Bug#1246)
ResultSet.get/setString mashing char 127.
(Bug#1247)
Backported authentication changes for 4.1.1 and newer from 3.1 branch.
Added com.mysql.jdbc.util.BaseBugReport
to help creation of testcases for bug reports.
Added property to 鈥clobber鈥 streaming results,
by setting the clobberStreamingResults
property to true (the default is
false). This will cause a
鈥streaming鈥 ResultSet to be
automatically closed, and any oustanding data still
streaming from the server to be discarded if another query
is executed before all the data has been read from the
server.
Allow bogus URLs in
Driver.getPropertyInfo().
Return list of generated keys when using multi-value
INSERTS with
Statement.getGeneratedKeys().
Use JVM charset with filenames and LOAD DATA
[LOCAL] INFILE.
Fix infinite loop with
Connection.cleanup().
Changed Ant target compile-core to
compile-driver, and made testsuite
compilation a separate target.
Fixed result set not getting set for
Statement.executeUpdate(), which affected
getGeneratedKeys() and
getUpdateCount() in some cases.
Unicode character 0xFFFF in a string would cause the driver
to throw an ArrayOutOfBoundsException.
(Bug#378).
Return correct number of generated keys when using
REPLACE statements.
Fix problem detecting server character set in some cases.
Fix row data decoding error when using very large packets.
Optimized row data decoding.
Issue exception when operating on an already closed prepared statement.
Fixed SJIS encoding bug, thanks to Naoto Sato.
Optimized usage of EscapeProcessor.
Allow multiple calls to
Statement.close().
Fixed MysqlPooledConnection.close()
calling wrong event type.
Fixed StringIndexOutOfBoundsException in
PreparedStatement.setClob().
4.1 Column Metadata fixes.
Remove synchronization from
Driver.connect() and
Driver.acceptsUrl().
IOExceptions during a transaction now
cause the Connection to be closed.
Fixed missing conversion for YEAR type in
ResultSetMetaData.getColumnTypeName().
Don't pick up indexes that start with pri
as primary keys for
DBMD.getPrimaryKeys().
Throw SQLExceptions when trying to do
operations on a forcefully closed
Connection (that is, when a communication
link failure occurs).
You can now toggle profiling on/off using
Connection.setProfileSql(boolean).
Fixed charset issues with database metadata (charset was not getting set correctly).
Updatable ResultSets can now be created
for aliased tables/columns when connected to MySQL-4.1 or
newer.
Fixed LOAD DATA LOCAL INFILE bug when
file > max_allowed_packet.
Fixed escaping of 0x5c ('\') character
for GBK and Big5 charsets.
Fixed ResultSet.getTimestamp() when
underlying field is of type DATE.
Ensure that packet size from
alignPacketSize() does not exceed
max_allowed_packet (JVM bug)
Don't reset Connection.isReadOnly() when
autoReconnecting.
Fixed ResultSetMetaData to return
"" when catalog not known. Fixes
NullPointerExceptions with Sun's
CachedRowSet.
Fixed DBMD.getTypeInfo() and
DBMD.getColumns() returning different
value for precision in TEXT and
BLOB types.
Allow ignoring of warning for 鈥non transactional
tables鈥 during rollback (compliance/usability) by
setting ignoreNonTxTables property to
true.
Fixed SQLExceptions getting swallowed on
initial connect.
Fixed Statement.setMaxRows() to stop
sending LIMIT type queries when not
needed (performance).
Clean up Statement query/method mismatch
tests (that is, INSERT not allowed with
.executeQuery()).
More checks added in ResultSet traversal
method to catch when in closed state.
Fixed ResultSetMetaData.isWritable() to
return correct value.
Add 鈥window鈥 of different
NULL sorting behavior to
DBMD.nullsAreSortedAtStart (4.0.2 to
4.0.10, true; otherwise, no).
Implemented Blob.setBytes(). You still
need to pass the resultant Blob back into
an updatable ResultSet or
PreparedStatement to persist the changes,
because MySQL does not support 鈥locators鈥.
Backported 4.1 charset field info changes from Connector/J 3.1.
Fixed Buffer.fastSkipLenString() causing
ArrayIndexOutOfBounds exceptions with
some queries when unpacking fields.
Implemented an empty TypeMap for
Connection.getTypeMap() so that some
third-party apps work with MySQL (IBM WebSphere 5.0
Connection pool).
Added missing LONGTEXT type to
DBMD.getColumns().
Retrieve TX_ISOLATION from database for
Connection.getTransactionIsolation() when
the MySQL version supports it, instead of an instance
variable.
Quote table names in
DatabaseMetaData.getColumns(),
getPrimaryKeys(),
getIndexInfo(),
getBestRowIdentifier().
Greatly reduce memory required for
setBinaryStream() in
PreparedStatements.
Fixed ResultSet.isBeforeFirst() for empty
result sets.
Added update options for foreign key metadata.
Added quoted identifiers to database names for
Connection.setCatalog.
Added support for quoted identifiers in
PreparedStatement parser.
Streamlined character conversion and
byte[] handling in
PreparedStatements for
setByte().
Reduce memory footprint of
PreparedStatements by sharing outbound
packet with MysqlIO.
Added strictUpdates property to allow
control of amount of checking for 鈥correctness鈥
of updatable result sets. Set this to
false if you want faster updatable result
sets and you know that you create them from
SELECT statements on tables with primary
keys and that you have selected all primary keys in your
query.
Added support for 4.0.8-style large packets.
Fixed PreparedStatement.executeBatch()
parameter overwriting.
Changed charsToByte in
SingleByteCharConverter to be non-static.
Changed SingleByteCharConverter to use
lazy initialization of each converter.
Fixed charset handling in Fields.java.
Implemented Connection.nativeSQL().
More robust escape tokenizer: Recognize
-- comments, and allow nested escape
sequences (see
testsuite.EscapeProcessingTest).
DBMD.getImported/ExportedKeys() now
handles multiple foreign keys per table.
Fixed ResultSetMetaData.getPrecision()
returning incorrect values for some floating-point types.
Fixed
ResultSetMetaData.getColumnTypeName()
returning BLOB for
TEXT and TEXT for
BLOB types.
Fixed Buffer.isLastDataPacket() for 4.1
and newer servers.
Added CLIENT_LONG_FLAG to be able to get
more column flags (isAutoIncrement()
being the most important).
Because of above, implemented
ResultSetMetaData.isAutoIncrement() to
use Field.isAutoIncrement().
Honor lower_case_table_names when enabled
in the server when doing table name comparisons in
DatabaseMetaData methods.
Some MySQL-4.1 protocol support (extended field info from selects).
Use non-aliased table/column names and database names to
fullly qualify tables and columns in
UpdatableResultSet (requires MySQL-4.1 or
newer).
Allow user to alter behavior of
Statement/
PreparedStatement.executeBatch() via
continueBatchOnError property (defaults
to true).
Check for connection closed in more
Connection methods
(createStatement,
prepareStatement,
setTransactionIsolation,
setAutoCommit).
More robust implementation of updatable result sets. Checks that all primary keys of the table have been selected.
LOAD DATA LOCAL INFILE ... now works, if
your server is configured to allow it. Can be turned off
with the allowLoadLocalInfile property
(see the README).
Substitute '?' for unknown character
conversions in single-byte character sets instead of
'\0'.
NamedPipeSocketFactory now works (only
intended for Windows), see README for
instructions.
Fixed issue with updatable result sets and
PreparedStatements not working.
Fixed
ResultSet.setFetchDirection(FETCH_UNKNOWN).
Fixed issue when calling
Statement.setFetchSize() when using
arbitrary values.
Fixed incorrect conversion in
ResultSet.getLong().
Implemented ResultSet.updateBlob().
Removed duplicate code from
UpdatableResultSet (it can be inherited
from ResultSet, the extra code for each
method to handle updatability I thought might someday be
necessary has not been needed).
Fixed UnsupportedEncodingException thrown
when 鈥forcing鈥 a character encoding via
properties.
Fixed various non-ASCII character encoding issues.
Added driver property
useHostsInPrivileges. Defaults to
true. Affects whether or not
@hostname will be used in
DBMD.getColumn/TablePrivileges.
All DBMD result set columns describing
schemas now return NULL to be more
compliant with the behavior of other JDBC drivers for other
database systems (MySQL does not support schemas).
Added SSL support. See README for
information on how to use it.
Properly restore connection properties when autoReconnecting
or failing-over, including autoCommit
state, and isolation level.
Use SHOW CREATE TABLE when possible for
determining foreign key information for
DatabaseMetaData. Also allows cascade
options for DELETE information to be
returned.
Escape 0x5c character in strings for the
SJIS charset.
Fixed start position off-by-1 error in
Clob.getSubString().
Implemented Clob.truncate().
Implemented Clob.setString().
Implemented Clob.setAsciiStream().
Implemented Clob.setCharacterStream().
Added com.mysql.jdbc.MiniAdmin class,
which allows you to send shutdown command
to MySQL server. This is intended to be used when
鈥embedding鈥 Java and MySQL server together in
an end-user application.
Added connectTimeout parameter that
allows users of JDK-1.4 and newer to specify a maxium time
to wait to establish a connection.
Failover and autoReconnect work only when
the connection is in an autoCommit(false)
state, in order to stay transaction-safe.
Added queriesBeforeRetryMaster property
that specifies how many queries to issue when failed over
before attempting to reconnect to the master (defaults to
50).
Fixed DBMD.supportsResultSetConcurrency()
so that it returns true for
ResultSet.TYPE_SCROLL_INSENSITIVE and
ResultSet.CONCUR_READ_ONLY or
ResultSet.CONCUR_UPDATABLE.
Fixed ResultSet.isLast() for empty result
sets (should return false).
PreparedStatement now honors stream
lengths in setBinary/Ascii/Character Stream() unless you set
the connection property
useStreamLengthsInPrepStmts to
false.
Removed some not-needed temporary object creation by smarter
use of Strings in
EscapeProcessor,
Connection and
DatabaseMetaData classes.
Fixed ResultSet.getRow() off-by-one bug.
Fixed RowDataStatic.getAt() off-by-one
bug.
Added limited Clob functionality
(ResultSet.getClob(),
PreparedStatemtent.setClob(),
PreparedStatement.setObject(Clob).
Added socketTimeout parameter to URL.
Connection.isClosed() no longer
鈥pings鈥 the server.
Connection.close() issues
rollback() when
getAutoCommit() is
false.
Added paranoid parameter, which sanitizes
error messages by removing 鈥sensitive鈥
information from them (such as hostnames, ports, or
usernames), as well as clearing 鈥sensitive鈥
data structures when possible.
Fixed ResultSetMetaData.isSigned() for
TINYINT and BIGINT.
Charsets now automatically detected. Optimized code for single-byte character set conversion.
Implemented
ResultSet.getCharacterStream().
Added LOCAL TEMPORARY to table types in
DatabaseMetaData.getTableTypes().
Massive code clean-up to follow Java coding conventions (the time had come).
!!! LICENSE CHANGE !!! The
driver is now GPL. If you need non-GPL licenses, please
contact me <mark@mysql.com>.
JDBC-3.0 functionality including
Statement/PreparedStatement.getGeneratedKeys()
and ResultSet.getURL().
Performance enchancements: Driver is now 50鈥100% faster in most situations, and creates fewer temporary objects.
Repackaging: New driver name is
com.mysql.jdbc.Driver, old name still
works, though (the driver is now provided by MySQL-AB).
Better checking for closed connections in
Statement and
PreparedStatement.
Support for streaming (row-by-row) result sets (see
README) Thanks to Doron.
Support for large packets (new addition to MySQL-4.0
protocol), see README for more
information.
JDBC Compliance: Passes all tests besides stored procedure tests.
Fix and sort primary key names in
DBMetaData (SF bugs 582086 and 582086).
Float types now reported as
java.sql.Types.FLOAT (SF bug 579573).
ResultSet.getTimestamp() now works for
DATE types (SF bug 559134).
ResultSet.getDate/Time/Timestamp now
recognizes all forms of invalid values that have been set to
all zeros by MySQL (SF bug 586058).
Testsuite now uses Junit (which you can get from http://www.junit.org.
The driver now only works with JDK-1.2 or newer.
Added multi-host failover support (see
README).
General source-code cleanup.
Overall speed improvements via controlling transient object
creation in MysqlIO class when reading
packets.
Performance improvements in string handling and field metadata creation (lazily instantiated) contributed by Alex Twisleton-Wykeham-Fiennes.
More code cleanup.
PreparedStatement now releases resources
on .close(). (SF bug 553268)
Quoted identifiers not used if server version does not
support them. Also, if server started with
--ansi or
--sql-mode=ANSI_QUOTES,
鈥"鈥 will be used as an
identifier quote character, otherwise
鈥'鈥 will be used.
ResultSet.getDouble() now uses code built
into JDK to be more precise (but slower).
LogicalHandle.isClosed() calls through to
physical connection.
Added SQL profiling (to STDERR). Set
profileSql=true in your JDBC URL. See
README for more information.
Fixed typo for relaxAutoCommit parameter.
More code cleanup.
Fixed unicode chars being read incorrectly. (SF bug 541088)
Faster blob escaping for PrepStmt.
Added
set/getPortNumber() to
DataSource(s). (SF bug 548167)
Added setURL() to
MySQLXADataSource. (SF bug 546019)
PreparedStatement.toString() fixed. (SF
bug 534026)
ResultSetMetaData.getColumnClassName()
now implemented.
Rudimentary version of
Statement.getGeneratedKeys() from
JDBC-3.0 now implemented (you need to be using JDK-1.4 for
this to work, I believe).
DBMetaData.getIndexInfo() - bad PAGES
fixed. (SF BUG 542201)
General code cleanup.
Added getIdleFor() method to
Connection and
MysqlLogicalHandle.
Relaxed synchronization in all classes, should fix 520615 and 520393.
Added getTable/ColumnPrivileges() to DBMD
(fixes 484502).
Added new types to getTypeInfo(), fixed
existing types thanks to Al Davis and Kid Kalanon.
Added support for BIT types (51870) to
PreparedStatement.
Fixed getRow() bug (527165) in
ResultSet.
Fixes for ResultSet updatability in
PreparedStatement.
Fixed time zone off-by-1-hour bug in
PreparedStatement (538286, 528785).
ResultSet: Fixed updatability (values
being set to null if not updated).
DataSources - fixed
setUrl bug (511614, 525565), wrong
datasource class name (532816, 528767).
Added identifier quoting to all
DatabaseMetaData methods that need them
(should fix 518108).
Added support for YEAR type (533556).
ResultSet.insertRow() should now detect
auto_increment fields in most cases and use that value in
the new row. This detection will not work in multi-valued
keys, however, due to the fact that the MySQL protocol does
not return this information.
ResultSet.refreshRow() implemented.
Fixed testsuite.Traversal
afterLast() bug, thanks to Igor Lastric.
Fixed missing DELETE_RULE value in
DBMD.getImported/ExportedKeys() and
getCrossReference().
Full synchronization of Statement.java.
More changes to fix Unexpected end of input
stream errors when reading BLOB
values. This should be the last fix.
Fixed spurious Unexpected end of input
stream errors in MysqlIO (bug
507456).
Fixed null-pointer-exceptions when using
MysqlConnectionPoolDataSource with
Websphere 4 (bug 505839).
Ant build was corrupting included
jar files, fixed (bug 487669).
Fixed extra memory allocation in
MysqlIO.readPacket() (bug 488663).
Implementation of
DatabaseMetaData.getExported/ImportedKeys()
and getCrossReference().
Full synchronization on methods modifying instance and class-shared references, driver should be entirely thread-safe now (please let me know if you have problems).
DataSource implementations moved to
org.gjt.mm.mysql.jdbc2.optional package,
and (initial) implementations of
PooledConnectionDataSource and
XADataSource are in place (thanks to Todd
Wolff for the implementation and testing of
PooledConnectionDataSource with IBM
WebSphere 4).
Added detection of network connection being closed when reading packets (thanks to Todd Lizambri).
Fixed quoting error with escape processor (bug 486265).
Report batch update support through
DatabaseMetaData (bug 495101).
Fixed off-by-one-hour error in
PreparedStatement.setTimestamp() (bug
491577).
Removed concatenation support from driver (the
|| operator), as older versions of
VisualAge seem to be the only thing that use it, and it
conflicts with the logical || operator.
You will need to start mysqld with the
--ansi flag to use the
|| operator as concatenation (bug
491680).
Fixed casting bug in PreparedStatement
(bug 488663).
Batch updates now supported (thanks to some inspiration from Daniel Rall).
XADataSource/ConnectionPoolDataSource
code (experimental)
PreparedStatement.setAnyNumericType() now
handles positive exponents correctly (adds
+ so MySQL can understand it).
DatabaseMetaData.getPrimaryKeys() and
getBestRowIdentifier() are now more
robust in identifying primary keys (matches regardless of
case or abbreviation/full spelling of Primary
Key in Key_type column).
PreparedStatement.setCharacterStream()
now implemented
Fixed dangling socket problem when in high availability
(autoReconnect=true) mode, and finalizer
for Connection will close any dangling
sockets on GC.
Fixed ResultSetMetaData.getPrecision()
returning one less than actual on newer versions of MySQL.
ResultSet.getBlob() now returns
null if column value was
null.
Character sets read from database if
useUnicode=true and
characterEncoding is not set. (thanks to
Dmitry Vereshchagin)
Initial transaction isolation level read from database (if avaialable). (thanks to Dmitry Vereshchagin)
Fixed
DatabaseMetaData.supportsTransactions(),
and supportsTransactionIsolationLevel()
and getTypeInfo()
SQL_DATETIME_SUB and
SQL_DATA_TYPE fields not being readable.
Fixed PreparedStatement generating SQL
that would end up with syntax errors for some queries.
Fixed ResultSet.isAfterLast() always
returning false.
Fixed time zone issue in
PreparedStatement.setTimestamp(). (thanks
to Erik Olofsson)
Captialize type names when
captializeTypeNames=true is passed in URL
or properties (for WebObjects. (thanks to Anjo Krank)
Updatable result sets now correctly handle
NULL values in fields.
PreparedStatement.setDouble() now uses full-precision doubles (reverting a fix made earlier to truncate them).
PreparedStatement.setBoolean() will use 1/0 for values if your MySQL version is 3.21.23 or higher.
Fixed PreparedStatement parameter
checking.
Fixed case-sensitive column names in
ResultSet.java.
Fixed ResultSet.getBlob()
ArrayIndex out-of-bounds.
Fixed ResultSetMetaData.getColumnTypeName
for TEXT/BLOB.
Fixed ArrayIndexOutOfBounds when sending
large BLOB queries. (Max size packet was
not being set)
Added ISOLATION level support to
Connection.setIsolationLevel()
Fixed NPE on
PreparedStatement.executeUpdate() when
all columns have not been set.
Fixed data parsing of TIMESTAMP values
with 2-digit years.
Added Byte to
PreparedStatement.setObject().
ResultSet.getBoolean() now recognizes
-1 as true.
ResultSet has +/-Inf/inf support.
ResultSet.insertRow() works now, even if
not all columns are set (they will be set to
NULL).
DataBaseMetaData.getCrossReference() no
longer ArrayIndexOOB.
getObject() on
ResultSet correctly does
TINYINT->Byte and
SMALLINT->Short.
Implemented getBigDecimal() without scale
component for JDBC2.
Fixed composite key problem with updatable result sets.
Added detection of -/+INF for doubles.
Faster ASCII string operations.
Fixed incorrect detection of
MAX_ALLOWED_PACKET, so sending large
blobs should work now.
Fixed off-by-one error in java.sql.Blob
implementation code.
Added ultraDevHack URL parameter, set to
true to allow (broken) Macromedia
UltraDev to use the driver.
Fixed RSMD.isWritable() returning wrong
value. Thanks to Moritz Maass.
Cleaned up exception handling when driver connects.
Columns that are of type TEXT now return
as Strings when you use
getObject().
DatabaseMetaData.getPrimaryKeys() now
works correctly with respect to key_seq.
Thanks to Brian Slesinsky.
No escape processing is done on
PreparedStatements anymore per JDBC spec.
Fixed many JDBC-2.0 traversal, positioning bugs, especially with respect to empty result sets. Thanks to Ron Smits, Nick Brook, Cessar Garcia and Carlos Martinez.
Fixed some issues with updatability support in
ResultSet when using multiple primary
keys.
Fixes to ResultSet for insertRow() - Thanks to Cesar Garcia
Fix to Driver to recognize JDBC-2.0 by loading a JDBC-2.0 class, instead of relying on JDK version numbers. Thanks to John Baker.
Fixed ResultSet to return correct row numbers
Statement.getUpdateCount() now returns rows matched, instead of rows actually updated, which is more SQL-92 like.
10-29-99
Statement/PreparedStatement.getMoreResults() bug fixed. Thanks to Noel J. Bergman.
Added Short as a type to PreparedStatement.setObject(). Thanks to Jeff Crowder
Driver now automagically configures maximum/preferred packet sizes by querying server.
Autoreconnect code uses fast ping command if server supports it.
Fixed various bugs with respect to packet sizing when reading from the server and when alloc'ing to write to the server.
Now compiles under JDK-1.2. The driver supports both JDK-1.1 and JDK-1.2 at the same time through a core set of classes. The driver will load the appropriate interface classes at runtime by figuring out which JVM version you are using.
Fixes for result sets with all nulls in the first row. (Pointed out by Tim Endres)
Fixes to column numbers in SQLExceptions in ResultSet (Thanks to Blas Rodriguez Somoza)
The database no longer needs to specified to connect. (Thanks to Christian Motschke)
Better Documentation (in progress), in doc/mm.doc/book1.html
DBMD now allows null for a column name pattern (not in spec), which it changes to '%'.
DBMD now has correct types/lengths for getXXX().
ResultSet.getDate(), getTime(), and getTimestamp() fixes. (contributed by Alan Wilken)
EscapeProcessor now handles \{ \} and { or } inside quotes correctly. (thanks to Alik for some ideas on how to fix it)
Fixes to properties handling in Connection. (contributed by Juho Tikkala)
ResultSet.getObject() now returns null for NULL columns in the table, rather than bombing out. (thanks to Ben Grosman)
ResultSet.getObject() now returns Strings for types from MySQL that it doesn't know about. (Suggested by Chris Perdue)
Removed DataInput/Output streams, not needed, 1/2 number of method calls per IO operation.
Use default character encoding if one is not specified. This is a work-around for broken JVMs, because according to spec, EVERY JVM must support "ISO8859_1", but they don't.
Fixed Connection to use the platform character encoding instead of "ISO8859_1" if one isn't explicitly set. This fixes problems people were having loading the character- converter classes that didn't always exist (JVM bug). (thanks to Fritz Elfert for pointing out this problem)
Changed MysqlIO to re-use packets where possible to reduce memory usage.
Fixed escape-processor bugs pertaining to {} inside quotes.
Fixed character-set support for non-Javasoft JVMs (thanks to many people for pointing it out)
Fixed ResultSet.getBoolean() to recognize 'y' & 'n' as well as '1' & '0' as boolean flags. (thanks to Tim Pizey)
Fixed ResultSet.getTimestamp() to give better performance. (thanks to Richard Swift)
Fixed getByte() for numeric types. (thanks to Ray Bellis)
Fixed DatabaseMetaData.getTypeInfo() for DATE type. (thanks to Paul Johnston)
Fixed EscapeProcessor for "fn" calls. (thanks to Piyush Shah at locomotive.org)
Fixed EscapeProcessor to not do extraneous work if there are no escape codes. (thanks to Ryan Gustafson)
Fixed Driver to parse URLs of the form "jdbc:mysql://host:port" (thanks to Richard Lobb)
Fixed Timestamps for PreparedStatements
Fixed null pointer exceptions in RSMD and RS
Re-compiled with jikes for valid class files (thanks ms!)
Fixed escape processor to deal with unmatched { and } (thanks to Craig Coles)
Fixed escape processor to create more portable (between DATETIME and TIMESTAMP types) representations so that it will work with BETWEEN clauses. (thanks to Craig Longman)
MysqlIO.quit() now closes the socket connection. Before, after many failed connections some OS's would run out of file descriptors. (thanks to Michael Brinkman)
Fixed NullPointerException in Driver.getPropertyInfo. (thanks to Dave Potts)
Fixes to MysqlDefs to allow all *text fields to be retrieved as Strings. (thanks to Chris at Leverage)
Fixed setDouble in PreparedStatement for large numbers to avoid sending scientific notation to the database. (thanks to J.S. Ferguson)
Fixed getScale() and getPrecision() in RSMD. (contrib'd by James Klicman)
Fixed getObject() when field was DECIMAL or NUMERIC (thanks to Bert Hobbs)
DBMD.getTables() bombed when passed a null table-name pattern. Fixed. (thanks to Richard Lobb)
Added check for "client not authorized" errors during connect. (thanks to Hannes Wallnoefer)
Result set rows are now byte arrays. Blobs and Unicode work bidriectonally now. The useUnicode and encoding options are implemented now.
Fixes to PreparedStatement to send binary set by setXXXStream to be sent untouched to the MySQL server.
Fixes to getDriverPropertyInfo().
Changed all ResultSet fields to Strings, this should allow Unicode to work, but your JVM must be able to convert between the character sets. This should also make reading data from the server be a bit quicker, because there is now no conversion from StringBuffer to String.
Changed PreparedStatement.streamToString() to be more efficient (code from Uwe Schaefer).
URL parsing is more robust (throws SQL exceptions on errors rather than NullPointerExceptions)
PreparedStatement now can convert Strings to Time/Date values via setObject() (code from Robert Currey).
IO no longer hangs in Buffer.readInt(), that bug was introduced in 1.1d when changing to all byte-arrays for result sets. (Pointed out by Samo Login)
Fixes to DatabaseMetaData to allow both IBM VA and J-Builder to work. Let me know how it goes. (thanks to Jac Kersing)
Fix to ResultSet.getBoolean() for NULL strings (thanks to Barry Lagerweij)
Beginning of code cleanup, and formatting. Getting ready to branch this off to a parallel JDBC-2.0 source tree.
Added "final" modifier to critical sections in MysqlIO and Buffer to allow compiler to inline methods for speed.
9-29-98
If object references passed to setXXX() in PreparedStatement are null, setNull() is automatically called for you. (Thanks for the suggestion goes to Erik Ostrom)
setObject() in PreparedStatement will now attempt to write a serialized representation of the object to the database for objects of Types.OTHER and objects of unknown type.
Util now has a static method readObject() which given a ResultSet and a column index will re-instantiate an object serialized in the above manner.
Got rid of "ugly hack" in MysqlIO.nextRow(). Rather than catch an exception, Buffer.isLastDataPacket() was fixed.
Connection.getCatalog() and Connection.setCatalog() should work now.
Statement.setMaxRows() works, as well as setting by property maxRows. Statement.setMaxRows() overrides maxRows set via properties or url parameters.
Automatic re-connection is available. Because it has to "ping" the database before each query, it is turned off by default. To use it, pass in "autoReconnect=true" in the connection URL. You may also change the number of reconnect tries, and the initial timeout value via "maxReconnects=n" (default 3) and "initialTimeout=n" (seconds, default 2) parameters. The timeout is an exponential backoff type of timeout; for example, if you have initial timeout of 2 seconds, and maxReconnects of 3, then the driver will timeout 2 seconds, 4 seconds, then 16 seconds between each re-connection attempt.
Fixed handling of blob data in Buffer.java
Fixed bug with authentication packet being sized too small.
The JDBC Driver is now under the LPGL
8-14-98
Fixed Buffer.readLenString() to correctly read data for BLOBS.
Fixed PreparedStatement.stringToStream to correctly read data for BLOBS.
Fixed PreparedStatement.setDate() to not add a day. (above fixes thanks to Vincent Partington)
Added URL parameter parsing (?user=... and so forth).
Big news! New package name. Tim Endres from ICE Engineering is starting a new source tree for GNU GPL'd Java software. He's graciously given me the org.gjt.mm package directory to use, so now the driver is in the org.gjt.mm.mysql package scheme. I'm "legal" now. Look for more information on Tim's project soon.
Now using dynamically sized packets to reduce memory usage when sending commands to the DB.
Small fixes to getTypeInfo() for parameters, and so forth.
DatabaseMetaData is now fully implemented. Let me know if these drivers work with the various IDEs out there. I've heard that they're working with JBuilder right now.
Added JavaDoc documentation to the package.
Package now available in .zip or .tar.gz.
Implemented getTypeInfo(). Connection.rollback() now throws an SQLException per the JDBC spec.
Added PreparedStatement that supports all JDBC API methods for PreparedStatement including InputStreams. Please check this out and let me know if anything is broken.
Fixed a bug in ResultSet that would break some queries that only returned 1 row.
Fixed bugs in DatabaseMetaData.getTables(), DatabaseMetaData.getColumns() and DatabaseMetaData.getCatalogs().
Added functionality to Statement that allows executeUpdate() to store values for IDs that are automatically generated for AUTO_INCREMENT fields. Basically, after an executeUpdate(), look at the SQLWarnings for warnings like "LAST_INSERTED_ID = 'some number', COMMAND = 'your SQL query'". If you are using AUTO_INCREMENT fields in your tables and are executing a lot of executeUpdate()s on one Statement, be sure to clearWarnings() every so often to save memory.
Split MysqlIO and Buffer to separate classes. Some ClassLoaders gave an IllegalAccess error for some fields in those two classes. Now mm.mysql works in applets and all classloaders. Thanks to Joe Ennis <jce@mail.boone.com> for pointing out the problem and working on a fix with me.
Fixed DatabaseMetadata problems in getColumns() and bug in switch statement in the Field constructor. Thanks to Costin Manolache <costin@tdiinc.com> for pointing these out.
Incorporated efficiency changes from Richard Swift
<Richard.Swift@kanatek.ca> in
MysqlIO.java and
ResultSet.java:
We're now 15% faster than gwe's driver.
Started working on DatabaseMetaData.
The following methods are implemented:
getTables()
getTableTypes()
getColumns
getCatalogs()