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 InnoDB.
A query cache, offering vastly increased performance for many applications. By caching complete result sets, later identical queries can return instantly. See the section called “The MySQL Query Cache”.
Improved full-text indexing with boolean mode, truncation, and phrase searching. See the section called “Full-Text Search Functions”.
Enhanced MERGE tables, now supporting INSERT statements and AUTO_INCREMENT. See MERGE.
UNION syntax in SELECT. See UNION.
Multiple-table DELETE statements. See DELETE.
libmysqld, the embedded server library. See libmysqld.
Additional GRANT privilege options for even tighter control and security. See GRANT.
Management of user resources in the GRANT system, particularly useful for ISPs and other hosting providers. See the section called “Limiting Account Resources”.
Dynamic server variables, allowing configuration changes to be made without having to stop and restart the server. See SET OPTION.
Improved replication code and features. See Chapter 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:
InnoDB: Made LOCK TABLES behave by default like it did before MySQL 4.0.20 or 4.1.2: no InnoDB lock will be taken. Added a startup option and settable system variable innodb_table_locks for making LOCK TABLE acquire also InnoDB locks. See the section called “Restrictions on InnoDB Tables”. (Bug #3299, Bug #5998)
The --with-openssl option for configure now accepts a path prefix as an argument. --with-openssl-includes and --with-openssl-libs still are supported, but are needed only to override the default values. (Bug #5494)
Added new --without-man option to configure to suppress building/installing the manual pages. (Bug #5379)
Bugs fixed:
Fixed returning wrong query result from query cache if temporary table haded real tables after putting results to query cache. (Bug #6084)
Fixed ENABLE KEYS, which failed if tmpdir ran out of space. Now, a full repair is done in this case. (Bug #5625)
Fixed an improper error message when trying to drop a table which is referenced by a FOREIGN KEY constraint. (Bug #5784)
Fixed a bug that allowed FLUSH TABLE(S) to close HANDLER tables. HANDLER tables now are re-opened after a FLUSH TABLE(S) when they are next used. However, they lose their file position if this happens. (Bug #4286)
Fixed a bug that allowed HANDLER tables with the same alias to be multiple opened. HANDLER aliases must now be unique, even though it is syntactically correct in versions below 4.1, to qualify them with their base table's database name (e.g. test_db.handler_tbl, but this will now conflict with e.g. another_db.handler_tbl). (Bug #4335)
Fixed crash when using MySQL 4.0 with privilege tables from MySQL 5.0.
InnoDB: Make the check for excessive semaphore waits tolerate glitches in the system clock (do not crash the server if the system time is adjusted while InnoDB is under load.). (Bug #5898)
mysqlimport now reads input files locally from the client host only if the --local option is given. Previously, it assumed incorrectly in some cases that files were local even without --local. (Bug #5829)
InnoDB: Fixed a bug in the InnoDB FOREIGN KEY parser that prevented ALTER TABLE of tables containing ‘#’ in their names. (Bug #5856)
Fixed a bug which resulted in erronously calculated number of examined rows in UNION's. This value is printed in the slow query log. (Bug #5879)
Fixed bug with crash of server on some values of read_rnd_buffer_size (Bug #5492)
Fixed bug which caused truncation of values read from or into TIMESTAMP fields if --new mode was enabled. (Bug #4131)
mysqladmin now returns a status of 0 even when the server denies access; such an error means theserver is running. (Bug #3120)
InnoDB: Fixed a bug introduced in 4.0.21. An assertion failed if one used mysqldump with the option -l or --opt, or if one used LOCK TABLES ... LOCAL. (Workaround in 4.0.21: use --quick and --single-transaction. (Bug #5538)
Fixed that if the slave SQL thread found a syntax error in a query (which should be rare, as the master parsed it successfully), it stops. (Bug #5711)
Fixed that if a write to a MyISAM table fails because of a full disk or an exceeded disk quota, it prints a message to the error log every 10 minutes, and waits until disk becomes free. (Bug #3248)
Fixed problem with symlinked databases on Windows being shown with SHOW DATABASES even if the database name doesn't match the given wildcard (Bug #5539)
Fixed problem introduced in 4.0.21 where a connection starting a transaction, doing updates, then FLUSH TABLES WITH READ LOCK, then COMMIT, would cause replication slaves to stop complaing about error 1223. Bug surfaced when using the InnoDB innobackup script. (Bug #5949)
Functionality added or changed:
Print version_comment (from ./configure --comment during compilation) when starting the server. E.g.: Version: '4.0.21-debug' socket: '/tmp/mysql.sock' port: 0 Official MySQL Binary
Made the MySQL server not react to signals SIGHUP and SIGQUIT on Mac OS X 10.3. This is needed because under this OS, the MySQL server receives lots of these signals (reported as Bug #2030).
On Windows, the mysqld-nt and mysqld-max-nt servers now write error messages to the Windows event log in addition to the MySQL error log.
Bugs fixed:
Fixed an old bug in concurrent accesses to MERGE tables (even one MERGE table and MyISAM tables), that could've resulted in a crash or hang of the server. (Bug #2408)
Fixed a bug that caused incorrect results from GROUP BY queries with expression in HAVING clause that refers to a BLOB (TEXT, TINYBLOB, etc) fields. (Bug #4358)
Fixed a bug when memory was not released when HEAP table is dropped. It could only happen on Windows when a symlink file (.sym) is used and if that symlink file contained double backslashes (\\). (Bug #4973)
Fixed a bug which prevented TIMESTAMP(19) fields from being created. (Bug #4491)
Fixed a bug that caused wrong results in queries that were using index to search for NULL values in BLOB (TINYBLOB, TEXT, TINYTEXT, etc) columns of MyISAM tables. (Bug #4816)
Fixed a bug in the function ROUND() reporting incorrect metadata (number of digits after the decimal point). It can be seen, for example, in CREATE TABLE t1 SELECT ROUND(1, 34). (Bug #4393)
Fixed precision loss bug in some mathematical functions such as SQRT() and LOG(). (Bug #4356)
Fixed a long-standing problem with LOAD DATA with the LOCAL option. The problem occurs when an error happens during the LOAD DATA operation. Previously, the connection was broken. Now the error message is returned and connection stays open.
Optimizer now treats col IN (val) the same way it does for col = val.
Fixed a problem with net_buffer_length when building the DBD::mysql Perl module. (Bug #4206)
lower_case_table_names=2 (keep case for table names) was not honored with ALTER TABLE and CREATE/DROP INDEX. (Bug #3109)
Fixed a crash on declaration of DECIMAL(0,...) column. (Bug #4046)
Fixed a bug in IF() function incorrectly determining the result type if aggregate functions were involved. (Bug #3987)
Fixed bug in privilege checking where, under some conditions, one was able to grant privileges on the database, he has no privileges on. (Bug #3933)
Fixed crash in MATCH ... AGAINST() on a phrase search operator with a missing closing double quote. (Bug #3870)
Fixed a bug with truncation of big values (> 4294967295) of 64-bit system variables. (Bug #3754)
If server-id was not set using startup options but with SET GLOBAL, the replication slave still complained that it was not set. (Bug #3829)
Fixed potential memory overrun in mysql_real_connect() (which required a compromised DNS server and certain operating systems). (Bug #4017)
During the installation process of the server RPM on Linux, mysqld was run as the root system user, and if you had --log-bin=<somewhere_out_of_var_lib_mysql> it created binary log files owned by root in this directory, which remained owned by root after the installation. This is now fixed by starting mysqld as the mysql system user instead. (Bug #4038)
Made DROP DATABASE honor the value of lower_case_table_names. (Bug #4066)
The slave SQL thread refused to replicate INSERT ... SELECT if it examined more than 4 billion rows. (Bug #3871)
Fixed incorrect destruction of expression which led to crash of server on complex AND/OR expressions if query was ignored (either by a replication server because of --replicate-*-table rules, or by any MySQL server because of a syntax error). (Bug #3969, Bug #4494)
Fixed that mysqlbinlog --position --read-from-remote-server had wrong # at lines. (Bug #4506)
If CREATE TEMPORARY TABLE t SELECT failed while loading the data, the temporary table was not dropped. (Bug #4551)
Fixed that when a multiple-table DROP TABLE failed to drop a table on the master server, the error code was not written to the binary log. (Bug #4553)
When the slave SQL thread was replicating a LOAD DATA INFILE statement, it didn't show the statement in the output of SHOW PROCESSLIST. (Bug #4326)
Fixed that CREATE TABLE ... TYPE=HEAP ... AS SELECT... caused replication slave to stop. (Bug #4971)
Fixed that disable-local-infile option had no effect if client read it from a configuration file using mysql_options(...,MYSQL_READ_DEFAULT,...). (Bug #5073)
Fixed that mysql-test-run failed on the rpl_trunc_binlog test if running test from the installed (the target of 'make install') directory. (Bug #5050)
Fixed an unlikely deadlock which could happen when using KILL. (Bug #4810)
Fixed a crash when one connection got KILLed while it was doing START SLAVE. (Bug #4827)
Made FLUSH TABLES WITH READ LOCK block COMMIT if server is running with binary logging; this ensures that the binary log position is trustable when doing a full backup of tables and the binary log. (Bug #4953)
Fixed that the counter of an auto_increment column was not reset by TRUNCATE TABLE is the table was a temporary one. (Bug #5033)
Made database names to compare case-insensitively in fully qualified column names (database.table.column) when lower_case_table_names=1. (Bug #4792)
Fixed that SET CHARACTER SET was not replicated correctly. MySQL 4.1 does not have that bug. (Bug #4500)
Note: The windows packages had to be repackaged and re-released several times to resolve packaging issues (such as missing files). This did not affect the binaries included (they have not been recompiled), therefore the installation packages are of version 4.0.20d, while the binaries included still identify themselves as version 4.0.20b.
Functionality added or changed:
Phrase search in MATCH ... AGAINST ( ... IN BOOLEAN MODE) no longer matches partial words.
Bugs fixed:
A crashing bug (race condition) was fixed in InnoDB diagnostic logging. It was introduced in 4.0.19. (Bug #3596)
Fixed a bug in division / reporting incorrect metadata (number of digits after the decimal point). It can be seen, for example, in CREATE TABLE t1 SELECT "0.01"/"3". (Bug #3612)
Fixed a problem with non-working DROP DATABASE on some configurations (in particular, Linux 2.6.5 with ext3 are known to expose this bug). (Bug #3594)
Fixed that in some replication error messages, a very long query caused the rest of the message to be invisible (truncated), by putting the query last in the message. (Bug #3357)
Note: 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 will be 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 will be set to 255. This was made to ensure that all raid directories are always 2 hex bytes. (Bug #3182)
Changed that the optimizer will now consider the index specified in FORCE INDEX clause as a candidate to resolve ORDER BY as well.
The --log-warnings server option now is enabled by default. Disable with --skip-log-warnings.
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 allows 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 relevant mainly for Mac OS X users who use a case-insensitive filesystem. This is not relevant for Windows users as InnoDB in this case always stores filenames 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 filesystems when you have previously not used lower_case_table_names=1 or lower_case_table_names=2 and you have already created InnoDB tables. With lower_case_table_names=0, InnoDB tables were stored in mixed case while setting lower_case_table_names to a non-zero value now will 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.
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 option --replicate-same-server-id.
Bugs fixed:
Added missing full-text variable ft_stopword_file to myisamchk.
Don't allow stray ',' at the end of field specifications. (Bug #3481)
INTERVAL now can handle big values for seconds, minutes and hours. (Bug #3498)
Blank hostname did not work as documented for table and column privileges. Now it's works the same way as '%'. (Bug #3473)
Fixed a harmless buffer overflow in replace utility. (Bug# 3541)
Fixed SOUNDEX() to ignore non-alphabetic 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 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 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)
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 the section called “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)
Fixed a crash of the MySQL slave server when it was built with --with-debug and replicating itself. (Bug #3568)
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)
Added option --sync-frm. It's on by default, to instruct MySQL to sync to disk each time .frm file is created. Use --disable-sync-frm to disable.
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 the section called “Server System Variables”.
Fixed a crashing bug in parallel repair operations. See the section called “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 the section called “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-dependent 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 WEEK(date,mode). (Bug #1178)
Allow UNION DISTINCT syntax.
MySQL now syncs to disk each time .frm file is created.
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 CHANGE MASTER TO. (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 system 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 filenames 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 use backticks to quote 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 system 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 system 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 the section called “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 the section called “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 the section called “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 the section called “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 the section called “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 (although 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 the section called “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: The proper sort order (from most specific to less specific, see the section called “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 (for example, 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 who 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 and problems with MASTER_POS_WAIT() in A->B->C replication setup. (Bug #1086)
Fixed a segfault in mysqlbinlog when --position=x was used with x being between a Create_file event and its fellow Append_block, Exec_load or Delete_file events. (Bug #1091)
mysqlbinlog printed superfluous warnings when using --database, which caused syntax errors when piped to mysql. (Bug #1092)
Made mysqlbinlog --database filter LOAD DATA INFILE too (previously, it filtered all queries except LOAD DATA INFILE). (Bug #1093)
mysqlbinlog in some cases forgot to put a leading '#' in front of the original LOAD DATA INFILE (this command is displayed only for information, not to be run; it is later reworked to LOAD DATA LOCAL with a different filename, for execution by mysql). (Bug #1096)
binlog-do-db and binlog-ignore-db incorrectly filtered LOAD DATA INFILE (it was half-written to the binary log). This resulted in a corrupted binary log, which could cause the slave to stop with an error. (Bug #1100)
When, in a transaction, a transactional table (such as an InnoDB table) was updated, and later in the same transaction a non-transactional table (such as a MyISAM table) was updated using the updated content of the transactional table (with INSERT ... SELECT for example), the queries were written to the binary log in an incorrect order. (Bug #873)
When, in a transaction, INSERT ... SELECT updated a non-transactional table, and ROLLBACK was issued, no error was returned to the client. Now the client is warned that some changes could not be rolled back, as this was already the case for normal INSERT. (Bug #1113)
Fixed a potential bug: When STOP SLAVE was run while the slave SQL thread was in the middle of a transaction, and then CHANGE MASTER was used to point the slave to some non-transactional statement, the slave SQL thread could get confused (because it would still think, from the past, that it was in a transaction).
Functionality added or changed:
Added default_week_format system variable. The value is used as the default mode for the WEEK() function.
mysqld now reads an additional option file group having a name corresponding to the server's release series: [mysqld-4.0] for 4.0.x servers, [mysqld-4.1] for 4.1.x servers, and so forth. This allows options to be specified on a series-specific basis.
The CONCAT_WS() function no longer skips empty strings. (Bug #586).
InnoDB now supports indexing a prefix of a column. This means, in particular, that BLOB and TEXT columns can be indexed in InnoDB tables, which was not possible before.
A documentation change: Function INTERVAL(NULL, ...) returns -1.
Enabled INSERT from SELECT when the table into which the records are inserted is also a table listed in the SELECT.
Allow CREATE TABLE and INSERT from any UNION.
The SQL_CALC_FOUND_ROWS option now always returns the total number of rows for any UNION.
Removed --table option from mysqlbinlog to avoid repeating mysqldump functionality.
Comment lines in option files can now start from the middle of a line, too (like basedir=c:\mysql # installation directory).
Changed optimizer slightly to prefer index lookups over full table scans in some boundary cases.
Added thread-specific max_seeks_for_key variable that can be used to force the optimizer to use keys instead of table scans even if the cardinality of the index is low.
Added optimization that converts LEFT JOIN to normal join in some cases.
A documentation change: added a paragraph about failover in replication (how to use a surviving slave as the new master, how to resume to the original setup). See the section called “Replication FAQ”.
A documentation change: added warning notes about safe use of the CHANGE MASTER command. See the section called “CHANGE MASTER TO Syntax”.
MySQL now issues a warning (not an error, as in 4.0.13) when it opens a table that was created with MySQL 4.1.
Added --nice option to mysqld_safe to allow setting the niceness of the mysqld process. (Thanks to Christian Hammers for providing the initial patch.) (Bug #627)
Added --read-only option to cause mysqld to allow no updates except from slave threads or from users with the SUPER privilege. (Original patch from Markus Benning).
SHOW BINLOG EVENTS FROM x where x is less than 4 now silently converts x to 4 instead of printing an error. The same change was done for CHANGE MASTER TO MASTER_LOG_POS=x and CHANGE MASTER TO RELAY_LOG_POS=x.
mysqld now only adds an interrupt handler for the SIGINT signal if you start it with the new --gdb option. This is because some MySQL users encountered strange problems when they accidentally sent SIGINT to mysqld threads.
RESET SLAVE now clears the Last_Errno and Last_Error fields in the output of SHOW SLAVE STATUS.
Added max_relay_log_size variable; the relay log will be rotated automatically when its size exceeds max_relay_log_size. But if max_relay_log_size is 0 (the default), max_binlog_size will be used (as in older versions). max_binlog_size still applies to binary logs in any case.
FLUSH LOGS now rotates relay logs in addition to the other types of logs it already rotated.
The DELAYED keyword in INSERT DELAYED no longer causes an error for InnoDB tables. Now it is silently ignored.
Bugs fixed:
Comparison/sorting for latin1_de character set was rewritten. The old algorithm could not handle cases like "sä" > "ßa". See the section called “Using the German Character Set”. In rare cases it resulted in table corruption.
Fixed a problem with the password prompt on Windows. (Bug #683)
ALTER TABLE ... UNION=(...) for MERGE table is now allowed even if some underlying MyISAM tables are read-only. (Bug #702)
Fixed a problem with CREATE TABLE t1 SELECT x'41'. (Bug #801)
Removed some incorrect lock warnings from the error log.
Fixed memory overrun when doing REPAIR TABLE on a table with a multiple-part auto_increment key where one part was a packed CHAR.
Fixed a probable race condition in the replication code that could potentially lead to INSERT statements not being replicated in the event of a FLUSH LOGS command or when the binary log exceeds max_binlog_size. (Bug #791)
Fixed a crashing bug in INTERVAL and GROUP BY or DISTINCT. (Bug #807)
Fixed bug in mysqlhotcopy so it actually aborts for unsuccessful table copying operations. Fixed another bug so that it succeeds when there are thousands of tables to copy. (Bug #812)
Fixed problem with mysqlhotcopy failing to read options from option files. (Bug #808)
Fixed bugs in optimizer that sometimes prevented MySQL from using FULLTEXT indexes even though it was possible (for example, in SELECT * FROM t1 WHERE MATCH a,b AGAINST("index") > 0).
Fixed a bug with “table is full” in UNION operations.
Fixed a security problem that enabled users with no privileges to obtain information on the list of existing databases by using SHOW TABLES and similar commands.
Fixed a stack problem on UnixWare/OpenUnix.
Fixed a configuration problem on UnixWare/OpenUNIX and OpenServer.
Fixed a stack overflow problem in password verification.
Fixed a problem with max_user_connections.
HANDLER without an index now works properly when a table has deleted rows. (Bug #787)
Fixed a bug with LOAD DATA in mysqlbinlog. (Bug #670)
Fixed that SET CHARACTER SET DEFAULT works. (Bug #462)
Fixed MERGE table behavior in ORDER BY ... DESC queries. (Bug #515)
Fixed server crash on PURGE MASTER LOGS or SHOW MASTER LOGS when the binary log is off. (Bug #733)
Fixed password-checking problem on Windows. (Bug #464)
Fixed the bug in comparison of a DATETIME column and an integer constant. (Bug #504)
Fixed remote mode of mysqlbinlog. (Bug #672)
Fixed ERROR 1105: Unknown error that occurred for some SELECT queries, where a column that was declared as NOT NULL was compared with an expression that took NULL value.
Changed timeout in mysql_real_connect() to use poll() instead of select() to work around problem with many open files in the client.
Fixed incorrect results from MATCH ... AGAINST used with a LEFT JOIN query.
Fixed a bug that limited the maximum value for mysqld variables to 4294967295 when they are specified on the command line.
Fixed a bug that sometimes caused spurious “Access denied” errors in HANDLER ... READ statements, when a table is referenced via an alias.
Fixed portability problem with safe_malloc, which caused MySQL to give "Freeing wrong aligned pointer" errors on SCO 3.2.
ALTER TABLE ... ENABLE/DISABLE KEYS could cause a core dump when done after an INSERT DELAYED statement on the same table.
Fixed problem with conversion of localtime to GMT where some times resulted in different (but correct) timestamps. Now MySQL should use the smallest possible timestamp value in this case. (Bug #316)
Very small query cache sizes could crash mysqld. (Bug #549)
Fixed a bug (accidentally introduced by us but present only in version 4.0.13) that made INSERT ... SELECT into an AUTO_INCREMENT column not replicate well. This bug is in the master, not in the slave. (Bug #490)
Fixed a bug: When an INSERT ... SELECT statement inserted rows into a non-transactional table, but failed at some point (for example, due to a “Duplicate key” error), the query was not written to the binary log. Now it is written to the binary log, with its error code, as all other queries are. About the slave-skip-errors option for how to handle partially completed queries in the slave, see the section called “Replication Startup Options”. (Bug #491)
SET FOREIGN_KEY_CHECKS=0 was not replicated properly. The fix probably will not be backported to 3.23.
On a slave, LOAD DATA INFILE which had no IGNORE or REPLACE clause on the master, was replicated with IGNORE. While this is not a problem if the master and slave data are identical (a LOAD that produces no duplicate conflicts on the master will produce none on the slave anyway), which is true in normal operation, it is better for debugging not to silently add the IGNORE. That way, you can get an error message on the slave and discover that for some reason, the data on master and slave are different and investigate why. (Bug #571)
On a slave, LOAD DATA INFILE printed an incomplete “Duplicate entry '%-.64s' for key %d”' message (the key name and value were not mentioned) in case of duplicate conflict (which does not happen in normal operation). (Bug #573)
When using a slave compiled with --debug, CHANGE MASTER TO RELAY_LOG_POS could cause a debug assertion failure. (Bug #576)
When doing a LOCK TABLES WRITE on an InnoDB table, commit could not happen, if the query was not written to the binary log (for example, if --log-bin was not used, or binlog-ignore-db was used). (Bug #578)
If a 3.23 master had open temporary tables that had been replicated to a 4.0 slave, and the binary log got rotated, these temporary tables were immediately dropped by the slave (which caused problems if the master used them subsequently). This bug had been fixed in 4.0.13, but in a manner which caused an unlikely inconvenience: If the 3.23 master died brutally (power failure), without having enough time to automatically write DROP TABLE statements to its binary log, then the 4.0.13 slave would not notice the temporary tables have to be dropped, until the slave mysqld server is restarted. This minor inconvenience is fixed in 3.23.57 and 4.0.14 (meaning the master must be upgraded to 3.23.57 and the slave to 4.0.14 to remove the inconvenience). (Bug #254)
If MASTER_POS_WAIT() was waiting, and the slave was idle, and the slave SQL thread terminated, MASTER_POS_WAIT() would wait forever. Now when the slave SQL thread terminates, MASTER_POS_WAIT() immediately returns NULL (“slave stopped”). (Bug #651)
After RESET SLAVE; START SLAVE;, the Relay_Log_Space value displayed by SHOW SLAVE STATUS was too big by four bytes. (Bug #763)
If a query was ignored on the slave (because of --replicate-ignore-table and other similar rules), the slave still checked if the query got the same error code (0, no error) as on the master. So if the master had an error on the query (for example, “Duplicate entry” in a multiple-row insert), then the slave stopped and warned that the error codes didn't match. (Bug #797)
Functionality added or changed:
PRIMARY KEY now implies NOT NULL. (Bug #390)
The Windows binary packages are now compiled with --enable-local-infile to match the Unix build configuration.
Removed timing of tests from mysql-test-run. time does not accept all required parameters on many platforms (for example, QNX) and timing the tests is not really required (it's not a benchmark anyway).
SHOW MASTER STATUS and SHOW SLAVE STATUS required the SUPER privilege; now they accept REPLICATION CLIENT as well. (Bug #343)
Added multi-threaded MyISAM repair optimization and myisam_repair_threads variable to enable it. See the section called “Server System Variables”.
Added innodb_max_dirty_pages_pct variable which controls amount of dirty pages allowed in InnoDB buffer pool.
CURRENT_USER() and Access denied error messages now report the hostname exactly as it was specified in the GRANT command.
Removed benchmark results from the source and binary distributions. They are still available in the BK source tree, though.
InnoDB tables now support ANALYZE TABLE.
MySQL now issues an error when it opens a table that was created with MySQL 4.1.
Option --new now changes binary items (0xFFDF) to be treated as binary strings instead of numbers by default. This fixes some problems with character sets where it's convenient to input the string as a binary item. After this change you have to convert the binary string to INTEGER with a CAST if you want to compare two binary items with each other and know which one is bigger than the other. SELECT CAST(0xfeff AS UNSIGNED) < CAST(0xff AS UNSIGNED). This will be the default behavior in MySQL 4.1. (Bug #152)
Enabled delayed_insert_timeout on Linux (most modern glibc libraries have a fixed pthread_cond_timedwait()). (Bug #211)
Don't create more insert delayed threads than given by max_delayed_threads. (Bug #211)
Changed UPDATE ... LIMIT to apply the limit to rows that were matched, whether or not they actually were changed. Previously the limit was applied as a restriction on the number of rows changed.
Tuned optimizer to favor clustered index over table scan.
BIT_AND() and BIT_OR() now return an unsigned 64-bit value.
Added warnings to error log of why a secure connection failed (when running with --log-warnings).
Deprecated options --skip-symlink and --use-symbolic-links and replaced these with --symbolic-links.
The default option for innodb_flush_log_at_trx_commit was changed from 0 to 1 to make InnoDB tables ACID by default. See InnoDB start.
Added a feature to SHOW KEYS to display keys that are disabled by ALTER TABLE DISABLE KEYS command.
When using a non-existing table type with CREATE TABLE, first try if the default table type exists before falling back to MyISAM.
Added MEMORY as an alias for HEAP.
Renamed function rnd to my_rnd as the name was too generic and is an exported symbol in libmysqlclient (thanks to Dennis Haney for the initial patch).
Portability fix: renamed include/dbug.h to include/my_dbug.h.
mysqldump no longer silently deletes the binary logs when invoked with the --master-data or --first-slave option; while this behavior was convenient for some users, others may suffer from it. Now you must explicitly ask for binary logs to be deleted by using the new --delete-master-logs option.
If the slave is configured (using for example --replicate-wild-ignore-table=mysql.%) to exclude mysql.user, mysql.host, mysql.db, mysql.tables_priv and mysql.columns_priv from replication, then GRANT and REVOKE will not be replicated.
Bugs fixed:
Logged Access denied error message had incorrect Using password value. (Bug #398)
Fixed bug with NATURAL LEFT JOIN, NATURAL RIGHT JOIN and RIGHT JOIN when using many joined tables. The problem was that the JOIN method was not always associated with the tables surrounding the JOIN method. If you have a query that uses many RIGHT JOIN or NATURAL ... JOINS you should verify that they work as you expected after upgrading MySQL to this version. (Bug #291)
Fixed mysql parser not to erroneously interpret ‘'’ or ‘"’ characters within /* ... */ comment as beginning a quoted string.
mysql command-line client no longer looks for \* commands inside backtick-quoted strings.
Fixed Unknown error when using UPDATE ... LIMIT. (Bug #373)
Fixed problem with ANSI mode and GROUP BY with constants. (Bug #387)
Fixed bug with UNION and OUTER JOIN. (Bug #386)
Fixed bug if one used a multiple-table UPDATE and the query required a temporary table bigger than tmp_table_size. (Bug #286)
Run mysql_install_db with the -IN-RPM option for the Mac OS X installation to not fail on systems with improperly configured hostname configurations.
LOAD DATA INFILE will now read 000000 as a zero date instead as "2000-00-00".
Fixed bug that caused DELETE FROM table WHERE const_expression always to delete the whole table (even if expression result was false). (Bug #355)
Fixed core dump bug when using FORMAT('nan',#). (Bug #284)
Fixed name resolution bug with HAVING ... COUNT(DISTINCT ...).
Fixed incorrect result from truncation operator (*) in MATCH ... AGAINST() in some complex joins.
Fixed a crash in REPAIR ... USE_FRM command, when used on read-only, nonexisting table or a table with a crashed index file.
Fixed a crashing bug in mysql monitor program. It occurred if program was started with --no-defaults, with a prompt that contained the hostname and a connection to a non-existent database was requested.
Fixed problem when comparing a key for a multi-byte character set. (Bug #152)
Fixed bug in LEFT, RIGHT and MID when used with multi-byte character sets and some GROUP BY queries. (Bug #314)
Fix problem with ORDER BY being discarded for some DISTINCT queries. (Bug #275)
Fixed that SET SQL_BIG_SELECTS=1 works as documented (This corrects a new bug introduced in 4.0)
Fixed some serious bugs in UPDATE ... ORDER BY. (Bug #241)
Fixed unlikely problem in optimizing WHERE clause with constant expression like in WHERE 1 AND (a=1 AND b=1).
Fixed that SET SQL_BIG_SELECTS=1 works again.
Introduced proper backtick quoting for db.table in SHOW GRANTS.
FULLTEXT index stopped working after ALTER TABLE that converts TEXT column to CHAR. (Bug #283)
Fixed a security problem with SELECT and wildcarded select list, when user only had partial column SELECT privileges on the table.
Mark a MyISAM table as "analyzed" only when all the keys are indeed analyzed.
Only ignore world-writable my.cnf files that are regular files (and not, for example, named pipes or character devices).
Fixed few smaller issues with SET PASSWORD.
Fixed error message which contained deprecated text.
Fixed a bug with two NATURAL JOINs in the query.
SUM() didn't return NULL when there was no rows in result or when all values was NULL.
On Unix symbolic links handling was not enabled by default and there was no way to turn this on.
Added missing dashes to parameter --open-files-limit in mysqld_safe. (Bug #264)
Fixed incorrect hostname for TCP/IP connections displayed in SHOW PROCESSLIST.
Fixed a bug with NAN in FORMAT(...) function ...
Fixed a bug with improperly cached database privileges.
Fixed a bug in ALTER TABLE ENABLE / DISABLE KEYS which failed to force a refresh of table data in the cache.
Fixed bugs in replication of LOAD DATA INFILE for custom parameters (ENCLOSED, TERMINATED and so on) and temporary tables. (Bug #183, Bug #222)
Fixed a replication bug when the master is 3.23 and the slave 4.0: the slave lost the replicated temporary tables if FLUSH LOGS was issued on the master. (Bug #254)
Fixed a bug when doing LOAD DATA INFILE IGNORE: When reading the binary log, mysqlbinlog and the replication code read REPLACE instead of IGNORE. This could make the slave's table become different from the master's table. (Bug #218)
Fixed a deadlock when relay_log_space_limit was set to a too small value. (Bug #79)
Fixed a bug in HAVING clause when an alias is used from the select list.
Fixed overflow bug in MyISAM when a row is inserted into a table with a large number of columns and at least one BLOB/TEXT column. Bug was caused by incorrect calculation of the needed buffer to pack data.
Fixed a bug when SELECT @nonexistent_variable caused the error in client - server protocol due to net_printf() being sent to the client twice.
Fixed a bug in setting SQL_BIG_SELECTS option.
Fixed a bug in SHOW PROCESSLIST which only displayed a localhost in the "Host" column. This was caused by a glitch that used only current thread information instead of information from the linked list of threads.
Removed unnecessary Mac OS X helper files from server RPM. (Bug #144)
Allow optimization of multiple-table update for InnoDB tables as well.
Fixed a bug in multiple-table updates that caused some rows to be updated several times.
Fixed a bug in mysqldump when it was called with --master-data: the CHANGE MASTER TO commands appended to the SQL dump had incorrect coordinates. (Bug #159)
Fixed a bug when an updating query using USER() was replicated on the slave; this caused segfault on the slave. (Bug #178). USER() is still badly replicated on the slave (it is replicated to "").
Functionality added or changed:
mysqld no longer reads options from world-writable config files.
Integer values between 9223372036854775807 and 9999999999999999999 are now regarded as unsigned longlongs, not as floats. This makes these values work similar to values between 10000000000000000000 and 18446744073709551615.
SHOW PROCESSLIST will now include the client TCP port after the hostname to make it easier to know from which client the request originated.
The --new option can be used to make a 4.0 server return TIMESTAMP as a string in 'YYYY-MM-DD HH:MM:SS' format, the way that 4.1 servers do.
Bugs fixed:
Fixed mysqld crash on extremely small values of sort_buffer variable.
INSERT INTO u SELECT ... FROM t was written too late to the binary log if t was very frequently updated during the execution of this query. This could cause a problem with mysqlbinlog or replication. The master must be upgraded, not the slave. (Bug #136)
Fixed checking of random part of WHERE clause. (Bug #142)
Fixed a bug with multiple-table updates with InnoDB tables. This bug occurred as, in many cases, InnoDB tables cannot be updated “on the fly,” but offsets to the records have to be stored in a temporary table.
Added missing file mysql_secure_installation to the server RPM subpackage. (Bug #141)
Fixed MySQL (and myisamchk) crash on artificially corrupted .MYI files.
Don't allow BACKUP TABLE to overwrite existing files.
Fixed a bug with multiple-table UPDATE statements when user had all privileges on the database where tables are located and there were any entries in tables_priv table, that is, grant_option was true.
Fixed a bug that allowed a user with table or column grants on some table, TRUNCATE any table in the same database.
Fixed deadlock when doing LOCK TABLE followed by DROP TABLE in the same thread. In this case one could still kill the thread with KILL.
LOAD DATA LOCAL INFILE was not properly written to the binary log (hence not properly replicated). (Bug #82)
RAND() entries were not read correctly by mysqlbinlog from the binary log which caused problems when restoring a table that was inserted with RAND(). INSERT INTO t1 VALUES(RAND()). In replication this worked okay.
SET SQL_LOG_BIN=0 was ignored for INSERT DELAYED queries. (Bug #104)
SHOW SLAVE STATUS reported too old positions (columns Relay_Master_Log_File and Exec_Master_Log_Pos) for the last executed statement from the master, if this statement was the COMMIT of a transaction. The master must be upgraded for that, not the slave. (Bug #52)
LOAD DATA INFILE was not replicated by the slave if replicate_*_table was set on the slave. (Bug #86)
After RESET SLAVE, the coordinates displayed by SHOW SLAVE STATUS looked un-reset (although they were, but only internally). (Bug #70)
Fixed query cache invalidation on LOAD DATA.
Fixed memory leak on ANALYZE procedure with error.
Fixed a bug in handling CHAR(0) columns that could cause incorrect results from the query.
Fixed rare bug with incorrect initialization of AUTO_INCREMENT column, as a secondary column in a multi-column key (see AUTO_INCREMENT on secondary column in a multi-column key), when data was inserted with INSERT ... SELECT or LOAD DATA into an empty table.
On Windows, STOP SLAVE didn't stop the slave until the slave got one new command from the master (this bug has been fixed for MySQL 4.0.11 by releasing updated 4.0.11a Windows packages, which include this individual fix on top of the 4.0.11 sources). (Bug #69)
Fixed a crash when no database was selected and LOAD DATA command was issued with full table name specified, including database prefix.
Fixed a crash when shutting down replication on some platforms (for example, Mac OS X).
Fixed a portability bug with pthread_attr_getstacksize on HP-UX 10.20 (Patch was also included in 4.0.11a sources).
Fixed the bigint test to not fail on some platforms (for example, HP-UX and Tru64) due to different return values of the atof() function.
Fixed the rpl_rotate_logs test to not fail on certain platforms (such as Mac OS X) due to a too-long file name (changed slave-master-info.opt to .slave-mi).
Functionality added or changed:
NULL is now sorted LAST if you use ORDER BY ... DESC (as it was before MySQL 4.0.2). This change was required to comply with the SQL standard. (The original change was made because we thought that standard SQL required NULL to be always sorted at the same position, but this was incorrect).
Added START TRANSACTION (standard SQL syntax) as alias for BEGIN. This is recommended to use instead of BEGIN to start a transaction.
Added OLD_PASSWORD() as a synonym for PASSWORD().
Allow keyword ALL in group functions.
Added support for some new INNER JOIN and JOIN syntaxes. For example, SELECT * FROM t1 INNER JOIN t2 didn't work before.
Novell NetWare 6.0 porting effort completed, Novell patches merged into the main source tree.
Bugs fixed:
Fixed problem with multiple-table delete and InnoDB tables.
Fixed a problem with BLOB NOT NULL columns used with IS NULL.
Re-added missing pre- and post(un)install scripts to the Linux RPM packages (they were missing after the renaming of the server subpackage).
Fixed that table locks are not released with multiple-table updates and deletes with InnoDB storage engine.
Fixed bug in updating BLOB columns with long strings.
Fixed integer-wraparound when giving big integer (>= 10 digits) to function that requires an unsigned argument, like CREATE TABLE (...) AUTO_INCREMENT=#.
MIN(key_column) could in some cases return NULL on a column with NULL and other values.
MIN(key_column) and MAX(key_column) could in some cases return incorrect values when used in OUTER JOIN.
MIN(key_column) and MAX(key_column) could return incorrect values if one of the tables was empty.
Fixed rare crash in compressed MyISAM tables with blobs.
Fixed bug in using aggregate functions as argument for INTERVAL, CASE, FIELD, CONCAT_WS, ELT and MAKE_SET functions.
When running with --lower-case-table-names (default on Windows) and you had tables or databases with mixed case on disk, then executing SHOW TABLE STATUS followed with DROP DATABASE or DROP TABLE could fail with Errcode 13.
Functionality added or changed:
Added option --log-error[=file_name] to mysqld_safe and mysqld. This option will force all error messages to be put in a log file if the option --console is not given. On Windows --log-error is enabled as default, with a default name of host_name.err if the name is not specified.
Changed some things from Warning: to Note: in the log files.
The mysqld server should now compile on NetWare.
Added optimization that if one does GROUP BY ... ORDER BY NULL then result is not sorted.
New --ft-stopword-file command-line option for mysqld to replace/disable the built-in stopword list that is used in full-text searches. See the section called “Server System Variables”.
Changed default stack size from 64KB to 192KB; This fixes a core dump problem on Red Hat 8.0 and other systems with a glibc that requires a stack size larger than 128K for gethostbyaddr() to resolve a hostname. You can fix this for earlier MySQL versions by starting mysqld with --thread-stack=192K.
Added mysql_waitpid to the binary distribution and the MySQL-client RPM subpackage (required for mysql-test-run).
Renamed the main MySQL RPM package to MySQL-server. When updating from an older version, MySQL-server.rpm will simply replace MySQL.rpm.
If a slave is configured with replicate_wild_do_table=db.% or replicate_wild_ignore_table=db.%, these rules will be applied to CREATE/DROP DATABASE, too.
Added timeout value for MASTER_POS_WAIT().
Bugs fixed:
Fixed initialization of the random seed for newly created threads to give a better rand() distribution from the first call.
Fixed a bug that caused mysqld to hang when a table was opened with the HANDLER command and then dropped without being closed.
Fixed bug in logging to binary log (which affects replication) a query that inserts a NULL in an AUTO_INCREMENT column and also uses LAST_INSERT_ID().
Fixed an unlikely bug that could cause a memory overrun when using ORDER BY constant_expression.
Fixed a table corruption in myisamchk parallel repair mode.
Fixed bug in query cache invalidation on simple table renaming.
Fixed bug in mysqladmin --relative.
On some 64-bit systems, show status reported a strange number for Open_files and Open_streams.
Fixed incorrect number of columns in EXPLAIN on empty table.
Fixed bug in LEFT JOIN that caused zero rows to be returned in the case the WHERE condition was evaluated as FALSE after reading const tables. (Unlikely condition).
FLUSH PRIVILEGES didn't correctly flush table/column privileges when mysql.tables_priv is empty.
Fixed bug in replication when using LOAD DATA INFILE one a file that updated an AUTO_INCREMENT column with NULL or 0. This bug only affected MySQL 4.0 masters (not slaves or MySQL 3.23 masters). Note: If you have a slave that has replicated a file with generated AUTO_INCREMENT columns then the slave data is corrupted and you should reinitialize the affected tables from the master.
Fixed possible memory overrun when sending a BLOB value larger than 16M to the client.
Fixed incorrect error message when setting a NOT NULL column to an expression that returned NULL.
Fixed core dump bug in str LIKE "%other_str%" where str or other_str contained characters >= 128.
Fixed bug: When executing on master LOAD DATA and InnoDB failed with table full error the binary log was corrupted.
Functionality added or changed:
OPTIMIZE TABLE will for MyISAM tables treat all NULL values as different when calculating cardinality. This helps in optimizing joins between tables where one of the tables has a lot of NULL values in a indexed column:
SELECT * from t1, t2 where t1.a=t2.key_with_a_lot_of_null;
Added join operator FORCE INDEX (key_list). This acts likes USE INDEX (key_list) but with the addition that a table scan is assumed to be VERY expensive. One bad thing with this is that it makes FORCE a reserved word.
Reset internal row buffer in MyISAM after each query. This will reduce memory in the case you have a lot of big blobs in a table.
Bugs fixed:
A security patch in 4.0.8 causes the mysqld server to die if the remote hostname can't be resolved. This is now fixed.
Fixed crash when replication big LOAD DATA INFILE statement that caused log rotation.
Functionality added or changed:
Default max_packet_length for libmysqld.c is now 1024*1024*1024.
You can now specify max_allowed_packet in a file read by mysql_options(MYSQL_READ_DEFAULT_FILE). for clients.
When sending a too big packet to the server with the not compressed protocol, the client now gets an error message instead of a lost connection.
We now send big queries/result rows in bigger hunks, which should give a small speed improvement.
Fixed some bugs with the compressed protocol for rows > 16MB.
InnoDB tables now also support ON UPDATE CASCADE in FOREIGN KEY constraints. See the InnoDB section in the manual for the InnoDB changelog.
Bugs fixed:
Fixed bug in ALTER TABLE with BDB tables.
Fixed core dump bug in QUOTE() function.
Fixed a bug in handling communication packets bigger than 16MB. Unfortunately this required a protocol change; If you upgrade the server to 4.0.8 and above and have clients that uses packets >= 255*255*255 bytes (=16581375) you must also upgrade your clients to at least 4.0.8. If you don't upgrade, the clients will hang when sending a big packet.
Fixed bug when sending blobs longer than 16MB to client.
Fixed bug in GROUP BY when used on BLOB column with NULL values.
Fixed a bug in handling NULL values in CASE ... WHEN ...
Functionality added or changed:
mysqlbug now also reports the compiler version used for building the binaries (if the compiler supports the option --version).
Bugs fixed:
Fixed compilation problems on OpenUnix and HPUX 10.20.
Fixed some optimization problems when compiling MySQL with -DBIG_TABLES on a 32-bit system.
mysql_drop_db() didn't check permissions properly so anyone could drop another users database. DROP DATABASE is checked properly.
Functionality added or changed:
Added syntax support for CHARACTER SET xxx and CHARSET=xxx table options (to be able to read table dumps from 4.1).
Fixed replication bug that caused the slave to loose its position in some cases when the replication log was rotated.
Fixed that a slave will restart from the start of a transaction if it's killed in the middle of one.
Moved the manual pages from man to man/man1 in the binary distributions.
The default type returned by IFNULL(A,B) is now set to be the more 'general' of the types of A and B. (The order is STRING, REAL or INTEGER).
Moved the mysql.server startup script in the RPM packages from /etc/rc.d/init.d/mysql to /etc/init.d/mysql (which almost all current Linux distributions support for LSB compliance).
Added Qcache_lowmem_prunes status variable (number of queries that were deleted from the cache because of low memory).
Fixed mysqlcheck so it can deal with table names containing dashes.
Bulk insert optimization (see bulk_insert_buffer_size) is no longer used when inserting small (less than 100) number of rows.
Optimization added for queries like SELECT ... FROM merge_table WHERE indexed_column=constant_expr.
Added functions LOCALTIME and LOCALTIMESTAMP as synonyms for NOW().
CEIL is now an alias for CEILING.
The CURRENT_USER() function can be used to get a user@host value as it was matched in the GRANT system. See CURRENT_USER().
Fixed CHECK constraints to be compatible with standard SQL. This made CHECK a reserved word. (Checking of CHECK constraints is still not implemented).
Added CAST(... as CHAR).
Added PostgreSQL compatible LIMIT syntax: SELECT ... LIMIT row_count OFFSET offset
mysql_change_user() will now reset the connection to the state of a fresh connect (Ie, ROLLBACK any active transaction, close all temporary tables, reset all user variables etc..)
CHANGE MASTER and RESET SLAVE now require that slave threads be both already stopped; these commands will return an error if at least one of these two threads is running.
Bugs fixed:
Fixed number of found rows returned in multi table updates
Make --lower-case-table-names default on Mac OS X as the default filesystem (HFS+) is case insensitive. See the section called “Identifier Case Sensitivity”.
Transactions in AUTOCOMMIT=0 mode didn't rotate binary log.
A fix for the bug in a SELECT with joined tables with ORDER BY and LIMIT clause when filesort had to be used. In that case LIMIT was applied to filesort of one of the tables, although it could not be. This fix also solved problems with LEFT JOIN.
mysql_server_init() now makes a copy of all arguments. This fixes a problem when using the embedded server in C# program.
Fixed buffer overrun in libmysqlclient library that allowed a malicious MySQL server to crash the client application.
Fixed security-related bug in mysql_change_user() handling. All users are strongly recommended to upgrade to version 4.0.6.
Fixed bug that prevented --chroot command-line option of mysqld from working.
Fixed bug in phrase operator "..." in boolean full-text search.
Fixed bug that caused OPTIMIZE TABLE to corrupt the table under some rare circumstances.
Part rewrite of multiple-table-update to optimize it, make it safer and more bug-free.
LOCK TABLES now works together with multiple-table-update and multiple-table-delete.
--replicate-do=xxx didn't work for UPDATE commands. (Bug introduced in 4.0.0)
Fixed shutdown problem on Mac OS X.
Major InnoDB bugs in REPLACE, AUTO_INCREMENT, INSERT INTO ... SELECT ... were fixed. See the InnoDB changelog in the InnoDB section of the manual.
RESET SLAVE caused a crash if the slave threads were running.
Functionality added or changed:
Port number was added to hostname (if it is known) in SHOW PROCESSLIST command
Changed handling of last argument in WEEK() so that you can get week number according to the ISO 8601 specification. (Old code should still work).
Fixed that INSERT DELAYED threads don't hang on Waiting for INSERT when one sends a SIGHUP to mysqld.
Change that AND works according to standard SQL when it comes to NULL handling. In practice, this affects only queries where you do something like WHERE ... NOT (NULL AND 0).
mysqld will now resolve basedir to its full path (with realpath()). This enables one to use relative symlinks to the MySQL installation directory. This will however cause show variables to report different directories on systems where there is a symbolic link in the path.
Fixed that MySQL will not use index scan on index disabled with IGNORE INDEX or USE INDEX. to be ignored.
Added --use-frm option to mysqlcheck. When used with REPAIR TABLE, it gets the table structure from the .frm file, so the table can be repaired even if the .MYI header is corrupted.
Fixed bug in MAX() optimization when used with JOIN and ON expressions.
Added support for reading of MySQL 4.1 table definition files.
BETWEEN behavior changed (see the section called “Comparison Functions and Operators”). Now datetime_col BETWEEN timestamp AND timestamp should work as expected.
One can create TEMPORARY MERGE tables now.
DELETE FROM myisam_table now shrinks not only the .MYD file but also the .MYI file.
When one uses the --open-files-limit=# option to mysqld_safe it's now passed on to mysqld.
Changed output from EXPLAIN from 'where used' to 'Using where' to make it more in line with other output.
Removed variable safe_show_database as it was no longer used.
Updated source tree to be built using automake 1.5 and libtool 1.4.
Fixed an inadvertently changed option (--ignore-space) back to the original --ignore-spaces in mysqlclient. (Both syntaxes will work).
Don't require UPDATE privilege when using REPLACE.
Added support for DROP TEMPORARY TABLE ..., to be used to make replication safer.
When transactions are enabled, all commands that update temporary tables inside a BEGIN/COMMIT are now stored in the binary log on COMMIT and not stored if one does ROLLBACK. This fixes some problems with non-transactional temporary tables used inside transactions.
Allow braces in joins in all positions. Formerly, things like SELECT * FROM (t2 LEFT JOIN t3 USING (a)), t1 worked, but not SELECT * FROM t1, (t2 LEFT JOIN t3 USING (a)). Note that braces are simply removed, they do not change the way the join is executed.
InnoDB now supports also isolation levels READ UNCOMMITTED and READ COMMITTED. For a detailed InnoDB changelog, see the section called “InnoDB Change History” in this manual.
Bugs fixed:
Fixed bug in MAX() optimization when used with JOIN and ON expressions.
Fixed that INSERT DELAY threads don't hang on Waiting for INSERT when one sends a SIGHUP to mysqld.
Fixed that MySQL will not use an index scan on an index that has been disabled with IGNORE INDEX or USE INDEX.
Corrected test for root user in mysqld_safe.
Fixed error message issued when storage engine cannot do CHECK TABLE or REPAIR TABLE.
Fixed rare core dump problem in complicated GROUP BY queries that didn't return any result.
Fixed mysqlshow to work properly with wildcarded database names and with database names that contain underscores.
Portability fixes to get MySQL to compile cleanly with Sun Forte 5.0.
Fixed MyISAM crash when using dynamic-row tables with huge numbers of packed columns.
Fixed query cache behavior with BDB transactions.
Fixed possible floating point exception in MATCH relevance calculations.
Fixed bug in full-text search IN BOOLEAN MODE that made MATCH to return incorrect relevance value in some complex joins.
Fixed a bug that limited MyISAM key length to a value slightly less that 500. It is exactly 500 now.
Fixed that GROUP BY on columns that may have a NULL value doesn't always use disk based temporary tables.
The filename argument for the --des-key-file argument to mysqld is interpreted relative to the data directory if given as a relative pathname.
Removed a condition that temp table with index on column that can be NULL has to be MyISAM. This was okay for 3.23, but not needed in 4.*. This resulted in slowdown in many queries since 4.0.2.
Small code improvement in multiple-table updates.
Fixed a newly introduced bug that caused ORDER BY ... LIMIT row_count to not return all rows.
Fixed a bug in multiple-table deletes when outer join is used on an empty table, which gets first to be deleted.
Fixed a bug in multiple-table updates when a single table is updated.
Fixed bug that caused REPAIR TABLE and myisamchk to corrupt FULLTEXT indexes.
Fixed bug with caching the mysql grant table database. Now queries in this database are not cached in the query cache.
Small fix in mysqld_safe for some shells.
Give error if a MyISAM MERGE table has more than 2 ^ 32 rows and MySQL was not compiled with -DBIG_TABLES.
Fixed some ORDER BY ... DESC problems with InnoDB tables.
Fixed bug where GRANT/REVOKE failed if hostname was given in non-matching case.
Don't give warning in LOAD DATA INFILE when setting a timestamp to a string value of '0'.
Fixed bug in myisamchk -R mode.
Fixed bug that caused mysqld to crash on REVOKE.
Fixed bug in ORDER BY when there is a constant in the SELECT statement.
One didn't get an error message if mysqld couldn't open the privilege tables.
SET PASSWORD FOR ... closed the connection in case of errors (bug from 4.0.3).
Increased maximum possible max_allowed_packet in mysqld to 1GB.
Fixed bug when doing a multiple-row INSERT on a table with an AUTO_INCREMENT key which was not in the first part of the key.
Changed LOAD DATA INFILE to not re-create index if the table had rows from before.
Fixed overrun bug when calling AES_DECRYPT() with incorrect arguments.
--skip-ssl can now be used to disable SSL in the MySQL clients, even if one is using other SSL options in an option file or previously on the command line.
Fixed bug in MATCH ... AGAINST( ... IN BOOLEAN MODE) used with ORDER BY.
Added LOCK TABLES and CREATE TEMPORARY TABLES privilege on the database level. You must run the mysql_fix_privilege_tables script on old installations to activate these.
In SHOW TABLE ... STATUS, compressed tables sometimes showed up as dynamic.
SELECT @@[global|session].var_name didn't report global | session in the result column name.
Fixed problem in replication that FLUSH LOGS in a circular replication setup created an infinite number of binary log files. Now a rotate-binary-log command in the binary log will not cause slaves to rotate logs.
Removed STOP EVENT from binary log when doing FLUSH LOGS.
Disable the use of SHOW NEW MASTER FOR SLAVE as this needs to be completely reworked in a future release.
Fixed a bug with constant expression (for example, column of a one-row table, or column from a table, referenced by a UNIQUE key) appeared in ORDER BY part of SELECT DISTINCT.
--log-binary=a.b.c now properly strips off .b.c.
FLUSH LOGS removed numerical extension for all future update logs.
GRANT ... REQUIRE didn't store the SSL information in the mysql.user table if SSL was not enabled in the server.
GRANT ... REQUIRE NONE can now be used to remove SSL information.
AND is now optional between REQUIRE options.
REQUIRE option was not properly saved, which could cause strange output in SHOW GRANTS.
Fixed that mysqld --help reports correct values for --datadir and --bind-address.
Fixed that one can drop UDFs that didn't exist when mysqld was started.
Fixed core dump problem with SHOW VARIABLES on some 64-bit systems (like Solaris SPARC).
Fixed a bug in my_getopt(); --set-variable syntax didn't work for those options that didn't have a valid variable in the my_option struct. This affected at least the default-table-type option.
Fixed a bug from 4.0.2 that caused REPAIR TABLE and myisamchk --recover to fail on tables with duplicates in a unique key.
Fixed a bug from 4.0.3 in calculating the default data type for some functions. This affected queries of type CREATE TABLE tbl_name SELECT expression(),...
Fixed bug in queries of type SELECT * FROM table-list GROUP BY ... and SELECT DISTINCT * FROM ....
Fixed bug with the --slow-log when logging an administrator command (like FLUSH TABLES).
Fixed a bug that OPTIMIZE TABLE of locked and modified table, reported table corruption.
Fixed a bug in my_getopt() in handling of special prefixes (--skip-, --enable-). --skip-external-locking didn't work and the bug may have affected other similar options.
Fixed bug in checking for output file name of the tee option.
Added some more optimization to use index for SELECT ... FROM many_tables .. ORDER BY key limit #
Fixed problem in SHOW OPEN TABLES when a user didn't have access permissions to one of the opened tables.
Fixed problem with types of user variables. (Bug #551)
Fixed problem with configure ... --localstatedir=....
Cleaned up mysql.server script.
Fixed a bug in mysqladmin shutdown when pid file was modified while mysqladmin was still waiting for the previous one to disappear. This could happen during a very quick restart and caused mysqladmin to hang until shutdown_timeout seconds had passed.
Don't increment warnings when setting AUTO_INCREMENT columns to NULL in LOAD DATA INFILE.
Fixed all boolean type variables/options to work with the old syntax, for example, all of these work: --lower-case-table-names, --lower-case-table-names=1, -O lower-case-table-names=1, --set-variable=lower-case-table-names=1
Fixed shutdown problem (SIGTERM signal handling) on Solaris. (Bug from 4.0.2).
SHOW MASTER STATUS now returns an empty set if binary log is not enabled.
SHOW SLAVE STATUS now returns an empty set if slave is not initialized.
Don't update MyISAM index file on update if not strictly necessary.
Fixed bug in SELECT DISTINCT ... FROM many_tables ORDER BY not-used-column.
Fixed a bug with BIGINT values and quoted strings.
Added QUOTE() function that performs SQL quoting to produce values that can be used as data values in queries.
Changed variable DELAY_KEY_WRITE to an enumeration to allow it to be set for all tables without taking down the server.
Changed behavior of IF(condition,column,NULL) so that it returns the value of the column type.
Made safe_mysqld a symlink to mysqld_safe in binary distribution.
Fixed security bug when having an empty database name in the user.db table.
Fixed some problems with CREATE TABLE ... SELECT function().
mysqld now has the option --temp-pool enabled by default as this gives better performance with some operating systems.
Fixed problem with too many allocated alarms on slave when connecting to master many times (normally not a very critical error).
Fixed hang in CHANGE MASTER TO if the slave thread died very quickly.
Big cleanup in replication code (less logging, better error messages, etc..)
If the --code-file option is specified, the server calls setrlimit() to set the maximum allowed core file size to unlimited, so core files can be generated.
Fixed bug in query cache after temporary table creation.
Added --count=N (-c) option to mysqladmin, to make the program do only N iterations. To be used with --sleep (-i). Useful in scripts.
Fixed bug in multiple-table UPDATE: when updating a table, do_select() became confused about reading records from a cache.
Fixed bug in multiple-table UPDATE when several columns were referenced from a single table
Fixed bug in truncating nonexisting table.
Fixed bug in REVOKE that caused user resources to be randomly set.
Fixed bug in GRANT for the new CREATE TEMPORARY TABLE privilege.
Fixed bug in multiple-table DELETE when tables are re-ordered in the table initialization method and ref_lengths are of different sizes.
Fixed two bugs in SELECT DISTINCT with large tables.
Fixed bug in query cache initialization with very small query cache size.
Allow DEFAULT with INSERT statement.
The startup parameters myisam_max_sort_file_size and myisam_max_extra_sort_file_size are now given in bytes, not megabytes.
External system locking of MyISAM/ISAM files is now turned off by default. One can turn this on with --external-locking. (For most users this is never needed).
Fixed core dump bug with INSERT ... SET db_name.tbl_name.col_name=''.
Fixed client hangup bug when using some SQL commands with incorrect syntax.
Fixed a timing bug in DROP DATABASE
New SET [GLOBAL | SESSION] syntax to change thread-specific and global system variables at runtime.
Added variable slave_compressed_protocol.
Renamed variable query_cache_startup_type to query_cache_type, myisam_bulk_insert_tree_size to bulk_insert_buffer_size, record_buffer to read_buffer_size and record_rnd_buffer to read_rnd_buffer_size.
Renamed some SQL variables, but old names will still work until 5.0. See the section called “Upgrading from Version 3.23 to 4.0”.
Renamed --skip-locking to --skip-external-locking.
Removed unused variable query_buffer_size.
Fixed a bug that made the pager option in the mysql client non-functional.
Added full AUTO_INCREMENT support to MERGE tables.
Extended LOG() function to accept an optional arbitrary base parameter. See the section called “Mathematical Functions”.
Added LOG2() function (useful for finding out how many bits a number would require for storage).
Added LN() natural logarithm function for compatibility with other databases. It is synonymous with LOG(X).
Cleaned up NULL handling for default values in DESCRIBE tbl_name.
Fixed TRUNCATE() to round up negative values to the nearest integer.
Changed --chroot=path option to execute chroot() immediately after all options have been parsed.
Don't allow database names that contain ‘\’.
lower_case_table_names now also applies to database names.
Added XOR operator (logical and bitwise XOR) with ^ as a synonym for bitwise XOR.
Added function IS_FREE_LOCK("lock_name"). Based on code contributed by Hartmut Holzgraefe mailto:hartmut@@six.de.
Removed mysql_ssl_clear() from C API, as it was not needed.
DECIMAL and NUMERIC types can now read exponential numbers.
Added SHA1() function to calculate 160 bit hash value as described in RFC 3174 (Secure Hash Algorithm). This function can be considered a cryptographically more secure equivalent of MD5(). See the section called “Encryption Functions”.
Added AES_ENCRYPT() and AES_DECRYPT() functions to perform encryption according to AES standard (Rijndael). See the section called “Encryption Functions”.
Added --single-transaction option to mysqldump, allowing a consistent dump of InnoDB tables. See the section called “The mysqldump Database Backup Program”.
Fixed bug in innodb_log_group_home_dir in SHOW VARIABLES.
Fixed a bug in optimizer with merge tables when non-unique values are used in summing up (causing crashes).
Fixed a bug in optimizer when a range specified makes index grouping impossible (causing crashes).
Fixed a rare bug when FULLTEXT index is present and no tables are used.
Added privileges CREATE TEMPORARY TABLES, EXECUTE, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES and SUPER. To use these, you must have run the mysql_fix_privilege_tables script after upgrading.
Fixed query cache align data bug.
Fixed mutex bug in replication when reading from master fails.
Added missing mutex in TRUNCATE TABLE; This fixes some core dump/hangup problems when using TRUNCATE TABLE.
Fixed bug in multiple-table DELETE when optimizer uses only indexes.
Fixed that ALTER TABLE tbl_name RENAME new_tbl_name is as fast as RENAME TABLE.
Fixed bug in GROUP BY with two or more columns, where at least one column can contain NULL values.
Use Turbo Boyer-Moore algorithm to speed up LIKE "%keyword%" searches.
Fixed bug in DROP DATABASE with symlink.
Fixed crash in REPAIR ... USE_FRM.
Fixed bug in EXPLAIN with LIMIT offset != 0.
Fixed bug in phrase operator "..." in boolean full-text search.
Fixed bug that caused duplicated rows when using truncation operator * in boolean full-text search.
Fixed bug in truncation operator of boolean full-text search (incorrect results when there are only +word*s in the query).
Fixed bug in boolean full-text search that caused a crash when an identical MATCH expression that did not use an index appeared twice.
Query cache is now automatically disabled in mysqldump.
Fixed problem on Windows 98 that made sending of results very slow.
Boolean full-text search weighting scheme changed to something more reasonable.
Fixed bug in boolean full-text search that caused MySQL to ignore queries of ft_min_word_len characters.
Boolean full-text search now supports “phrase searches.”
New configure option --without-query-cache.
Memory allocation strategy for “root memory” changed. Block size now grows with number of allocated blocks.
INET_NTOA() now returns NULL if you give it an argument that is too large (greater than the value corresponding to 255.255.255.255).
Fix SQL_CALC_FOUND_ROWS to work with UNION. It will work only if the first SELECT has this option and if there is global LIMIT for the entire statement. For the moment, this requires using parentheses for individual SELECT queries within the statement.
Fixed bug in SQL_CALC_FOUND_ROWS and LIMIT.
Don't give an error for CREATE TABLE ...(... VARCHAR(0)).
Fixed SIGINT and SIGQUIT problems in mysql.cc on Linux with some glibc versions.
Fixed bug in convert.cc, which is caused by having an incorrect net_store_length() linked in the CONVERT::store() method.
DOUBLE and FLOAT columns now honor the UNSIGNED flag on storage.
InnoDB now retains foreign key constraints through ALTER TABLE and CREATE/DROP INDEX.
InnoDB now allows foreign key constraints to be added through the ALTER TABLE syntax.
InnoDB tables can now be set to automatically grow in size (autoextend).
Added --ignore-lines=n option to mysqlimport. This has the same effect as the IGNORE n LINES clause for LOAD DATA.
Fixed bug in UNION with last offset being transposed to total result set.
REPAIR ... USE_FRM added.
Fixed that DEFAULT_SELECT_LIMIT is always imposed on UNION result set.
Fixed that some SELECT options can appear only in the first SELECT.
Fixed bug with LIMIT with UNION, where last select is in the braces.
Fixed that full-text works fine with UNION operations.
Fixed bug with indexless boolean full-text search.
Fixed bug that sometimes appeared when full-text search was used with const tables.
Fixed incorrect error value when doing a SELECT with an empty HEAP table.
Use ORDER BY column DESC now sorts NULL values first. (In other words, NULL values sort first in all cases, whether or not DESC is specified.) This is changed back in 4.0.10.
Fixed bug in WHERE key_name='constant' ORDER BY key_name DESC.
Fixed bug in SELECT DISTINCT ... ORDER BY DESC optimization.
Fixed bug in ... HAVING 'GROUP_FUNCTION'(xxx) IS [NOT] NULL.
Fixed bug in truncation operator for boolean full-text search.
Allow value of --user=# option for mysqld to be specified as a numeric user ID.
Fixed a bug where SQL_CALC_ROWS returned an incorrect value when used with one table and ORDER BY and with InnoDB tables.
Fixed that SELECT 0 LIMIT 0 doesn't hang thread.
Fixed some problems with USE/IGNORE INDEX when using many keys with the same start column.
Don't use table scan with BerkeleyDB and InnoDB tables when we can use an index that covers the whole row.
Optimized InnoDB sort-buffer handling to take less memory.
Fixed bug in multiple-table DELETE and InnoDB tables.
Fixed problem with TRUNCATE and InnoDB tables that produced the error Can't execute the given command because you have active locked tables or an active transaction.
Added NO_UNSIGNED_SUBTRACTION to the set of flags that may be specified with the --sql-mode option for mysqld. It disables unsigned arithmetic rules when it comes to subtraction. (This will make MySQL 4.0 behave more like 3.23 with UNSIGNED columns).
The result returned for all bit functions (|, <<, ...) is now of type unsigned integer.
Added detection of nan values in MyISAM to make it possible to repair tables with nan in float or double columns.
Fixed new bug in myisamchk where it didn't correctly update number of “parts” in the MyISAM index file.
Changed to use autoconf 2.52 (from autoconf 2.13).
Fixed optimization problem where the MySQL Server was in “preparing” state for a long time when selecting from an empty table which had contained a lot of rows.
Fixed bug in complicated join with const tables. This fix also improves performance a bit when referring to another table from a const table.
First pre-version of multiple-table UPDATE statement.
Fixed bug in multiple-table DELETE.
Fixed bug in SELECT CONCAT(argument_list) ... GROUP BY 1.
INSERT ... SELECT did a full rollback in case of an error. Fixed so that we only roll back the last statement in the current transaction.
Fixed bug with empty expression for boolean full-text search.
Fixed core dump bug in updating full-text key from/to NULL.
ODBC compatibility: Added BIT_LENGTH() function.
Fixed core dump bug in GROUP BY BINARY column.
Added support for NULL keys in HEAP tables.
Use index for ORDER BY in queries of type: SELECT * FROM t WHERE key_part1=1 ORDER BY key_part1 DESC, key_part2 DESC
Fixed bug in FLUSH QUERY CACHE.
Added CAST() and CONVERT() functions. The CAST and CONVERT functions are nearly identical and mainly useful when you want to create a column with a specific type in a CREATE ... SELECT statement. For more information, read the section called “Cast Functions and Operators”.
CREATE ... SELECT on DATE and TIME functions now create columns of the expected type.
Changed order in which keys are created in tables.
Added new columns Null and Index_type to SHOW INDEX output.
Added --no-beep and --prompt options to mysql command-line client.
New feature: management of user resources.
GRANT ... WITH MAX_QUERIES_PER_HOUR N1 MAX_UPDATES_PER_HOUR N2 MAX_CONNECTIONS_PER_HOUR N3;
Added mysql_secure_installation to the scripts/ directory.
Added system command to mysql.
Fixed bug when HANDLER was used with some unsupported table type.
mysqldump now puts ALTER TABLE tbl_name DISABLE KEYS and ALTER TABLE tbl_name ENABLE KEYS in the sql dump.
Added mysql_fix_extensions script.
Fixed stack overrun problem with LOAD DATA FROM MASTER on OSF/1.
Fixed shutdown problem on HP-UX.
Added DES_ENCRYPT() and DES_DECRYPT() functions.
Added FLUSH DES_KEY_FILE statement.
Added --des-key-file option to mysqld.
HEX(str) now returns the characters in str converted to hexadecimal.
Fixed problem with GRANT when using lower_case_table_names=1.
Changed SELECT ... IN SHARE MODE to SELECT ... LOCK IN SHARE MODE (as in MySQL 3.23).
A new query cache to cache results from identical SELECT queries.
Fixed core dump bug on 64-bit machines when it got an incorrect communication packet.
MATCH ... AGAINST(... IN BOOLEAN MODE) can now work without FULLTEXT index.
Fixed slave to replicate from 3.23 master.
Miscellaneous replication fixes/cleanup.
Got shutdown to work on Mac OS X.
Added myisam/ft_dump utility for low-level inspection of FULLTEXT indexes.
Fixed bug in DELETE ... WHERE ... MATCH ....
Added support for MATCH ... AGAINST(... IN BOOLEAN MODE). Note: You must rebuild your tables with ALTER TABLE tbl_name TYPE=MyISAM to be able to use boolean full-text search.
LOCATE() and INSTR() are now case sensitive if either argument is a binary string.
Changed RAND() initialization so that RAND(N) and RAND(N+1) are more distinct.
Fixed core dump bug in UPDATE ... ORDER BY.
In 3.23, INSERT INTO ... SELECT always had IGNORE enabled. Now MySQL will stop (and possibly roll back) by default in case of an error unless you specify IGNORE.
Ignore DATA DIRECTORY and INDEX DIRECTORY directives on Windows.
Added boolean full-text search code. It should be considered early alpha.
Extended MODIFY and CHANGE in ALTER TABLE to accept the FIRST and AFTER keywords.
Indexes are now used with ORDER BY on a whole InnoDB table.
Added --xml option to mysql for producing XML output.
Added full-text variables ft_min_word_len, ft_max_word_len, and ft_max_word_len_for_sort system variables.
Added full-text variables ft_min_word_len, ft_max_word_len, and ft_max_word_len_for_sort variables to myisamchk.
Added documentation for libmysqld, the embedded MySQL server library. Also added example programs (a mysql client and mysqltest test program) which use libmysqld.
Removed all Gemini hooks from MySQL server.
Removed my_thread_init() and my_thread_end() from mysql_com.h, and added mysql_thread_init() and mysql_thread_end() to mysql.h.
Support for communication packets > 16MB. In 4.0.1 we will extend MyISAM to be able to handle these.
Secure connections (with SSL).
Unsigned BIGINT constants now work. MIN() and MAX() now handle signed and unsigned BIGINT numbers correctly.
New character set latin1_de which provides correct German sorting.
STRCMP() now uses the current character set when doing comparisons, which means that the default comparison behavior now is case insensitive.
TRUNCATE TABLE and DELETE FROM tbl_name are now separate functions. One bonus is that DELETE FROM tbl_name now returns the number of deleted rows, rather than zero.
DROP DATABASE now executes a DROP TABLE on all tables in the database, which fixes a problem with InnoDB tables.
Added support for UNION.
Added support for multiple-table DELETE operations.
A new HANDLER interface to MyISAM tables.
Added support for INSERT on MERGE tables. Patch from Benjamin Pflugmann.
Changed WEEK(date,0) to match the calendar in the USA.
COUNT(DISTINCT) is about 30% faster.
Speed up all internal list handling.
Speed up IS NULL, ISNULL() and some other internal primitives.
Full-text index creation now is much faster.
Tree-like cache to speed up bulk inserts and myisam_bulk_insert_tree_size variable.
Searching on packed (CHAR/VARCHAR) keys is now much faster.
Optimized queries of type: SELECT DISTINCT * FROM tbl_name ORDER by key_part1 LIMIT row_count.
SHOW CREATE TABLE now shows all table attributes.
ORDER BY ... DESC can now use keys.
LOAD DATA FROM MASTER “automatically” sets up a slave.
Renamed safe_mysqld to mysqld_safe to make this name more in line with other MySQL scripts/commands.
Added support for symbolic links to MyISAM tables. Symlink handling is now enabled by default for Windows.
Added SQL_CALC_FOUND_ROWS and FOUND_ROWS(). This makes it possible to know how many rows a query would have returned without a LIMIT clause.
Changed output format of SHOW OPEN TABLES.
Allow SELECT expression LIMIT ....
Added ORDER BY syntax to UPDATE and DELETE.
SHOW INDEXES is now a synonym for SHOW INDEX.
Added ALTER TABLE tbl_name DISABLE KEYS and ALTER TABLE tbl_name ENABLE KEYS commands.
Allow use of IN as a synonym for FROM in SHOW commands.
Implemented “repair by sort” for FULLTEXT indexes. REPAIR TABLE, ALTER TABLE, and OPTIMIZE TABLE for tables with FULLTEXT indexes are now up to 100 times faster.
Allow standard SQL syntax X'hexadecimal-number'.
Cleaned up global lock handling for FLUSH TABLES WITH READ LOCK.
Fixed problem with DATETIME = constant in WHERE optimization.
Added --master-data and --no-autocommit options to mysqldump. (Thanks to Brian Aker for this.)
Added script mysql_explain_log.sh to distribution. (Thanks to mobile.de).