End of Product Lifecycle. Active development and support for MySQL Database Server versions 3.23, 4.0, and 4.1 has ended. For details, see http://www.mysql.com/about/legal/lifecycle/#calendar. Please consider upgrading to a recent version. Further updates to the content of this manual will be minimal. All formats of this manual will continue to be available until 31 Dec 2010.
The MySQL 4.0.19 binaries were uploaded to the download mirrors on May, 10th. However, a potential crashing bug was found just before the 4.0.19 release was publicly announced and published from the 4.0 download pages at http://dev.mysql.com/.
A fix for the bug was pushed into the MySQL source tree shortly after it could be reproduced and is included in MySQL 4.0.20. Users upgrading from MySQL 4.0.18 should upgrade directly to MySQL 4.0.20 or later.
See (Bug #3596) for details (it was reported against MySQL-4.1, but was confirmed to affect 4.0.19 as well).
Functionality added or changed:
If length of a timestamp field is defined as 19, the timestamp is displayed as
"YYYY-MM-DD HH:MM:SS. This is done to make it easier to use tables created in MySQL 4.1 to be used in MySQL 4.0.
If you use
RAID_CHUNKS with a value > 255 it is set to 255. This was made to ensure that all raid directories are always 2 hex bytes. (Bug #3182)
Changed that the optimizer now considers the index specified in
FORCE INDEX clause as a candidate to resolve
ORDER BY as well.
--log-warnings server option now is enabled by default. Disable with
Until now, in
SELECT ... UNION SELECT ... ORDER BY ..., it was possible to qualify a column name in the
ORDER BY clause with a table name. This is no longer possible. Column names in
ORDER BY should refer to names established in the first
SELECT of the
UNION. (Bug #3064)
max_insert_delayed_threads system variable as a synonym for
query_cache_wlock_invalidate system variable. It enables emulation of
MyISAM table write-locking behavior, even for queries in the query cache. (Bug #2693)
MASTER_SERVER_ID is not reserved anymore.
The following is relevant mainly for Mac OS X users who use a case-insensitive file system. This is not relevant for Windows users as
InnoDB in this case always stores file names in lower case:
You can now force
lower_case_table_names to 0 from the command line or a configuration file. This is useful with case-insensitive file systems when you have previously not used
lower_case_table_names = 1 or
lower_case_table_names = 2 and you have created
InnoDB tables. With
lower_case_table_names = 0,
InnoDB tables were stored in mixed case while setting
lower_case_table_names to a nonzero value now forces it to lower case (to make the table names case insensitive).
Because it is possible to crash
MyISAM tables by referring to them with different case on a case-insensitive file system, use
lower_case_table_names = 2 on such file systems.
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.
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.
Added missing full-text variable
ft_stopword_file to myisamchk.
Do not allow stray
',' at the end of field specifications. (Bug #3481)
INTERVAL now can handle big values for seconds, minutes and hours. (Bug #3498)
Blank host name did not work as documented for table and column privileges. Now it works the same way as
'%'. (Bug #3473)
Fixed a harmless buffer overflow in
replace utility. (Bug #3541)
SOUNDEX() to ignore nonalphabetic characters also in the beginning of the string. (Bug #3556)
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 (for example, “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 whether 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 the
mysqlbug script. (Bug #3284, CVE-2004-0381)
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
Fixed problem with multiple-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)
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 quotation marks within comments. (Bug #539)
--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
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
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 statements 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)
--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 bug in privilege checking of
ALTER TABLE RENAME. (Bug #3270, CVE-2004-0835)
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 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 14.7, “Replication Features and Issues”. (Bug #3422)
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)