Go to the first, previous, next, last section, table of contents.
This appendix lists the changes from version to version in the MySQL
source code.
We are now working actively on MySQL 4.1 and 5.0, and will provide
only critical bug fixes for MySQL 4.0 and MySQL 3.23. We update this section
as we add new features, so that everybody can follow the development.
Our TODO section contains what further plans we have for 4.1 & 5.0.
See section 1.6 MySQL and the Future (The TODO).
Note that we tend to update the manual at the same time we make changes to
MySQL. If you find a version listed here that you can't
find on the MySQL download page (http://www.mysql.com/downloads/),
this means that the version has not yet been released!
The date mentioned with a release version is the date of the last BitKeeper
ChangeSet that this particular release has been based on, not the date when
the packages have been made available. The binaries are usually made
available a few days after the date of the tagged ChangeSet - building and
testing all packages takes some time.
The following changelog shows what has already been done in the 5.0 tree:
-
Basic support for stored procedures (SQL:2003 style).
See section 19 Stored Procedures and Functions.
-
Added
SELECT INTO list_of_vars, which can be of mixed,
that is, global and local type.
See section 19.1.6.3 SELECT ... INTO Statement.
-
Removed the update log. It is fully replaced by the binary log.
If the MySQL server is started with
--log-update, it will be
translated to --log-bin (or ignored if the server is explicitly
started with --log-bin), and a warning message will be written to
the error log. Setting SQL_LOG_UPDATE will silently set
SQL_LOG_BIN instead (or do nothing if the server is explicitly
started with --log-bin).
-
User variable names are now case insensitive: If you do
SET
@a=10; then SELECT @A; will now return 10.
Case sensitivity of a variable's value depends on the collation of the value.
For a full list of changes, please refer to the changelog sections for
each individual 5.0.x release.
Functionality added or changed:
-
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 binlog cache is allocated
for connections (this should save binlog_cache_size bytes of memory (32
kilobytes by default) for every connection).
Bugs fixed:
-
Strange results with index (x, y) ... WHERE x=val_1 AND y>=val_2 ORDER BY pk; (Bug #3155)
-
Subquery and order by (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 the query (submitted through
mysql_real_query() or mysql_prepare()) was terminated by garbage
characters (which can happen if you pass a wrong length parameter to
mysql_real_query() or mysql_prepare()); 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 which 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 '%', like it is already 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 binlog 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 was it does when reading a local binary log. (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)
-
Fixed
mysqlbinlog not to forget to print a USE statement
under rare circumstances where the binary log contained a LOAD DATA
INFILE statement. (Bug #3415)
-
Fixed a memory corruption when replicating a
LOAD DATA INFILE when the
master had 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)
Functionality added or changed:
-
The
KILL statement now takes CONNECTION and QUERY
variants. 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 DATE_ADD() and DATE_SUB() functions.
-
New binary log format that enables replication of those session variables:
SQL_MODE, SQL_AUTO_IS_NULL, FOREIGN_KEY_CHECKS
(that one was already replicated since 4.0.14 but here it's done more
efficiently: takes less space in the binary logs), UNIQUE_CHECKS.
Other variables (like character sets, SQL_SELECT_LIMIT...) will be
replicated in next 5.0.x releases.
-
Implemented
Merge Index optimization for OR clauses.
See section 7.2.5 How MySQL Optimizes OR Clauses.
-
Basic support for stored procedures (SQL:2003 style).
See section 19 Stored Procedures and Functions.
-
Added
SELECT INTO list_of_vars, which can be of mixed,
that is, global and local type.
See section 19.1.6.3 SELECT ... INTO Statement.
-
Easier replication upgrade (5.0.0 masters can read older binary logs,
5.0.0 slaves can read older relay logs; see
section 6.5 Replication Compatibility Between MySQL Versions for more details). The format of the binary log and
relay log is changed compared to the one of MySQL 4.1 and older.
-
Important note:
If you upgrade to InnoDB-4.1.1 or higher, you cannot downgrade to a version
lower than 4.1.1 any more! That is because earlier versions of
InnoDB are
not aware of multiple tablespaces.
Bugs fixed:
Version 4.1 of the MySQL server includes many enhancements and new features.
Binaries for this version are available for download at
http://www.mysql.com/downloads/mysql-4.1.html.
-
Subqueries and derived tables (unnamed views).
See section 14.1.8 Subquery Syntax.
-
INSERT ... ON DUPLICATE KEY UPDATE ... syntax. This allows you to
UPDATE an existing row if the insert would cause a duplicate value
in a PRIMARY or UNIQUE key. (REPLACE allows you to
overwrite an existing row, which is something entirely different.)
See section 14.1.4 INSERT Syntax.
-
A newly designed
GROUP_CONCAT() aggregate function.
See section 13.9 Functions and Modifiers for Use with GROUP BY Clauses.
-
Extensive Unicode (UTF8) support.
-
Character sets can be defined per column, table, and database.
-
New key cache for
MyISAM tables with many tunable parameters. You can
have multiple key caches, preload index into caches for batches...
-
BTREE index on HEAP tables.
-
Support for OpenGIS spatial types (geographical data).
See section 18 Spatial Extensions in MySQL.
-
SHOW WARNINGS shows warnings for the last command.
See section 14.5.3.20 SHOW WARNINGS Syntax.
-
Faster binary protocol with prepared statements and parameter binding.
See section 20.2.4 C API Prepared Statements.
-
You can now issue multiple statements with a single C API call and
then read the results in one go.
See section 20.2.8 C API Handling of Multiple Query Execution.
-
Create Table:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] table2 LIKE
table1.
-
Server based
HELP command that can be used in the mysql
command line client (and other clients) to get help for SQL statements.
For a full list of changes, please refer to the changelog sections for
each individual 4.1.x release.
Functionality added or changed:
-
Warning: Incompatible change!
String comparison now works according to the SQL standard. Because we have
that
'a' = 'a ' then from it must follow that 'a' > 'a\t'.
(The latter was not the case before 4.1.2.) To implement it, we had to
change how storage engines compare strings internally. As a side effect, if
you have a table where a CHAR or VARCHAR column in some row
has a value with the last character less than ASCII(32) you will have
to repair this table. CHECK TABLES will tell you if this problem
exists. (Bug #3152)
-
Added support for
DEFAULT CURRENT_TIMESTAMP and for ON UPDATE
CURRENT_TIMESTAMP specifications for TIMESTAMP columns. Now you can
explicitly say that a TIMESTAMP column should be set automatically
to the current timestamp for INSERT and/or UPDATE statements, or
even prevent the column from updating automatically. Only one column with such
an auto-set
feature per table is supported. TIMESTAMP columns created with earlier
versions of MySQL behave as before. Behavior of TIMESTAMP columns that
were created without explicit specification of default/on as earlier
depends on its position in table: If it is the first TIMESTAMP column, it will
be treated as having been specified as TIMESTAMP DEFAULT
CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
In other cases, it would be treated as a TIMESTAMP DEFAULT 0 column.
NOW is supported as an alias for CURRENT_TIMESTAMP.
Warning: Incompatible change! Unlike in previous versions, explicit
specification of default values for TIMESTAMP column is never ignored
and turns off the auto-set feature (unless you have CURRENT_TIMESTAMP as
the default).
-
Warning: Incompatible change!
Renamed prepared statements C API functions:
| Old Name | New Name
|
mysql_bind_param() | mysql_stmt_bind_param()
|
mysql_bind_result() | mysql_stmt_bind_result()
|
mysql_prepare() | mysql_stmt_prepare()
|
mysql_execute() | mysql_stmt_execute()
|
mysql_fetch() | mysql_stmt_fetch()
|
mysql_fetch_column() | mysql_stmt_fetch_column()
|
mysql_param_count() | mysql_stmt_param_count()
|
mysql_param_result() | mysql_stmt_param_metadata()
|
mysql_get_metadata() | mysql_stmt_result_metadata()
|
mysql_send_long_data() | mysql_stmt_send_long_data()
|
Now all functions that operate with a MYSQL_STMT structure begin with
the prefix mysql_stmt_.
-
Warning: Incompatible change!
The signature of the
mysql_stmt_prepare() function was changed to
int mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
unsigned long length).
To create a MYSQL_STMT handle, you
should use the mysql_stmt_init() function.
-
SHOW GRANTS with no FOR clause or with FOR
CURRENT_USER() shows the privileges for the current session.
-
The improved character set support introduced in MySQL 4.1.0 for the
MyISAM and HEAP storage engines is now available for
InnoDB as well.
-
A key name of ``Primary'' is no longer allowed. (Bug #856)
-
MySQL now issues a warning when a
SET or ENUM column with
duplicate values in the list is created. (Bug #1427)
-
Now
SQL_SELECT_LIMIT variable has no influence on subqueries.
(Bug #2600)
-
UNHEX() function implemented.
See section 13.3 String Functions.
-
History in command line client does not store multiple copies of identical queries that are run consecutively.
-
Multi-line queries in the command line client now are stored as a single line.
-
UUID() function implemented. Note that it does not work with replication
yet.
See section 13.8.4 Miscellaneous Functions.
-
Prepared statements with all types of subqueries fixed.
-
MyISAM tables now support keys up to 1000 bytes long.
-
If you try to create a key with a key part that is too long, and it is safe
to auto-truncate it to a smaller length, MySQL now does so. A warning is
generated, rather than an error.
-
The
ft_boolean_syntax variable now can be changed while the server is
running.
See section 5.2.3 Server System Variables.
-
REVOKE ALL PRIVILEGES, GRANT FROM user_list
is changed to a more consistent
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user_list. (Bug #2642)
-
Internal string-to-number conversion now supports only SQL:2003 compatible
syntax for numbers. In particular,
'0x10'+0 will not work anymore.
(Actually, it worked only on some systems before, such as Linux. It
did not work on others, such as FreeBSD or Solaris. Making these queries
OS-independent was the goal of this change). Use CONV() to convert
hexadecimal numbers to decimal. E.g. CONV(MID('0x10',3),16,10)+0.
-
mysqlhotcopy now works on NetWare.
-
ALTER TABLE DROP PRIMARY KEY no longer drops the first UNIQUE
index if there is no primary index. (Bug #2361)
-
Added
latin1_spanish_ci (Modern Spanish) collation for the latin1
character set.
-
Added the
ENGINE table option as a synonym for the TYPE option
for CREATE TABLE and ALTER TABLE.
-
Added the
--default-storage-engine server option as a synonym for
--default-table-type.
-
Added the
storage_engine system variable as a synonym for
table_type.
-
Added
init_connect and init_slave server variables.
The values should be SQL statements to be executed when each client
connects or each time a slave's SQL thread starts, respectively.
-
C API enhancement:
SERVER_QUERY_NO_INDEX_USED and
SERVER_QUERY_NO_GOOD_INDEX_USED flags are now set
in the server_status field of the MYSQL structure.
It is these flags that make the query to be logged as slow
if mysqld was started with --log-slow-queries
--log-queries-not-using-indexes.
-
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 or SET
SQL_LOG_UPDATE 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 binlog cache is allocated
for connections (this should save binlog_cache_size bytes of memory (32
kilobytes by default) for every connection).
-
Added
Binlog_cache_use and Binlog_cache_disk_use status
variables that count the number of transactions that used transaction binary
log and that had to flush this temporary binary log to disk instead of using
only buffer in memory. They can be used for tuning the
binlog_cache_size system variable.
Bugs fixed:
-
Fixed crash in prepared statements when subquery in the
FROM
clause with parameter used. (Bug #3020)
-
Fixed unknown error when negative value bind to unsigned. (Bug #3223)
-
Fixed aggregate function in prepared statements. (Bug #3360)
-
Incorrect error message when wrong table used in
multi-delete
statement in prepared statements. (Bug #3411)
-
Requiring
UPDATE privilege for tables which will not be updated in
multi-update query in prepared statements.
-
Fixed prepared statement support for
INSERT, REPLACE,
CREATE, DELETE, SELECT, DO, SET and
SHOW. All other commands are prohibited via prepared statement
interface. (Bug ##3398, Bug #3406, Bug #2811)
-
Fixed a lot of bugs in
GROUP_CONCAT(). (Bug #2695, Bug #3381, Bug #3319)
-
Added optimization that allows for prepared statements using a large number of
tables or tables with a large number of columns to be re-executed significantly
faster. (Bug #2050)
-
Fixed bug that caused execution of prepared statements to fail then table
that this statement were using left table cache. This bug showed up as if
this prepared statement used random garbage as column names or as server
crashes. (Bug #3307)
-
Fixed a problem resulting from setting the
character_set_results
variable to NULL.
(Bug #3296)
-
Fixed query cache statistics.
-
Fixed bug in
ANALYZE TABLE on a BDB table inside a transaction
that hangs server thread. (Bug #2342)
-
Fixed a symlink vulnerability in `mysqlbug' script. (Bug #3284)
-
Fixed a bug in parallel repair
(
myisamchk -p, myisam_repair_threads);
sometimes the repair process failed to repair a table. (Bug #1334)
-
A query that uses both
UNION [DISTINCT] and UNION ALL
now works correctly. (Bug #1428)
-
Table default character set affects
LONGBLOB columns. (Bug #2821)
-
CONCAT_WS() makes the server die in case of illegal mix of collations. (Bug #3087)
-
UTF8 charset breaks joins with mixed column/string constant. (Bug #2959)
-
Fixed
DROP DATABASE to report number of tables deleted.
-
Fixed memory leak in the client library when statement handle was freed
on closed connection (call to
mysql_stmt_close after
mysql_close). (Bug #3073)
-
Fixed server segfaults when processing malformed prepared statements
commands. (Bug #2795, Bug #2274)
-
Fixed using subqueries with
OR and AND functions. (Bug #2838)
-
Fixed comparison of tables/database names with
--lower_case_table_names option. (Bug #2880)
-
Removed try to check
NULL if index built on column where NULL
is impossible in IN subquery optimization. (Bug #2393)
-
Fixed incorrect parsing of subqueries in the
FROM clause. (Bug #2421)
-
Fixed processing of
RAND() in subqueries with static tables. (bug #2645)
-
Fixed bug with quoting of table names in
mysqldump for
various values of sql_mode of server. (Bug #2591)
-
Fixed bug with storing values that are out of range for
DOUBLE and
FLOAT columns.
(Bug #2082)
-
Fixed bug with compiling
--with-pstack with binutils 2.13.90. (Bug #1661)
-
Fixed a bug in the
GRANT system. When a password was assigned to an
account at the global level and then privileges were granted at the database
level (without specifying any password), the existing password was replaced
temporarily in memory until the next FLUSH PRIVILEGES operation or
the server was restarted. (Bug #2953)
-
Fixed a bug in full-text search on multi-byte character set (such as UTF8)
that appeared when a search word was shorter than a matching word from
the index (for example, searching for ``Uppsala'' when table data contain
``Uppsåla''). (Bug #3011)
-
Fixed a bug that made
Max_used_connections to be less than
the actual maximum number of connections in use simultaneously.
-
Fixed calculation of
Index_length in HEAP table status for
BTREE indexes. (Bug #2719)
-
Fixed
mysql_stmt_affected_rows() call to always return number of rows
affected by given statement. (Bug #2247)
-
Fixed crash in
MATCH ... AGAINST() on a phrase search operator with
a missing closing double quote. (Bug #2708)
-
Fixed output of
mysqldump --tab. (Bug #2705)
-
Fix for a bug in
UNION operations that prevented proper handling of
NULL columns. This happened only if a column in the first
SELECT node was NOT NULL. (Bug #2508)
-
Fix for a bug in
UNION operations with InnoDB storage engine,
when some columns from one table where used in one SELECT statement and
some were used in another SELECT statement. (Bug #2552)
-
Fixed a few years old bug in the range optimizer that
caused a segmentation fault on some very rare queries. (Bug #2698)
-
Fixed bug with
SHOW CREATE TABLE ... which didn't properly double
quotes. (Bug #2593)
-
Queries with subqueries in
FROM clause locks all tables at once for now.
This also fixed bugs in EXPLAIN of subqueries
in FROM output. (Bug #2120)
-
Fixed bug with
mysqldump not quoting ``tricky'' names correctly.
(Bug #2592)
-
Fix for a bug that prevented table / column privileges from
being loaded on startup. (Bug #2546)
-
Fixed bug in replication with
CREATE TABLE ... LIKE ... that resulted
in a statement not being written to the binary log. (Bug #2557)
-
Fixed memory leak in
INSERT ... ON DUPLICATE KEY UPDATE ....
(Bug #2438)
-
Fixed bug in the parser, making the syntax
CONVERT(expression,type)
legal again.
-
Fixed parsing of short-form IP addresses in
INET_ATON(). (Bug #2310)
-
Fixed a bug in
CREATE ... SELECT that sometimes caused a
string column with a multi-byte character set (such as utf8) to have
insufficient length to hold the data.
-
Fixed a rare table corruption on adding data (
INSERT, REPLACE,
UPDATE, etc. but not DELETE) to a FULLTEXT index.
(Bug #2417)
-
Compile the
MySQL-client RPM package against libreadline instead
of libedit. (Bug #2289)
-
Fix for a crashing bug that was caused by not setting
vio_timeout() virtual function for all protocols. This bug occurred on
Windows. (Bug #2025)
-
Fix for a bug that caused
mysql client program to erroneously
cache the value of the current database. (Bug #2025)
-
Fix for a bug that caused client/server communication to be
broken when
mysql_set_server_option() or
mysql_get_server_option() were invoked.
(Bug #2207)
-
Fix for a bug that caused wong results when
CAST() was
applied on NULL to signed or unsigned integer column.
(Bug #2219)
-
Fix for a crashing bug that occurred in the
mysql client program when
database name was longer then expected.
(Bug #2221)
-
Fixed a bug in
CHECK TABLE that occasionally resulted in
spurious "Found key at page ... that points to record outside
datafile" error on a table with a FULLTEXT index. (Bug #2190)
-
Fixed bug in
GRANT with table-level privilege handling. (Bug #2178)
-
Fixed bug in
ORDER BY on a small column. (Bug #2147)
-
Fixed a bug with the
INTERVAL() function when 8 or more
comparison arguments are provided. (Bug #1561)
-
Packaging:
Fixed a bug in the Mac OS PKG
postinstall script
(mysql_install_db was called with an obsolete argument).
-
Packaging:
Added missing file `mysql_create_system_tables' to the server RPM
package. This bug was fixed for the 4.1.1 RPMs by updating the MySQL-server
RPM from
MySQL-server-4.1.1-0 to MySQL-server-4.1.1-1. The
other RPMs were not affected by this change.
-
Fixed a bug in `myisamchk' and
CHECK TABLE that sometimes
resulted in a spurious error Found key at page ... that points to record
outside datafile for a table with a FULLTEXT index. (Bug #1977)
-
Fixed a hang in full-text indexing of strings in multi-byte (all besides
utf8) charsets. (Bug #2065)
-
Fixed a crash in full-text indexing of UTF8 data. (Bug #2033)
-
Replication:
a rare race condition in the slave SQL thread that could lead to an
incorrect complaint that the relay log is corrupted. (Bug #2011)
-
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)
-
Replication:
in the slave SQL thread, a multiple-table
UPDATE could produce an
incorrect complaint that some record was not found in one table, if the
UPDATE was preceded by a INSERT ... SELECT. (Bug #1701)
-
Replication: sometimes the master gets a non-fatal error during the execution
of a statement but finally the statements succeeds (for example, a write to a
MyISAM table first receives "no space left on device" but is able to finally
complete, see section A.4.3 How MySQL Handles a Full Disk); the bug was that the master forgot to reset the
error code to 0 after success, so the error code got into its binary log, thus
making the slave giving false alarms like "did not get the same error as on
master". (Bug #2083)
-
Removed a misleading "check permissions on master.info" from a replication
error message, because the cause of the problem could be different from
permissions. (Bug #2121)
-
Fixed a crash when the replication slave was unable to create the first relay
log. (Bug #2145)
-
ALTER DATABASE caused the client to hang if the database did not
exist. (Bug #2333)
-
Multiple-table
DELETE statements were never replicated by the slave if
there were any replicate-*-table options. (Bug #2527)
-
Fixed bug in
ALTER TABLE RENAME, when rename to the table with
the same name in another database silently dropped destination table if
it existed. (Bug #2628)
-
The MySQL server did not report any error if the query (submitted through
mysql_real_query() or mysql_prepare()) was terminated by garbage
characters (which can happen if you pass a wrong length parameter to
mysql_real_query() or mysql_prepare()); the result was that the
garbage characters were written into the binary log. (Bug #2703)
-
Fixed bug in client library which caused
mysql_fetch and
mysql_stmt_store_result() to hang if they were called without
prior call of mysql_execute(). Now they give an error instead.
(Bug #2248)
-
Made clearer the error message which 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 '%', like it is already 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 was it does when reading a local binary log. (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)
-
Fixed the
Exec_master_log_pos column and its disk image in the
`relay-log.info' file to be correct if the master had version 3.23. (The
value was too big by six bytes.) This bug does not exist in MySQL 5.0.
(Bug #3400)
-
Fixed
mysqlbinlog not to forget to print a USE statement
under rare circumstances where the binary log contained a LOAD DATA
INFILE statement. (Bug #3415)
-
Fixed a memory corruption when replicating a
LOAD DATA INFILE when the
master had version 3.23. Some smaller problems remain in this setup,
See section 6.7 Replication Features and Known Problems. (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)
This release includes all fixes in MySQL 4.0.16 and most of the fixes
in MySQL 4.0.17.
Functionality added or changed:
-
New
CHECKSUM TABLE statement for reporting table checksum values.
-
Added
character_set_client, character_set_connection,
character_set_database, character_set_results,
character_set_server, character_set_system,
collation_connection, collation_database, and
collation_server system variables to provide information about
character sets and collations.
-
It is now possible to create multiple key caches, assign table indexes to
particular caches, and to preload indexes into caches.
See section 14.5.4.1
CACHE INDEX Syntax.
See section 14.5.4.4 LOAD INDEX INTO CACHE Syntax.
Structured system
variables are introduced as a means of grouping related key cache parameters.
See section 10.4.1 Structured System Variables.
-
New
COERCIBILITY() function to return the collation coercibility of a
string.
-
The
--quote-names option for mysqldump now is enabled
by default.
-
mysqldump now includes a statement in the dump output to set
FOREIGN_KEY_CHECKS to 0 to avoid problems with tables having to be
reloaded in a particular order when the dump is reloaded. The existing
FOREIGN_KEY_CHECKS value is saved and restored.
-
Important note: If you upgrade to
InnoDB-4.1.1 or higher,
you cannot downgrade to a version lower than 4.1.1
any more! That is because earlier versions of InnoDB are not aware of
multiple tablespaces.
-
One can revoke all privileges from a user with
REVOKE ALL PRIVILEGES, GRANT FROM user_list.
-
Added
IGNORE option for DELETE statement.
-
The MySQL source distribution now also includes the MySQL Internals
Manual `internals.texi'.
-
Added
mysql_set_server_option() C API client function to allow multiple
statement handling in the server to be enabled or disabled.
-
The
mysql_next_result() C API function now returns -1 if there
are no more result sets.
-
Renamed
CLIENT_MULTI_QUERIES connect option flag to
CLIENT_MULTI_STATEMENTS. To allow for a transition period, the old
option will continue to be recognized for a while.
-
Require
DEFAULT before table and database default character set.
This enables us to use ALTER TABLE tbl_name ... CHARACTER SET=...
to change the character set for all CHAR, VARCHAR, and
TEXT columns in a table.
-
Added
MATCH ... AGAINST( ... WITH QUERY EXPANSION) and the
ft_query_expansion_limit server variable.
-
Removed unused
ft_max_word_len_for_sort server variable.
-
Full-text search now supports multi-byte character sets and the Unicode
utf8 character set. (The Unicode ucs2 character set is not
yet supported.)
-
Phrase search in
MATCH ... AGAINST ( ... IN BOOLEAN MODE) no longer
matches partial words.
-
Added aggregate function
BIT_XOR() for bitwise XOR operations.
-
Replication over SSL now works.
-
The
START SLAVE statement now supports an UNTIL clause for
specifying that the slave SQL thread should be started but run only until it
reaches a given position in the master's binary logs or in the slave's relay logs.
-
Produce warnings even for single-row
INSERT statements, not just for
multiple-row INSERT statements. Previously, it was necessary to set
SQL_WARNINGS=1 to generate warnings for single-row statements.
-
Added
delimiter (\d) command to the mysql command-line
client for changing the statement delimiter (terminator).
The default delimiter is semicolon.
-
CHAR, VARCHAR, and TEXT columns now have lengths measured
in characters rather than in bytes.
The character size depends on the column's character set.
This means, for example, that a CHAR(n) column
for a multi-byte character set will take more storage than before.
Similarly, index values on such columns are measured in characters, not bytes.
-
LIMIT no longer accepts negative arguments
(they used to be treated as very big positive numbers before).
-
The
DATABASE() function now returns NULL rather than the empty
string if there is no database selected.
-
Added
--sql-mode=NO_AUTO_VALUE_ON_ZERO option to suppress the usual
behavior of generating the next sequence number when zero is stored in
an AUTO_INCREMENT column. With this mode enabled, zero is stored as
zero; only storing NULL generates a sequence number.
-
Warning: Incompatible change!
Client authentication now is based on 41-byte passwords in the
user table, not 45-byte passwords as in 4.1.0.
Any 45-byte passwords created for 4.1.0 must be reset after running the
mysql_fix_privilege_tables script.
-
Added
secure_auth global server system variable and --secure-auth
server option that disallow authentication for accounts that have old
(pre-4.1.1) passwords.
-
Added
--secure-auth option to mysql command-line client. If this
option is set, the client refuses to send passwords in old (pre-4.1.1) format.
-
Warning: Incompatible change!
Renamed the C API
mysql_prepare_result() function to
mysql_get_metadata() as the old name was confusing.
-
Added
DROP USER 'username'@'hostname' statement to drop an account
that has no privileges.
-
The interface to aggregated UDF functions has changed a bit. You must now
declare a
xxx_clear() function for each aggregate function XXX().
-
Added new
ADDTIME(), DATE(), DATEDIFF(), LAST_DAY(),
MAKEDATE(), MAKETIME(), MICROSECOND(), SUBTIME(),
TIME(), TIMEDIFF(), TIMESTAMP(), UTC_DATE(),
UTC_TIME(), UTC_TIMESTAMP(), and WEEKOFYEAR()
functions.
-
Added new syntax for
ADDDATE() and SUBDATE().
The second argument now may be a number representing the number of days to
be added to or subtracted from the first date argument.
-
Added new
type values DAY_MICROSECOND,
HOUR_MICROSECOND, MINUTE_MICROSECOND,
SECOND_MICROSECOND, and MICROSECOND
for DATE_ADD(), DATE_SUB(), and EXTRACT().
-
Added new
%f microseconds format specifier for DATE_FORMAT() and
TIME_FORMAT().
-
All queries in which at least one
SELECT does not use indexes properly
now are written to the slow query log when long log format is used.
-
It is now possible to create a
MERGE table from MyISAM tables in
different databases. Formerly, all the MyISAM tables had to be in the
same database, and the MERGE table had to be created in that database
as well.
-
Added new
COMPRESS(), UNCOMPRESS(), and
UNCOMPRESSED_LENGTH() functions.
-
When using
SET sql_mode='mode' for a complex mode (like ANSI), we
now update the sql_mode variable to include all the individual options
implied by the complex mode.
-
Added the OLAP (On-Line Analytical Processing) function
ROLLUP, which
provides summary rows for each GROUP BY level.
-
Added
SQLSTATE codes for all server errors.
-
Added
mysql_sqlstate() and mysql_stmt_sqlstate() C API client
functions that return the SQLSTATE error code for the last error.
-
TIME columns with hour values greater than 24 were returned incorrectly
to the client.
-
ANALYZE, OPTIMIZE, REPAIR, and FLUSH statements
are now stored in the binary log and thus replicated to slaves.
This logging does not occur if the optional NO_WRITE_TO_BINLOG keyword
(or its alias LOCAL) is given. Exceptions are that
FLUSH LOGS, FLUSH MASTER, FLUSH SLAVE, and
FLUSH TABLES WITH READ LOCK are not logged in any case.
For a syntax example, see section 14.5.4.2 FLUSH Syntax.
-
New global system variable
relay_log_purge to enable or disable automatic
relay log purging.
-
LOAD DATA now produces warnings that can be fetched with
SHOW WARNINGS.
-
Added support for syntax
CREATE TABLE table2 (LIKE table1)
that creates an empty table table2 with a definition that is
exactly the same as table1, including any indexes.
-
CREATE TABLE tbl_name (...) TYPE=storage_engine now generates a
warning if the named storage engine is not available. The table is still
created as a MyISAM table, as before.
-
Most subqueries are now much faster than before.
-
Added
PURGE BINARY LOGS as an alias for PURGE MASTER LOGS.
-
Disabled the
PURGE LOGS statement that was added in in version 4.1.0.
The statement now should be issued as PURGE MASTER LOGS or
PURGE BINARY LOGS.
-
Added
SHOW BDB LOGS as an alias for SHOW LOGS.
-
Added
SHOW MASTER LOGS (which had been deleted in version
4.1.0) as an alias for SHOW BINARY LOGS.
-
Added
Slave_IO_State and Seconds_Behind_Master columns
to the output of SHOW SLAVE STATUS.
Slave_IO_State indicates the state of the slave I/O thread, and
Seconds_Behind_Master indicates the number of seconds by
which the slave is late compared to the master.
-
The
--lower-case-table-names=1 server option now also makes aliases case
insensitive. (Bug #534)
-
Changed that the relay log is flushed to disk by the slave I/O thread every
time it reads a relay log event. This reduces the risk of losing some part of
the relay log in case of brutal crash.
Bugs fixed:
-
Fixed
mysql parser not to erroneously interpret `;' character
within /* ... */ comment as statement terminator.
-
Fixed merging types and length of result set columns for
UNION
operations. The types and lengths now are determined taking into
account values for all SELECT statements in the UNION,
not just the first SELECT.
-
Fixed a bug in privilege handling that caused connections from
certain IP addresses to be assigned incorrect database-level privileges.
A connection could be assigned the database privileges of the
previous successful authentication from one of those IP addresses,
even if the IP address username and database name were different. (Bug #1636)
-
Error-handling functions were not called properly when an error resulted
from
[CREATE | REPLACE| INSERT] ... SELECT statements.
-
HASH, BTREE, RTREE, ERRORS, and
WARNINGS no longer are reserved words. (Bug #724)
-
Fix for bug in
ROLLUP when all tables were const tables.
(Bug #714)
-
Fixed a bug in
UNION that prohibited NULL values from being
inserted into result set columns where the first SELECT of the
UNION retrieved NOT NULL columns. The type and max_length
of the result column is now defined based on all UNION parts.
-
Fixed name resolution of columns of reduced subqueries in unions. (Bug #745)
-
Fixed memory overrun in subqueries in select list with
WHERE clause
bigger than outer query WHERE clause. (Bug #726)
-
Fixed a bug that caused
MyISAM tables with FULLTEXT indexes
created in 4.0.x to be unreadable in 4.1.x.
-
Fixed a data loss bug in
REPAIR TABLE ... USE_FRM when used
with tables
that contained TIMESTAMP columns and were created in 4.0.x.
-
Fixed reduced subquery processing in
ORDER BY/GROUP BY
clauses. (Bug #442)
-
Fixed name resolution of outer columns of subquery in
INSERT/REPLACE statements. (Bug #446)
-
Fixed bug in marking columns of reduced subqueries. (Bug #679)
-
Fixed a bug that made
CREATE FULLTEXT INDEX syntax illegal.
-
Fixed a crash when a
SELECT that required a temporary table
(marked by Using temporary in EXPLAIN output)
was used as a derived table in EXPLAIN command. (Bug #251)
-
Fixed a rare table corruption bug in
DELETE
from a big table with
a new (created by MySQL-4.1) full-text index.
-
LAST_INSERT_ID() now returns 0 if the last INSERT statement
didn't insert any rows.
-
Fixed missing last character in function output. (Bug #447)
-
Fixed a rare replication bug when a transaction spanned two or more
relay logs, and the slave was stopped while executing the part
of the transaction that was in the second or later relay log. Then
replication would resume at the beginning of the second or later
relay log, which was incorrect. (It should resume at
BEGIN, in the
first relay log.) (Bug #53)
-
CONNECTION_ID() now is properly replicated. (Bug #177)
-
The new
PASSWORD() function in 4.1 is now properly replicated.
(Bug #344)
-
Fixed a bug with double freed memory.
-
Fixed a crashing bug in
UNION operations that involved temporary tables.
-
Fixed a crashing bug in
DERIVED TABLES when EXPLAIN is
used on a DERIVED TABLES with a join.
-
Fixed a crashing bug in
DELETE with ORDER BY and
LIMIT caused by an uninitialized array of reference pointers.
-
Fixed a bug in the
USER() function caused by an error in the size of
the allocated string.
-
Fixed a crashing bug when attempting to create a table containing a spatial
(GIS) column with a storage engine that does not support spatial types.
-
Fixed a crashing bug in
UNION caused by the empty select list and
a non-existent column being used in some of the individual SELECT
statements.
-
Fixed a replication bug with a 3.23 master and a 4.0 slave: The
slave lost the replicated temporary tables if
FLUSH LOGS was
issued on the master. (Bug #254)
-
Fixed a security bug: A server compiled without SSL support still allowed
connections by users that had the
REQUIRE SSL option specified for
their accounts.
-
When an undefined user variable was used in a updating query on the
master (such as
INSERT INTO t VALUES(@a), where @a had never
been set by this connection before), the slave could replicate the
query incorrectly if a previous transaction on the master used a user
variable of the same name. (Bug #1331)
-
Fixed bug with prepared statements: Using the
? prepared statement
parameter as the argument to certain functions or statement clauses caused
a server crash when mysql_prepare() was invoked. (Bug #1500)
-
Fixed bug with prepared statements: after call to mysql_prepare
placeholders became allowed in all consequent statements, even if they are
not prepared (Bug #1946)
-
SLAVE START (which is a deprecated syntax, START SLAVE should be
used instead) could crash the slave. (Bug #2516)
-
Fixed bug in
ALTER TABLE RENAME, when rename to the table with
the same name in another database silently dropped destination table if
it existed. (Bug #2628)
Functionality added or changed:
-
Added
--compatible option to mysqldump for producing output that
is compatible with other database systems or with older MySQL servers.
-
The
--opt option for mysqldump now is enabled by default,
as are all the options implied by --opt.
-
New
CHARSET() and COLLATION() functions to return the character
set and collation of a string.
-
Allow index type to be specified explicitly for some storage engines via
USING type_name syntax in index definition.
-
New function
IS_USED_LOCK() for determining the connection identifier
of the client that holds a given advisory lock.
-
New more secure client authentication based on 45-byte passwords in the
user table.
-
New
CRC32() function to compute cyclic redundancy check value.
-
On Windows, we are now using shared memory to communicate between server
and client when they are running on the same machine and you are
connecting to
localhost.
-
REPAIR of MyISAM tables now uses less temporary disk space when
sorting char columns.
-
DATE/DATETIME checking is now a bit stricter to support the
ability to automatically distinguish between date, datetime, and time
with microseconds. For example, dates of type YYYYMMDD HHMMDD are no
longer supported; you must either have separators between each
DATE/TIME part or not at all.
-
Server side help for all MySQL functions. One can now type
help
week in the mysql client and get help for the week()
function.
-
Added new
mysql_get_server_version() C API client function.
-
Fixed bug in
libmysqlclient that fetched column defaults.
-
Fixed bug in `mysql' command-line client in interpreting quotes
within comments. (Bug #539)
-
Added
record_in_range() method to MERGE tables to be
able to choose the right index when there are many to choose from.
-
Replication now works with
RAND() and user variables @var.
-
Allow one to change mode for
ANSI_QUOTES on the fly.
-
EXPLAIN SELECT now can be killed. See section 14.5.4.3 KILL Syntax.
-
REPAIR TABLE now can be killed. See section 14.5.4.3 KILL Syntax.
-
Allow empty index lists to be specified for
USE INDEX,
IGNORE INDEX, and FORCE INDEX.
-
DROP TEMPORARY TABLE now drops only temporary tables and doesn't
end transactions.
-
Added support for
UNION in derived tables.
-
Warning: Incompatible change!
TIMESTAMP is now returned as a string of type
'YYYY-MM-DD HH:MM:SS' and different timestamp lengths are not supported.
This change was necessary for SQL standards compliance. In a future
version, a further change will be made (backward compatible with this
change), allowing the timestamp length to indicate the desired number
of digits of fractions of a second.
-
New faster client/server protocol that supports prepared statements,
bound parameters, and bound result columns, binary transfer of data,
warnings.
-
Added database and real table name (in case of alias) to the
MYSQL_FIELD structure.
-
Multi-line queries: You can now issue several queries at once and
then read the results in one go.
-
In
CREATE TABLE foo (a INT not null primary key) the
PRIMARY word is now optional.
-
In
CREATE TABLE the attribute SERIAL is now an alias for
BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.
-
SELECT ... FROM DUAL is an alias for SELECT ....
(To be compatible with some other databases).
-
If one creates a too long
CHAR/VARCHAR it's now
automatically changed to TEXT or BLOB; One will get a
warning in this case.
-
One can specify the different
BLOB/TEXT types with the
syntax BLOB(length) and TEXT(length). MySQL will
automatically change it to one of the internal BLOB/TEXT
types.
-
CHAR BYTE is an alias for CHAR BINARY.
-
VARCHARACTER is an alias for VARCHAR.
-
New operators
integer MOD integer and integer DIV integer.
-
SERIAL DEFAULT VALUE added as an alias for AUTO_INCREMENT.
-
TRUE and FALSE added as alias for 1 and 0, respectively.
-
Aliases are now forced in derived tables, as per standard SQL.
-
Fixed
SELECT .. LIMIT 0 to return proper row count for
SQL_CALC_FOUND_ROWS.
-
One can specify many temporary directories to be used in a round-robin
fashion with:
--tmpdir=dirname1:dirname2:dirname3.
-
Subqueries:
SELECT * from t1 where t1.a=(SELECT t2.b FROM t2).
-
Derived tables:
SELECT a.col1, b.col2
FROM (SELECT MAX(col1) AS col1 FROM root_table) a,
other_table b
WHERE a.col1=b.col1;
-
Character sets to be defined per column, table and database.
-
Unicode (UTF8) support.
-
New
CONVERT(... USING ...) syntax for converting string values between
character sets.
-
BTREE index on MEMORY (HEAP) tables.
-
Faster embedded server (new internal communication protocol).
-
One can add a comment per column in
CREATE TABLE.
-
SHOW FULL COLUMNS FROM tbl_name shows column comments.
-
ALTER DATABASE.
-
Support for GIS (Geometrical data).
See section 18 Spatial Extensions in MySQL.
-
SHOW [COUNT(*)] WARNINGS shows warnings from the last command.
-
One can specify a column type for a column in
CREATE TABLE
... SELECT by defining the column in the CREATE part.
CREATE TABLE foo (a TINYINT NOT NULL) SELECT b+1 AS a FROM bar;
-
expr SOUNDS LIKE expr same as SOUNDEX(expr)=SOUNDEX(expr).
-
Added new
VARIANCE(expr) function returns the variance of expr
-
One can create a table from the existing table using
CREATE
[TEMPORARY] TABLE [IF NOT EXISTS] table (LIKE table). The table can
be either normal or temporary.
-
New options
--reconnect and --skip-reconnect for the
mysql client, to reconnect automatically or not if the
connection is lost.
-
START SLAVE (STOP SLAVE) no longer returns an error
if the slave is already started (stopped); it returns a
warning instead.
-
SLAVE START and SLAVE STOP are no longer accepted by the query
parser; use START SLAVE and STOP SLAVE instead.
Version 4.0 of the MySQL server includes many enhancements and new features:
-
The
InnoDB storage engine is now included in the standard binaries,
adding transactions, row-level locking, and foreign keys.
See section 16 The InnoDB Storage Engine.
-
A query cache, offering vastly increased performance for many applications.
By caching complete result sets, later identical queries can return
instantly.
See section 5.10 The MySQL Query Cache.
-
Improved full-text indexing with boolean mode, truncation, and phrase searching.
See section 13.6 Full-text Search Functions.
-
Enhanced
MERGE tables, now supporting INSERT statements and
AUTO_INCREMENT.
See section 15.2 The MERGE Storage Engine.
-
UNION syntax in SELECT.
See section 14.1.7.2 UNION Syntax.
-
Multiple-table
DELETE statements.
See section 14.1.1 DELETE Syntax.
-
libmysqld, the embedded server library.
See section 20.2.15 libmysqld, the Embedded MySQL Server Library.
-
Additional
GRANT privilege options for even tighter control and
security.
See section 14.5.1.2 GRANT and REVOKE Syntax.
-
Management of user resources in the
GRANT system, particularly
useful for ISPs and other hosting providers.
See section 5.5.5 Limiting Account Resources.
-
Dynamic server variables, allowing configuration changes to be made
without having to stop and restart the server.
See section 14.5.3.1
SET Syntax.
-
Improved replication code and features.
See section 6 Replication in MySQL.
-
Numerous new functions and options.
-
Changes to existing code for enhanced performance and reliability.
For a full list of changes, please refer to the changelog sections for
each individual 4.0.x release.
Functionality added or changed:
-
Changed that the optimizer will now consider the index specified in
FORCE INDEX clause as a candidate to resolve ORDER BY
as well.
-
Non-standard behavior of
UNION statements has changed to the standard
ones. So far, a table name in the ORDER BY clause was
tolerated. From now on a proper error message is issued (Bug #3064).
-
Added
max_insert_delayed_threads system variable as a synonym for
max_delayed_threads.
-
Added
query_cache_wlock_invalidate system variable. It allow
emulation of MyISAM table write-locking behavior, even for queries
in the query cache. (Bug #2693)
-
The keyword
MASTER_SERVER_ID is not reserved anymore.
-
The following is mainly relevant for Mac OS X users that use a
case-insensitive filesystem. This is not relevant for Windows users as
InnoDB in this case always stores file names in lower case:
One can now force lower_case_table_names to 0 from the command
line or a configuration file. This is useful with case-insensitive filesystems
when you have previously not used
lower_case_table_names=1 or lower_case_table_names=2 and
your have already created InnoDB tables. With
lower_case_table_names=0, InnoDB tables were stored in mixed case
while setting lower_case_table_names <> 0 will now force it to lower
case (to make the table names case insensitive).
Because it's possible to crash MyISAM tables by referring to them with
different case on a case-insensitive filesystem, we recommend that you
use lower_case_table_names or lower_case_table_names=2 on
such filesystems.
The easiest way to convert to use lower_case_table_names=2 is to
dump all your InnoDB tables with mysqldump, drop them and then
restore them.
-
Non-standard behavior of
UNION statements has changed to the standard
ones. So far, a table name in the ORDER BY clause was
tolerated. From now on a proper error message is issued (Bug #3064).
-
Added
max_insert_delayed_threads system variable as a synonym for
max_delayed_threads.
-
Added
query_cache_wlock_invalidate system variable. It allow
emulation of MyISAM table write-locking behavior, even for queries
in the query cache. (Bug #2693)
-
Changed that the relay log is flushed to disk by the slave I/O thread every
time it reads a relay log event. This reduces the risk of losing some part of
the relay log in case of brutal crash.
-
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.
Bugs fixed:
-
Fixed a bug in
MATCH ... AGAINST() searches when another thread was
doing concurrent inserts into the MyISAM table in question. The first
--- full-text search -- query could return incorrect results in this case
(e.g. ``phantom'' rows or not all matching rows, even an empty result set).
The easiest way to check whether you are affected is to start `mysqld'
with --skip-concurrent-insert switch and see if it helps.
-
Fixed bug when doing
DROP DATABASE on a directory containing non-
MySQL files. Now a proper error message is returned.
-
Fixed bug in
ANALYZE TABLE on a BDB table inside a transaction
that hangs server thread. (Bug #2342)
-
Fixed a symlink vulnerability in `mysqlbug' script. (Bug #3284)
-
Fixed core dump bug in
SELECT DISTINCT where all selected parts
where constants and there were hidden columns in the created temporary table.
(Bug #3203)
-
Fixed core dump bug in
COUNT(DISTINCT) when there was a lot of
values and one had a big value for max_heap_table_size.
-
Fixed problem with multi-table-update and BDB tables. (Bug: #3098)
-
Fixed memory leak when dropping database with
RAID tables. (Bug #2882)
-
Fixed core dump crash in replication during relay-log switch when the
relay log went over
max_relay_log_size and the slave thread did a
flush_io_cache() at the same time.
-
Fixed hangup bug when issuing multiple
SLAVE START from different
threads at the same time. (Bug #2921)
-
Fixed bug when using
DROP DATABASE with lower_case_table_names=2.
-
Fixed wrong result in
UNION when using lower_case_table_names=2.
(Bug #2858)
-
One can now kill threads that is 'stuck' in the join optimizer (can
happen when there is MANY tables in the join in which case the optimizer
can take really long time). (Bug #2825)
-
Rollback
DELETE and UPDATE statements if thread is killed.
(Bug #2422)
-
Ensure that all rows in an
INSERT DELAYED statement is written at
once if binary logging is enabled. (Bug #2491).
-
Fixed bug in query cache statistic, more accurate formula linked statistic
variables mentioned in the manual.
-
Fixed a bug in parallel repair
(
myisamchk -p, myisam_repair_threads) -
sometimes repair process failed to repair a table. (Bug #1334)
-
Fixed bugs with names of tables, databases and columns that end to space
(Bug #2985)
-
Fixed a bug in multiple-table
UPDATE statements involving at least one constant
table. Bug was exhibited in allowing non matching row to be updated.
(Bug #2996).
-
Fixed all bugs in scripts for creating/upgrading system database (Bug #2874)
Added tests which guarantee against such bugs in the future.
-
Fixed bug in `mysql' command-line client in interpreting quotes
within comments. (Bug #539)
-
--set-character-set and --character-sets-dir options in
`myisamchk' now work.
-
Fixed a bug in
mysqlbinlog that caused one pointer to be free'd twice
in some cases.
-
Fixed a bug in boolean full-text search, that sometimes could lead to false
matches in queries with several levels of subexpressions using
+
operator (for example,
MATCH ... AGAINST('+(+(word1 word2)) +word3*' IN BOOLEAN MODE).
-
Fixed Windows-specific portability bugs in `myisam_ftdump'.
-
Fixed a bug in multiple-table
DELETE that was caused by foreign key
constraints. If the order of the tables established by MySQL optimizer
did not match parent-child order, no rows were deleted and no error
message was provided. (Bug #2799)
-
Fixed a few years old bug in the range optimizer that
caused a segmentation fault on some very rare queries. (Bug #2698)
-
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)
The bug was accidentally not fixed in 4.0.17 as it was unfortunately
earlier said.
-
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 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)
-
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)
-
Fixed the column
Exec_master_log_pos (and its disk image in the
relay-log.info file) to be correct if the master had version 3.23 (it
was too big by 6 bytes). This bug does not exist in the 5.0 version.
(Bug #3400)
-
Fixed that
mysqlbinlog does not forget to print a USE command
under rare circumstances where the binary log contained a LOAD DATA
INFILE command. (Bug #3415)
-
Fixed a memory corruption when replicating a
LOAD DATA INFILE when the
master had version 3.23. Some smaller problems remain in this setup,
See section 6.7 Replication Features and Known Problems. (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)
Functionality added or changed:
-
Fixed processing of
LOAD DATA by mysqlbinlog in remote mode.
(Bug #1378)
-
New utility program `myisam_ftdump' was added to binary
distributions.
-
ENGINE is now a synonym for the TYPE option for
CREATE TABLE and ALTER TABLE.
-
lower_case_table_names system variable now can take a value of
2, to store table names in mixed case on case-insensitive filesystems.
It's forced to 2 if the database directory is located on a case-insensitive
filesystem.
-
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)
-
Optimizer is now better tuned for the case where the first used key part
(of many) is a constant. (Bug #1679)
-
Removed old non-working
--old-rpl-compat server option, which was a
holdover from the very first 4.0.x versions. (Bug #2428)
Bugs fixed:
-
mysqlhotcopy now works on NetWare.
-
DROP DATABASE could not drop databases with RAID tables that had
more than nine RAID_CHUNKS. (Bug #2627)
-
Fixed bug in range optimizer when using overlapping ranges. (Bug #2448)
-
Limit
wait_timeout to 2147483 on Windows (OS limit). (Bug #2400)
-
Fixed bug when
--init-file crashes MySQL if it contains a large
SELECT. (Bug #2526)
-
SHOW KEYS now shows NULL in the Sub_part column for
FULLTEXT indexes.
-
The signal thread's stack size was increased to enable
mysqld
to run on Debian/IA-64 with a TLS-enabled glibc. (Bug #2599)
-
Now only the
SELECT privilege is needed for tables that are only read in
multiple-table UPDATE statements. (Bug #2377)
-
Give proper error message if one uses
LOCK TABLES ... ; INSERT
... SELECT and one used the same table in the INSERT and SELECT
part. (Bug #2296)
-
SELECT INTO ... DUMPFILE now deletes the generated file on error.
-
Fixed foreign key reference handling to allow references to column names that
contain spaces. (Bug #1725)
-
Fixed problem with index reads on character columns with
BDB tables. The
symptom was that data could be returned in the wrong lettercase. (Bug #2509)
-
Fixed a spurious table corruption problem that could sometimes appear on
tables with indexed
TEXT columns if these columns happened to contain
values having trailing spaces. This bug was introduced in 4.0.17.
-
Fixed a problem where some queries could hang if a condition like
indexed_TEXT_column = expr
was present and the column contained values having trailing spaces.
This bug was introduced in 4.0.17.
-
Fixed a bug that could cause incorrect results from a query
that involved range conditions on indexed
TEXT columns
that happened to contain values having trailing spaces. This bug was
introduced in 4.0.17. (Bug #2295)
-
Fixed incorrect path names in some of the manual pages.
(Bug #2270)
-
Fixed spurious ``table corrupted'' errors in parallel repair operations.
See section 5.2.3 Server System Variables.
-
Fixed a crashing bug in parallel repair operations.
See section 5.2.3 Server System Variables.
-
Fixed bug in updating
MyISAM tables for BLOB values longer
than 16MB. (Bug #2159)
-
Fixed bug in
mysqld_safe when running multiple instances of
MySQL. (Bug #2114)
-
Fixed a bug in using
HANDLER statement with tables not
from a current database. (Bug #2304)
-
Fixed a crashing bug that occurred due to the fact that multiple-table
UPDATE statements did not check that there was only one table
to be updated. (Bug #2103)
-
Fixed a crashing bug that occurred due to
BLOB column
type index size being calculated incorrectly in MIN() and MAX()
optimizations.
(Bug #2189)
-
Fixed a bug with incorrect syntax for
LOCK TABLES in
mysqldump. (Bug #2242)
-
Fixed a bug in
mysqld_safe that caused mysqld to generate a
warning about duplicate user=xxx options if this option was specified in
the [mysqld] or [server] sections of `my.cnf'.
(Bug #2163)
-
INSERT DELAYED ... SELECT ... could cause table corruption because
tables were not locked properly. This is now fixed by ignoring DELAYED
in this context. (Bug #1983)
-
Replication: Sometimes the master gets a non-fatal error during the
execution of a statement that does not immediately succeed. (For example,
a write to a
MyISAM table may first receive ``no space left
on device,'' but later complete when disk space becomes available.
See section A.4.3 How MySQL Handles a Full Disk.) The bug was that the master forgot to reset the error
code to 0 after success, so the error code got into its binary log, thus
causing the slave to issue false alarms such as ``did not get the same
error as on master.'' (Bug #2083)
-
Removed a misleading ``check permissions on master.info'' from a replication
error message, because the cause of the problem could be something other than
permissions. (Bug #2121)
-
Fixed a crash when the replication slave was unable to create the first relay
log. (Bug #2145)
-
Replication of
LOAD DATA INFILE for an empty file from a 3.23 master to a
4.0 slave caused the slave to print an error. (Bug #2452)
-
When automatically forcing
lower_case_table_names to 1 if the file
system was case insensitive, mysqld could crash. This bug existed only
in MySQL 4.0.17. (Bug #2481)
-
Restored ability to specify default values for
TIMESTAMP columns
that was erroneously disabled in previous release. (Bug #2539) Fixed
SHOW CREATE TABLE to reflect these values. (Bug #1885) Note
that because of the auto-update feature for the first TIMESTAMP
column in a table, it makes no sense to specify a default value for
the column. Any such default will be silently ignored (unless another
TIMESTAMP column is added before this one). Also fixed the meaning
of the DEFAULT keyword when it is used to specify the value to be
inserted into a TIMESTAMP column other than the first. (Bug #2464)
-
Fixed bug for out-of-range arguments on QNX platform that caused
UNIX_TIMESTAMP() to produce incorrect results or that caused
non-zero values to be inserted into TIMESTAMP columns. (Bug #2523)
Also, current time zone now is taken into account when checking if datetime
values satisfy both range boundaries for TIMESTAMP columns. The
range allowed for a TIMESTAMP column is time zone-dependant and
equivalent to a range of 1970-01-01 00:00:01 UTC to 2037-12-31
23:59:59 UTC.
-
Multiple-table
DELETE statements were never replicated by the slave if
there were any replicate-*-table options. (Bug #2527)
-
Changes to session counterparts of variables
query_prealloc_size,
query_alloc_block_size, trans_prealloc_size,
trans_alloc_block_size now
have an effect. (Bug #1948)
-
Fixed bug in
ALTER TABLE RENAME, when rename to the table with
the same name in another database silently dropped destination table if
it existed. (Bug #2628)
Functionality added or changed:
-
mysqldump no longer dumps data for MERGE tables. (Bug #1846)
-
lower_case_table_names is now forced to 1 if the database directory
is located on a case-insensitive filesystem. (Bug #1812)
-
Symlink creation is now disabled on systems where
realpath() doesn't
work. (Before one could use CREATE TABLE .. DATA DIRECTORY=.. even if
HAVE_BROKEN_REALPATH was defined. This is now disabled to avoid
problems when running ALTER TABLE).
-
Inserting a negative
AUTO_INCREMENT value in a MyISAM table
no longer updates the AUTO_INCREMENT counter to a big unsigned value.
(Bug #1366)
-
Added four new modes to
WEEK(..., mode) function.
See section 13.5 Date and Time Functions.
(Bug #1178)
-
Allow
UNION DISTINCT syntax.
-
mysql_server_init() now returns 1 if it can't initialize the
environment. (Previously mysql_server_init() called exit(1)
if it could not create a key with pthread_key_create(). (Bug #2062)
-
Allow spaces in Windows service names.
-
Changed the default Windows service name for
mysqld from MySql
to MySQL.
This should not affect usage, because service names are not case sensitive.
-
When you install
mysqld as a service on Windows systems, mysqld
will read startup options in option files from the option group with the same
name as the service name.
(Except when the service name is MySQL).
Bugs fixed:
-
Sending
SIGHUP to mysqld crashed the server if it was running with
--log-bin. (Bug #2045)
-
One can now configure MySQL as a Windows service as a normal
user. (Bug #1802). Thanks to Richard Hansen for fixing this.
-
Database names are now compared in lowercase in
ON clauses
when lower_case_table_names is set. (Bug #1736)
-
IGNORE ... LINES option to LOAD DATA INFILE didn't work
when used with fixed length rows. (Bug #1704)
-
Fixed problem with
UNIX_TIMESTAMP() for timestamps close to 0.
(Bug #1998)
-
Fixed problem with character values greater than 128 in the
QUOTE()
function. (Bug #1868)
-
Fixed searching of
TEXT with endspace. (Bug #1651)
-
Fixed caching bug in multiple-table updates where same table was used twice.
(Bug #1711)
-
Fixed directory permissions for the MySQL-server RPM documentation directory.
(Bug #1672)
-
Fixed server crash when updating an
ENUM column that is set to the
empty string (for example, with REPLACE()). (Bug #2023)
-
mysql client program now correctly prints connection identifier
returned by mysql_thread_id() as unsigned integer rather than as signed
integer. (Bug #1951)
-
FOUND_ROWS() could return incorrect number of rows after a query
with an impossible WHERE condition. (Bug #1468)
-
SHOW DATABASES no longer shows .sym files (on Windows) that
do not point to a valid directory. (Bug #1385)
-
Fixed a possible memory leak on Mac OS X when using the shared
libmysql.so library. (from pthread_key_create()). (Bug #2061)
-
Fixed bug in
UNION statement with alias *. (Bug #1249)
-
Fixed a bug in
DELETE ... ORDER BY ... LIMIT where the rows where not
deleted in the proper order. (Bug #1024, Bug #1697).
-
Fixed serious problem with multi-threaded programs on Windows that used the
embedded MySQL libraries. (Locks of tables were not handled correctly between
different threads).
-
Code cleanup: Fixed a few code defects (potential memory leaks, null pointer
dereferences, uninitialized variables). Thanks to Reasoning Inc. for
informing us about these findings.
-
Fixed a buffer overflow error that occurred with prepended `0' characters
in some columns of type
DECIMAL. (Bug #2128)
-
Filesort was never shown in
EXPLAIN if query contained an
ORDER BY NULL clause. (Bug #1335)
-
Fixed invalidation of whole query cache on
DROP DATABASE. (Bug #1898)
-
Fixed bug in range optimizer that caused wrong results for some unlikely
AND/OR queries. (Bug #1828)
-
Fixed a crash in
ORDER BY when ordering by expression and identifier.
(Bug #1945)
-
Fixed a crash in an open
HANDLER when an ALTER TABLE was
executed in a different connection. (Bug #1826)
-
Fixed a bug in
trunc* operator of full-text search which
sometimes caused MySQL not to find all matched rows.
-
Fixed bug in prepending `0' characters to
DECIMAL column values.
-
Fixed optimizer bug, introduced in 4.0.16, when
REF access plan was
preferred to more efficient RANGE on another column.
-
Fixed problem when installing a MySQL server as a Windows service using a
command of the form
mysqld --install mysql --defaults-file=path-to-file.
(Bug #1643)
-
Fixed an incorrect result from a query that uses only
const tables
(such as one-row tables) and non-constant expression
(such as RAND()). (Bug #1271)
-
Fixed bug when the optimizer did not take
SQL_CALC_FOUND_ROWS into
account if LIMIT clause was present. (Bug #1274)
-
mysqlbinlog now asks for a password at the console when the -p
or --password option is used with no argument. This is consistent with
the way that other clients such mysqladmin and mysqldump
already behave. Note: A consequence of this change is that it is no
longer possible to invoke mysqlbinlog as mysqlbinlog -p
pass_val (with a space between the -p option and the following
password value).
(Bug #1595)
-
Fixed bug accidentally introduced in 4.0.16 where the slave SQL thread
deleted its replicated temporary tables when
STOP SLAVE was
issued.
-
In a ``chain'' replication setup
A->B->C, if 2 sessions on A
updated temporary tables of the same name at the same time, the binary log
of B became incorrect, resulting in C becoming confused.
(Bug #1686)
-
In a ``chain'' replication setup
A->B->C, if STOP SLAVE
was issued on B while it was replicating a temporary table from
A, then when START SLAVE was issued on B, the binary log
of B became incorrect, resulting in C becoming confused.
(Bug #1240)
-
When
MASTER_LOG_FILE and MASTER_LOG_POS were not
specified, CHANGE MASTER used the coordinates of the slave I/O
thread to set up replication, which broke replication if the slave SQL
thread lagged behind the slave I/O thread. This caused the slave
SQL thread to lose some events. The new behavior is to use the
coordinates of the slave SQL thread instead.
See section 14.6.2.1 CHANGE MASTER TO Syntax.
(Bug #1870)
-
Now if integer is stored or converted to
TIMESTAMP or
DATETIME value checks of year, month, day, hour, minute
and second ranges are performed and numbers representing illegal
timestamps are converted to 0 value. This behavior is consistent
with manual and with behavior of string to
TIMESTAMP/DATETIME conversion. (Bug #1448)
-
Fixed bug when
BIT_AND() and BIT_OR() group functions
returned incorrect value if SELECT used a temporary table and
no rows were found. (Bug #1790).
-
BIT_AND() is now unsigned in all contexts. This means that it will
now return 18446744073709551615 (= 0xffffffffffffffff) instead of -1 if
there were no rows in the result.
-
Fixed bug with
BIT_AND() still returning signed value for an
empty set in some cases. (Bug #1972)
-
Fixed bug with
^ (XOR) and >> (bit shift) still returning
signed value in some cases. (Bug #1993)
-
Replication:
a rare race condition in the slave SQL thread, which could lead to a
wrong complain that the relay log is corrupted. (Bug #2011)
-
Replication:
in the slave SQL thread, a multiple-table
UPDATE could produce a
wrong complain that some record was not found in one table, if the
UPDATE was preceded by a INSERT ... SELECT. (Bug #1701)
-
Fixed deficiency in MySQL code which is responsible for scanning
directories. This deficiency caused
SHOW TABLE STATUS to be
very slow when a database contained a large number of tables, even if a single
particular table were specified. (Bug #1952)
Functionality added or changed:
-
Option values in option files now may be quoted. This is useful for values that
contain whitespace or comment characters.
-
Write memory allocation information to error log when doing
mysqladmin debug. This works only on systems that support the
mallinfo() call (like newer Linux systems).
-
Added the following new server variables to allow more precise memory
allocation:
range_alloc_block_size, query_alloc_block_size,
query_prealloc_size, transaction_alloc_block_size, and
transaction_prealloc_size.
-
mysqlbinlog now reads option files. To make this work, you must now
specify --read-from-remote-server when reading binary logs from
a MySQL server. (Note that using a remote server is deprecated and may
disappear in future mysqlbinlog versions).
-
Block
SIGPIPE signals also for non-threaded programs. The blocking is moved
from mysql_init() to mysql_server_init(), which is
automatically called on the first call to mysql_init().
-
Added
--libs_r and --include options to mysql_config.
-
New
`> prompt for mysql. This prompt is similar to the
'> and "> prompts, but indicates that an identifier
quoted with backticks was begun on an earlier line and the closing backtick
has not yet been seen.
-
Updated
mysql_install_db to be able to use the local machine's IP
address instead of the hostname when building the initial grant tables if
skip-name-resolve has been specified. This
option can be helpful on FreeBSD to avoid thread-safety problems with the
FreeBSD resolver libraries. (Thanks to Jeremy Zawodny for the patch.)
-
A documentation change: Added a note that when backing up a slave, it is
necessary also to back up the `master.info' and `relay-log.info'
files, as well as any `SQL_LOAD-*' files located in the directory
specified by the
--slave-load-tmpdir option. All these files are
needed when the slave resumes replication after you restore the slave's data.
Bugs fixed:
-
Fixed a spurious error
ERROR 14: Can't change size of file (Errcode: 2)
on Windows in DELETE FROM tbl_name without a WHERE clause or
TRUNCATE TABLE tbl_name, when tbl_name is a MyISAM
table. (Bug #1397)
-
Fixed a bug that resulted in
thr_alarm queue is full warnings after
increasing the max_connections variable with SET GLOBAL.
(Bug #1435)
-
Made
LOCK TABLES to work when Lock_tables_priv is granted on the
database level and Select_priv is granted on the table level.
-
Fixed crash of
FLUSH QUERY CACHE on queries that use same table
several times (Bug #988).
-
Fixed core dump bug when setting an enum system variable (such as
SQL_WARNINGS) to NULL.
-
Extended the default timeout value for Windows clients from 30 seconds
to 1 year. (The timeout that was added in MySQL 4.0.15 was way too
short). This fixes a bug that caused
ERROR 2013: Lost connection
to MySQL server during query for queries that lasted longer than 30 seconds,
if the client didn't specify a limit with mysql_options(). Users of
4.0.15 on Windows should upgrade to avoid this problem.
-
More ``out of memory'' checking in range optimizer.
-
Fixed and documented a problem when setting and using a user variable within the
same
SELECT statement. (Bug #1194).
-
Fixed bug in overrun check for
BLOB values with compressed tables.
This was a bug introduced in 4.0.14. It caused MySQL to regard some
correct tables containing BLOB values as corrupted.
(Bug #770, Bug #1304, and maybe Bug #1295)
-
SHOW GRANTS showed USAGE instead of the real column-level
privileges when no table-level privileges were given.
-
When copying a database from the master,
LOAD DATA FROM
MASTER dropped the corresponding database on the slave, thus erroneously
dropping tables that had no counterpart on the master and tables that
may have been excluded from replication using replicate-*-table
rules. Now LOAD DATA FROM MASTER no longer drops the database.
Instead, it drops only the tables that have a counterpart on the master
and that match the replicate-*-table
rules. replicate-*-db rules can still be used to include or exclude a
database as a whole from LOAD DATA FROM MASTER. A database will
also be included or excluded as a whole if there are some rules like
replicate-wild-do-table=db1.% or
replicate-wild-ignore-table=db1.%, as is already the case for
CREATE DATABASE and DROP DATABASE in replication. (Bug
#1248)
-
Fixed a bug where
mysqlbinlog crashed with a segmentation fault when used with the
-h or --host option. (Bug #1258)
-
Fixed a bug where
mysqlbinlog crashed with a segmentation fault
when used on a binary log containing only final events for LOAD
DATA. (Bug #1340)
-
mysqlbinlog will not reuse temporary file names from previous runs.
Previously mysqlbinlog failed if was used several times on the same
binary log file that contained a LOAD DATA command.
-
Fixed compilation problem when compiling with OpenSSL 0.9.7 with
disabled old DES support (If
OPENSSL_DISABLE_OLD_DES_SUPPORT
option was enabled).
-
Fixed a bug when two (or more) MySQL servers were running on the same machine,
and they were both slaves, and at least one of them was replicating some
LOAD DATA INFILE command from its master.
The bug was that one slave MySQL server sometimes
deleted the `SQL_LOAD-*' files (used for replication of
LOAD DATA INFILE and located in the slave-load-tmpdir directory,
which defaults to tmpdir) belonging to the other slave MySQL server of
this machine, if these slaves had the same slave-load-tmpdir directory.
When that happened, the other slave could not replicate
LOAD DATA INFILE and complained about not being able to open some
SQL_LOAD-* file. (Bug #1357)
-
If
LOAD DATA INFILE failed for a small file, the master forgot to
write a marker (a Delete_file event) in its binary log, so the slave
could not delete 2 files (`SQL_LOAD-*.info' and
`SQL_LOAD-*.data' from its tmpdir. (Bug #1391)
-
On Windows, the slave forgot to delete a
SQL_LOAD-*.info
file from tmpdir after successfully replicating a LOAD DATA
INFILE command. (Bug #1392)
-
When a connection terminates, MySQL writes
DROP TEMPORARY TABLE
statements to the binary log for all temporary tables which the
connection had not explicitly dropped. MySQL forgot to backquote the
database and table names in the statement. (Bug #1345)
-
On some 64-bit machines (some HP-UX and Solaris machines), a slave
installed with the 64-bit MySQL binary could not connect to its master
(it connected to itself instead). (Bug #1256, Bug #1381)
-
Code was introduced in MySQL 4.0.15 for the slave to detect that the master
had died while writing a transaction to its binary log. This code reported an
error in a legal situation: When the slave I/O thread was stopped while
copying a transaction to the relay log, the slave SQL thread would later
pretend that it found an unfinished transaction. (Bug #1475)
IMPORTANT:
If you are using this release on Windows, you should upgrade at least your
clients (any program that uses libmysql.lib) to 4.0.16 or above. This
is because the 4.0.15 release had a bug in the Windows client library that
causes Windows clients using the library to die with a Lost connection
to MySQL server during query error for queries that take more than 30
seconds. This problem is specific to Windows; clients on other platforms are
unaffected.
Functionality added or changed:
-
mysqldump now correctly quotes all identifiers when communicating
with the server. This assures that during the dump process, mysqldump
will never send queries to the server that result in a syntax error.
This problem is not related to the
mysqldump program's output, which was not changed. (Bug #1148)
-
Change result set metadata information so that
MIN() and MAX()
report that they can return NULL (this is true because an
empty set will return NULL). (Bug #324)
-
Produce an error message on Windows if a second
mysqld server is
started on the same TCP/IP port as an already running mysqld server.
-
The
mysqld server variables wait_timeout,
net_read_timeout, and net_write_timeout now work on Windows.
One can now also set timeouts for read and writes in Windows clients with
mysql_options().
-
Added option
--sql-mode=NO_DIR_IN_CREATE to make it possible for
slaves to ignore INDEX DIRECTORY and
DATA DIRECTORY options given to CREATE TABLE.
When this is mode is on, SHOW CREATE TABLE will not show the
given directories.
-
SHOW CREATE TABLE now shows the INDEX DIRECTORY and
DATA DIRECTORY options, if they were specified when the table was
created.
-
The
open_files_limit server variable now shows the real open files limit.
-
MATCH ... AGAINST() in natural language mode
now treats words that are present
in more than 2,000,000 rows as stopwords.
-
The Mac OS X installation disk images now include an additional
`MySQLStartupItem.pkg' package that enables the automatic
startup of MySQL on system startup.
See section 2.2.3 Installing MySQL on Mac OS X.
-
Most of the documentation included in the binary tarball distributions
(
.tar.gz) has been moved into a subdirectory docs.
See section 2.1.8 Installation Layouts.
-
The manual is now included as an additional
info file in the binary
distributions. (Bug #1019)
-
The binary distributions now include the embedded server library
(
libmysqld.a) by default. Due to a linking problem with non-gcc
compilers, it was not included in all packages of the initial 4.0.15
release. The affected packages were rebuilt and released as 4.0.15a.
See section 1.5.1.2 The Embedded MySQL Server.
-
MySQL can now use range optimization for
BETWEEN with
non-constant limits. (Bug #991)
-
Replication error messages now include the default database, so that
users can check which database the failing query was run for.
-
A documentation change: Added a paragraph about how the
binlog-do-db and binlog-ignore-db options are tested
against the database on the master (see section 5.8.4 The Binary Log), and a
paragraph about how replicate-do-db, replicate-do-table
and analogous options are tested against the database and tables on the
slave (see section 6.8 Replication Startup Options).
-
Now the slave does not replicate
SET PASSWORD
if it is configured to exclude the mysql database from
replication (using for example
replicate-wild-ignore-table=mysql.%). This was already the
case for GRANT and REVOKE since version 4.0.13 (though
there was Bug #980 in 4.0.13 & 4.0.14, which has been fixed in
4.0.15).
-
Rewrote the information shown in the
State column of SHOW
PROCESSLIST for replication threads and for MASTER_POS_WAIT()
and added the most common states for these threads to the
documentation, see section 6.3 Replication Implementation Details.
-
Added a test in replication to detect the case where the master died
in the middle of writing a transaction to the binary log; such unfinished
transactions now trigger an error message on the slave.
-
A
GRANT command that creates an anonymous user
(that is, an account with an empty username) no longer requires
FLUSH PRIVILEGES for the account to be recognized by the server.
(Bug #473)
-
CHANGE MASTER now flushes `relay-log.info'. Previously
this was deferred to the next run of START SLAVE, so if
mysqld was shutdown on the slave after CHANGE MASTER
without having run START SLAVE, the relay log's name and
position were lost. At restart they were reloaded from
`relay-log.info', thus reverting to their old (incorrect) values from
before CHANGE MASTER and leading to error messages
(as the old relay log did not exist any more) and the slave threads
refusing to start. (Bug #858)
Bugs fixed:
-
Fixed buffer overflow in password handling which could potentially be
exploited by MySQL users with
ALTER privilege on the
mysql.user table to execute random code or to gain shell access with
the UID of the mysqld process (thanks to Jedi/Sector One for spotting and
reporting this bug).
-
Fixed server crash on
FORCE INDEX in a query that contained
"Range checked for each record" in the EXPLAIN output. (Bug #1172)
-
Fixed table/column grant handling - proper sort order (from most specific
to less specific, see section 5.4.6 Access Control, Stage 2: Request Verification) was not honored.
(Bug #928)
-
Fixed rare bug in
MYISAM introduced in 4.0.3 where the index file header
was not updated directly after an UPDATE of split dynamic rows.
The symptom was that the table had a corrupted delete-link if mysqld
was shut down or the table was checked directly after the update.
-
Fixed
Can't unlock file error when running
myisamchk --sort-index on Windows. (Bug #1119)
-
Fixed possible deadlock when changing
key_buffer_size while
the key cache was actively used. (Bug #1088)
-
Fixed overflow bug in
MyISAM and ISAM when a row is updated
in a table with a large number of columns and at least one BLOB/TEXT
column.
-
Fixed incorrect result when doing
UNION and LIMIT #,# when
braces were not used around the SELECT parts.
-
Fixed incorrect result when doing
UNION and ORDER BY .. LIMIT #
when one didn't use braces around the SELECT parts.
-
Fixed problem with
SELECT SQL_CALC_FOUND_ROWS ... UNION ALL ... LIMIT #
where FOUND_ROWS() returned incorrect number of rows.
-
Fixed unlikely stack bug when having a BIG expression of
type
1+1-1+1-1... in certain combinations. (Bug #871)
-
Fixed the bug that sometimes prevented a table with a
FULLTEXT index
from being marked as "analyzed".
-
Fixed MySQL so that the column length (in C API) for the second column in
SHOW CREATE TABLE is always larger than the data length.
The only known application that was affected by the old behavior was
Borland dbExpress, which truncated the output from the command.
(Bug #1064)
-
Fixed crash in comparisons of strings using the
tis620 character
set. (Bug #1116)
-
Fixed
ISAM bug in MAX() optimization.
-
myisamchk --sort-records=N no longer marks table as crashed if
sorting failed because of an inappropriate key. (Bug #892)
-
Fixed a minor bug in
MyISAM compressed table handling that sometimes
made it impossible to repair compressed table in "Repair by sort" mode.
"Repair with keycache" (myisamchk --safe-recover) worked, though.
(Bug #1015)
-
Fixed bug in propagating the version number to the manual included in
the distribution files. (Bug #1020)
-
Fixed key sorting problem (a
PRIMARY key declared for a column
that is not explicitly marked NOT NULL was sorted after a
UNIQUE key for a NOT NULL column).
-
Fixed the result of
INTERVAL when applied to a DATE value.
(Bug #792)
-
Fixed compiling of the embedded server library in the RPM spec file.
(Bug #959)
-
Added some missing files to the RPM spec file and fixed some RPM building
errors that occurred on Red Hat Linux 9. (Bug #998)
-
Fixed incorrect
XOR evaluation in WHERE clause. (Bug #992)
-
Fixed bug with processing in query cache merged tables constructed
from more then 255 tables. (Bug #930)
-
Fixed incorrect results from outer join query (e.g.
LEFT JOIN)
when ON condition is always false, and range search in used.
(Bug #926)
-
Fixed a bug causing incorrect results from
MATCH ... AGAINST() in some
joins. (Bug #942)
-
MERGE tables do not ignore "Using index" (from EXPLAIN output)
anymore.
-
Fixed a bug that prevented an empty table from being marked as "analyzed".
(Bug #937)
-
Fixed
myisamchk --sort-records crash when used on compressed table.
-
Fixed slow (as compared to 3.23)
ALTER TABLE and related commands such as CREATE INDEX.
(Bug #712)
-
Fixed segmentation fault resulting from
LOAD DATA FROM MASTER when
the master was running without the --log-bin option. (Bug #934)
-
Fixed a security bug: A server compiled without SSL support still allowed
connections by users that had the
REQUIRE SSL option specified for
their accounts.
-
Fixed a random bug: Sometimes the slave would replicate
GRANT
or REVOKE queries even if it was configured to exclude the
mysql database from replication (for example, using
replicate-wild-ignore-table=mysql.%). (Bug #980)
-
The
Last_Errno and Last_Error fields in the output of
SHOW SLAVE STATUS are now cleared by CHANGE MASTER and
when the slave SQL thread starts. (Bug #986)
-
A documentation mistake: It said that
RESET SLAVE does not change
connection information (master host, port, user, and
password), whereas it does. The statement resets these to the startup options
(master-host etc) if there were some. (Bug #985)
-
SHOW SLAVE STATUS now shows correct information (master host,
port, user, and password) after RESET SLAVE
(that is, it shows the new values, which are copied from the startup
options if there were some). (Bug #985)
-
Disabled propagation of the original master's log position for events because
this caused unexpected values for
Exec_Master_Log_Pos< |